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 @@