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 = {
198198 email : config . isEmailEnable ,
199199 allowEmailRegister : config . allowEmailRegister
200200}
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
202206
203207app . use ( require ( './lib/web/baseRouter' ) )
204208app . 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 !==
110110 logger . warn ( 'config.js contains wrong version (' + config . gitlab . version + ') for gitlab api; it should be \'v3\' or \'v4\'. Defaulting to v4' )
111111 config . gitlab . version = 'v4'
112112}
113+ // If gitlab scope is api, enable snippets Export/import
114+ config . isGitlabSnippetsEnable = ( ! config . gitlab . scope || config . gitlab . scope === 'api' )
113115
114116// Only update i18n files in development setups
115117config . updateI18nFiles = ( env === Environment . development )
Original file line number Diff line number Diff line change 3232 </li >
3333 <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 >
3434 </li >
35- <% if (( typeof github !== ' undefined ' && github) || ( typeof dropbox !== ' undefined ' && dropbox) || enableGitlabSnippets) { % >
35+ <% if (enableGitHubGist || enableDropBoxSave || enableGitlabSnippets) { % >
3636 < li class = " divider" >< / li>
3737 < li class = " dropdown-header" >< %= __ (' Export' ) % >< / li>
3838 < 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>
3939 < / li>
40- < % if (typeof github !== ' undefined ' && github ) { % >
40+ < % if (enableGitHubGist ) { % >
4141 < 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>
4242 < / li>
4343 < % } % >
134134 </li >
135135 <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 >
136136 </li >
137- <% if (( typeof github !== ' undefined ' && github) || ( typeof dropbox !== ' undefined ' && dropbox) || enableGitlabSnippets ) { % >
137+ <% if (enableGitHubGist || enableDropBoxSave || enableGitlabSnippets) { % >
138138 < li class = " divider" >< / li>
139139 < li class = " dropdown-header" >< %= __ (' Export' ) % >< / li>
140140 < 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>
141141 < / li>
142- < % if (typeof github !== ' undefined ' && github ) { % >
142+ < % if (enableGitHubGist ) { % >
143143 < 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>
144144 < / li>
145145 < % } % >
You can’t perform that action at this time.
0 commit comments