Help & Support: Improve about.vue and connect.vue pages

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer 2023-03-29 12:53:51 +02:00
parent 7a55f13f63
commit c4593b750e
8 changed files with 83 additions and 77 deletions

View file

@ -2001,21 +2001,21 @@
}
},
"node_modules/@eslint-community/regexpp": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.4.1.tgz",
"integrity": "sha512-BISJ6ZE4xQsuL/FmsyRaiffpq977bMlsKfGHTQrOGFErfByxIe6iZTxPf/00Zon9b9a7iUykfQwejN3s2ZW/Bw==",
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.0.tgz",
"integrity": "sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ==",
"engines": {
"node": "^12.0.0 || ^14.0.0 || >=16.0.0"
}
},
"node_modules/@eslint/eslintrc": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.1.tgz",
"integrity": "sha512-eFRmABvW2E5Ho6f5fHLqgena46rOj7r7OKHYfLElqcBfGFHHpjBhivyi5+jOEQuSpdc/1phIZJlbC2te+tZNIw==",
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz",
"integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==",
"dependencies": {
"ajv": "^6.12.4",
"debug": "^4.3.2",
"espree": "^9.5.0",
"espree": "^9.5.1",
"globals": "^13.19.0",
"ignore": "^5.2.0",
"import-fresh": "^3.2.1",
@ -2072,9 +2072,9 @@
}
},
"node_modules/@eslint/js": {
"version": "8.36.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.36.0.tgz",
"integrity": "sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg==",
"version": "8.37.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.37.0.tgz",
"integrity": "sha512-x5vzdtOOGgFVDCUs81QRB2+liax8rFg3+7hqM+QhBG0/G3F1ZsoYl97UrqgHgQ9KKT7G6c4V+aTUCgu/n22v1A==",
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
}
@ -2408,9 +2408,9 @@
}
},
"node_modules/@types/node": {
"version": "18.15.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.10.tgz",
"integrity": "sha512-9avDaQJczATcXgfmMAW3MIWArOO7A+m90vuCFLr8AotWf8igO/mRoYukrk2cqZVtv38tHs33retzHEilM7FpeQ=="
"version": "18.15.11",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz",
"integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q=="
},
"node_modules/@types/pbf": {
"version": "3.0.2",
@ -4904,14 +4904,14 @@
}
},
"node_modules/eslint": {
"version": "8.36.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.36.0.tgz",
"integrity": "sha512-Y956lmS7vDqomxlaaQAHVmeb4tNMp2FWIvU/RnU5BD3IKMD/MJPr76xdyr68P8tV1iNMvN2mRK0yy3c+UjL+bw==",
"version": "8.37.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.37.0.tgz",
"integrity": "sha512-NU3Ps9nI05GUoVMxcZx1J8CNR6xOvUT4jAUMH5+z8lpp3aEdPVCImKw6PWG4PY+Vfkpr+jvMpxs/qoE7wq0sPw==",
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.4.0",
"@eslint/eslintrc": "^2.0.1",
"@eslint/js": "8.36.0",
"@eslint/eslintrc": "^2.0.2",
"@eslint/js": "8.37.0",
"@humanwhocodes/config-array": "^0.11.8",
"@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8",
@ -4922,8 +4922,8 @@
"doctrine": "^3.0.0",
"escape-string-regexp": "^4.0.0",
"eslint-scope": "^7.1.1",
"eslint-visitor-keys": "^3.3.0",
"espree": "^9.5.0",
"eslint-visitor-keys": "^3.4.0",
"espree": "^9.5.1",
"esquery": "^1.4.2",
"esutils": "^2.0.2",
"fast-deep-equal": "^3.1.3",
@ -5290,9 +5290,9 @@
}
},
"node_modules/eslint-plugin-n": {
"version": "15.6.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.6.1.tgz",
"integrity": "sha512-R9xw9OtCRxxaxaszTQmQAlPgM+RdGjaL1akWuY/Fv9fRAi8Wj4CUKc6iYVG8QNRjRuo8/BqVYIpfqberJUEacA==",
"version": "15.7.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.7.0.tgz",
"integrity": "sha512-jDex9s7D/Qial8AGVIHq4W7NswpUD5DPDL2RH8Lzd9EloWUuvUkHfv4FRLMipH5q2UtyurorBkPeNi1wVWNh3Q==",
"peer": true,
"dependencies": {
"builtins": "^5.0.1",
@ -5827,13 +5827,13 @@
}
},
"node_modules/espree": {
"version": "9.5.0",
"resolved": "https://registry.npmjs.org/espree/-/espree-9.5.0.tgz",
"integrity": "sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw==",
"version": "9.5.1",
"resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz",
"integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==",
"dependencies": {
"acorn": "^8.8.0",
"acorn-jsx": "^5.3.2",
"eslint-visitor-keys": "^3.3.0"
"eslint-visitor-keys": "^3.4.0"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"

View file

@ -493,7 +493,7 @@
</v-list-tile-content>
</v-list-tile>
<v-list-tile v-show="isAdmin && !isPublic && !isDemo && featUpgrade" :to="{ name: 'upgrade' }" class="nav-upgrade" :exact="true" @click.stop="">
<v-list-tile v-show="isSuperAdmin && !isPublic && !isDemo && featUpgrade" :to="{ name: 'upgrade' }" class="nav-upgrade" :exact="true" @click.stop="">
<v-list-tile-content>
<v-list-tile-title :class="`menu-item ${rtl ? '--rtl' : ''}`">
<translate key="Upgrade">Upgrade</translate>
@ -720,6 +720,7 @@ export default {
isPublic: isPublic,
isReadOnly: isReadOnly,
isAdmin: this.$session.isAdmin(),
isSuperAdmin: this.$session.isSuperAdmin(),
isSponsor: this.$config.isSponsor(),
isTest: this.$config.test,
session: this.$session,

View file

@ -23,7 +23,7 @@
<translate>Being 100% self-funded and independent, we can promise you that we will never sell your data and that we will always be transparent about our software and services.</translate>
</p>
<p class="body-1">
<translate>Feel free to contact us at hello@photoprism.app if you have any questions.</translate>
<translate>Feel free to contact us at members@photoprism.app for questions regarding your membership.</translate>
</p>
</v-flex>
</v-layout>

File diff suppressed because one or more lines are too long

View file

@ -12,7 +12,7 @@
</v-btn>
</v-toolbar>
<v-container fluid class="px-4 pt-4 pb-1">
<p class="subheading py-2 text-selectable">
<p class="subheading py-1 pb-2 text-selectable">
<strong><translate>At PhotoPrism, we believe that every moment captured through a photograph is precious, and our mission is to enable people to cherish those moments for generations to come.</translate></strong>
</p>
@ -23,7 +23,7 @@
<translate>Your continued support helps us provide regular updates and remain independent, so we can fulfill our mission and protect your privacy.</translate>
<translate>Being 100% self-funded and independent, we can promise you that we will never sell your data and that we will always be transparent about our software and services.</translate>
</p>
<p v-if="isAdmin && !isPublic" class="text-xs-center my-4">
<p v-if="isSuperAdmin" class="text-xs-center my-4">
<v-btn
to="/upgrade"
color="primary-button"
@ -36,12 +36,12 @@
</v-btn>
</p>
</template>
<template v-else-if="isAdmin && !isPublic">
<h3 class="subheading py-2"><translate>Membership</translate></h3>
<template v-else-if="isSuperAdmin">
<h3 class="subheading py-2"><translate>Thanks for Your Support!</translate> <v-icon size="20" color="primary">favorite</v-icon></h3>
<p class="text-selectable">
<translate>PhotoPrism is 100% self-funded and independent.</translate>
<translate>Your continued support helps us provide regular updates and remain independent, so we can fulfill our mission and protect your privacy.</translate>
<translate>Feel free to contact us at hello@photoprism.app if you have any questions.</translate>
<translate>Feel free to contact us at members@photoprism.app for questions regarding your membership.</translate>
</p>
<p class="text-xs-center my-4">
<v-btn
@ -50,7 +50,7 @@
class="white--text px-3 py-2 action-upgrade"
round depressed
>
<translate>Manage account</translate>
<translate>Manage Account</translate>
<v-icon v-if="rtl" left dark>navigate_before</v-icon>
<v-icon v-else right dark>navigate_next</v-icon>
</v-btn>
@ -58,44 +58,38 @@
</template>
<div class="text-columns py-2">
<h3 class="subheading py-2"><translate>User Guide</translate></h3>
<p class="text-selectable" style="break-inside: avoid-column">
<translate>Visit docs.photoprism.app/user-guide to learn how to sync, organize, and share your pictures.</translate>
<translate>Our User Guide also covers many advanced topics, such as migrating from Google Photos and thumbnail quality settings.</translate>
<translate>Common issues can be quickly diagnosed and solved using the troubleshooting checklists we provide.</translate>
<br>
<a href="https://link.photoprism.app/docs" class="text-link d-inline-block pt-2" target="_blank"><translate>Read the Docs</translate> </a>
<h3 class="subheading pb-2">Getting Started</h3>
<p class="text-selectable">
Follow our <a href="https://docs.photoprism.app/user-guide/first-steps/" class="text-link" target="_blank">First Steps 👣</a> tutorial to learn how to navigate the user interface and ensure your library is indexed according to your individual preferences.
Additional help and product-specific information can be found in our <a href="https://www.photoprism.app/plus/kb" class="text-link" target="_blank">Knowledge Base</a>.
</p>
<h3 class="subheading py-2"><translate>Knowledge Base</translate></h3>
<p class="text-selectable" style="break-inside: avoid-column">
<translate>Browse the Knowledge Base for detailed information on specific product features, services, and related resources.</translate>
<br>
<a href="https://www.photoprism.app/kb" class="text-link d-inline-block pt-2" target="_blank"><translate>Learn more</translate> </a>
<h3 class="subheading pb-2">User Guide</h3>
<p>
Visit <a href="https://link.photoprism.app/docs" class="text-link" target="_blank">docs.photoprism.app/user-guide</a> to learn how to sync, organize, and share your pictures. Our <a href="https://docs.photoprism.app/user-guide/" class="text-link" target="_blank">User Guide</a> also covers many advanced topics, such as <a href="https://docs.photoprism.app/user-guide/use-cases/google/" class="text-link" target="_blank">migrating from Google Photos</a> and <a href="https://docs.photoprism.app/user-guide/settings/advanced/#images" class="text-link" target="_blank">thumbnail quality settings</a>.
Common issues can be quickly diagnosed and solved using the troubleshooting checklists we provide at <a href="https://docs.photoprism.app/getting-started/troubleshooting/" class="text-link" target="_blank">docs.photoprism.app/getting-started/troubleshooting</a>.
</p>
<h3 class="subheading py-2">
<translate>Getting Support</translate>
</h3>
<p class="body-1 text-selectable">
<a target="_blank" href="https://docs.photoprism.app/getting-started/troubleshooting/">
<translate>Before submitting a support request, please use our Troubleshooting Checklists to determine the cause of your problem.</translate>
<translate>If this doesn't help, or you have other questions:</translate>
</a>
</p>
<ul class="body-1 mb-3">
<li><a target="_blank" href="https://link.photoprism.app/reddit"><translate>you are welcome to join us on Reddit</translate></a></li>
<li><a target="_blank" href="https://link.photoprism.app/discussions"><translate>post your question in GitHub Discussions</translate></a></li>
<li><a target="_blank" href="https://link.photoprism.app/chat"><translate>or ask in our Community Chat</translate></a></li>
</ul>
<p class="body-1 text-selectable" style="break-inside: avoid-column">
<a target="_blank" href="https://www.photoprism.app/contact"><translate>In addition, sponsors receive direct technical support via email.</translate></a>
<span v-if="!isSponsor">
<translate>We'll do our best to answer all your questions. In return, we ask you to back us on Patreon or GitHub Sponsors.</translate>
</span>
<br>
<a href="https://www.photoprism.app/kb/getting-support" class="text-link d-inline-block pt-2" target="_blank"><translate>Learn more</translate> </a>
</p>
<h3 class="subheading pb-2">Getting Support</h3>
<p>Before reporting a bug, please use our <a href="https://docs.photoprism.app/getting-started/troubleshooting/" class="text-link" target="_blank">Troubleshooting Checklists</a>
to determine the cause of your problem. If you have a general question, need help, it could be a local configuration
issue, or a misunderstanding in how the software works, you are welcome to ask in our <a href="https://link.photoprism.app/chat" class="text-link" target="_blank">Community Chat</a>
or post your question in <a href="https://link.photoprism.app/discussions" class="text-link" target="_blank">GitHub Discussions</a></p>
<p>When reporting a problem, always include the software versions you are using and <a href="https://www.photoprism.app/kb/reporting-bugs" class="text-link" target="_blank">other information about your environment</a>
such as <a href="https://docs.photoprism.app/getting-started/troubleshooting/browsers/" class="text-link" target="_blank">browser, browser plugins</a>, operating system, storage type,
memory size, and processor.</p>
<p>We kindly ask you not to report bugs via GitHub Issues unless you are certain to have found a fully reproducible and previously unreported issue that must be fixed directly in the app.</p>
<h3 class="subheading pb-2">Developer Guide</h3>
<p>Our <a href="https://docs.photoprism.app/developer-guide/" class="text-link" target="_blank">Developer Guide</a> contains all the information you need to get started as a developer. It guides you from <a href="https://docs.photoprism.app/developer-guide/setup/" class="text-link" target="_blank">setting up your development environment</a> and <a href="https://docs.photoprism.app/developer-guide/pull-requests/" class="text-link" target="_blank">creating pull requests</a> to <a href="https://docs.photoprism.app/developer-guide/tests/" class="text-link" target="_blank">running tests</a> and <a href="https://docs.photoprism.app/developer-guide/translations-weblate/" class="text-link" target="_blank">adding translations</a>. Multiple subsections provide details on specific features and links to external resources for further information.</p>
<h3 class="subheading pb-2">Terms &amp; Privacy</h3>
<p>Visit <a href="https://www.photoprism.app/terms" class="text-link" target="_blank"><strong>photoprism.app/terms</strong></a> to learn how we work, what you can expect from us, and what we expect from you.
What information we collect, how we use it, and under what circumstances we share it is explained in our <a href="https://www.photoprism.app/privacy" class="text-link" target="_blank">Privacy Policy</a>.</p>
<p>Read our <a href="https://www.photoprism.app/privacy/gdpr" class="text-link" target="_blank">GDPR Compliance Statement</a> to learn more about the rights you have as a resident of the European Economic Area ("EEA"), our ongoing commitment to user privacy, and the General Data Protection Regulation ("GDPR").</p>
<p>Our <a href="https://www.photoprism.app/trademark" class="text-link" target="_blank">Trademark and Brand Guidelines</a>, which may be updated from time to time, describe how our brand assets may be used. It is important to us that any permitted use of our brand assets is fair and meets the highest standards.</p>
</div>
<p class="text-xs-center pt-4 ma-0 pb-0">
@ -131,13 +125,15 @@ export default {
name: 'PPageAbout',
data() {
const membership = this.$config.getMembership();
const isDemo = this.$config.isDemo();
const isPublic = this.$config.isPublic();
return {
rtl: this.$rtl,
membership: membership,
canUpgrade: membership === 'ce' || membership === 'essentials',
isPublic: this.$config.isPublic(),
isAdmin: this.$session.isAdmin(),
isDemo: this.$config.isDemo(),
isDemo: isDemo,
isPublic: isPublic,
isSuperAdmin: this.$session.isSuperAdmin() && !isPublic && !isDemo,
isSponsor: this.$config.isSponsor(),
};
},

View file

@ -76,7 +76,7 @@
<v-flex xs12 grow class="pa-2">
<v-btn href="https://my.photoprism.app/dashboard" target="_blank" color="primary-button lighten-2" :block="$vuetify.breakpoint.xsOnly"
class="ml-0" outline :disabled="busy">
<translate>Manage account</translate>
<translate>Manage Account</translate>
</v-btn>
<v-btn v-if="$config.values.restart" color="primary-button" :block="$vuetify.breakpoint.xsOnly"
class="white--text ml-0" depressed :disabled="busy" @click.stop.p.prevent="onRestart">
@ -111,7 +111,7 @@
class="ml-0"
outline
:disabled="busy">
<translate>Manage account</translate>
<translate>Manage Account</translate>
</v-btn>
<v-btn v-else color="primary-button lighten-2" :block="$vuetify.breakpoint.xsOnly"
class="ml-0"
@ -208,7 +208,7 @@ export default {
},
created() {
this.$config.load().then(() => {
if (this.$config.isPublic() || !this.$session.isAdmin()) {
if (this.$config.isPublic() || !this.$session.isSuperAdmin()) {
this.$router.push({name: "home"});
}
});

View file

@ -49,7 +49,7 @@ func Connect(router *gin.RouterGroup) {
s := Auth(c, acl.ResourceConfig, acl.ActionUpdate)
if s.Invalid() {
if !s.IsSuperAdmin() {
log.Errorf("connect: %s not authorized", clean.Log(s.User().UserName))
AbortForbidden(c)
return

View file

@ -414,6 +414,15 @@ func (m *Session) IsVisitor() bool {
return m.User().IsVisitor()
}
// IsSuperAdmin checks if the session belongs to a registered super admin user.
func (m *Session) IsSuperAdmin() bool {
if !m.IsRegistered() {
return false
}
return m.User().IsSuperAdmin()
}
// IsRegistered checks if the session belongs to a registered user account.
func (m *Session) IsRegistered() bool {
if m == nil || m.user == nil || rnd.InvalidUID(m.UserUID, UserUID) {