File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,11 @@ app.locals.authProviders = {
198
198
email : config . isEmailEnable ,
199
199
allowEmailRegister : config . allowEmailRegister
200
200
}
201
- app . locals . enableGitlabSnippets = ( ! config . gitlab . scope || config . gitlab . scope === 'api' )
201
+
202
+ // Export/Import menu items
203
+ app . locals . enableDropBoxSave = config . isDropboxEnable
204
+ app . locals . enableGitHubGist = config . isGitHubEnable
205
+ app . locals . enableGitlabSnippets = config . isGitlabSnippetsEnable
202
206
203
207
app . use ( require ( './lib/web/baseRouter' ) )
204
208
app . use ( require ( './lib/web/statusRouter' ) )
Original file line number Diff line number Diff line change @@ -110,6 +110,8 @@ if (config.gitlab && config.gitlab.version !== 'v4' && config.gitlab.version !==
110
110
logger . warn ( 'config.js contains wrong version (' + config . gitlab . version + ') for gitlab api; it should be \'v3\' or \'v4\'. Defaulting to v4' )
111
111
config . gitlab . version = 'v4'
112
112
}
113
+ // If gitlab scope is api, enable snippets Export/import
114
+ config . isGitlabSnippetsEnable = ( ! config . gitlab . scope || config . gitlab . scope === 'api' )
113
115
114
116
// Only update i18n files in development setups
115
117
config . updateI18nFiles = ( env === Environment . development )
Original file line number Diff line number Diff line change 32
32
</li >
33
33
<li role =" presentation" ><a role =" menuitem" class =" ui-extra-slide" tabindex =" -1" href =" #" target =" _blank" rel =" noopener" ><i class =" fa fa-tv fa-fw" ></i > <%= __ (' Slide Mode' ) %> </a >
34
34
</li >
35
- <% if (( typeof github !== ' undefined ' && github) || ( typeof dropbox !== ' undefined ' && dropbox) || enableGitlabSnippets) { % >
35
+ <% if (enableGitHubGist || enableDropBoxSave || enableGitlabSnippets) { % >
36
36
< li class = " divider" >< / li>
37
37
< li class = " dropdown-header" >< %= __ (' Export' ) % >< / li>
38
38
< li role= " presentation" >< a role= " menuitem" class = " ui-save-dropbox" tabindex= " -1" href= " #" target= " _self" >< i class = " fa fa-dropbox fa-fw" >< / i> Dropbox< / a>
39
39
< / li>
40
- < % if (typeof github !== ' undefined ' && github ) { % >
40
+ < % if (enableGitHubGist ) { % >
41
41
< li role= " presentation" >< a role= " menuitem" class = " ui-save-gist" tabindex= " -1" href= " #" target= " _blank" rel= " noopener" >< i class = " fa fa-github fa-fw" >< / i> Gist< / a>
42
42
< / li>
43
43
< % } % >
134
134
</li >
135
135
<li role =" presentation" ><a role =" menuitem" class =" ui-extra-slide" tabindex =" -1" href =" #" target =" _blank" rel =" noopener" ><i class =" fa fa-tv fa-fw" ></i > <%= __ (' Slide Mode' ) %> </a >
136
136
</li >
137
- <% if (( typeof github !== ' undefined ' && github) || ( typeof dropbox !== ' undefined ' && dropbox) || enableGitlabSnippets ) { % >
137
+ <% if (enableGitHubGist || enableDropBoxSave || enableGitlabSnippets) { % >
138
138
< li class = " divider" >< / li>
139
139
< li class = " dropdown-header" >< %= __ (' Export' ) % >< / li>
140
140
< li role= " presentation" >< a role= " menuitem" class = " ui-save-dropbox" tabindex= " -1" href= " #" target= " _self" >< i class = " fa fa-dropbox fa-fw" >< / i> Dropbox< / a>
141
141
< / li>
142
- < % if (typeof github !== ' undefined ' && github ) { % >
142
+ < % if (enableGitHubGist ) { % >
143
143
< li role= " presentation" >< a role= " menuitem" class = " ui-save-gist" tabindex= " -1" href= " #" target= " _blank" rel= " noopener" >< i class = " fa fa-github fa-fw" >< / i> Gist< / a>
144
144
< / li>
145
145
< % } % >
You can’t perform that action at this time.
0 commit comments