Skip to content

Commit 2f3c5e6

Browse files
committed
добавил переменную CMD_VISIBLE_SOURCE в среду
1 parent 1bedea0 commit 2f3c5e6

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ app.locals.sourceURL = config.sourceURL
197197
app.locals.allowAnonymous = config.allowAnonymous
198198
app.locals.allowAnonymousEdits = config.allowAnonymousEdits
199199
//here 1 line below is mine
200-
app.locals.allowSourceView = config.allowSourceView
200+
app.locals.allowVisibleSource = config.allowVisibleSource
201201
app.locals.permission = config.permission
202202
app.locals.allowPDFExport = config.allowPDFExport
203203
app.locals.authProviders = {

lib/config/default.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module.exports = {
3434
allowAnonymousViews: true,
3535
allowFreeURL: false,
3636
//my new feature below
37-
allowSourceView: false,
37+
allowVisibleSource: true,
3838
forbiddenNoteIDs: ['robots.txt', 'favicon.ico', 'api'],
3939
defaultPermission: 'editable',
4040
dbURL: '',

lib/config/environment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module.exports = {
3030
allowAnonymousViews: toBooleanConfig(process.env.CMD_ALLOW_ANONYMOUS_VIEWS),
3131
allowFreeURL: toBooleanConfig(process.env.CMD_ALLOW_FREEURL),
3232
//my feature is below
33-
//allowSourceView: toBooleanConfig(process.env.CMD_ALLOW_SOURCE_VIEW),
33+
allowVisibleSource: toBooleanConfig(process.env.CMD_VISIBLE_SOURCE),
3434
forbiddenNoteIDs: toArrayConfig(process.env.CMD_FORBIDDEN_NOTE_IDS),
3535
defaultPermission: process.env.CMD_DEFAULT_PERMISSION,
3636
dbURL: process.env.CMD_DB_URL,

public/views/codimd/header.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
<div class="collapse navbar-collapse">
8585
<ul class="nav navbar-nav navbar-form navbar-left" style="padding:0;">
8686
<div class="btn-group" data-toggle="buttons">
87-
<% if (allowSourceView) { %>
87+
<% if (allowVisibleSource) { %>
8888
<label class="btn btn-default ui-edit" title="<%= __('Edit') %> (Ctrl+Alt+E)">
8989
<input type="radio" name="mode" autocomplete="off"><i class="fa fa-pencil"></i>
9090
</label>

0 commit comments

Comments
 (0)