From e954b50a7ac9669bc515493ce621b23a7bd93e54 Mon Sep 17 00:00:00 2001 From: NGPixel Date: Thu, 16 Feb 2023 20:45:55 -0500 Subject: [PATCH] feat: footer text override option --- client/components/admin/admin-general.vue | 15 +++++++++++++++ client/store/site.js | 1 + client/themes/default/components/nav-footer.vue | 5 ++++- server/app/data.yml | 1 + server/graph/resolvers/site.js | 7 ++++++- server/graph/schemas/site.graphql | 2 ++ server/master.js | 1 + server/modules/storage/git/storage.js | 2 +- 8 files changed, 31 insertions(+), 3 deletions(-) diff --git a/client/components/admin/admin-general.vue b/client/components/admin/admin-general.vue index 8804ee39..3ac524a8 100644 --- a/client/components/admin/admin-general.vue +++ b/client/components/admin/admin-general.vue @@ -82,6 +82,14 @@ :return-object='false' :hint='$t(`admin:general.contentLicenseHint`)' persistent-hint + ) + v-text-field.mt-3( + outlined + :label='$t(`admin:general.footerOverride`)' + v-model='config.footerOverride' + prepend-icon='mdi-page-layout-footer' + persistent-hint + :hint='$t(`admin:general.footerOverrideHint`)' ) v-divider .overline.grey--text.pa-4 SEO @@ -280,6 +288,7 @@ export default { analyticsId: '', company: '', contentLicense: '', + footerOverride: '', logoUrl: '', featureAnalytics: false, featurePageRatings: false, @@ -308,6 +317,7 @@ export default { logoUrl: sync('site/logoUrl'), company: sync('site/company'), contentLicense: sync('site/contentLicense'), + footerOverride: sync('site/footerOverride'), activeModal: sync('editor/activeModal'), contentLicenses () { return [ @@ -346,6 +356,7 @@ export default { $analyticsId: String $company: String $contentLicense: String + $footerOverride: String $logoUrl: String $pageExtensions: String $featurePageRatings: Boolean @@ -369,6 +380,7 @@ export default { analyticsId: $analyticsId company: $company contentLicense: $contentLicense + footerOverride: $footerOverride logoUrl: $logoUrl pageExtensions: $pageExtensions featurePageRatings: $featurePageRatings @@ -401,6 +413,7 @@ export default { analyticsId: _.get(this.config, 'analyticsId', ''), company: _.get(this.config, 'company', ''), contentLicense: _.get(this.config, 'contentLicense', ''), + footerOverride: _.get(this.config, 'footerOverride', ''), logoUrl: _.get(this.config, 'logoUrl', ''), pageExtensions: _.get(this.config, 'pageExtensions', ''), featurePageRatings: _.get(this.config, 'featurePageRatings', false), @@ -426,6 +439,7 @@ export default { this.siteTitle = this.config.title this.company = this.config.company this.contentLicense = this.config.contentLicense + this.footerOverride = this.config.footerOverride this.logoUrl = this.config.logoUrl } catch (err) { this.$store.commit('pushGraphError', err) @@ -461,6 +475,7 @@ export default { analyticsId company contentLicense + footerOverride logoUrl pageExtensions featurePageRatings diff --git a/client/store/site.js b/client/store/site.js index 979468c7..0e3369de 100644 --- a/client/store/site.js +++ b/client/store/site.js @@ -5,6 +5,7 @@ import { make } from 'vuex-pathify' const state = { company: siteConfig.company, contentLicense: siteConfig.contentLicense, + footerOverride: siteConfig.footerOverride, dark: siteConfig.darkMode, tocPosition: siteConfig.tocPosition, mascot: true, diff --git a/client/themes/default/components/nav-footer.vue b/client/themes/default/components/nav-footer.vue index 08e44fcd..a43428d6 100644 --- a/client/themes/default/components/nav-footer.vue +++ b/client/themes/default/components/nav-footer.vue @@ -1,7 +1,9 @@