Skip to content

Commit 2817c72

Browse files
committed
feat: core improvements + local fs provider + UI fixes
1 parent 803d86f commit 2817c72

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+469
-251
lines changed

client/app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Vue.prototype.Velocity = Velocity
110110
Vue.component('admin', () => import(/* webpackChunkName: "admin" */ './components/admin.vue'))
111111
Vue.component('editor', () => import(/* webpackChunkName: "editor" */ './components/editor.vue'))
112112
Vue.component('login', () => import(/* webpackMode: "eager" */ './components/login.vue'))
113-
Vue.component('nav-header', () => import(/* webpackMode: "eager" */ './components/nav-header.vue'))
113+
Vue.component('nav-header', () => import(/* webpackMode: "eager" */ './components/common/nav-header.vue'))
114114
Vue.component('profile', () => import(/* webpackChunkName: "profile" */ './components/profile.vue'))
115115
Vue.component('setup', () => import(/* webpackChunkName: "setup" */ './components/setup.vue'))
116116
Vue.component('v-card-chin', () => import(/* webpackMode: "eager" */ './components/common/v-card-chin.vue'))

client/components/admin/admin-general.vue

+23-3
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,34 @@
1313
v-toolbar-title
1414
.subheading {{ $t('admin:general.siteInfo') }}
1515
v-subheader General
16-
.px-3
16+
.px-3.pb-3
1717
v-text-field(label='Site Title', required, :counter='50', v-model='siteTitle', prepend-icon='public')
18-
v-divider.mt-3
18+
v-divider
1919
v-subheader SEO
20-
.px-3
20+
.px-3.pb-3
2121
v-text-field(label='Site Description', :counter='255', prepend-icon='public')
2222
v-text-field(label='Site Keywords', :counter='255', prepend-icon='public')
2323
v-select(label='Meta Robots', chips, tags, :items='metaRobots', v-model='metaRobotsSelection', prepend-icon='public')
24+
v-divider
25+
v-subheader Analytics
26+
.px-3.pb-3
27+
v-text-field(
28+
label='Google Analytics ID'
29+
:counter='255'
30+
prepend-icon='public'
31+
persistent-hint
32+
hint='Property tracking ID for Google Analytics.'
33+
)
34+
v-divider
35+
v-subheader Footer Copyright
36+
.px-3.pb-3
37+
v-text-field(
38+
label='Company / Organization Name'
39+
:counter='255'
40+
prepend-icon='public'
41+
persistent-hint
42+
hint='Name to use when displaying copyright notice in the footer. Leave empty to hide.'
43+
)
2444
v-card-chin
2545
v-spacer
2646
v-btn(color='primary')

client/components/admin/admin-stats.vue

+12
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,22 @@
44
v-flex(xs12)
55
.headline.primary--text Statistics
66
.subheading.grey--text Useful information about your wiki
7+
.pa-3
8+
fingerprint-spinner(
9+
:animation-duration='1500'
10+
:size='128'
11+
color='#e91e63'
12+
)
13+
.caption.pink--text.mt-3 Compiling latest data...
714
</template>
815

916
<script>
17+
import { FingerprintSpinner } from 'epic-spinners'
18+
1019
export default {
20+
components: {
21+
FingerprintSpinner
22+
},
1123
data() {
1224
return {}
1325
}

client/components/admin/admin-storage.vue

+15-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
:key='tgt.key'
1919
:label='tgt.title'
2020
color='primary'
21-
:disabled='tgt.key === `local`'
2221
hide-details
2322
)
2423

