From 653f381f81e66d751d3fe5ff3235302aa8a338f5 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Fri, 24 Mar 2023 19:34:40 +0100 Subject: [PATCH] Frontend: Update about page and footer Signed-off-by: Michael Mayer --- frontend/.eslintrc.js | 1 + frontend/src/common/config.js | 10 +-- frontend/src/component/components.js | 6 ++ frontend/src/component/footer.vue | 26 +++++-- .../icon/{live_photo.vue => live-photo.vue} | 0 frontend/src/component/icon/prism.vue | 8 ++ frontend/src/component/icons.js | 9 ++- frontend/src/component/navigation.vue | 3 +- frontend/src/component/photo/cards.vue | 2 +- frontend/src/component/photo/list.vue | 2 +- frontend/src/component/photo/mosaic.vue | 2 +- frontend/src/css/app.css | 2 +- frontend/src/css/themes.css | 2 + frontend/src/css/{font.css => typography.css} | 9 +++ frontend/src/locales/af.po | 69 ++++++++++-------- frontend/src/locales/ar.po | 65 ++++++++++------- frontend/src/locales/be.po | 73 ++++++++++--------- frontend/src/locales/bg.po | 65 ++++++++++------- frontend/src/locales/ca.po | 69 ++++++++++-------- frontend/src/locales/cs.po | 65 ++++++++++------- frontend/src/locales/da.po | 65 ++++++++++------- frontend/src/locales/de.po | 65 ++++++++++------- frontend/src/locales/el.po | 65 ++++++++++------- frontend/src/locales/en.po | 65 ++++++++++------- frontend/src/locales/es.po | 65 ++++++++++------- frontend/src/locales/et.po | 69 ++++++++++-------- frontend/src/locales/fa.po | 69 ++++++++++-------- frontend/src/locales/fi.po | 65 ++++++++++------- frontend/src/locales/fr.po | 65 ++++++++++------- frontend/src/locales/he.po | 65 ++++++++++------- frontend/src/locales/hi.po | 65 ++++++++++------- frontend/src/locales/hr.po | 65 ++++++++++------- frontend/src/locales/hu.po | 65 ++++++++++------- frontend/src/locales/id.po | 65 ++++++++++------- frontend/src/locales/it.po | 65 ++++++++++------- frontend/src/locales/ja.po | 65 ++++++++++------- frontend/src/locales/ko.po | 65 ++++++++++------- frontend/src/locales/ku.po | 65 ++++++++++------- frontend/src/locales/lt.po | 65 ++++++++++------- frontend/src/locales/ms.po | 65 ++++++++++------- frontend/src/locales/nb.po | 65 ++++++++++------- frontend/src/locales/nl.po | 65 ++++++++++------- frontend/src/locales/pl.po | 65 ++++++++++------- frontend/src/locales/pt.po | 65 ++++++++++------- frontend/src/locales/pt_BR.po | 65 ++++++++++------- frontend/src/locales/ro.po | 65 ++++++++++------- frontend/src/locales/ru.po | 65 ++++++++++------- frontend/src/locales/sk.po | 65 ++++++++++------- frontend/src/locales/sl.po | 72 ++++++++++-------- frontend/src/locales/sv.po | 65 ++++++++++------- frontend/src/locales/th.po | 65 ++++++++++------- frontend/src/locales/tr.po | 65 ++++++++++------- frontend/src/locales/translations.json | 2 +- frontend/src/locales/translations.pot | 65 ++++++++++------- frontend/src/locales/uk.po | 65 ++++++++++------- frontend/src/locales/zh.po | 65 ++++++++++------- frontend/src/locales/zh_TW.po | 65 ++++++++++------- frontend/src/page/about/about.vue | 32 ++++---- 58 files changed, 1688 insertions(+), 1189 deletions(-) rename frontend/src/component/icon/{live_photo.vue => live-photo.vue} (100%) create mode 100644 frontend/src/component/icon/prism.vue rename frontend/src/css/{font.css => typography.css} (88%) diff --git a/frontend/.eslintrc.js b/frontend/.eslintrc.js index 5adf39bcc..144c0fc68 100644 --- a/frontend/.eslintrc.js +++ b/frontend/.eslintrc.js @@ -52,6 +52,7 @@ module.exports = { "no-console": 0, "no-case-declarations": 0, "no-prototype-builtins": 0, + "vue/no-v-text-v-html-on-component": 0, "vue/valid-model-definition": 0, "vue/valid-attribute-name": 0, "vue/first-attribute-linebreak": [ diff --git a/frontend/src/common/config.js b/frontend/src/common/config.js index 32fe71448..8ccf9ed87 100644 --- a/frontend/src/common/config.js +++ b/frontend/src/common/config.js @@ -602,8 +602,6 @@ export default class Config { if (!s) { return "PhotoPrism"; - } else if (s === "PhotoPrism" && this.values.sponsor) { - return "PhotoPrism+"; } return s; @@ -613,7 +611,7 @@ export default class Config { const s = this.get("about"); if (!s) { - return "PhotoPrism® Dev"; + return "PhotoPrism®"; } return s; @@ -633,11 +631,13 @@ export default class Config { return this.getEdition() === "ce"; } - getLicense() { - const s = this.get("license"); + getMembership() { + const s = this.get("membership"); if (!s) { return "ce"; + } else if (s === "ce" && this.isSponsor()) { + return "essentials"; } return s; diff --git a/frontend/src/component/components.js b/frontend/src/component/components.js index 71a7bc83f..9c9f36cfc 100644 --- a/frontend/src/component/components.js +++ b/frontend/src/component/components.js @@ -42,6 +42,9 @@ import PSubjectClipboard from "component/subject/clipboard.vue"; import PAuthHeader from "component/auth/header.vue"; import PAuthFooter from "component/auth/footer.vue"; import PAboutFooter from "component/footer.vue"; +import IconLivePhoto from "component/icon/live-photo.vue"; +import IconSponsor from "component/icon/sponsor.vue"; +import IconPrism from "component/icon/prism.vue"; const components = {}; @@ -65,6 +68,9 @@ components.install = (Vue) => { Vue.component("PAuthHeader", PAuthHeader); Vue.component("PAuthFooter", PAuthFooter); Vue.component("PAboutFooter", PAboutFooter); + Vue.component("IconLivePhoto", IconLivePhoto); + Vue.component("IconSponsor", IconSponsor); + Vue.component("IconPrism", IconPrism); }; export default components; diff --git a/frontend/src/component/footer.vue b/frontend/src/component/footer.vue index 388679e12..7e8a97c6d 100644 --- a/frontend/src/component/footer.vue +++ b/frontend/src/component/footer.vue @@ -3,7 +3,7 @@ - {{ about }} + {{ about }} {{ getMembership() }} Build {{ build }} @@ -27,19 +27,35 @@ export default { const ver = this.$config.getVersion().split("-"); const build = ver.slice(0, 2).join("-"); const about = this.$config.getAbout(); - const customer = this.$config.get("customer"); + const membership = this.$config.getMembership(); + const customer = this.$config.getCustomer(); const evaluation = !customer; return { rtl: this.$rtl, build: build, about: about, - version: this.$config.getVersion(), - sponsor: this.$config.isSponsor(), + membership: membership, customer: customer, evaluation: evaluation, + version: this.$config.getVersion(), + sponsor: this.$config.isSponsor(), }; }, - methods: {}, + methods: { + getMembership() { + const m = this.$config.getMembership(); + switch (m) { + case "ce": + return "CE"; + case "cloud": + return "Cloud"; + case "essentials": + return "Essentials"; + default: + return "Plus"; + } + } + }, }; diff --git a/frontend/src/component/icon/live_photo.vue b/frontend/src/component/icon/live-photo.vue similarity index 100% rename from frontend/src/component/icon/live_photo.vue rename to frontend/src/component/icon/live-photo.vue diff --git a/frontend/src/component/icon/prism.vue b/frontend/src/component/icon/prism.vue new file mode 100644 index 000000000..a617c0b66 --- /dev/null +++ b/frontend/src/component/icon/prism.vue @@ -0,0 +1,8 @@ + + \ No newline at end of file diff --git a/frontend/src/component/icons.js b/frontend/src/component/icons.js index 34ff2f2d1..d8cc94822 100644 --- a/frontend/src/component/icons.js +++ b/frontend/src/component/icons.js @@ -23,8 +23,9 @@ Additional information can be found in our Developer Guide: */ -import IconLivePhoto from "component/icon/live_photo.vue"; +import IconLivePhoto from "component/icon/live-photo.vue"; import IconSponsor from "component/icon/sponsor.vue"; +import IconPrism from "component/icon/prism.vue"; const icons = { live_photo: { @@ -39,6 +40,12 @@ const icons = { name: "sponsor", }, }, + prism: { + component: IconPrism, + props: { + name: "prism", + }, + }, }; export default icons; diff --git a/frontend/src/component/navigation.vue b/frontend/src/component/navigation.vue index c1f66b449..04473f880 100644 --- a/frontend/src/component/navigation.vue +++ b/frontend/src/component/navigation.vue @@ -671,7 +671,6 @@