Parcourir la source

feat(admin): add footerExtra field to admin general

Nicolas Giard il y a 3 ans
Parent
commit
c011d714d5

+ 1 - 0
server/db/migrations/3.0.0.js

@@ -452,6 +452,7 @@ exports.up = async knex => {
       description: '',
       company: '',
       contentLicense: '',
+      footerExtra: '',
       defaults: {
         timezone: 'America/New_York',
         dateFormat: 'YYYY-MM-DD',

+ 2 - 0
server/graph/schemas/site.graphql

@@ -53,6 +53,7 @@ type Site {
   description: String
   company: String
   contentLicense: String
+  footerExtra: String
   logoText: Boolean
   sitemap: Boolean
   robots: SiteRobots
@@ -130,6 +131,7 @@ input SiteUpdateInput {
   description: String
   company: String
   contentLicense: String
+  footerExtra: String
   logoText: Boolean
   sitemap: Boolean
   robots: SiteRobotsInput

+ 1 - 0
server/models/sites.js

@@ -37,6 +37,7 @@ module.exports = class Site extends Model {
         description: '',
         company: '',
         contentLicense: '',
+        footerExtra: '',
         defaults: {
           timezone: 'America/New_York',
           dateFormat: 'YYYY-MM-DD',

+ 1 - 0
ux/public/_assets/icons/ultraviolet-subtitles.svg

@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"  viewBox="0 0 40 40" width="80px" height="80px"><path fill="#98ccfd" d="M1.5 5.5H38.5V34.5H1.5z"/><path fill="#4788c7" d="M38,6v28H2V6H38 M39,5H1v30h38V5L39,5z"/><path fill="#fff" d="M9,20v8h15l4,4v-4h3v-8H9z M27,25h-2v-2h2V25z M23,25h-2v-2h2V25z M19,25h-2v-2h2V25z M15,25h-2v-2h2 V25z"/></svg>

+ 3 - 1
ux/src/i18n/locales/en.json

@@ -1424,5 +1424,7 @@
   "admin.general.sitemapHint": "Make a sitemap.xml available to search engines with all pages accessible to guests.",
   "admin.groups.usersNone": "This group doesn't have any user yet.",
   "admin.mail.smtpName": "Client Identifying Name",
-  "admin.mail.smtpNameHint": "An optional name to send to the SMTP server to identify your mailer. Leave empty to use server hostname. For Google Workspace customers, this should be your main domain name."
+  "admin.mail.smtpNameHint": "An optional name to send to the SMTP server to identify your mailer. Leave empty to use server hostname. For Google Workspace customers, this should be your main domain name.",
+  "admin.general.footerExtra": "Additional Footer Text",
+  "admin.general.footerExtraHint": "Optionally add more content to the footer, such as additional copyright terms or mandatory regulatory info."
 }

+ 16 - 0
ux/src/pages/AdminGeneral.vue

@@ -118,6 +118,19 @@ q-page.admin-general
               dense
               :aria-label='t(`admin.general.contentLicense`)'
               )
+        q-separator.q-my-sm(inset)
+        q-item
+          blueprint-icon(icon='subtitles')
+          q-item-section
+            q-item-label {{t(`admin.general.footerExtra`)}}
+            q-item-label(caption) {{t(`admin.general.footerExtraHint`)}}
+          q-item-section
+            q-input(
+              outlined
+              v-model='state.config.footerExtra'
+              dense
+              :aria-label='t(`admin.general.footerExtra`)'
+              )
 
       //- -----------------------
       //- FEATURES
@@ -430,6 +443,7 @@ const state = reactive({
     description: '',
     company: '',
     contentLicense: '',
+    footerExtra: '',
     logoText: false,
     ratings: {
       index: false,
@@ -517,6 +531,7 @@ async function load () {
           description
           company
           contentLicense
+          footerExtra
           logoText
           sitemap
           robots {
@@ -578,6 +593,7 @@ async function save () {
           description: state.config.description ?? '',
           company: state.config.company ?? '',
           contentLicense: state.config.contentLicense ?? '',
+          footerExtra: state.config.footerExtra ?? '',
           logoText: state.config.logoText ?? false,
           sitemap: state.config.sitemap ?? false,
           robots: {

+ 1 - 1
ux/src/pages/AdminLogin.vue

@@ -39,7 +39,7 @@ q-page.admin-login
       q-card.shadow-1.q-pb-sm
         q-card-section
           .text-subtitle1 {{t('admin.login.experience')}}
-        q-item(tag='label')
+        q-item
           blueprint-icon(icon='full-image', indicator, :indicator-text='t(`admin.extensions.requiresSharp`)')
           q-item-section
             q-item-label {{t(`admin.login.background`)}}