@@ -30,26 +29,38 @@
3029
template(v-else, v-for='cfg in tgt.config')
3130
v-select(
3231
v-if='cfg.value.type === "string" && cfg.value.enum'
32+
outline
33+
background-color='grey lighten-2'
3334
:items='cfg.value.enum'
3435
:key='cfg.key'
35-
:label='cfg.key | startCase'
36+
:label='cfg.value.title'
3637
v-model='cfg.value.value'
3738
prepend-icon='settings_applications'
39+
:hint='cfg.value.hint ? cfg.value.hint : ""'
40+
persistent-hint
41+
:class='cfg.value.hint ? "mb-2" : ""'
3842
)
3943
v-switch(
4044
v-else-if='cfg.value.type === "boolean"'
4145
:key='cfg.key'
42-
:label='cfg.key | startCase'
46+
:label='cfg.value.title'
4347
v-model='cfg.value.value'
4448
color='primary'
4549
prepend-icon='settings_applications'
50+
:hint='cfg.value.hint ? cfg.value.hint : ""'
51+
persistent-hint
4652
)
4753
v-text-field(
4854
v-else
55+
outline
56+
background-color='grey lighten-2'
4957
:key='cfg.key'
50-
:label='cfg.key | startCase'
58+
:label='cfg.value.title'
5159
v-model='cfg.value.value'
5260
prepend-icon='settings_applications'
61+
:hint='cfg.value.hint ? cfg.value.hint : ""'
62+
persistent-hint
63+
:class='cfg.value.hint ? "mb-2" : ""'
5364
)
5465
v-divider.mt-3
5566
v-subheader.pl-0 Sync Direction

client/components/admin/admin-utilities.vue

+61-46
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,18 @@
3636
v-subheader Rescan Modules
3737
v-card-text.pt-0.pl-4
3838
.body-1 Look for new modules on disk. Existing configurations will be merged.
39-
v-btn(depressed).ml-0
40-
v-icon(left, color='grey') youtube_searched_for
41-
span Authentication
42-
v-btn(depressed).ml-0
43-
v-icon(left, color='grey') youtube_searched_for
44-
span Storage
39+
v-select.mt-3(
40+
v-model='rescanModuleType'
41+
:items='moduleTypes'
42+
label='Modules Type'
43+
outline
44+
background-color='grey lighten-1'
45+
hide-details
46+
dense
47+
)
48+
v-btn.ml-0(color='primary', depressed, dark)
49+
v-icon(left) chevron_right
50+
span Rescan
4551
v-flex(xs12, sm6)
4652
v-card
4753
v-toolbar(:color='$vuetify.dark ? "" : "grey darken-3"', dark, dense, flat)
@@ -58,50 +64,50 @@
5864
.subheading Graph Endpoint
5965
v-card-text
6066
.body-1 The Graph API Endpoint from which remote resources like locales, themes and plugins are fetched.
61-
.caption Do not change unless you know what you're doing!
62-
v-text-field.my-2.grey.lighten-3(solo, flat, label='Graph Endpoint', value='https://graph.requarks.io')
67+
.caption.red--text Do not change unless you know what you're doing!
68+
v-text-field.my-2(outline, hide-details, background-color='grey lighten-1', label='Graph Endpoint', value='https://graph.requarks.io')
6369
v-btn.ml-0(color='primary', depressed, dark)
6470
v-icon(left) chevron_right
6571
span Save
6672

