Frontend: Update login and about page

This commit is contained in:
Michael Mayer 2022-01-29 13:43:09 +01:00
parent 3d74ae6585
commit 6fd03a0813
10 changed files with 30 additions and 22 deletions

View file

@ -62,4 +62,4 @@ You can also contribute by...
---- ----
*PhotoPrism® is a [registered trademark](https://photoprism.app/trademark). Docs [are available](https://github.com/photoprism/photoprism-docs) under the [CC BY-NC-SA 4.0 License](https://creativecommons.org/licenses/by-nc-sa/4.0/); [additional terms](https://github.com/photoprism/photoprism/blob/develop/assets/LICENSE) may apply. By using our software and services, you agree to our [terms & conditions](https://photoprism.app/terms).* *PhotoPrism® is a [registered trademark](https://photoprism.app/trademark). Docs are [available](https://github.com/photoprism/photoprism-docs) under the [CC BY-NC-SA 4.0 License](https://creativecommons.org/licenses/by-nc-sa/4.0/); [additional terms](https://github.com/photoprism/photoprism/blob/develop/assets/LICENSE) may apply. By using our software, you agree to our [terms of service](https://photoprism.app/terms).*

View file

@ -125,4 +125,4 @@ We welcome [contributions](CONTRIBUTING.md) of any kind, including blog posts, t
---- ----
*PhotoPrism® is a [registered trademark](https://photoprism.app/trademark). Docs [are available](https://github.com/photoprism/photoprism-docs) under the [CC BY-NC-SA 4.0 License](https://creativecommons.org/licenses/by-nc-sa/4.0/); [additional terms](https://github.com/photoprism/photoprism/blob/develop/assets/LICENSE) may apply. By using our software and services, you agree to our [terms & conditions](https://photoprism.app/terms).* *PhotoPrism® is a [registered trademark](https://photoprism.app/trademark). Docs are [available](https://github.com/photoprism/photoprism-docs) under the [CC BY-NC-SA 4.0 License](https://creativecommons.org/licenses/by-nc-sa/4.0/); [additional terms](https://github.com/photoprism/photoprism/blob/develop/assets/LICENSE) may apply. By using our software, you agree to our [terms of service](https://photoprism.app/terms).*

View file

@ -90,7 +90,7 @@ Vue.prototype.$config = config;
Vue.prototype.$clipboard = Clipboard; Vue.prototype.$clipboard = Clipboard;
Vue.prototype.$isMobile = isMobile; Vue.prototype.$isMobile = isMobile;
Vue.prototype.$rtl = rtl; Vue.prototype.$rtl = rtl;
Vue.prototype.$earlyAccess = () => { Vue.prototype.$sponsorFeatures = () => {
return config.load().finally(() => { return config.load().finally(() => {
if (config.values.sponsor) { if (config.values.sponsor) {
return Promise.resolve(); return Promise.resolve();

View file

@ -22,7 +22,7 @@ import "./css/app.css";
import Event from "pubsub-js"; import Event from "pubsub-js";
export default { export default {
name: 'Photoprism', name: 'PhotoPrism',
data() { data() {
return { return {
touchStart: 0, touchStart: 0,

View file

@ -361,6 +361,14 @@ export default class Config {
return []; return [];
} }
isSponsor() {
if (!this.values || !this.values.sponsor) {
return false;
}
return !this.values.demo && !this.values.test;
}
appIcon() { appIcon() {
switch (this.get("appIcon")) { switch (this.get("appIcon")) {
case "crisp": case "crisp":

View file

@ -2,18 +2,17 @@
<v-card flat tile class="ma-0 pa-0 application p-about-footer"> <v-card flat tile class="ma-0 pa-0 application p-about-footer">
<v-card-actions class="px-4 py-2"> <v-card-actions class="px-4 py-2">
<v-layout wrap align-top pt-3> <v-layout wrap align-top pt-3>
<v-flex xs12 sm6 class="px-0 pb-2 body-1 text-selectable"> <v-flex xs12 sm6 class="px-0 pb-2 body-1 text-selectable text-xs-left">
<template v-if="sponsor"><router-link to="/about"><translate>Thank you very much for your support!</translate></router-link></template> Build {{ $config.get("version") }}<br>
<template v-else><router-link to="/about" class="text-link"><translate>Help us make a difference and become a sponsor today!</translate></router-link></template> <template v-if="sponsor"><router-link to="/about" class="text-link"><translate>Thank you for supporting PhotoPrism®</translate></router-link></template>
<br> <strong v-else><router-link to="/about" class="text-link"><translate>PhotoPrism® needs your support</translate></router-link></strong>
PhotoPrism® {{ $config.get("version") }}
</v-flex> </v-flex>
<v-flex xs12 sm6 class="px-0 pb-2 body-1 text-xs-left text-sm-right"> <v-flex xs12 sm6 class="px-0 pb-2 body-1 text-xs-left text-sm-right">
<a href="https://photoprism.app/team/" target="_blank">© 2018-2022 Michael Mayer</a><br>
<a href="https://raw.githubusercontent.com/photoprism/photoprism/develop/NOTICE" <a href="https://raw.githubusercontent.com/photoprism/photoprism/develop/NOTICE"
target="_blank"> target="_blank" class="text-link">
3rd-party software packages</a><br> 3rd-party software packages</a>
<a href="https://photoprism.app/team/" target="_blank">© 2018-2022 Michael Mayer</a>
</v-flex> </v-flex>
</v-layout> </v-layout>
</v-card-actions> </v-card-actions>
@ -25,7 +24,8 @@ export default {
name: 'PAboutFooter', name: 'PAboutFooter',
data() { data() {
return { return {
sponsor: this.$config.values.sponsor && !this.$config.values.demo, rtl: this.$rtl,
sponsor: this.$config.isSponsor(),
}; };
}, },
methods: {}, methods: {},

View file

@ -88,9 +88,9 @@
<p class="caption mt-4 text-xs-center"> <p class="caption mt-4 text-xs-center">
PhotoPrism® is a <a href="https://photoprism.app/trademark" rel="nofollow" target="_blank" class="text-link">registered trademark</a>. PhotoPrism® is a <a href="https://photoprism.app/trademark" rel="nofollow" target="_blank" class="text-link">registered trademark</a>.
Docs <a href="https://github.com/photoprism/photoprism-docs" rel="nofollow" target="_blank" class="text-link">are available</a> under the Docs are <a href="https://github.com/photoprism/photoprism-docs" rel="nofollow" target="_blank" class="text-link">available</a> under the
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" rel="nofollow" target="_blank" class="text-link">CC BY-NC-SA 4.0 License</a>; additional terms may apply. <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" rel="nofollow" target="_blank" class="text-link">CC BY-NC-SA 4.0 License</a>; additional terms may apply.
By using our software and services, you agree to our <a href="https://photoprism.app/terms" rel="nofollow" target="_blank" class="text-link">terms &amp; conditions</a>. By using our software, you agree to our <a href="https://photoprism.app/terms" rel="nofollow" target="_blank" class="text-link">terms of service</a>.
</p> </p>
</v-container> </v-container>
<p-about-footer></p-about-footer> <p-about-footer></p-about-footer>
@ -103,7 +103,7 @@ export default {
data() { data() {
return { return {
rtl: this.$rtl, rtl: this.$rtl,
sponsor: this.$config.values.sponsor && !this.$config.values.demo, sponsor: this.$config.isSponsor(),
}; };
}, },
methods: {}, methods: {},

View file

@ -64,9 +64,9 @@ export default {
return { return {
loading: false, loading: false,
showPassword: false, showPassword: false,
username: "admin", username: "",
password: "", password: "",
sponsor: this.$config.values.sponsor, sponsor: this.$config.isSponsor(),
siteDescription: c.siteDescription ? c.siteDescription : c.siteCaption, siteDescription: c.siteDescription ? c.siteDescription : c.siteCaption,
nextUrl: this.$route.params.nextUrl ? this.$route.params.nextUrl : "/", nextUrl: this.$route.params.nextUrl ? this.$route.params.nextUrl : "/",
rtl: this.$rtl, rtl: this.$rtl,

View file

@ -400,7 +400,7 @@ export default {
this.showHidden(""); this.showHidden("");
}, },
showHidden(value) { showHidden(value) {
this.$earlyAccess().then(() => { this.$sponsorFeatures().then(() => {
this.filter.hidden = value; this.filter.hidden = value;
this.updateQuery(); this.updateQuery();
}).catch(() => { }).catch(() => {
@ -414,7 +414,7 @@ export default {
return; return;
} }
this.$earlyAccess().then(() => { this.$sponsorFeatures().then(() => {
this.toggleHidden(this.results[index]); this.toggleHidden(this.results[index]);
}).catch(() => { }).catch(() => {
this.dialog.sponsor = true; this.dialog.sponsor = true;

View file

@ -371,7 +371,7 @@ export default {
return false; return false;
} }
this.$earlyAccess().then(() => { this.$sponsorFeatures().then(() => {
this.currentTheme = value; this.currentTheme = value;
this.onChange(); this.onChange();
}).catch(() => { }).catch(() => {
@ -397,7 +397,7 @@ export default {
return false; return false;
} }
this.$earlyAccess().then(() => { this.$sponsorFeatures().then(() => {
this.currentMapsStyle = value; this.currentMapsStyle = value;
this.onChange(); this.onChange();
}).catch(() => { }).catch(() => {