Skip to content

Commit

Permalink
viewSource theme config
Browse files Browse the repository at this point in the history
  • Loading branch information
Bamieh authored and NGPixel committed Aug 28, 2017
1 parent dca2372 commit 4b33a83
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions config.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ externalLogging:
theme:
primary: indigo
alt: blue-grey
viewSource: "all"
footer: blue-grey
code:
dark: true
Expand Down
1 change: 1 addition & 0 deletions server/app/data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ defaults:
primary: indigo
alt: blue-grey
footer: blue-grey
viewSource: "none"
code:
dark: true
colorize: true
Expand Down
1 change: 1 addition & 0 deletions server/libs/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module.exports = (confPaths) => {
fs.readFileSync(confPaths.config, 'utf8')
)
)

appdata = yaml.safeLoad(fs.readFileSync(confPaths.data, 'utf8'))
appdata.regex = require(confPaths.dataRegex)
} catch (ex) {
Expand Down
7 changes: 4 additions & 3 deletions server/views/pages/view.pug
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ block rootNavRight
a.button.is-outlined(v-on:click='$store.dispatch("modalMovePage/open")')
i.nc-icon-outline.arrows-1_shuffle-98
span= t('nav.move')
a.button.is-outlined(href='/source/' + pageData.meta.path)
i.nc-icon-outline.education_paper
span= t('nav.source')
if appconfig.theme.viewSource == "all" || rights.write && appconfig.theme.viewSource == "write"
a.button.is-outlined(href='/source/' + pageData.meta.path)
i.nc-icon-outline.education_paper
span= t('nav.source')
//-a.button.is-outlined(href='/hist/' + pageData.meta.path)
i.nc-icon-outline.ui-2_time
span= t('nav.history')
Expand Down

0 comments on commit 4b33a83

Please sign in to comment.