feat: asset rename + delete
This commit is contained in:
@@ -42,6 +42,32 @@
|
||||
persistent-hint
|
||||
)
|
||||
v-divider
|
||||
v-subheader Logo #[v-chip.ml-2(label, color='grey', small, outline) coming soon]
|
||||
v-card-text.pb-4.pl-5
|
||||
v-layout.px-3(row, align-center)
|
||||
v-avatar(size='100', :color='$vuetify.dark ? `grey darken-2` : `grey lighten-3`', :tile='config.logoIsSquare')
|
||||
.ml-4
|
||||
v-btn.mx-0(color='teal', depressed, disabled)
|
||||
v-icon(left) cloud_upload
|
||||
span Upload Logo
|
||||
v-btn(color='teal', depressed, disabled)
|
||||
v-icon(left) clear
|
||||
span Clear
|
||||
.caption.grey--text An image of 120x120 pixels is recommended for best results.
|
||||
.caption.grey--text SVG, PNG or JPG files only.
|
||||
v-divider
|
||||
v-subheader Footer Copyright
|
||||
.px-3.pb-3
|
||||
v-text-field(
|
||||
outline
|
||||
label='Company / Organization Name'
|
||||
v-model='config.company'
|
||||
:counter='255'
|
||||
prepend-icon='business'
|
||||
persistent-hint
|
||||
hint='Name to use when displaying copyright notice in the footer. Leave empty to hide.'
|
||||
)
|
||||
v-divider
|
||||
v-subheader SEO
|
||||
.px-3.pb-3
|
||||
v-text-field(
|
||||
@@ -64,73 +90,65 @@
|
||||
hint='Default: Index, Follow. Can also be set on a per-page basis.'
|
||||
persistent-hint
|
||||
)
|
||||
v-divider
|
||||
v-subheader Analytics #[v-chip.ml-2(label, color='grey', small, outline) coming soon]
|
||||
.px-3.pb-3
|
||||
v-select.mt-2(
|
||||
outline
|
||||
label='Analytics Service Provider'
|
||||
:items='analyticsServices'
|
||||
v-model='config.analyticsService'
|
||||
prepend-icon='timeline'
|
||||
persistent-hint
|
||||
hint='Automatically add tracking code for services like Google Analytics.'
|
||||
)
|
||||
v-text-field.mt-2(
|
||||
v-if='config.analyticsService !== ``'
|
||||
outline
|
||||
label='Property Tracking ID'
|
||||
:counter='255'
|
||||
v-model='config.analyticsId'
|
||||
prepend-icon='timeline'
|
||||
persistent-hint
|
||||
hint='A unique identifier provided by your analytics service provider.'
|
||||
)
|
||||
v-flex(lg6 xs12)
|
||||
v-card.wiki-form.animated.fadeInUp.wait-p2s
|
||||
v-toolbar(color='primary', dark, dense, flat)
|
||||
v-toolbar-title
|
||||
.subheading {{ $t('admin:general.siteBranding') }}
|
||||
v-subheader Logo #[v-chip.ml-2(label, color='grey', small, outline) coming soon]
|
||||
v-card-text
|
||||
v-layout.px-3(row, align-center)
|
||||
v-avatar(size='120', :color='$vuetify.dark ? `grey darken-2` : `grey lighten-3`', :tile='config.logoIsSquare')
|
||||
.ml-4
|
||||
v-btn.mx-0(color='teal', depressed, disabled)
|
||||
v-icon(left) cloud_upload
|
||||
span Upload Logo
|
||||
v-btn(color='teal', depressed, disabled)
|
||||
v-icon(left) clear
|
||||
span Clear
|
||||
.caption.grey--text An image of 120x120 pixels is recommended for best results.
|
||||
.caption.grey--text SVG, PNG or JPG files only.
|
||||
v-switch(
|
||||
v-model='config.logoIsSquare'
|
||||
label='Use Square Logo Frame'
|
||||
color='primary'
|
||||
persistent-hint
|
||||
hint='Check this option if a round logo frame doesn\'t work with your logo.'
|
||||
)
|
||||
v-divider
|
||||
v-subheader Footer Copyright
|
||||
.px-3.pb-3
|
||||
v-text-field(
|
||||
outline
|
||||
label='Company / Organization Name'
|
||||
v-model='config.company'
|
||||
:counter='255'
|
||||
prepend-icon='business'
|
||||
persistent-hint
|
||||
hint='Name to use when displaying copyright notice in the footer. Leave empty to hide.'
|
||||
)
|
||||
|
||||
v-card.wiki-form.mt-3.animated.fadeInUp.wait-p4s
|
||||
v-flex(lg6 xs12)
|
||||
v-card.wiki-form.animated.fadeInUp.wait-p4s
|
||||
v-toolbar(color='primary', dark, dense, flat)
|
||||
v-toolbar-title
|
||||
.subheading Features
|
||||
v-spacer
|
||||
v-chip(label, color='white', small).primary--text coming soon
|
||||
v-card-text
|
||||
v-switch(
|
||||
label='Analytics'
|
||||
color='primary'
|
||||
v-model='config.featureAnalytics'
|
||||
persistent-hint
|
||||
hint='Enable site analytics using service provider.'
|
||||
disabled
|
||||
)
|
||||
v-select.mt-3(
|
||||
outline
|
||||
label='Analytics Service Provider'
|
||||
:items='analyticsServices'
|
||||
v-model='config.analyticsService'
|
||||
prepend-icon='subdirectory_arrow_right'
|
||||
persistent-hint
|
||||
hint='Automatically add tracking code for services like Google Analytics.'
|
||||
disabled
|
||||
)
|
||||
v-text-field.mt-2(
|
||||
v-if='config.analyticsService !== ``'
|
||||
outline
|
||||
label='Property Tracking ID'
|
||||
:counter='255'
|
||||
v-model='config.analyticsId'
|
||||
prepend-icon='timeline'
|
||||
persistent-hint
|
||||
hint='A unique identifier provided by your analytics service provider.'
|
||||
)
|
||||
|
||||
v-divider.mt-3
|
||||
v-switch(
|
||||
label='Asset Image Optimization'
|
||||
color='primary'
|
||||
v-model='config.featureTinyPNG'
|
||||
persistent-hint
|
||||
hint='Image optimization tool to reduce filesize and bandwidth costs.'
|
||||
disabled
|
||||
)
|
||||
v-text-field.mt-3(
|
||||
outline
|
||||
label='TinyPNG API Key'
|
||||
:counter='255'
|
||||
v-model='config.description'
|
||||
prepend-icon='subdirectory_arrow_right'
|
||||
hint='Get your API key at https://tinypng.com/developers'
|
||||
persistent-hint
|
||||
disabled
|
||||
)
|
||||
|
||||
v-divider.mt-3
|
||||
v-switch(
|
||||
label='Page Ratings'
|
||||
color='primary'
|
||||
@@ -138,6 +156,7 @@
|
||||
persistent-hint
|
||||
hint='Allow users to rate pages.'
|
||||
)
|
||||
|
||||
v-divider.mt-3
|
||||
v-switch(
|
||||
label='Page Comments'
|
||||
@@ -146,6 +165,7 @@
|
||||
persistent-hint
|
||||
hint='Allow users to leave comments on pages.'
|
||||
)
|
||||
|
||||
v-divider.mt-3
|
||||
v-switch(
|
||||
label='Personal Wikis'
|
||||
@@ -188,9 +208,11 @@ export default {
|
||||
company: '',
|
||||
hasLogo: false,
|
||||
logoIsSquare: false,
|
||||
featureAnalytics: false,
|
||||
featurePageRatings: false,
|
||||
featurePageComments: false,
|
||||
featurePersonalWikis: false
|
||||
featurePersonalWikis: false,
|
||||
featureTinyPNG: false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
116
client/components/admin/admin-webhooks.vue
Normal file
116
client/components/admin/admin-webhooks.vue
Normal file
@@ -0,0 +1,116 @@
|
||||
<template lang='pug'>
|
||||
v-container(fluid, grid-list-lg)
|
||||
v-layout(row, wrap)
|
||||
v-flex(xs12)
|
||||
.admin-header
|
||||
img.animated.fadeInUp(src='/svg/icon-winter.svg', alt='Mail', style='width: 80px;')
|
||||
.admin-header-title
|
||||
.headline.primary--text.animated.fadeInLeft {{ $t('admin:webhooks.title') }}
|
||||
.subheading.grey--text.animated.fadeInLeft.wait-p4s {{ $t('admin:webhooks.subtitle') }}
|
||||
v-spacer
|
||||
v-btn.animated.fadeInDown(color='success', depressed, @click='save', large, disabled)
|
||||
v-icon(left) check
|
||||
span {{$t('common:actions.apply')}}
|
||||
|
||||
v-flex(lg3, xs12)
|
||||
v-card.animated.fadeInUp
|
||||
v-toolbar(flat, color='primary', dark, dense)
|
||||
.subheading Webhooks
|
||||
v-spacer
|
||||
v-btn(outline, small)
|
||||
v-icon.mr-2 add
|
||||
span New
|
||||
v-list(two-line, dense).py-0
|
||||
template(v-for='(str, idx) in hooks')
|
||||
v-list-tile(:key='str.key', @click='selectedHook = str.key')
|
||||
v-list-tile-avatar
|
||||
v-icon(color='primary', v-if='str.isEnabled', v-ripple, @click='str.isEnabled = false') check_box
|
||||
v-icon(color='grey', v-else, v-ripple, @click='str.isEnabled = true') check_box_outline_blank
|
||||
v-list-tile-content
|
||||
v-list-tile-title.body-2(:class='!str.isAvailable ? `grey--text` : (selectedHook === str.key ? `primary--text` : ``)') {{ str.title }}
|
||||
v-list-tile-sub-title.caption(:class='!str.isAvailable ? `grey--text text--lighten-1` : (selectedHook === str.key ? `blue--text ` : ``)') {{ str.description }}
|
||||
v-list-tile-avatar(v-if='selectedHook === str.key')
|
||||
v-icon.animated.fadeInLeft(color='primary') arrow_forward_ios
|
||||
v-divider(v-if='idx < hooks.length - 1')
|
||||
|
||||
v-flex(xs12, lg9)
|
||||
v-card.wiki-form.animated.fadeInUp.wait-p2s
|
||||
v-toolbar(color='primary', dense, flat, dark)
|
||||
.subheading {{hook.title}}
|
||||
v-card-text
|
||||
v-form
|
||||
.authlogo
|
||||
img(:src='hook.logo', :alt='hook.title')
|
||||
.caption.pt-3 {{hook.description}}
|
||||
.caption.pb-3: a(:href='hook.website') {{hook.website}}
|
||||
.body-2(v-if='hook.isEnabled')
|
||||
span This hook is
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import _ from 'lodash'
|
||||
import { get } from 'vuex-pathify'
|
||||
import mailConfigQuery from 'gql/admin/mail/mail-query-config.gql'
|
||||
import mailUpdateConfigMutation from 'gql/admin/mail/mail-mutation-save-config.gql'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
hooks: [],
|
||||
selectedHook: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
hook() {
|
||||
return _.find(this.hooks, ['id', this.selectedHook]) || {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async save () {
|
||||
try {
|
||||
await this.$apollo.mutate({
|
||||
mutation: mailUpdateConfigMutation,
|
||||
variables: {
|
||||
senderName: this.config.senderName || '',
|
||||
senderEmail: this.config.senderEmail || '',
|
||||
host: this.config.host || '',
|
||||
port: _.toSafeInteger(this.config.port) || 0,
|
||||
secure: this.config.secure || false,
|
||||
user: this.config.user || '',
|
||||
pass: this.config.pass || '',
|
||||
useDKIM: this.config.useDKIM || false,
|
||||
dkimDomainName: this.config.dkimDomainName || '',
|
||||
dkimKeySelector: this.config.dkimKeySelector || '',
|
||||
dkimPrivateKey: this.config.dkimPrivateKey || ''
|
||||
},
|
||||
watchLoading (isLoading) {
|
||||
this.$store.commit(`loading${isLoading ? 'Start' : 'Stop'}`, 'admin-mail-update')
|
||||
}
|
||||
})
|
||||
this.$store.commit('showNotification', {
|
||||
style: 'success',
|
||||
message: 'Configuration saved successfully.',
|
||||
icon: 'check'
|
||||
})
|
||||
} catch (err) {
|
||||
this.$store.commit('pushGraphError', err)
|
||||
}
|
||||
}
|
||||
},
|
||||
apollo: {
|
||||
hooks: {
|
||||
query: mailConfigQuery,
|
||||
fetchPolicy: 'network-only',
|
||||
update: (data) => _.cloneDeep(data.mail.config),
|
||||
watchLoading (isLoading) {
|
||||
this.$store.commit(`loading${isLoading ? 'Start' : 'Stop'}`, 'admin-mail-refresh')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='scss'>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user