Skip to content

Commit 911cfd8

Browse files
committed
add Member setting, Team setting, FolderSetting(80%)
bump react-select
1 parent 3539bd1 commit 911cfd8

15 files changed

Lines changed: 985 additions & 188 deletions

File tree

browser/main/HomePage/ArticleNavigator.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import Preferences from 'boost/components/modal/Preferences'
88
import CreateNewFolder from 'boost/components/modal/CreateNewFolder'
99

1010
export default class ArticleNavigator extends React.Component {
11-
// componentDidMount () {
12-
// this.handlePreferencesButtonClick()
13-
// }
11+
componentDidMount () {
12+
this.handlePreferencesButtonClick()
13+
}
1414

1515
handlePreferencesButtonClick (e) {
1616
openModal(Preferences)
@@ -51,7 +51,7 @@ export default class ArticleNavigator extends React.Component {
5151

5252
return (
5353
<button onClick={e => this.handleFolderButtonClick(folder.name)(e)} key={'folder-' + folder.id} className={isActive ? 'active' : ''}>
54-
<FolderMark id={folder.id}/> {folder.name} {folder.public ? <i className='fa fa-fw fa-lock'/> : null}</button>
54+
<FolderMark id={folder.id}/> {folder.name} {folder.public ? null : <i className='fa fa-fw fa-lock'/>}</button>
5555
)
5656
})
5757
: []

browser/styles/main/HomeContainer/components/ArticleNavigator.styl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ articleNavBgColor = #353535
1515
color brandColor
1616
font-size 28px
1717
padding 6px 0 0 10px
18+
white-space nowrap
19+
text-overflow ellipsis
20+
overflow-x hidden
1821
.userName
1922
color white
2023
padding-left 20px

browser/styles/main/HomeContainer/lib/Preferences.styl

Lines changed: 298 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ iptFocusBorderColor = #369DCD
5858
absolute right bottom
5959
top 50px
6060
left 180px
61+
overflow-y auto
6162
&>.section
6263
padding 10px
6364
border-bottom 1px solid borderColor
@@ -119,8 +120,304 @@ iptFocusBorderColor = #369DCD
119120
&.success
120121
background-color successBackgroundColor
121122
color successTextColor
122-
123+
&.AppSettingTab
123124
.description
124125
marked()
126+
&.TeamSettingTab
127+
.header
128+
border-bottom 1px solid borderColor
129+
padding 10px
130+
font-size 18px
131+
color brandColor
132+
line-height 33px
133+
.teamSelect
134+
border 1px solid borderColor
135+
height 33px
136+
width 200px
137+
margin 0 10px
138+
outline none
139+
font-size 14px
140+
&:focus
141+
border-color iptFocusBorderColor
142+
.teamDeleteConfirm
143+
144+
label
145+
line-height 33px
146+
font-size 14px
147+
.teamDelete
148+
label
149+
line-height 33px
150+
font-size 18px
151+
color brandColor
152+
.teamDelete, .teamDeleteConfirm
153+
padding 15px 20px 15px 15px
154+
button
155+
background-color white
156+
height 33px
157+
font-size 14px
158+
padding 0 15px
159+
border 1px solid borderColor
160+
float right
161+
margin 0 5px
162+
border-radius 5px
163+
&:hover
164+
background-color darken(white, 10%)
165+
button.deleteBtn
166+
background-color brandColor
167+
border none
168+
color white
169+
&:hover
170+
background-color lighten(brandColor, 10%)
171+
&.MemberSettingTab
172+
&>.header
173+
border-bottom 1px solid borderColor
174+
padding 10px
175+
font-size 18px
176+
color brandColor
177+
line-height 33px
178+
.teamSelect
179+
border 1px solid borderColor
180+
height 33px
181+
width 200px
182+
margin 0 10px
183+
outline none
184+
font-size 14px
185+
&:focus
186+
border-color iptFocusBorderColor
187+
.membersTableSection
188+
.addMember
189+
clearfix()
190+
padding 10px
191+
.addMemberLabel
192+
font-size 14px
193+
line-height 33px
194+
float left
195+
.addMemberControl
196+
width 330px
197+
float left
198+
margin-left 25px
199+
.Select
200+
display block
201+
margin 0
202+
float left
203+
width 280px
204+
height 33px
205+
font-size 14px
206+
border none
207+
line-height 33px
208+
background-color transparent
209+
outline none
210+
&.is-focus
211+
.Select-control
212+
border-color iptFocusBorderColor
213+
.Select-control
214+
height 33px
215+
line-height 33px
216+
padding 0 0 0 15px
217+
border-radius 5px 0 0 5px
218+
border 1px solid borderColor
219+
border-right none
220+
.Select-placeholder
221+
padding 0 0 0 15px
222+
.Seleect-arrow
223+
top 21px
224+
.Select-clear
225+
padding 0 10px
226+
.Select-noresults, .Select-option
227+
line-height 33px
228+
padding 0 0 0 15px
229+
button
230+
font-weight 400
231+
height 33px
232+
cursor pointer
233+
margin 0
234+
padding 0
235+
width 50px
236+
float right
237+
border none
238+
background-color brandColor
239+
border-top-right-radius 5px
240+
border-bottom-right-radius 5px
241+
color white
242+
font-size 14px
243+
.memberList
244+
&>.header
245+
clearfix()
246+
&>.userName
247+
float left
248+
&>.role
249+
float left
250+
&>.control
251+
float right
252+
&>li
253+
border-bottom 1px solid borderColor
254+
height 44px
255+
padding 0 25px
256+
width 420px
257+
margin 0 auto
258+
clearfix()
259+
&:nth-last-child(1)
260+
border-bottom-color transparent
261+
.colUserName
262+
float left
263+
width 250px
264+
clearfix()
265+
.userPhoto
266+
width 30px
267+
height 30px
268+
float left
269+
margin-top 7px
270+
margin-right 15px
271+
border-radius 15px
272+
.userInfo
273+
float left
274+
margin-top 7px
275+
.userName
276+
font-size 16px
277+
margin-bottom 2px
278+
.userEmail
279+
font-size 12px
280+
.colRole
281+
float left
282+
width 75px
283+
.userRole
284+
height 30px
285+
background-color transparent
286+
border 1px solid transparent
287+
margin-top 7px
288+
margin-right 35px
289+
outline none
290+
cursor pointer
291+
&:hover
292+
border-color borderColor
293+
&:focus
294+
border-color iptFocusBorderColor
295+
&:disabled
296+
border-color transparent
297+
cursor not-allowed
298+
.colDelete
299+
width 45px
300+
float right
301+
text-align center
302+
button.deleteButton
303+
border none
304+
height 30px
305+
width 30px
306+
margin-top 7px
307+
background-color transparent
308+
color stripBtnColor
309+
&:hover
310+
color stripHoverBtnColor
311+
&:disabled
312+
color lighten(stripBtnColor, 10%)
313+
cursor not-allowed
314+
&.header
315+
.colRole, .colDelete
316+
text-align center
317+
.colUserName, .colRole, .colDelete
318+
line-height 44px
319+
&.FolderSettingTab
320+
&>.header
321+
border-bottom 1px solid borderColor
322+
padding 10px
323+
font-size 18px
324+
color brandColor
325+
line-height 33px
326+
.teamSelect
327+
border 1px solid borderColor
328+
height 33px
329+
width 200px
330+
margin 0 10px
331+
outline none
332+
font-size 14px
333+
&:focus
334+
border-color iptFocusBorderColor
335+
.section
336+
.folderTable
337+
width 420px
338+
margin 15px auto
339+
&>div
340+
border-bottom 1px solid borderColor
341+
clearfix()
342+
height 43px
343+
line-height 33px
344+
padding 5px 0
345+
&:last-child
346+
border-color transparent
347+
.folderName
348+
float left
349+
width 175px
350+
padding-left 15px
351+
.folderPublic
352+
float left
353+
text-align center
354+
width 100px
355+
.folderControl
356+
float right
357+
width 145px
358+
text-align center
359+
&.FolderRow
360+
.folderName input
361+
height 33px
362+
border 1px solid borderColor
363+
border-radius 5px
364+
padding 0 10px
365+
font-size 14px
366+
outline none
367+
width 150px
368+
&:focus
369+
border-color iptFocusBorderColor
370+
.folderPublic select
371+
height 33px
372+
border 1px solid borderColor
373+
background-color white
374+
outline none
375+
display block
376+
margin 0 auto
377+
&:focus
378+
border-color iptFocusBorderColor
379+
.folderControl
380+
button
381+
border none
382+
height 30px
383+
width 30px
384+
margin-top 1.5px
385+
font-size 14px
386+
background-color transparent
387+
color stripBtnColor
388+
&:hover
389+
color stripHoverBtnColor
390+
&:disabled
391+
color lighten(stripBtnColor, 10%)
392+
cursor not-allowed
393+
&.edit
394+
.folderControl
395+
button
396+
width 60px
397+
&.primary
398+
color brandColor
399+
&:hover
400+
color lighten(brandColor, 10%)
401+
&.delete
402+
.folderDeleteLabel
403+
float left
404+
height 33px
405+
width 250px
406+
padding-left 15px
407+
strong
408+
font-size 16px
409+
color brandColor
410+
.folderControl
411+
button
412+
width 60px
413+
&.primary
414+
color brandColor
415+
&:hover
416+
color lighten(brandColor, 10%)
417+
418+
419+
420+
421+
125422

126423

lib/api.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,15 @@ export function createTeam (input) {
8686
.send(input)
8787
}
8888

89+
export function updateTeamInfo (teamId, input) {
90+
return request
91+
.put(API_URL + 'teams/' + teamId)
92+
.set({
93+
Authorization: 'Bearer ' + auth.token()
94+
})
95+
.send(input)
96+
}
97+
8998
export function searchUser (key) {
9099
return request
91100
.get(API_URL + 'search/users')
@@ -119,6 +128,23 @@ export function createFolder (input) {
119128
.send(input)
120129
}
121130

131+
export function updateFolder (id, input) {
132+
return request
133+
.put(API_URL + 'folders/' + id)
134+
.set({
135+
Authorization: 'Bearer ' + auth.token()
136+
})
137+
.send(input)
138+
}
139+
140+
export function destroyFolder (id) {
141+
return request
142+
.del(API_URL + 'folders/' + id)
143+
.set({
144+
Authorization: 'Bearer ' + auth.token()
145+
})
146+
}
147+
122148
export function sendEmail (input) {
123149
return request
124150
.post(API_URL + 'mail')
@@ -139,9 +165,12 @@ export default {
139165
saveArticle,
140166
destroyArticle,
141167
createTeam,
168+
updateTeamInfo,
142169
searchUser,
143170
setMember,
144171
deleteMember,
145172
createFolder,
173+
updateFolder,
174+
destroyFolder,
146175
sendEmail
147176
}

0 commit comments

Comments
 (0)