PWA: Add square and glow app icons

This commit is contained in:
Michael Mayer 2021-11-25 17:24:53 +01:00
parent ff66b3bccc
commit 34e1773595
92 changed files with 199 additions and 124 deletions

10
assets/LICENSE Normal file
View file

@ -0,0 +1,10 @@
Michael Mayer and his legal successors hereby grant you a non-exclusive, non-transferable right
to use these assets as part of the official software distribution. Additional terms may apply.
Unless you know specific assets were licensed under a permissive licence by the creator or copyright
holder, you are advised to ask before using them for your own private or commercial projects.
Visit https://docs.photoprism.org/credits/ for more information about images and other artwork.
PhotoPrism® is a registered trademark of Michael Mayer. By using our software, you agree to our
terms & conditions: https://photoprism.app/terms

View file

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View file

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View file

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View file

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View file

Before

Width:  |  Height:  |  Size: 8 KiB

After

Width:  |  Height:  |  Size: 8 KiB

View file

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View file

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View file

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View file

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View file

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View file

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View file

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View file

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 89 KiB

View file

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 119 KiB

View file

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View file

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View file

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View file

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

View file

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

View file

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View file

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View file

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

View file

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

View file

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View file

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View file

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View file

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View file

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
assets/static/icons/glow/114.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
assets/static/icons/glow/128.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

BIN
assets/static/icons/glow/144.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

BIN
assets/static/icons/glow/152.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
assets/static/icons/glow/16.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
assets/static/icons/glow/160.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

BIN
assets/static/icons/glow/167.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

BIN
assets/static/icons/glow/180.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
assets/static/icons/glow/192.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
assets/static/icons/glow/196.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
assets/static/icons/glow/256.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
assets/static/icons/glow/32.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
assets/static/icons/glow/400.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
assets/static/icons/glow/512.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
assets/static/icons/glow/72.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

View file

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View file

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View file

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View file

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View file

Before

Width:  |  Height:  |  Size: 760 B

After

Width:  |  Height:  |  Size: 760 B

View file

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View file

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View file

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

View file

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View file

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View file

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

View file

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

Before

Width:  |  Height:  |  Size: 171 KiB

After

Width:  |  Height:  |  Size: 171 KiB

View file

Before

Width:  |  Height:  |  Size: 260 KiB

After

Width:  |  Height:  |  Size: 260 KiB

View file

Before

Width:  |  Height:  |  Size: 8 KiB

After

Width:  |  Height:  |  Size: 8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
assets/static/icons/square/72.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View file

@ -10,7 +10,7 @@
<div class="loading-animation">
<div class="loading-circle"></div>
</div>
{{if not .config.Sponsor}}<div id="photoprism-info"><a href="https://docs.photoprism.org/funding/" target="_blank">{{ .config.SiteDescription }}</a></div>{{end}}
{{if not .config.Sponsor}}<div id="loading-info"><a href="{{ .signUp.url }}" target="_blank">{{ .signUp.message }}</a></div>{{end}}
</div>
<div id="busy-overlay"></div>

View file

