File tree 1 file changed +12
-8
lines changed
1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ export const queryAvailablePerspectives = gql`
35
35
query availablePerspectives($dictionary_id: LingvodocID!) {
36
36
dictionary(id: $dictionary_id) {
37
37
id
38
+ category
38
39
perspectives {
39
40
id
40
41
parent_id
@@ -89,6 +90,7 @@ class PerspectivePath extends React.Component {
89
90
const dictionary_id_tree = tree [ 1 ] . id ;
90
91
91
92
const {
93
+ category,
92
94
perspectives,
93
95
additional_metadata : { license }
94
96
} = queryAvailablePerspectives . dictionary ;
@@ -173,14 +175,16 @@ class PerspectivePath extends React.Component {
173
175
actions . openStatistics ( id , "perspective" , `'${ T ( e . translations ) } ' ${ statistics_str } ` )
174
176
}
175
177
/>
176
- < Dropdown . Item
177
- key = "upload"
178
- icon = { < i className = "lingvo-icon lingvo-icon_stats" /> }
179
- text = { this . context ( "Upload" ) }
180
- onClick = { ( ) =>
181
- actions . openUploadModal ( id , `'${ T ( e . translations ) } ' ${ upload_str } ` )
182
- }
183
- />
178
+ { user . id !== undefined && category == 1 && (
179
+ < Dropdown . Item
180
+ key = "upload"
181
+ icon = { < i className = "lingvo-icon lingvo-icon_published" /> }
182
+ text = { this . context ( "Upload" ) }
183
+ onClick = { ( ) =>
184
+ actions . openUploadModal ( id , `'${ T ( e . translations ) } ' ${ upload_str } ` )
185
+ }
186
+ />
187
+ ) }
184
188
</ Dropdown . Menu >
185
189
</ Dropdown >
186
190
) : index === tree . length - 2 ? (
You can’t perform that action at this time.
0 commit comments