feat: admin mail + system translations
This commit is contained in:
		| @@ -19,12 +19,12 @@ | |||||||
|                   v-toolbar(color='primary', dark, dense, flat) |                   v-toolbar(color='primary', dark, dense, flat) | ||||||
|                     v-toolbar-title |                     v-toolbar-title | ||||||
|                       .subheading {{ $t('admin:mail.configuration') }} |                       .subheading {{ $t('admin:mail.configuration') }} | ||||||
|                   v-subheader Sender |                   v-subheader {{ $t('admin:mail.sender') }} | ||||||
|                   .px-3.pb-3 |                   .px-3.pb-3 | ||||||
|                     v-text-field( |                     v-text-field( | ||||||
|                       outline |                       outline | ||||||
|                       v-model='config.senderName' |                       v-model='config.senderName' | ||||||
|                       label='Sender Name' |                       :label='$t(`admin:mail.senderName`)' | ||||||
|                       required |                       required | ||||||
|                       :counter='255' |                       :counter='255' | ||||||
|                       prepend-icon='person' |                       prepend-icon='person' | ||||||
| @@ -32,18 +32,18 @@ | |||||||
|                     v-text-field( |                     v-text-field( | ||||||
|                       outline |                       outline | ||||||
|                       v-model='config.senderEmail' |                       v-model='config.senderEmail' | ||||||
|                       label='Sender Email' |                       :label='$t(`admin:mail.senderEmail`)' | ||||||
|                       required |                       required | ||||||
|                       :counter='255' |                       :counter='255' | ||||||
|                       prepend-icon='email' |                       prepend-icon='email' | ||||||
|                       ) |                       ) | ||||||
|                   v-divider |                   v-divider | ||||||
|                   v-subheader SMTP Settings |                   v-subheader {{ $t('admin:mail.smtp') }} | ||||||
|                   .px-3.pb-3 |                   .px-3.pb-3 | ||||||
|                     v-text-field( |                     v-text-field( | ||||||
|                       outline |                       outline | ||||||
|                       v-model='config.host' |                       v-model='config.host' | ||||||
|                       label='Host' |                       :label='$t(`admin:mail.smtpHost`)' | ||||||
|                       required |                       required | ||||||
|                       :counter='255' |                       :counter='255' | ||||||
|                       prepend-icon='memory' |                       prepend-icon='memory' | ||||||
| @@ -51,25 +51,25 @@ | |||||||
|                     v-text-field( |                     v-text-field( | ||||||
|                       outline |                       outline | ||||||
|                       v-model='config.port' |                       v-model='config.port' | ||||||
|                       label='Port' |                       :label='$t(`admin:mail.smtpPort`)' | ||||||
|                       required |                       required | ||||||
|                       prepend-icon='router' |                       prepend-icon='router' | ||||||
|                       persistent-hint |                       persistent-hint | ||||||
|                       hint='Usually 465 (recommended), 587 or 25.' |                       :hint='$t(`admin:mail.smtpPortHint`)' | ||||||
|                       style='max-width: 300px;' |                       style='max-width: 300px;' | ||||||
|                       ) |                       ) | ||||||
|                     v-switch( |                     v-switch( | ||||||
|                       v-model='config.secure' |                       v-model='config.secure' | ||||||
|                       label='Secure (TLS)' |                       :label='$t(`admin:mail.smtpTLS`)' | ||||||
|                       color='primary' |                       color='primary' | ||||||
|                       persistent-hint |                       persistent-hint | ||||||
|                       hint='Should be enabled when using port 465, otherwise turned off (587 or 25).' |                       :hint='$t(`admin:mail.smtpTLSHint`)' | ||||||
|                       prepend-icon='vpn_lock' |                       prepend-icon='vpn_lock' | ||||||
|                       ) |                       ) | ||||||
|                     v-text-field.mt-3( |                     v-text-field.mt-3( | ||||||
|                       outline |                       outline | ||||||
|                       v-model='config.user' |                       v-model='config.user' | ||||||
|                       label='Username' |                       :label='$t(`admin:mail.smtpUser`)' | ||||||
|                       required |                       required | ||||||
|                       :counter='255' |                       :counter='255' | ||||||
|                       prepend-icon='lock_outline' |                       prepend-icon='lock_outline' | ||||||
| @@ -77,7 +77,7 @@ | |||||||
|                     v-text-field( |                     v-text-field( | ||||||
|                       outline |                       outline | ||||||
|                       v-model='config.pass' |                       v-model='config.pass' | ||||||
|                       label='Password' |                       :label='$t(`admin:mail.smtpPwd`)' | ||||||
|                       required |                       required | ||||||
|                       prepend-icon='lock' |                       prepend-icon='lock' | ||||||
|                       type='password' |                       type='password' | ||||||
| @@ -90,17 +90,17 @@ | |||||||
|                     v-toolbar-title |                     v-toolbar-title | ||||||
|                       .subheading {{ $t('admin:mail.dkim') }} |                       .subheading {{ $t('admin:mail.dkim') }} | ||||||
|                   .pa-3 |                   .pa-3 | ||||||
|                     .body-2.grey--text.text--darken-2 DKIM (DomainKeys Identified Mail) provides a layer of security on all emails sent from Wiki.js by providing the means for recipients to validate the domain name and ensure the message authenticity. |                     .body-2.grey--text.text--darken-2 {{ $t('admin:mail.dkimHint') }} | ||||||
|                     v-switch( |                     v-switch( | ||||||
|                       v-model='config.useDKIM' |                       v-model='config.useDKIM' | ||||||
|                       label='Use DKIM' |                       :label='$t(`admin:mail.dkimUse`)' | ||||||
|                       color='primary' |                       color='primary' | ||||||
|                       prepend-icon='vpn_key' |                       prepend-icon='vpn_key' | ||||||
|                       ) |                       ) | ||||||
|                     v-text-field( |                     v-text-field( | ||||||
|                       outline |                       outline | ||||||
|                       v-model='config.dkimDomainName' |                       v-model='config.dkimDomainName' | ||||||
|                       label='Domain Name' |                       :label='$t(`admin:mail.dkimDomainName`)' | ||||||
|                       :counter='255' |                       :counter='255' | ||||||
|                       prepend-icon='vpn_key' |                       prepend-icon='vpn_key' | ||||||
|                       :disabled='!config.useDKIM' |                       :disabled='!config.useDKIM' | ||||||
| @@ -108,7 +108,7 @@ | |||||||
|                     v-text-field( |                     v-text-field( | ||||||
|                       outline |                       outline | ||||||
|                       v-model='config.dkimKeySelector' |                       v-model='config.dkimKeySelector' | ||||||
|                       label='Key Selector' |                       :label='$t(`admin:mail.dkimKeySelector`)' | ||||||
|                       :counter='255' |                       :counter='255' | ||||||
|                       prepend-icon='vpn_key' |                       prepend-icon='vpn_key' | ||||||
|                       :disabled='!config.useDKIM' |                       :disabled='!config.useDKIM' | ||||||
| @@ -116,13 +116,32 @@ | |||||||
|                     v-text-field( |                     v-text-field( | ||||||
|                       outline |                       outline | ||||||
|                       v-model='config.dkimPrivateKey' |                       v-model='config.dkimPrivateKey' | ||||||
|                       label='Private Key' |                       :label='$t(`admin:mail.dkimPrivateKey`)' | ||||||
|                       prepend-icon='vpn_key' |                       prepend-icon='vpn_key' | ||||||
|                       persistent-hint |                       persistent-hint | ||||||
|                       hint='Private key for the selector in PEM format' |                       :hint='$t(`admin:mail.dkimPrivateKeyHint`)' | ||||||
|                       :disabled='!config.useDKIM' |                       :disabled='!config.useDKIM' | ||||||
|                       ) |                       ) | ||||||
|  |  | ||||||
|  |               v-card.mt-3.wiki-form.animated.fadeInUp.wait-p3s | ||||||
|  |                 v-form | ||||||
|  |                   v-toolbar(color='teal', dark, dense, flat) | ||||||
|  |                     v-toolbar-title | ||||||
|  |                       .subheading {{ $t('admin:mail.test') }} | ||||||
|  |                   .pa-3 | ||||||
|  |                     .body-2.grey--text.text--darken-2 {{ $t('admin:mail.testHint') }} | ||||||
|  |                     v-text-field.mt-3( | ||||||
|  |                       outline | ||||||
|  |                       v-model='testEmail' | ||||||
|  |                       :label='$t(`admin:mail.testRecipient`)' | ||||||
|  |                       :counter='255' | ||||||
|  |                       prepend-icon='mail' | ||||||
|  |                       disabled | ||||||
|  |                       ) | ||||||
|  |                   v-card-chin | ||||||
|  |                     v-spacer | ||||||
|  |                     v-btn(color='teal', :dark='false', disabled) {{ $t('admin:mail.testSend') }} | ||||||
|  |  | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| <script> | <script> | ||||||
| @@ -146,7 +165,8 @@ export default { | |||||||
|         dkimDomainName: '', |         dkimDomainName: '', | ||||||
|         dkimKeySelector: '', |         dkimKeySelector: '', | ||||||
|         dkimPrivateKey: '' |         dkimPrivateKey: '' | ||||||
|       } |       }, | ||||||
|  |       testEmail: '' | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   computed: { |   computed: { | ||||||
| @@ -176,7 +196,7 @@ export default { | |||||||
|         }) |         }) | ||||||
|         this.$store.commit('showNotification', { |         this.$store.commit('showNotification', { | ||||||
|           style: 'success', |           style: 'success', | ||||||
|           message: 'Configuration saved successfully.', |           message: this.$t('admin:mail.saveSuccess'), | ||||||
|           icon: 'check' |           icon: 'check' | ||||||
|         }) |         }) | ||||||
|       } catch (err) { |       } catch (err) { | ||||||
|   | |||||||
| @@ -91,7 +91,7 @@ | |||||||
|                     v-list-tile-title(v-html='dbVersion') |                     v-list-tile-title(v-html='dbVersion') | ||||||
|                     v-list-tile-sub-title {{ info.dbHost }} |                     v-list-tile-sub-title {{ info.dbHost }} | ||||||
|  |  | ||||||
|                 v-alert.mt-3(:value='isDbLimited', color='deep-orange', icon='warning') Your database version is not fully supported. Some functionality may be limited or not work as expected. |                 v-alert.mt-3(:value='isDbLimited', color='deep-orange', icon='warning') {{ $t('admin.system.dbPartialSupport') }} | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
| <script> | <script> | ||||||
| @@ -138,7 +138,7 @@ export default { | |||||||
|     async refresh() { |     async refresh() { | ||||||
|       await this.$apollo.queries.info.refetch() |       await this.$apollo.queries.info.refetch() | ||||||
|       this.$store.commit('showNotification', { |       this.$store.commit('showNotification', { | ||||||
|         message: 'System Info has been refreshed.', |         message: this.$t('admin.system.refreshSuccess'), | ||||||
|         style: 'success', |         style: 'success', | ||||||
|         icon: 'cached' |         icon: 'cached' | ||||||
|       }) |       }) | ||||||
|   | |||||||
| @@ -16,15 +16,15 @@ | |||||||
|                   .body-2.mt-2.grey--text.text--darken-2 API Docs |                   .body-2.mt-2.grey--text.text--darken-2 API Docs | ||||||
|                   .caption.grey--text.text--darken-1 REST / GraphQL |                   .caption.grey--text.text--darken-1 REST / GraphQL | ||||||
|             v-flex(xs4) |             v-flex(xs4) | ||||||
|               v-card.radius-7( |               v-card.radius-7.grey( | ||||||
|                 hover |                 hover | ||||||
|                 light |                 light | ||||||
|                 ripple |                 ripple | ||||||
|                 ) |                 ) | ||||||
|                 v-card-text.text-xs-center(@click='selectEditor("code")') |                 v-card-text.text-xs-center(@click='selectEditor("code")') | ||||||
|                   img(src='/svg/icon-source-code.svg', alt='Code', style='width: 36px;') |                   img(src='/svg/icon-source-code.svg', alt='Code', style='width: 36px;') | ||||||
|                   .body-2.mt-2 Code |                   .body-2.mt-2.grey--text.text--darken-2 Code | ||||||
|                   .caption.grey--text Raw HTML |                   .caption.grey--text.text--darken-1 Raw HTML | ||||||
|             v-flex(xs4) |             v-flex(xs4) | ||||||
|               v-card.radius-7( |               v-card.radius-7( | ||||||
|                 hover |                 hover | ||||||
| @@ -87,7 +87,7 @@ export default { | |||||||
|       get() { return this.value }, |       get() { return this.value }, | ||||||
|       set(val) { this.$emit('input', val) } |       set(val) { this.$emit('input', val) } | ||||||
|     }, |     }, | ||||||
|     currentEditor: sync('editor/editor'), |     currentEditor: sync('editor/editor') | ||||||
|   }, |   }, | ||||||
|   methods: { |   methods: { | ||||||
|     selectEditor(name) { |     selectEditor(name) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user