@ -4,77 +4,77 @@
"description": "{{ .config.SiteDescription }}",
"icons": [
{
"src": "{{ .config.StaticUri }}/img/icons/{{ .config.AppIcon }}-16.png",
"src": "{{ .config.StaticUri }}/icons/{{ .config.AppIcon }}/16.png",
"sizes": "16x16",
"type": "image/png"
},
{
"src": "{{ .config.StaticUri }}/img/icons/{{ .config.AppIcon }}-32.png",
"src": "{{ .config.StaticUri }}/icons/{{ .config.AppIcon }}/32.png",
"sizes": "32x32",
"type": "image/png"
},
{
"src": "{{ .config.StaticUri }}/img/icons/{{ .config.AppIcon }}-72.png",
"src": "{{ .config.StaticUri }}/icons/{{ .config.AppIcon }}/72.png",
"sizes": "72x72",
"type": "image/png"
},
{
"src": "{{ .config.StaticUri }}/img/icons/{{ .config.AppIcon }}-114.png",
"src": "{{ .config.StaticUri }}/icons/{{ .config.AppIcon }}/114.png",
"sizes": "114x114",
"type": "image/png"
},
{
"src": "{{ .config.StaticUri }}/img/icons/{{ .config.AppIcon }}-128.png",
"src": "{{ .config.StaticUri }}/icons/{{ .config.AppIcon }}/128.png",
"sizes": "128x128",
"type": "image/png"
},
{
"src": "{{ .config.StaticUri }}/img/icons/{{ .config.AppIcon }}-144.png",
"src": "{{ .config.StaticUri }}/icons/{{ .config.AppIcon }}/144.png",
"sizes": "144x144",
"type": "image/png"
},
{
"src": "{{ .config.StaticUri }}/img/icons/{{ .config.AppIcon }}-152.png",
"src": "{{ .config.StaticUri }}/icons/{{ .config.AppIcon }}/152.png",
"sizes": "152x152",
"type": "image/png"
},
{
"src": "{{ .config.StaticUri }}/img/icons/{{ .config.AppIcon }}-160.png",
"src": "{{ .config.StaticUri }}/icons/{{ .config.AppIcon }}/160.png",
"sizes": "160x160",
"type": "image/png"
},
{
"src": "{{ .config.StaticUri }}/img/icons/{{ .config.AppIcon }}-167.png",
"src": "{{ .config.StaticUri }}/icons/{{ .config.AppIcon }}/167.png",
"sizes": "167x167",
"type": "image/png"
},
{
"src": "{{ .config.StaticUri }}/img/icons/{{ .config.AppIcon }}-180.png",
"src": "{{ .config.StaticUri }}/icons/{{ .config.AppIcon }}/180.png",
"sizes": "180x180",
"type": "image/png"
},
{
"src": "{{ .config.StaticUri }}/img/icons/{{ .config.AppIcon }}-192.png",
"src": "{{ .config.StaticUri }}/icons/{{ .config.AppIcon }}/192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "{{ .config.StaticUri }}/img/icons/{{ .config.AppIcon }}-196.png",
"src": "{{ .config.StaticUri }}/icons/{{ .config.AppIcon }}/196.png",
"sizes": "196x196",
"type": "image/png"
},
{
"src": "{{ .config.StaticUri }}/img/icons/{{ .config.AppIcon }}-256.png",
"src": "{{ .config.StaticUri }}/icons/{{ .config.AppIcon }}/256.png",
"sizes": "256x256",
"type": "image/png"
},
{
"src": "{{ .config.StaticUri }}/img/icons/{{ .config.AppIcon }}-400.png",
"src": "{{ .config.StaticUri }}/icons/{{ .config.AppIcon }}/400.png",
"sizes": "400x400",
"type": "image/png"
},
{
"src": "{{ .config.StaticUri }}/img/icons/{{ .config.AppIcon }}-512.png",
"src": "{{ .config.StaticUri }}/icons/{{ .config.AppIcon }}/512.png",
"sizes": "512x512",
"type": "image/png"
}

View file

@ -3068,9 +3068,9 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001282",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001282.tgz",
"integrity": "sha512-YhF/hG6nqBEllymSIjLtR2iWDDnChvhnVJqp+vloyt2tEHFG1yBR+ac2B/rOw0qOK0m0lEXU2dv4E/sMk5P9Kg==",
"version": "1.0.30001283",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001283.tgz",
"integrity": "sha512-9RoKo841j1GQFSJz/nCXOj0sD7tHBtlowjYlrqIUS812x9/emfBLBt6IyMz1zIaYc/eRL8Cs6HPUVi2Hzq4sIg==",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
@ -4345,9 +4345,9 @@
}
},
"node_modules/electron-to-chromium": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.0.tgz",
"integrity": "sha512-+oXCt6SaIu8EmFTPx8wNGSB0tHQ5biDscnlf6Uxuz17e9CjzMRtGk9B8705aMPnj0iWr3iC74WuIkngCsLElmA=="
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.1.tgz",
"integrity": "sha512-9ldvb6QMHiDpUNF1iSwBTiTT0qXEN+xIO5WlCJrC5gt0z74ofOiqR698vaJqYWnri0XZiF0YmnrFmGq/EmpGAA=="
},
"node_modules/emoji-regex": {
"version": "8.0.0",
@ -8774,9 +8774,9 @@
"integrity": "sha512-RVAzFGo1Mx9+YukVKSgTLut6r4ZVBW8IVrqGHAPfEsVJN93WSp5HRD6+qNa7av1q/joPKDNJd55m5AJl9GBQGA=="
},
"node_modules/postcss": {
"version": "8.4.0",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.0.tgz",
"integrity": "sha512-BRMNx3Wy7UI89jN8H4ZVS5lQMPM2OSMkOkvDCSjwXa7PWTs24k7Lm55NXLbMbs070LvraXaxN5l1npSOS6wMVw==",
"version": "8.4.1",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.1.tgz",
"integrity": "sha512-WqLs/TTzXdG+/A4ZOOK9WDZiikrRaiA+eoEb/jz2DT9KUhMNHgP7yKPO8vwi62ZCsb703Gwb7BMZwDzI54Y2Ag==",
"dependencies": {
"nanoid": "^3.1.30",
"picocolors": "^1.0.0",
@ -10756,9 +10756,9 @@
}
},
"node_modules/prettier": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.1.tgz",
"integrity": "sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==",
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.0.tgz",
"integrity": "sha512-FM/zAKgWTxj40rH03VxzIPdXmj39SwSjwG0heUcNFwI+EMZJnY93yAiKXM3dObIKAM5TA88werc8T/EwhB45eg==",
"bin": {
"prettier": "bin-prettier.js"
},
@ -11406,9 +11406,9 @@
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"node_modules/sass": {
"version": "1.43.4",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.43.4.tgz",
"integrity": "sha512-/ptG7KE9lxpGSYiXn7Ar+lKOv37xfWsZRtFYal2QHNigyVQDx685VFT/h7ejVr+R8w7H4tmUgtulsKl5YpveOg==",
"version": "1.43.5",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.43.5.tgz",
"integrity": "sha512-WuNm+eAryMgQluL7Mbq9M4EruyGGMyal7Lu58FfnRMVWxgUzIvI7aSn60iNt3kn5yZBMR7G84fAGDcwqOF5JOg==",
"dependencies": {
"chokidar": ">=3.0.0 <4.0.0"
},
@ -13153,9 +13153,9 @@
}
},
"node_modules/watchpack": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.2.0.tgz",
"integrity": "sha512-up4YAn/XHgZHIxFBVCdlMiWDj6WaLKpwVeGQk2I5thdYxF/KmF0aaz6TfJZ/hfl1h/XlcDr7k1KH7ThDagpFaA==",
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.0.tgz",
"integrity": "sha512-MnN0Q1OsvB/GGHETrFeZPQaOelWh/7O+EiFlj8sM9GPjtQkis7k01aAxrg/18kTfoIVcLL+haEVFlXDaSRwKRw==",
"dependencies": {
"glob-to-regexp": "^0.4.1",
"graceful-fs": "^4.1.2"
@ -15897,9 +15897,9 @@
}
},
"caniuse-lite": {
"version": "1.0.30001282",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001282.tgz",
"integrity": "sha512-YhF/hG6nqBEllymSIjLtR2iWDDnChvhnVJqp+vloyt2tEHFG1yBR+ac2B/rOw0qOK0m0lEXU2dv4E/sMk5P9Kg=="
"version": "1.0.30001283",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001283.tgz",
"integrity": "sha512-9RoKo841j1GQFSJz/nCXOj0sD7tHBtlowjYlrqIUS812x9/emfBLBt6IyMz1zIaYc/eRL8Cs6HPUVi2Hzq4sIg=="
},
"chai": {
"version": "4.3.4",
@ -16846,9 +16846,9 @@
"integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA=="
},
"electron-to-chromium": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.0.tgz",
"integrity": "sha512-+oXCt6SaIu8EmFTPx8wNGSB0tHQ5biDscnlf6Uxuz17e9CjzMRtGk9B8705aMPnj0iWr3iC74WuIkngCsLElmA=="
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.1.tgz",
"integrity": "sha512-9ldvb6QMHiDpUNF1iSwBTiTT0qXEN+xIO5WlCJrC5gt0z74ofOiqR698vaJqYWnri0XZiF0YmnrFmGq/EmpGAA=="
},
"emoji-regex": {
"version": "8.0.0",
@ -20101,9 +20101,9 @@
"integrity": "sha512-RVAzFGo1Mx9+YukVKSgTLut6r4ZVBW8IVrqGHAPfEsVJN93WSp5HRD6+qNa7av1q/joPKDNJd55m5AJl9GBQGA=="
},
"postcss": {
"version": "8.4.0",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.0.tgz",
"integrity": "sha512-BRMNx3Wy7UI89jN8H4ZVS5lQMPM2OSMkOkvDCSjwXa7PWTs24k7Lm55NXLbMbs070LvraXaxN5l1npSOS6wMVw==",
"version": "8.4.1",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.1.tgz",
"integrity": "sha512-WqLs/TTzXdG+/A4ZOOK9WDZiikrRaiA+eoEb/jz2DT9KUhMNHgP7yKPO8vwi62ZCsb703Gwb7BMZwDzI54Y2Ag==",
"requires": {
"nanoid": "^3.1.30",
"picocolors": "^1.0.0",
@ -21492,9 +21492,9 @@
"integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g=="
},
"prettier": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.1.tgz",
"integrity": "sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA=="
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.0.tgz",
"integrity": "sha512-FM/zAKgWTxj40rH03VxzIPdXmj39SwSjwG0heUcNFwI+EMZJnY93yAiKXM3dObIKAM5TA88werc8T/EwhB45eg=="
},
"prettier-linter-helpers": {
"version": "1.0.0",
@ -22026,9 +22026,9 @@
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"sass": {
"version": "1.43.4",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.43.4.tgz",
"integrity": "sha512-/ptG7KE9lxpGSYiXn7Ar+lKOv37xfWsZRtFYal2QHNigyVQDx685VFT/h7ejVr+R8w7H4tmUgtulsKl5YpveOg==",
"version": "1.43.5",
"resolved": "https://registry.npmjs.org/sass/-/sass-1.43.5.tgz",
"integrity": "sha512-WuNm+eAryMgQluL7Mbq9M4EruyGGMyal7Lu58FfnRMVWxgUzIvI7aSn60iNt3kn5yZBMR7G84fAGDcwqOF5JOg==",
"requires": {
"chokidar": ">=3.0.0 <4.0.0"
}
@ -23333,9 +23333,9 @@
}
},
"watchpack": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.2.0.tgz",
"integrity": "sha512-up4YAn/XHgZHIxFBVCdlMiWDj6WaLKpwVeGQk2I5thdYxF/KmF0aaz6TfJZ/hfl1h/XlcDr7k1KH7ThDagpFaA==",
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.0.tgz",
"integrity": "sha512-MnN0Q1OsvB/GGHETrFeZPQaOelWh/7O+EiFlj8sM9GPjtQkis7k01aAxrg/18kTfoIVcLL+haEVFlXDaSRwKRw==",
"requires": {
"glob-to-regexp": "^0.4.1",
"graceful-fs": "^4.1.2"

View file

@ -43,23 +43,6 @@
color: white;
}
#noscript-info {
position: fixed;
top: 10%;
left: 50%;
transform: translateX(-50%);
padding: 10px;
background-color: rgba(255, 255, 255, 0.6);
margin: 0;
border-radius: 5px;
}
#noscript-info a {
text-decoration: none;
font-size: 13px;
color: #000;
}
#photoprism-info {
position: fixed;
bottom: 0;