6773
v-tab-item(key='telemetry', :transition='false', :reverse-transition='false')
68-
v-card.pa-3
74+
v-card
6975
v-form
70-
v-subheader What is telemetry?
71-
.body-1.pl-3 Telemetry allows the developers of Wiki.js to improve the software by collecting basic anonymized data about its usage and the host info. #[br] This is entirely optional and #[strong absolutely no] private data (such as content or personal data) is collected.
72-
.body-1.pt-3.pl-3 For maximum privacy, a random client ID is generated every time Wiki.js is started. This ID is used to group requests together while keeping complete anonymity.
73-
v-divider
74-
v-subheader What is collected?
75-
.body-1.pl-3 When telemetry is enabled, only the following data is transmitted:
76-
v-list(dense)
77-
v-list-tile
78-
v-list-tile-avatar: v-icon info_outline
79-
v-list-tile-content: v-list-tile-title.caption Version of Wiki.js installed
80-
v-list-tile
81-
v-list-tile-avatar: v-icon info_outline
82-
v-list-tile-content: v-list-tile-title.caption Basic OS information (version, CPU cores, RAM available)
83-
v-list-tile
84-
v-list-tile-avatar: v-icon info_outline
85-
v-list-tile-content: v-list-tile-title.caption Crash debug data
86-
v-list-tile
87-
v-list-tile-avatar: v-icon info_outline
88-
v-list-tile-content: v-list-tile-title.caption Setup analytics (step reached)
89-
.body-2.pl-3
90-
v-divider
91-
v-subheader Settings
92-
.pl-3
93-
v-switch(
94-
v-model='telemetry',
95-
label='Enable Telemetry',
96-
:value='true',
97-
color='primary',
98-
hint='Allow Wiki.js to transmit telemetry data.',
99-
persistent-hint
100-
)
101-
.subheading.mt-3.grey--text.text--darken-1 Client ID
102-
.body-1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
103-
v-divider
104-
v-card-actions
76+
v-card-text
77+
v-subheader What is telemetry?
78+
.body-1.pl-3 Telemetry allows the developers of Wiki.js to improve the software by collecting basic anonymized data about its usage and the host info. #[br] This is entirely optional and #[strong absolutely no] private data (such as content or personal data) is collected.
79+
.body-1.pt-3.pl-3 For maximum privacy, a random client ID is generated every time Wiki.js is started. This ID is used to group requests together while keeping complete anonymity.
80+
v-divider.my-3
81+
v-subheader What is collected?
82+
.body-1.pl-3 When telemetry is enabled, only the following data is transmitted:
83+
v-list(dense)
84+
v-list-tile
85+
v-list-tile-avatar: v-icon info_outline
86+
v-list-tile-content: v-list-tile-title.caption Version of Wiki.js installed
87+
v-list-tile
88+
v-list-tile-avatar: v-icon info_outline
89+
v-list-tile-content: v-list-tile-title.caption Basic OS information (version, CPU cores, RAM available)
90+
v-list-tile
91+
v-list-tile-avatar: v-icon info_outline
92+
v-list-tile-content: v-list-tile-title.caption Crash debug data
93+
v-list-tile
94+
v-list-tile-avatar: v-icon info_outline
95+
v-list-tile-content: v-list-tile-title.caption Setup analytics (step reached)
96+
.body-2.pl-3
97+
v-divider.my-3
98+
v-subheader Settings
99+
.pl-3
100+
v-switch.mt-0(
101+
v-model='telemetry',
102+
label='Enable Telemetry',
103+
:value='true',
104+
color='primary',
105+
hint='Allow Wiki.js to transmit telemetry data.',
106+
persistent-hint
107+
)
108+
.subheading.mt-3.grey--text.text--darken-1 Client ID
109+
.body-1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
110+
v-card-chin
105111
v-btn(color='primary')
106112
v-icon(left) chevron_right
107113
| Save Changes
@@ -117,13 +123,13 @@
117123
v-btn.ml-3.mt-3(depressed, dark, color='grey darken-2', href='https://github.com/Requarks/wiki/issues', target='_blank')
118124
icon-github-circle.mr-3(fillColor='#FFFFFF')
119125
span Submit an issue
120-
v-divider
126+
v-divider.my-3
121127
v-subheader Suggest a New Feature / Enhancement
122128
.body-1.pl-3 Have an idea for a new feature or something that could be improved?
123129
v-btn.ml-3.mt-3(depressed, dark, color='indigo', href='https://requests.requarks.io/wiki', target='_blank')
124130
v-icon(left) lightbulb_outline
125131
span Submit an idea
126-
v-divider
132+
v-divider.my-3
127133
v-subheader Questions / Comments
128134
.body-1.pl-3 Join our gitter channel. We are very active and friendly!
129135
v-btn.ml-3.mt-3(depressed, dark, color='pink', href='https://gitter.im/Requarks/wiki', target='_blank')
@@ -144,6 +150,15 @@ export default {
144150
data() {
145151
return {
146152
tab: '0',
153+
moduleTypes: [
154+
{ text: 'Authentication', value: 'authentication' },
155+
{ text: 'Editor', value: 'editor' },
156+
{ text: 'Logging', value: 'logging' },
157+
{ text: 'Rendering', value: 'renderer' },
158+
{ text: 'Search Engine', value: 'search' },
159+
{ text: 'Storage', value: 'storage' }
160+
],
161+
rescanModuleType: 'authentication',
147162
telemetry: true
148163
}
149164
},

client/components/nav-header.vue renamed to client/components/common/nav-header.vue

+28-21
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template lang='pug'>
2-
v-toolbar(color='black', dark, app, clipped-left, fixed, flat, dense)
2+
v-toolbar(color='black', dark, app, clipped-left, fixed, flat, :dense='dense')
33
v-menu(open-on-hover, offset-y, bottom, left, nudge-top='-18', min-width='250')
44
v-toolbar-side-icon(slot='activator')
55
v-icon view_module
@@ -41,15 +41,15 @@
4141
v-if='searchIsShown',
4242
v-model='search',
4343
clearable,
44-
color='blue',
44+
color='white',
4545
label='Search...',
4646
single-line,
47+
solo
48+
flat
4749
hide-details,
48-
append-icon='search',
49-
:append-icon-cb='searchEnter',
50+
prepend-inner-icon='search',
5051
:loading='searchIsLoading',
51-
@keyup.enter='searchEnter',
52-
@keyup.esc='searchToggle'
52+
@keyup.enter='searchEnter'
5353
)
5454
v-progress-linear(
5555
indeterminate,
@@ -58,11 +58,9 @@
5858
color='blue'
5959
)
6060
v-spacer
61-
v-progress-circular.mr-3(indeterminate, color='blue', :size='22', :width='2' v-show='isLoading')
61+
.navHeaderLoading.mr-3
62+
v-progress-circular(indeterminate, color='blue', :size='22', :width='2' v-show='isLoading')
6263
slot(name='actions')
63-
transition(name='navHeaderSearch')
64-
v-btn(icon, @click='searchToggle', v-if='!searchIsShown')
65-
v-icon(color='grey') search
6664
v-btn(icon, href='/a')
6765
v-icon(color='grey') settings
6866
v-menu(offset-y, min-width='300')
@@ -90,28 +88,34 @@ import { mapGetters } from 'vuex'
9088
/* global siteConfig */
9189
9290
export default {
91+
props: {
92+
dense: {
93+
type: Boolean,
94+
default: false
95+
},
96+
hideSearch: {
97+
type: Boolean,
98+
default: false
99+
}
100+
},
93101
data() {
94102
return {
95103
menuIsShown: true,
96104
searchIsLoading: false,
97-
searchIsShown: false,
105+
searchIsShown: true,
98106
search: ''
99107
}
100108
},
101109
computed: {
102110
...mapGetters(['isLoading']),
103111
title() { return siteConfig.title }
104112
},
113+
created() {
114+
if (this.hideSearch || this.dense) {
115+
this.searchIsShown = false
116+
}
117+
},
105118
methods: {
106-
searchToggle() {
107-
this.searchIsLoading = false
108-
this.searchIsShown = !this.searchIsShown
109-
if (this.searchIsShown) {
110-
this.$nextTick(() => {
111-
this.$refs.searchField.focus()
112-
})
113-
}
114-
},
115119
searchEnter() {
116120
this.searchIsLoading = true
117121
}
@@ -130,7 +134,10 @@ export default {
130134
}
131135
&-enter, &-leave-to {
132136
opacity: 0;
133-
transform: translateY(-25px);
137+
transform: scale(.7, .7);
134138
}
135139
}
140+
.navHeaderLoading { // To avoid search bar jumping
141+
width: 22px;
142+
}
136143
</style>

client/components/editor.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template lang="pug">
22
.editor
3-
nav-header
3+
nav-header(dense)
44
template(slot='actions')
55
v-btn(outline, color='green', @click.native.stop='save')
66
v-icon(color='green', left) check

0 commit comments

Comments
 (0)