Skip to content

Commit

Permalink
refactor: remove config namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
NGPixel committed May 28, 2018
1 parent b1499d1 commit 416755f
Show file tree
Hide file tree
Showing 27 changed files with 556 additions and 283 deletions.
2 changes: 1 addition & 1 deletion client/components/nav-header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
color='blue'
)
v-spacer
v-progress-circular.mr-3(indeterminate, color='blue', v-show='isLoading')
v-progress-circular.mr-3(indeterminate, color='blue', :size='22', :width='2' v-show='isLoading')
slot(name='actions')
transition(name='navHeaderSearch')
v-btn(icon, @click='searchToggle', v-if='!searchIsShown')
Expand Down
11 changes: 11 additions & 0 deletions client/components/profile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
import VueRouter from 'vue-router'
import { mapState } from 'vuex'
/* global WIKI */
const router = new VueRouter({
mode: 'history',
base: '/p',
Expand All @@ -53,6 +55,15 @@ const router = new VueRouter({
]
})
router.beforeEach((to, from, next) => {
WIKI.$store.commit('loadingStart', 'profile')
next()
})
router.afterEach((to, from) => {
WIKI.$store.commit('loadingStop', 'profile')
})
export default {
data() {
return {
Expand Down
25 changes: 22 additions & 3 deletions client/components/profile/preferences.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,32 @@
v-toolbar(color='primary', dark, dense, flat)
v-toolbar-title
.subheading Display
v-subheader Locale
v-card-text
v-subheader.pl-0 Locale
v-select.grey.lighten-5(solo, flat)
v-divider
v-subheader.pl-0 Timezone
v-select.grey.lighten-5(solo, flat)
v-divider.my-0
v-card-actions.grey.lighten-4
v-spacer
v-btn(color='primary')
v-icon(left) chevron_right
span Save
v-flex(lg6 xs12)
v-card
v-toolbar(color='primary', dark, dense, flat)
v-toolbar-title
.subheading ---
v-card-text ---
.subheading Editing
v-card-text
v-subheader.pl-0 Default Editor
v-select.grey.lighten-5(solo, flat)
v-divider.my-0
v-card-actions.grey.lighten-4
v-spacer
v-btn(color='primary')
v-icon(left) chevron_right
span Save

</template>

Expand Down
100 changes: 67 additions & 33 deletions client/components/profile/profile.vue
Original file line number Diff line number Diff line change
@@ -1,40 +1,74 @@
<template lang='pug'>
v-container(fluid, fill-height, grid-list-lg)
v-container(fluid, grid-list-lg)
v-layout(row wrap)
v-flex(xs12)
v-flex(xs6)
.headline.primary--text Profile
.subheading.grey--text Personal profile
v-form.pt-3
v-layout(row wrap)
v-flex(lg6 xs12)
v-form
v-card
v-toolbar(color='primary', dark, dense, flat)
v-toolbar-title
.subheading User Details
v-card-text
v-text-field(label='Name', :counter='255', v-model='name', prepend-icon='person')
v-divider
v-text-field(label='Email', :counter='255', prepend-icon='email')
v-divider.my-0
v-card-actions.grey.lighten-4
v-spacer
v-btn(color='primary')
v-icon(left) chevron_right
span Save
v-flex(lg6 xs12)
v-card
v-toolbar(color='primary', dark, dense, flat)
v-toolbar-title
.subheading Picture
v-card-text ---
v-card.mt-3
v-toolbar(color='teal', dark, dense, flat)
v-toolbar-title
.subheading Activity
v-card-text.grey--text.text--darken-2
.body-1 Joined #[strong January 1st, 2010]
.body-1 Last login on #[strong January 2nd, 2010]
v-flex(xs6).text-xs-right
v-btn(outline, color='primary').mr-0
v-icon(left) public
span View Public Profile
v-flex(lg6 xs12)
v-card
v-toolbar(color='primary', dark, dense, flat)
v-toolbar-title
.subheading User Details
v-card-text
v-text-field(label='Name', :counter='255', v-model='name', prepend-icon='person')
v-text-field(label='Job Title', :counter='255', prepend-icon='accessibility')
v-text-field(label='Location / Office', :counter='255', prepend-icon='location_on')
v-divider.my-0
v-card-actions.grey.lighten-4
v-spacer
v-btn(color='primary')
v-icon(left) chevron_right
span Save
v-card.mt-3
v-toolbar(color='purple darken-4', dark, dense, flat)
v-toolbar-title
.subheading Authentication
v-card-text
v-subheader.pl-0 Provider
v-toolbar(flat, color='purple lighten-5', dense).purple--text.text--darken-4
v-icon(color='purple darken-4') supervised_user_circle
.subheading.ml-3 Local
v-divider
v-subheader.pl-0 Two-Factor Authentication (2FA)
.caption.mb-2 2FA adds an extra layer of security by requiring a unique code generated on your smartphone when signing in.
v-btn(color='purple darken-4', dark, depressed).ml-0 Enable 2FA
v-btn(color='purple darken-4', dark, depressed, disabled).ml-0 Disable 2FA
v-divider
v-subheader.pl-0 Change Password
v-text-field(label='Current Password', prepend-icon='last_page')
v-text-field(label='New Password', prepend-icon='last_page')
v-text-field(label='Confirm New Password', prepend-icon='last_page')
v-btn(color='purple darken-4', dark, depressed).ml-0 Change Password
v-flex(lg6 xs12)
v-card
v-toolbar(color='primary', dark, dense, flat)
v-toolbar-title
.subheading Picture
v-card-title
v-avatar(size='64', color='grey')
v-icon(size='64', color='grey lighten-2') account_circle
v-btn(depressed).ml-4.elevation-1 Upload Picture
v-btn(depressed, disabled).elevation-1 Remove Picture
v-card.mt-3
v-toolbar(color='teal', dark, dense, flat)
v-toolbar-title
.subheading Activity
v-card-text.grey--text.text--darken-2
.body-2.grey--text Joined on
.body-1: strong January 1st, 2018 at 12:00 AM
.body-2.grey--text.mt-3 Profile last updated on
.body-1: strong January 1st, 2018 at 12:00 AM
.body-2.grey--text.mt-3 Last login on
.body-1: strong January 1st, 2018 at 12:00 AM
v-divider
.body-2.grey--text.mt-3 Pages created
.body-1: strong 0
.body-2.grey--text.mt-3 Comments posted
.body-1: strong 0
</template>

<script>
Expand Down
12 changes: 11 additions & 1 deletion client/components/setup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,12 @@
v-flex.pr-3(xs6)
v-text-field(
ref='adminPassword',
counter='255'
v-model='conf.adminPassword',
label='Password',
:append-icon="pwdMode ? 'visibility' : 'visibility_off'"
:append-icon-cb="() => (pwdMode = !pwdMode)"
:type="pwdMode ? 'password' : 'text'"
hint='At least 8 characters long.',
v-validate='{ required: true, min: 8 }',
data-vv-name='adminPassword',
Expand All @@ -221,8 +225,12 @@
v-flex(xs6)
v-text-field(
ref='adminPasswordConfirm',
counter='255'
v-model='conf.adminPasswordConfirm',
label='Confirm Password',
:append-icon="pwdConfirmMode ? 'visibility' : 'visibility_off'"
:append-icon-cb="() => (pwdConfirmMode = !pwdConfirmMode)"
:type="pwdConfirmMode ? 'password' : 'text'"
hint='Verify your password again.',
v-validate='{ required: true, min: 8 }',
data-vv-name='adminPasswordConfirm',
Expand Down Expand Up @@ -339,7 +347,9 @@ export default {
title: siteConfig.title || 'Wiki',
upgrade: false,
upgMongo: 'mongodb://'
}
},
pwdMode: true,
pwdConfirmMode: true
}
},
methods: {
Expand Down
1 change: 1 addition & 0 deletions client/scss/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// @import 'node_modules/diff2html/dist/diff2html.min';

@import 'pages/welcome';
@import 'pages/error';

@import 'layout/_rtl';

Expand Down
64 changes: 64 additions & 0 deletions client/scss/pages/_error.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
.app-error {
background: linear-gradient(to bottom, mc('grey', '900') 0%, mc('grey', '800') 100%);
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: mc('grey', '50');

img {
width: 250px;
filter: grayscale(50%) brightness(120%);
animation: errorlogo 5s linear infinite;
margin-bottom: 3rem;

@include until($tablet) {
width: 200px;
}
}

@keyframes errorlogo {
0% {
filter: blur(0) grayscale(50%) brightness(200%) hue-rotate(110deg);
}
10% {
filter: blur(0) grayscale(50%) brightness(200%) hue-rotate(110deg) invert(100%);
}
15% {
filter: blur(0) grayscale(50%) brightness(200%) hue-rotate(110deg) invert(0%);
}
30% {
filter: blur(0) grayscale(50%) brightness(200%) hue-rotate(110deg);
}
32% {
filter: blur(0) grayscale(50%) brightness(200%) hue-rotate(2700deg) invert(100%);
}
34% {
filter: blur(0) grayscale(100%) brightness(50%) hue-rotate(110deg);
}
50% {
filter: blur(0) grayscale(100%) brightness(200%) hue-rotate(110deg) sepia(0%);
}
55% {
filter: blur(0) grayscale(100%) brightness(100%) hue-rotate(110deg) sepia(100%);
}
60% {
filter: blur(0) grayscale(50%) brightness(200%) hue-rotate(110deg) sepia(0%);
}
90% {
filter: blur(0) grayscale(50%) brightness(200%) hue-rotate(110deg);
}
95% {
filter: blur(5px) grayscale(50%) brightness(200%) hue-rotate(720deg);
}
100% {
filter: blur(0) grayscale(50%) brightness(200%) hue-rotate(110deg) invert(100%);
}
}

code {
color: mc('grey', '500');
font-size: .8rem;
}
}
26 changes: 1 addition & 25 deletions config.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# https://docs.requarks.io/wiki/install

# ---------------------------------------------------------------------
# Port the main server should listen to
# Port the server should listen to
# ---------------------------------------------------------------------

port: 80
Expand Down Expand Up @@ -55,27 +55,3 @@ redis:
# Possible values: error, warn, info (default), verbose, debug, silly

logLevel: info

# ---------------------------------------------------------------------
# Configuration Mode
# ---------------------------------------------------------------------
# Possible values: auto (default), file, setup

configMode: auto

# ---------------------------------------------------------------------
# Background Workers
# ---------------------------------------------------------------------
# Leave 0 for auto based on CPU cores

workers: 0

# ---------------------------------------------------------------------
# High Availability
# ---------------------------------------------------------------------
# Read the docs BEFORE changing these settings!

ha:
node: primary
uid: master
readonly: false
9 changes: 1 addition & 8 deletions server/app/data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,13 @@ defaults:
port: 6379
db: 0
password: null
configMode: auto
workers: 0
ha:
node: primary
uid: master
readonly: false
# DB defaults
auth:
public: false
strategies:
local:
isEnabled: true
allowSelfRegister: false
git:
enabled: false
logging:
telemetry: false
loggers:
Expand All @@ -48,6 +40,7 @@ defaults:
rtl: false
title: Wiki.js
# System defaults
setup: false
cors:
credentials: true
maxAge: 600
Expand Down
Loading

0 comments on commit 416755f

Please sign in to comment.