View file

@ -106,3 +106,43 @@
z-index: 0;
overflow: hidden;
}
#noscript-info {
position: fixed;
top: 10%;
left: 50%;
transform: translateX(-50%);
padding: 10px;
background-color: rgba(255, 255, 255, 0.6);
margin: 0;
border-radius: 5px;
min-width: 200px;
text-align: center;
}
#noscript-info a {
text-align: center;
text-decoration: none;
font-size: 13px;
color: #000;
}
#loading-info {
position: fixed;
bottom: 10%;
left: 50%;
transform: translateX(-50%);
padding: 10px;
background-color: rgba(255, 255, 255, 0.6);
margin: 0;
border-radius: 5px;
min-width: 200px;
text-align: center;
}
#loading-info a {
text-align: center;
text-decoration: none;
font-size: 13px;
color: #000;
}

View file

@ -84,7 +84,13 @@ func configAction(ctx *cli.Context) error {
fmt.Printf("%-25s %t\n", "detect-nsfw", conf.DetectNSFW())
fmt.Printf("%-25s %t\n", "upload-nsfw", conf.UploadNSFW())
// Progressive Web App.
fmt.Printf("%-25s %s\n", "app-name", conf.AppName())
fmt.Printf("%-25s %s\n", "app-mode", conf.AppMode())
fmt.Printf("%-25s %s\n", "app-icon", conf.AppIcon())
// Site.
fmt.Printf("%-25s %s\n", "cdn-url", conf.CdnUrl("/"))
fmt.Printf("%-25s %s\n", "site-url", conf.SiteUrl())
fmt.Printf("%-25s %s\n", "site-author", conf.SiteAuthor())
fmt.Printf("%-25s %s\n", "site-title", conf.SiteTitle())
@ -92,13 +98,7 @@ func configAction(ctx *cli.Context) error {
fmt.Printf("%-25s %s\n", "site-description", conf.SiteDescription())
fmt.Printf("%-25s %s\n", "site-preview", conf.SitePreview())
// Progressive Web App.
fmt.Printf("%-25s %s\n", "app-name", conf.AppName())
fmt.Printf("%-25s %s\n", "app-mode", conf.AppMode())
fmt.Printf("%-25s %s\n", "app-icon", conf.AppIcon())
// URLs.
fmt.Printf("%-25s %s\n", "cdn-url", conf.CdnUrl("/"))
// URIs.
fmt.Printf("%-25s %s\n", "content-uri", conf.ContentUri())
fmt.Printf("%-25s %s\n", "static-uri", conf.StaticUri())
fmt.Printf("%-25s %s\n", "api-uri", conf.ApiUri())

View file

@ -42,13 +42,24 @@ func (c *Config) AppMode() string {
// AppIcon returns the app icon when installed on a device.
func (c *Config) AppIcon() string {
defaultIcon := "logo"
defaultIcon := "default"
if c.options.AppIcon == "" || c.options.AppIcon == defaultIcon {
// Default.
} else if fs.FileExists(filepath.Join(c.ImgPath(), "icons", c.options.AppIcon+"-192.png")) {
} else if fs.FileExists(c.AppIconsPath(c.options.AppIcon, "512.png")) {
return c.options.AppIcon
}
return defaultIcon
}
// AppIconsPath returns the path to the app icons.
func (c *Config) AppIconsPath(name ...string) string {
if len(name) > 0 {
folder := []string{c.StaticPath(), "icons"}
folder = append(folder, name...)
return filepath.Join(folder...)
}
return filepath.Join(c.StaticPath(), "icons")
}

View file

@ -0,0 +1,48 @@
package config
import (
"strings"
"testing"
"github.com/stretchr/testify/assert"
)
func TestConfig_AppName(t *testing.T) {
c := NewConfig(CliTestContext())
assert.Equal(t, "config.test", c.AppName())
}
func TestConfig_AppMode(t *testing.T) {
c := NewConfig(CliTestContext())
assert.Equal(t, "standalone", c.AppMode())
}
func TestConfig_AppIcon(t *testing.T) {
c := NewConfig(CliTestContext())
assert.Equal(t, "default", c.AppIcon())
c.options.AppIcon = "foo"
assert.Equal(t, "default", c.AppIcon())
c.options.AppIcon = "lens"
assert.Equal(t, "lens", c.AppIcon())
c.options.AppIcon = "default"
assert.Equal(t, "default", c.AppIcon())
}
func TestConfig_AppIconsPath(t *testing.T) {
c := NewConfig(CliTestContext())
if p := c.AppIconsPath(); !strings.HasSuffix(p, "photoprism/assets/static/icons") {
t.Fatal("path .../photoprism/assets/static/icons expected")
}
if p := c.AppIconsPath("lens"); !strings.HasSuffix(p, "photoprism/assets/static/icons/lens") {
t.Fatal("path .../pphotoprism/assets/static/icons/lens expected")
}
if p := c.AppIconsPath("lens", "512.png"); !strings.HasSuffix(p, "photoprism/assets/static/icons/lens/512.png") {
t.Fatal("path .../photoprism/assets/static/icons/lens/512.png expected")
}
}

View file

@ -39,8 +39,9 @@ var once sync.Once
var LowMem = false
var TotalMem uint64
const MsgFreeBeer = "Help us make a difference and become a sponsor today!"
const MsgFundingInfo = "Visit https://docs.photoprism.org/funding/ to learn more."
const MsgSponsor = "Help us make a difference and become a sponsor today!"
const SignUpURL = "https://docs.photoprism.org/funding/"
const MsgSignUp = "Visit " + SignUpURL + " to learn more."
const MsgSponsorCommand = "Since running this command puts additional load on our infrastructure," +
" we unfortunately can only offer it to sponsors."
@ -179,8 +180,8 @@ func (c *Config) Init() error {
// Show funding info?
if !c.Sponsor() {
log.Info(MsgFreeBeer)
log.Info(MsgFundingInfo)
log.Info(MsgSponsor)
log.Info(MsgSignUp)
}
if insensitive, err := c.CaseInsensitive(); err != nil {

View file

@ -188,24 +188,6 @@ func TestConfig_AdminPassword(t *testing.T) {
assert.Equal(t, "photoprism", result)
}
func TestConfig_AppName(t *testing.T) {
c := NewConfig(CliTestContext())
assert.Equal(t, "config.test", c.AppName())
}
func TestConfig_AppMode(t *testing.T) {
c := NewConfig(CliTestContext())
assert.Equal(t, "standalone", c.AppMode())
}
func TestConfig_AppIcon(t *testing.T) {
c := NewConfig(CliTestContext())
assert.Equal(t, "logo", c.AppIcon())
}
func TestConfig_NSFWModelPath(t *testing.T) {
c := NewConfig(CliTestContext())

View file

@ -229,6 +229,23 @@ var GlobalFlags = []cli.Flag{
Usage: "allow uploads that may be offensive",
EnvVar: "PHOTOPRISM_UPLOAD_NSFW",
},
cli.StringFlag{
Name: "app-name",
Usage: "application `NAME` when installed on a device",
Value: "PhotoPrism",
EnvVar: "PHOTOPRISM_APP_NAME",
},
cli.StringFlag{
Name: "app-mode",
Usage: "application `MODE` (fullscreen, standalone, minimal-ui, browser)",
Value: "standalone",
EnvVar: "PHOTOPRISM_APP_MODE",
},
cli.StringFlag{
Name: "app-icon",
Usage: "application `ICON` (default, square, glow, lens, camera)",
EnvVar: "PHOTOPRISM_APP_ICON",
},
cli.StringFlag{
Name: "cdn-url",
Usage: "optional content delivery network `URL`",
@ -267,24 +284,6 @@ var GlobalFlags = []cli.Flag{
Usage: "optional preview image `URL`",
EnvVar: "PHOTOPRISM_SITE_PREVIEW",
},
cli.StringFlag{
Name: "app-name",
Usage: "application `NAME` when installed on a device",
Value: "PhotoPrism",
EnvVar: "PHOTOPRISM_APP_NAME",
},
cli.StringFlag{
Name: "app-mode",
Usage: "application `MODE` (fullscreen, standalone, minimal-ui, browser)",
Value: "standalone",
EnvVar: "PHOTOPRISM_APP_MODE",
},
cli.StringFlag{
Name: "app-icon",
Usage: "application `ICON` (logo, camera, lens)",
Value: "logo",
EnvVar: "PHOTOPRISM_APP_ICON",
},
cli.IntFlag{
Name: "http-port",
Value: 2342,

View file

@ -74,6 +74,9 @@ type Options struct {
DisableClassification bool `yaml:"DisableClassification" json:"DisableClassification" flag:"disable-classification"`
DetectNSFW bool `yaml:"DetectNSFW" json:"DetectNSFW" flag:"detect-nsfw"`
UploadNSFW bool `yaml:"UploadNSFW" json:"-" flag:"upload-nsfw"`
AppName string `yaml:"AppName" json:"AppName" flag:"app-name"`
AppMode string `yaml:"AppMode" json:"AppMode" flag:"app-mode"`
AppIcon string `yaml:"AppIcon" json:"AppIcon" flag:"app-icon"`
CdnUrl string `yaml:"CdnUrl" json:"CdnUrl" flag:"cdn-url"`
SiteUrl string `yaml:"SiteUrl" json:"SiteUrl" flag:"site-url"`
SiteAuthor string `yaml:"SiteAuthor" json:"SiteAuthor" flag:"site-author"`
@ -81,9 +84,6 @@ type Options struct {
SiteCaption string `yaml:"SiteCaption" json:"SiteCaption" flag:"site-caption"`
SiteDescription string `yaml:"SiteDescription" json:"SiteDescription" flag:"site-description"`
SitePreview string `yaml:"SitePreview" json:"SitePreview" flag:"site-preview"`
AppName string `yaml:"AppName" json:"AppName" flag:"app-name"`
AppMode string `yaml:"AppMode" json:"AppMode" flag:"app-mode"`
AppIcon string `yaml:"AppIcon" json:"AppIcon" flag:"app-icon"`
DatabaseDriver string `yaml:"DatabaseDriver" json:"-" flag:"database-driver"`
DatabaseDsn string `yaml:"DatabaseDsn" json:"-" flag:"database-dsn"`
DatabaseServer string `yaml:"DatabaseServer" json:"-" flag:"database-server"`

View file

@ -79,7 +79,7 @@ func (c *Config) BuildPath() string {
return filepath.Join(c.StaticPath(), "build")
}
// ImgPath returns the static image path.
// ImgPath returns the path to static image files.
func (c *Config) ImgPath() string {
return filepath.Join(c.StaticPath(), "img")
}

View file

@ -187,7 +187,8 @@ func registerRoutes(router *gin.Engine, conf *config.Config) {
// Default HTML page for client-side rendering and routing via VueJS.
router.NoRoute(func(c *gin.Context) {
clientConfig := conf.PublicConfig()
c.HTML(http.StatusOK, conf.TemplateName(), gin.H{"config": clientConfig})
signUp := gin.H{"message": config.MsgSponsor, "url": config.SignUpURL}
values := gin.H{"signUp": signUp, "config": conf.PublicConfig()}
c.HTML(http.StatusOK, conf.TemplateName(), values)
})
}