feat: admin - contribute
This commit is contained in:
parent
a5173fcf56
commit
8726494340
@ -62,6 +62,10 @@
|
|||||||
v-list-tile(to='/dev')
|
v-list-tile(to='/dev')
|
||||||
v-list-tile-action: v-icon weekend
|
v-list-tile-action: v-icon weekend
|
||||||
v-list-tile-title Developer Tools
|
v-list-tile-title Developer Tools
|
||||||
|
v-divider.my-2
|
||||||
|
v-list-tile(to='/contribute')
|
||||||
|
v-list-tile-action: v-icon favorite
|
||||||
|
v-list-tile-title Contribute to Wiki.js
|
||||||
|
|
||||||
v-content
|
v-content
|
||||||
transition(name='admin-router')
|
transition(name='admin-router')
|
||||||
@ -108,7 +112,8 @@ const router = new VueRouter({
|
|||||||
{ path: '/api', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-api.vue') },
|
{ path: '/api', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-api.vue') },
|
||||||
{ path: '/system', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-system.vue') },
|
{ path: '/system', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-system.vue') },
|
||||||
{ path: '/utilities', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-utilities.vue') },
|
{ path: '/utilities', component: () => import(/* webpackChunkName: "admin" */ './admin/admin-utilities.vue') },
|
||||||
{ path: '/dev', component: () => import(/* webpackChunkName: "admin-dev" */ './admin/admin-dev.vue') }
|
{ path: '/dev', component: () => import(/* webpackChunkName: "admin-dev" */ './admin/admin-dev.vue') },
|
||||||
|
{ path: '/contribute', component: () => import(/* webpackChunkName: "admin-dev" */ './admin/admin-contribute.vue') }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
60
client/components/admin/admin-contribute.vue
Normal file
60
client/components/admin/admin-contribute.vue
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
<template lang='pug'>
|
||||||
|
v-card(flat)
|
||||||
|
v-card(color='grey lighten-5')
|
||||||
|
.pa-3.pt-4
|
||||||
|
.headline.primary--text Contribute
|
||||||
|
.subheading.grey--text Help support Wiki.js development and operations
|
||||||
|
|
||||||
|
v-card.pa-3
|
||||||
|
.body-1.pl-3 Wiki.js is a #[strong free and open-source software] brought to you with #[v-icon(color='red') favorite] by #[a(href='https://requarks.io', target='_blank') requarks.io] and #[a(href='https://github.com/Requarks/wiki/graphs/contributors', target='_blank') contributors].
|
||||||
|
.body-1.pt-3.pl-3 We need your help to keep improving the software and run the various associated services (e.g. hosting and networking).
|
||||||
|
v-divider
|
||||||
|
v-subheader Fund our work
|
||||||
|
.body-1.pl-3 Wiki.js is part of the Open Collective initiative. You can contribute financially by making a monthly or one-time donation:
|
||||||
|
v-card-actions.mt-3.ml-2
|
||||||
|
v-btn(depressed, color='primary', href='https://opencollective.com/wikijs')
|
||||||
|
v-icon(left) local_atm
|
||||||
|
| Make a donation
|
||||||
|
v-divider
|
||||||
|
v-subheader Contribute
|
||||||
|
.body-1.pl-3
|
||||||
|
ul
|
||||||
|
li Submit an idea or vote on a proposed one on the #[a(href='https://requests.requarks.io/wiki', target='_blank') feature requests board].
|
||||||
|
li Found a bug? Submit an issue on #[a(href='https://github.com/Requarks/wiki/issues', target='_blank') Github].
|
||||||
|
li Help translate Wiki.js in your language. Let us know on #[a(href='https://gitter.im/Requarks/wiki', target='_blank') Gitter].
|
||||||
|
v-divider
|
||||||
|
v-subheader Spread the word
|
||||||
|
.body-1.pl-3
|
||||||
|
ul
|
||||||
|
li Talk to your friends and colleagues about how awesome Wiki.js is!
|
||||||
|
li Follow us on #[a(href='https://twitter.com/requarks', target='_blank') Twitter].
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import IconGithubCircle from 'mdi/github-circle'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
IconGithubCircle
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
tab: '0',
|
||||||
|
telemetry: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
resetClientID() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang='scss' scoped>
|
||||||
|
ul {
|
||||||
|
margin-left: 1rem;
|
||||||
|
list-style-type: square;
|
||||||
|
}
|
||||||
|
</style>
|
@ -3,7 +3,7 @@
|
|||||||
v-layout(row wrap)
|
v-layout(row wrap)
|
||||||
v-flex(xs12)
|
v-flex(xs12)
|
||||||
.headline.primary--text Dashboard
|
.headline.primary--text Dashboard
|
||||||
.subheading.grey--text Coming soon
|
.subheading.grey--text Wiki.js v2 ALPHA Build - NOT FOR PRODUCTION USE
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -35,12 +35,24 @@
|
|||||||
.login-copyright
|
.login-copyright
|
||||||
span {{ $t('footer.poweredBy') }}
|
span {{ $t('footer.poweredBy') }}
|
||||||
a(href='https://wiki.js.org', rel='external', title='Wiki.js') Wiki.js
|
a(href='https://wiki.js.org', rel='external', title='Wiki.js') Wiki.js
|
||||||
|
|
||||||
|
v-snackbar(
|
||||||
|
:color='notification.style'
|
||||||
|
bottom,
|
||||||
|
right,
|
||||||
|
multi-line,
|
||||||
|
v-model='notificationState'
|
||||||
|
)
|
||||||
|
.text-xs-left
|
||||||
|
v-icon.mr-3(dark) {{ notification.icon }}
|
||||||
|
span {{ notification.message }}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
/* global siteConfig */
|
/* global siteConfig */
|
||||||
|
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
|
import { mapState } from 'vuex'
|
||||||
|
|
||||||
import strategiesQuery from 'gql/login-query-strategies.gql'
|
import strategiesQuery from 'gql/login-query-strategies.gql'
|
||||||
import loginMutation from 'gql/login-mutation-login.gql'
|
import loginMutation from 'gql/login-mutation-login.gql'
|
||||||
@ -62,12 +74,16 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapState(['notification']),
|
||||||
|
notificationState: {
|
||||||
|
get() { return this.notification.isActive },
|
||||||
|
set(newState) { this.$store.commit('updateNotificationState', newState) }
|
||||||
|
},
|
||||||
siteTitle () {
|
siteTitle () {
|
||||||
return siteConfig.title
|
return siteConfig.title
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.$store.commit('navigator/subtitleStatic', 'Login')
|
|
||||||
this.refreshStrategies()
|
this.refreshStrategies()
|
||||||
this.$refs.iptEmail.focus()
|
this.$refs.iptEmail.focus()
|
||||||
},
|
},
|
||||||
@ -95,27 +111,27 @@ export default {
|
|||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.error(err)
|
console.error(err)
|
||||||
this.$store.dispatch('alert', {
|
this.$store.commit('showNotification', {
|
||||||
style: 'error',
|
style: 'red',
|
||||||
icon: 'gg-warning',
|
message: err.message,
|
||||||
msg: err.message
|
icon: 'warning'
|
||||||
})
|
})
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
login () {
|
login () {
|
||||||
if (this.username.length < 2) {
|
if (this.username.length < 2) {
|
||||||
this.$store.dispatch('alert', {
|
this.$store.commit('showNotification', {
|
||||||
style: 'error',
|
style: 'red',
|
||||||
icon: 'gg-warning',
|
message: 'Enter a valid email / username.',
|
||||||
msg: 'Enter a valid email / username.'
|
icon: 'warning'
|
||||||
})
|
})
|
||||||
this.$refs.iptEmail.focus()
|
this.$refs.iptEmail.focus()
|
||||||
} else if (this.password.length < 2) {
|
} else if (this.password.length < 2) {
|
||||||
this.$store.dispatch('alert', {
|
this.$store.commit('showNotification', {
|
||||||
style: 'error',
|
style: 'red',
|
||||||
icon: 'gg-warning',
|
message: 'Enter a valid password.',
|
||||||
msg: 'Enter a valid password.'
|
icon: 'warning'
|
||||||
})
|
})
|
||||||
this.$refs.iptPassword.focus()
|
this.$refs.iptPassword.focus()
|
||||||
} else {
|
} else {
|
||||||
@ -130,7 +146,7 @@ export default {
|
|||||||
}).then(resp => {
|
}).then(resp => {
|
||||||
if (_.has(resp, 'data.authentication.login')) {
|
if (_.has(resp, 'data.authentication.login')) {
|
||||||
let respObj = _.get(resp, 'data.authentication.login', {})
|
let respObj = _.get(resp, 'data.authentication.login', {})
|
||||||
if (respObj.operation.succeeded === true) {
|
if (respObj.responseResult.succeeded === true) {
|
||||||
if (respObj.tfaRequired === true) {
|
if (respObj.tfaRequired === true) {
|
||||||
this.screen = 'tfa'
|
this.screen = 'tfa'
|
||||||
this.securityCode = ''
|
this.securityCode = ''
|
||||||
@ -139,25 +155,26 @@ export default {
|
|||||||
this.$refs.iptTFA.focus()
|
this.$refs.iptTFA.focus()
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$store.dispatch('alert', {
|
this.$store.commit('showNotification', {
|
||||||
|
message: 'Login successful!',
|
||||||
style: 'success',
|
style: 'success',
|
||||||
icon: 'gg-check',
|
icon: 'check'
|
||||||
msg: 'Login successful!'
|
|
||||||
})
|
})
|
||||||
|
window.location.replace('/') // TEMPORARY - USE RETURNURL
|
||||||
}
|
}
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
} else {
|
} else {
|
||||||
throw new Error(respObj.operation.message)
|
throw new Error(respObj.responseResult.message)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new Error('Authentication is unavailable.')
|
throw new Error('Authentication is unavailable.')
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.error(err)
|
console.error(err)
|
||||||
this.$store.dispatch('alert', {
|
this.$store.commit('showNotification', {
|
||||||
style: 'error',
|
style: 'red',
|
||||||
icon: 'gg-warning',
|
message: err.message,
|
||||||
msg: err.message
|
icon: 'warning'
|
||||||
})
|
})
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
})
|
})
|
||||||
@ -165,10 +182,10 @@ export default {
|
|||||||
},
|
},
|
||||||
verifySecurityCode () {
|
verifySecurityCode () {
|
||||||
if (this.securityCode.length !== 6) {
|
if (this.securityCode.length !== 6) {
|
||||||
this.$store.dispatch('alert', {
|
this.$store.commit('showNotification', {
|
||||||
style: 'error',
|
style: 'red',
|
||||||
icon: 'gg-warning',
|
message: 'Enter a valid security code.',
|
||||||
msg: 'Enter a valid security code.'
|
icon: 'warning'
|
||||||
})
|
})
|
||||||
this.$refs.iptTFA.focus()
|
this.$refs.iptTFA.focus()
|
||||||
} else {
|
} else {
|
||||||
@ -182,25 +199,25 @@ export default {
|
|||||||
}).then(resp => {
|
}).then(resp => {
|
||||||
if (_.has(resp, 'data.authentication.loginTFA')) {
|
if (_.has(resp, 'data.authentication.loginTFA')) {
|
||||||
let respObj = _.get(resp, 'data.authentication.loginTFA', {})
|
let respObj = _.get(resp, 'data.authentication.loginTFA', {})
|
||||||
if (respObj.operation.succeeded === true) {
|
if (respObj.responseResult.succeeded === true) {
|
||||||
this.$store.dispatch('alert', {
|
this.$store.commit('showNotification', {
|
||||||
|
message: 'Login successful!',
|
||||||
style: 'success',
|
style: 'success',
|
||||||
icon: 'gg-check',
|
icon: 'check'
|
||||||
msg: 'Login successful!'
|
|
||||||
})
|
})
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
} else {
|
} else {
|
||||||
throw new Error(respObj.operation.message)
|
throw new Error(respObj.responseResult.message)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new Error('Authentication is unavailable.')
|
throw new Error('Authentication is unavailable.')
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.error(err)
|
console.error(err)
|
||||||
this.$store.dispatch('alert', {
|
this.$store.commit('showNotification', {
|
||||||
style: 'error',
|
style: 'red',
|
||||||
icon: 'gg-warning',
|
message: err.message,
|
||||||
msg: err.message
|
icon: 'warning'
|
||||||
})
|
})
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user