Skip to content

Commit

Permalink
Frontend: Update about page and footer
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Mayer <[email protected]>
  • Loading branch information
lastzero committed Mar 24, 2023
1 parent 0239551 commit 653f381
Show file tree
Hide file tree
Showing 58 changed files with 1,684 additions and 1,185 deletions.
1 change: 1 addition & 0 deletions frontend/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/common/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,6 @@ export default class Config {

if (!s) {
return "PhotoPrism";
} else if (s === "PhotoPrism" && this.values.sponsor) {
return "PhotoPrism+";
}

return s;
Expand All @@ -613,7 +611,7 @@ export default class Config {
const s = this.get("about");

if (!s) {
return "PhotoPrism® Dev";
return "PhotoPrism®";
}

return s;
Expand All @@ -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;
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/component/components.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};

Expand All @@ -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;
26 changes: 21 additions & 5 deletions frontend/src/component/footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<v-card-actions class="footer-actions">
<v-layout wrap align-top pt-3>
<v-flex xs12 sm6 class="px-0 pb-2 body-1 text-selectable text-xs-left">
<strong><router-link to="/about" class="text-link">{{ about }}</router-link></strong>
<strong><router-link to="/about" class="text-link text-selectable">{{ about }}&nbsp;{{ getMembership() }}</router-link></strong>
<span class="body-link text-selectable">Build&nbsp;<a href="https://docs.photoprism.app/release-notes/" target="_blank" :title="version" class="body-link">{{ build }}</a></span>
</v-flex>

Expand All @@ -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";
}
}
},
};
</script>
File renamed without changes.
8 changes: 8 additions & 0 deletions frontend/src/component/icon/prism.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<template>
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48"><path d="M480 936 80 456l120-240h560l120 240-400 480ZM368 426h224l-75-150h-74l-75 150Zm82 381V486H183l267 321Zm60 0 267-321H510v321Zm149-381h136l-75-150H584l75 150Zm-494 0h136l75-150H240l-75 150Z" style="fill: currentcolor" /></svg>
</template>
<script>
export default {
name: "IconPrism",
};
</script>
9 changes: 8 additions & 1 deletion frontend/src/component/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -39,6 +40,12 @@ const icons = {
name: "sponsor",
},
},
prism: {
component: IconPrism,
props: {
name: "prism",
},
},
};

export default icons;
3 changes: 1 addition & 2 deletions frontend/src/component/navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,6 @@
</template>

<script>
import Album from "model/album";
import Event from "pubsub-js";
export default {
Expand Down Expand Up @@ -714,7 +713,7 @@ export default {
appIcon: this.$config.getIcon(),
indexing: false,
drawer: null,
featUpgrade: this.$config.getLicense() === "ce",
featUpgrade: this.$config.getMembership() === "ce",
isRestricted: isRestricted,
isMini: localStorage.getItem('last_navigation_mode') !== 'false' || isRestricted,
isDemo: isDemo,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/photo/cards.vue
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ import download from "common/download";
import Notify from "common/notify";
import {Input, InputInvalid, ClickShort, ClickLong} from "common/input";
import {virtualizationTools} from 'common/virtualization-tools';
import IconLivePhoto from "component/icon/live_photo.vue";
import IconLivePhoto from "component/icon/live-photo.vue";
export default {
name: 'PPhotoCards',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/photo/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
import download from "common/download";
import Notify from "common/notify";
import {virtualizationTools} from 'common/virtualization-tools';
import IconLivePhoto from "component/icon/live_photo.vue";
import IconLivePhoto from "component/icon/live-photo.vue";
export default {
name: 'PPhotoList',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/photo/mosaic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
<script>
import {Input, InputInvalid, ClickShort, ClickLong} from "common/input";
import {virtualizationTools} from 'common/virtualization-tools';
import IconLivePhoto from "component/icon/live_photo.vue";
import IconLivePhoto from "component/icon/live-photo.vue";
export default {
name: 'PPhotoMosaic',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Additional information can be found in our Developer Guide:
@import url("vendor/icons/material-design-icons.css");
@import url("../../node_modules/vuetify/dist/vuetify.min.css");
@import url("../../node_modules/maplibre-gl/dist/maplibre-gl.css");
@import url("font.css");
@import url("typography.css");
@import url("wallpapers.css");
@import url("scrollbar.css");
@import url("themes.css");
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/css/themes.css
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ body.dark-theme #photoprism .theme--light.v-expansion-panel .v-expansion-panel__
body.dark-theme #photoprism .theme--light.v-tabs__bar .v-tabs__div,
body.dark-theme #photoprism .theme--light {
color: #ffffff;
caret-color: #ffffff;
stroke: #ffffff;
}

body.dark-theme #photoprism .theme--light.v-label {
Expand Down
9 changes: 9 additions & 0 deletions frontend/src/css/font.css → frontend/src/css/typography.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ body .application {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

@media (min-width: 600px) {
.text-columns {
column-count: 2;
column-gap: 2em;
orphans: 3;
widows: 0;
}
}

button.v-btn.compact {
font-size: 14px;
height: 34px;
Expand Down
Loading

0 comments on commit 653f381

Please sign in to comment.