misc: dev mode warning on setup

This commit is contained in:
NGPixel 2020-01-25 23:12:57 -05:00
parent 988ba3f616
commit 3e991fa590
4 changed files with 21 additions and 3 deletions

View File

@ -86,8 +86,8 @@
v-list-item(to='/mail', color='primary', v-if='hasPermission(`manage:system`)') v-list-item(to='/mail', color='primary', v-if='hasPermission(`manage:system`)')
v-list-item-avatar(size='24'): v-icon mdi-email-multiple-outline v-list-item-avatar(size='24'): v-icon mdi-email-multiple-outline
v-list-item-title {{ $t('admin:mail.title') }} v-list-item-title {{ $t('admin:mail.title') }}
v-list-item(to='/ssl', v-if='hasPermission(`manage:system`)', disabled) v-list-item(to='/ssl', v-if='hasPermission(`manage:system`)')
v-list-item-avatar(size='24'): v-icon(color='grey lighten-2') mdi-cloud-lock-outline v-list-item-avatar(size='24'): v-icon mdi-cloud-lock-outline
v-list-item-title {{ $t('admin:ssl.title') }} v-list-item-title {{ $t('admin:ssl.title') }}
v-list-item(to='/system', color='primary', v-if='hasPermission(`manage:system`)') v-list-item(to='/system', color='primary', v-if='hasPermission(`manage:system`)')
v-list-item-avatar(size='24'): v-icon mdi-tune v-list-item-avatar(size='24'): v-icon mdi-tune
@ -270,6 +270,10 @@ export default {
color: mc('theme', 'primary'); color: mc('theme', 'primary');
} }
} }
.v-list-group > .v-list-item {
padding-left: 0;
}
} }
.theme--dark { .theme--dark {

View File

@ -5,6 +5,10 @@
v-layout v-layout
v-flex(xs12, lg6, offset-lg3) v-flex(xs12, lg6, offset-lg3)
v-card.elevation-20.radius-7.animated.fadeInUp v-card.elevation-20.radius-7.animated.fadeInUp
v-alert(v-if='isDevMode', tile, dark, color='red darken-3', icon='mdi-alert', prominent)
.body-2 You are running an unstable, unreleased development version. This code base is #[strong NOT] for production use!
.body-2.mt-3 Cloning the master branch directly from GitHub is #[strong NOT] the proper way to install Wiki.js!
.body-2 Read the #[a(href='https://docs.requarks.io/install', style='color: #FFF;') documentation] on correctly installing the latest stable version.
.text-center .text-center
img.setup-logo.animated.fadeInUp.wait-p2s(src='/svg/logo-wikijs-full.svg', alt='Wiki.js Logo') img.setup-logo.animated.fadeInUp.wait-p2s(src='/svg/logo-wikijs-full.svg', alt='Wiki.js Logo')
v-alert(v-model='error', type='error', icon='mdi-alert', tile, dismissible) {{ errorMessage }} v-alert(v-model='error', type='error', icon='mdi-alert', tile, dismissible) {{ errorMessage }}
@ -101,6 +105,8 @@ import _ from 'lodash'
import validate from 'validate.js' import validate from 'validate.js'
import { BreedingRhombusSpinner } from 'epic-spinners' import { BreedingRhombusSpinner } from 'epic-spinners'
/* global siteConfig */
export default { export default {
components: { components: {
BreedingRhombusSpinner BreedingRhombusSpinner
@ -125,13 +131,15 @@ export default {
telemetry: true telemetry: true
}, },
pwdMode: true, pwdMode: true,
pwdConfirmMode: true pwdConfirmMode: true,
isDevMode: false
} }
}, },
mounted() { mounted() {
_.delay(() => { _.delay(() => {
this.$refs.adminEmailInput.focus() this.$refs.adminEmailInput.focus()
}, 500) }, 500)
this.isDevMode = siteConfig.devMode === true
}, },
methods: { methods: {
async install () { async install () {

View File

@ -21,6 +21,11 @@ html
script. script.
var siteConfig = !{JSON.stringify({ title: config.title })} var siteConfig = !{JSON.stringify({ title: config.title })}
//- Dev Mode Warning
if devMode
script.
siteConfig.devMode = true
//- CSS //- CSS
<% for (var index in htmlWebpackPlugin.files.css) { %> <% for (var index in htmlWebpackPlugin.files.css) { %>
link( link(

View File

@ -50,6 +50,7 @@ module.exports = () => {
app.locals.config = WIKI.config app.locals.config = WIKI.config
app.locals.data = WIKI.data app.locals.data = WIKI.data
app.locals._ = require('lodash') app.locals._ = require('lodash')
app.locals.devMode = WIKI.devMode
// ---------------------------------------- // ----------------------------------------
// HMR (Dev Mode Only) // HMR (Dev Mode Only)