mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Only send full clientConfig if authenticated #216
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
140
frontend/package-lock.json
generated
140
frontend/package-lock.json
generated
@@ -2704,11 +2704,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz",
|
||||||
"integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g=="
|
"integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g=="
|
||||||
},
|
},
|
||||||
"@types/geojson": {
|
|
||||||
"version": "7946.0.7",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.7.tgz",
|
|
||||||
"integrity": "sha512-wE2v81i4C4Ol09RtsWFAqg3BUitWbHSpSlIo+bNdsCJijO9sjme+zm+73ZMCa/qMC8UEERxzGbvmr1cffo2SiQ=="
|
|
||||||
},
|
|
||||||
"@types/glob": {
|
"@types/glob": {
|
||||||
"version": "7.1.1",
|
"version": "7.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz",
|
||||||
@@ -2719,14 +2714,6 @@
|
|||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/leaflet": {
|
|
||||||
"version": "1.5.7",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/leaflet/-/leaflet-1.5.7.tgz",
|
|
||||||
"integrity": "sha512-FiPU4NQwH+jQ2wc3IjD7+9hgNZ95m4ry8qILO+eS6L4eUUVSXr+472+k4SRVEW+8j18QwqY7PFqudDQzfpRXTQ==",
|
|
||||||
"requires": {
|
|
||||||
"@types/geojson": "*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@types/minimatch": {
|
"@types/minimatch": {
|
||||||
"version": "3.0.3",
|
"version": "3.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
|
||||||
@@ -2768,9 +2755,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/webpack": {
|
"@types/webpack": {
|
||||||
"version": "4.41.2",
|
"version": "4.41.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.3.tgz",
|
||||||
"integrity": "sha512-DNMQOfEvwzWRRyp6Wy9QVCgJ3gkelZsuBE2KUD318dg95s9DKGiT5CszmmV58hq8jk89I9NClre48AEy1MWAJA==",
|
"integrity": "sha512-dH+BZ6pHBZFrXpnif0YU/PbmUq3lQrvRPnqkxsciSIzvG/DE+Vm/Wrjn56T7V3+B5ryQa5fw0oGnHL8tk4ll6w==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/anymatch": "*",
|
"@types/anymatch": "*",
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
@@ -2788,9 +2775,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/webpack-sources": {
|
"@types/webpack-sources": {
|
||||||
"version": "0.1.5",
|
"version": "0.1.6",
|
||||||
"resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-0.1.5.tgz",
|
"resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-0.1.6.tgz",
|
||||||
"integrity": "sha512-zfvjpp7jiafSmrzJ2/i3LqOyTYTuJ7u1KOXlKgDlvsj9Rr0x7ZiYu5lZbXwobL7lmsRNtPXlBfmaUD8eU2Hu8w==",
|
"integrity": "sha512-FtAWR7wR5ocJ9+nP137DV81tveD/ZgB1sadnJ/axUGM3BUVfRPx8oQNMtv3JNfTeHx3VP7cXiyfR/jmtEsVHsQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
"@types/source-list-map": "*",
|
"@types/source-list-map": "*",
|
||||||
@@ -3228,11 +3215,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ajv": {
|
"ajv": {
|
||||||
"version": "6.10.2",
|
"version": "6.11.0",
|
||||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz",
|
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.11.0.tgz",
|
||||||
"integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==",
|
"integrity": "sha512-nCprB/0syFYy9fVYU1ox1l2KN8S9I+tziH8D4zdZuLT3N6RMlGSGt5FSTpAiHB/Whv8Qs1cWHma1aMKZyaHRKA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"fast-deep-equal": "^2.0.1",
|
"fast-deep-equal": "^3.1.1",
|
||||||
"fast-json-stable-stringify": "^2.0.0",
|
"fast-json-stable-stringify": "^2.0.0",
|
||||||
"json-schema-traverse": "^0.4.1",
|
"json-schema-traverse": "^0.4.1",
|
||||||
"uri-js": "^4.2.2"
|
"uri-js": "^4.2.2"
|
||||||
@@ -3484,24 +3471,19 @@
|
|||||||
"integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg=="
|
"integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg=="
|
||||||
},
|
},
|
||||||
"autoprefixer": {
|
"autoprefixer": {
|
||||||
"version": "9.7.3",
|
"version": "9.7.4",
|
||||||
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.7.3.tgz",
|
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.7.4.tgz",
|
||||||
"integrity": "sha512-8T5Y1C5Iyj6PgkPSFd0ODvK9DIleuPKUPYniNxybS47g2k2wFgLZ46lGQHlBuGKIAEV8fbCDfKCCRS1tvOgc3Q==",
|
"integrity": "sha512-g0Ya30YrMBAEZk60lp+qfX5YQllG+S5W3GYCFvyHTvhOki0AEQJLPEcIuGRsqVwLi8FvXPVtwTGhfr38hVpm0g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"browserslist": "^4.8.0",
|
"browserslist": "^4.8.3",
|
||||||
"caniuse-lite": "^1.0.30001012",
|
"caniuse-lite": "^1.0.30001020",
|
||||||
"chalk": "^2.4.2",
|
"chalk": "^2.4.2",
|
||||||
"normalize-range": "^0.1.2",
|
"normalize-range": "^0.1.2",
|
||||||
"num2fraction": "^1.2.2",
|
"num2fraction": "^1.2.2",
|
||||||
"postcss": "^7.0.23",
|
"postcss": "^7.0.26",
|
||||||
"postcss-value-parser": "^4.0.2"
|
"postcss-value-parser": "^4.0.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"caniuse-lite": {
|
|
||||||
"version": "1.0.30001012",
|
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001012.tgz",
|
|
||||||
"integrity": "sha512-7RR4Uh04t9K1uYRWzOJmzplgEOAXbfK72oVNokCdMzA67trrhPzy93ahKk1AWHiA0c58tD2P+NHqxrA8FZ+Trg=="
|
|
||||||
},
|
|
||||||
"chalk": {
|
"chalk": {
|
||||||
"version": "2.4.2",
|
"version": "2.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
|
||||||
@@ -3520,9 +3502,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"axios": {
|
"axios": {
|
||||||
"version": "0.19.1",
|
"version": "0.19.2",
|
||||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.19.1.tgz",
|
"resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz",
|
||||||
"integrity": "sha512-Yl+7nfreYKaLRvAvjNPkvfjnQHJM1yLBY3zhqAwcJSwR/6ETkanUgylgtIvkvz0xJ+p/vZuNw8X7Hnb7Whsbpw==",
|
"integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"follow-redirects": "1.5.10"
|
"follow-redirects": "1.5.10"
|
||||||
},
|
},
|
||||||
@@ -4145,19 +4127,19 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"browserslist": {
|
"browserslist": {
|
||||||
"version": "4.8.3",
|
"version": "4.8.5",
|
||||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.8.3.tgz",
|
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.8.5.tgz",
|
||||||
"integrity": "sha512-iU43cMMknxG1ClEZ2MDKeonKE1CCrFVkQK2AqO2YWFmvIrx4JWrvQ4w4hQez6EpVI8rHTtqh/ruHHDHSOKxvUg==",
|
"integrity": "sha512-4LMHuicxkabIB+n9874jZX/az1IaZ5a+EUuvD7KFOu9x/Bd5YHyO0DIz2ls/Kl8g0ItS4X/ilEgf4T1Br0lgSg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"caniuse-lite": "^1.0.30001017",
|
"caniuse-lite": "^1.0.30001022",
|
||||||
"electron-to-chromium": "^1.3.322",
|
"electron-to-chromium": "^1.3.338",
|
||||||
"node-releases": "^1.1.44"
|
"node-releases": "^1.1.46"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"caniuse-lite": {
|
"caniuse-lite": {
|
||||||
"version": "1.0.30001019",
|
"version": "1.0.30001022",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001019.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001022.tgz",
|
||||||
"integrity": "sha512-6ljkLtF1KM5fQ+5ZN0wuyVvvebJxgJPTmScOMaFuQN2QuOzvRJnWSKfzQskQU5IOU4Gap3zasYPIinzwUjoj/g=="
|
"integrity": "sha512-FjwPPtt/I07KyLPkBQ0g7/XuZg6oUkYBVnPHNj3VHJbOjmmJ/GdSo/GUY6MwINEQvjhP6WZVbX8Tvms8xh0D5A=="
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -5615,9 +5597,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"earcut": {
|
"earcut": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.2.tgz",
|
||||||
"integrity": "sha512-5jIMi2RB3HtGPHcYd9Yyl0cczo84y+48lgKPxMijliNQaKAHEZJbdzLmKmdxG/mCdS/YD9DQ1gihL8mxzR0F9w=="
|
"integrity": "sha512-eZoZPPJcUHnfRZ0PjLvx2qBordSiO8ofC3vt+qACLM95u+4DovnbYNpQtJh0DNsWj8RnxrQytD4WA8gj5cRIaQ=="
|
||||||
},
|
},
|
||||||
"easygettext": {
|
"easygettext": {
|
||||||
"version": "2.9.0",
|
"version": "2.9.0",
|
||||||
@@ -5654,9 +5636,9 @@
|
|||||||
"integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA=="
|
"integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA=="
|
||||||
},
|
},
|
||||||
"electron-to-chromium": {
|
"electron-to-chromium": {
|
||||||
"version": "1.3.333",
|
"version": "1.3.340",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.333.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.340.tgz",
|
||||||
"integrity": "sha512-7MJfCpa/tmhqYy2lZ1NEbkSxH7q3KiZiepiSs2ayTPAweAjdzGXotij+7OKPPb3OwJD2ZuBKPrA2HIuuSi6ahw=="
|
"integrity": "sha512-hRFBAglhcj5iVYH+o8QU0+XId1WGoc0VGowJB1cuJAt3exHGrivZvWeAO5BRgBZqwZtwxjm8a5MQeGoT/Su3ww=="
|
||||||
},
|
},
|
||||||
"elliptic": {
|
"elliptic": {
|
||||||
"version": "6.5.2",
|
"version": "6.5.2",
|
||||||
@@ -5786,9 +5768,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"es-abstract": {
|
"es-abstract": {
|
||||||
"version": "1.17.0",
|
"version": "1.17.4",
|
||||||
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.0.tgz",
|
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.4.tgz",
|
||||||
"integrity": "sha512-yYkE07YF+6SIBmg1MsJ9dlub5L48Ek7X0qz+c/CPCHS9EBXfESorzng4cJQjJW5/pB6vDF41u7F8vUhLVDqIug==",
|
"integrity": "sha512-Ae3um/gb8F0mui/jPL+QiqmglkUsaQf7FwBEHYIFkztkneosu9imhqHpBzQ3h1vit8t5iQ74t6PEVvphBZiuiQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"es-to-primitive": "^1.2.1",
|
"es-to-primitive": "^1.2.1",
|
||||||
"function-bind": "^1.1.1",
|
"function-bind": "^1.1.1",
|
||||||
@@ -6303,9 +6285,9 @@
|
|||||||
"integrity": "sha512-v/KBnfyaOMPmZc/dmc6ozOdWqekGp7bBGq4jLAecEfPGmfKiWS4sA8sC0LqiV9w5qmXAtXVn4M3p1jSyhY85SQ=="
|
"integrity": "sha512-v/KBnfyaOMPmZc/dmc6ozOdWqekGp7bBGq4jLAecEfPGmfKiWS4sA8sC0LqiV9w5qmXAtXVn4M3p1jSyhY85SQ=="
|
||||||
},
|
},
|
||||||
"eslint-rule-docs": {
|
"eslint-rule-docs": {
|
||||||
"version": "1.1.174",
|
"version": "1.1.175",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.174.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.175.tgz",
|
||||||
"integrity": "sha512-YgxPdamf/Wmpg5+JiU24KOLgDnPWf54Z+S4fbY9IqssNCTTxFeeVV18YI42hM6hZvhMo8fsXYaTPC9qzJEwpYw=="
|
"integrity": "sha512-jFBHgUeNAguil2gHyHJTTH8vBJ4W+abJz/Lm9z93Gv5FsZ//r8aGaaGSuFZDzLNB411EGBjwmTdt6rwAi0J7JQ=="
|
||||||
},
|
},
|
||||||
"eslint-scope": {
|
"eslint-scope": {
|
||||||
"version": "5.0.0",
|
"version": "5.0.0",
|
||||||
@@ -6634,9 +6616,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fast-deep-equal": {
|
"fast-deep-equal": {
|
||||||
"version": "2.0.1",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz",
|
||||||
"integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk="
|
"integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA=="
|
||||||
},
|
},
|
||||||
"fast-json-stable-stringify": {
|
"fast-json-stable-stringify": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
@@ -6933,9 +6915,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fs-minipass": {
|
"fs-minipass": {
|
||||||
"version": "2.0.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
|
||||||
"integrity": "sha512-40Qz+LFXmd9tzYVnnBmZvFfvAADfUA14TXPK1s7IfElJTIZ97rA8w4Kin7Wt5JBrC3ShnnFJO/5vPjPEeJIq9A==",
|
"integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"minipass": "^3.0.0"
|
"minipass": "^3.0.0"
|
||||||
}
|
}
|
||||||
@@ -8891,9 +8873,9 @@
|
|||||||
"integrity": "sha512-hRkd6/XW4HTsA9vjVpY9tuXJYLSlelnkTmVFu4M9/7MIYQtFcHpbugAU7UbOfjOiVSVYl2fqgBuJ32JUmRo5Ew=="
|
"integrity": "sha512-hRkd6/XW4HTsA9vjVpY9tuXJYLSlelnkTmVFu4M9/7MIYQtFcHpbugAU7UbOfjOiVSVYl2fqgBuJ32JUmRo5Ew=="
|
||||||
},
|
},
|
||||||
"kind-of": {
|
"kind-of": {
|
||||||
"version": "6.0.2",
|
"version": "6.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
|
||||||
"integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
|
"integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw=="
|
||||||
},
|
},
|
||||||
"last-call-webpack-plugin": {
|
"last-call-webpack-plugin": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
@@ -9768,9 +9750,9 @@
|
|||||||
"integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA="
|
"integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA="
|
||||||
},
|
},
|
||||||
"node-releases": {
|
"node-releases": {
|
||||||
"version": "1.1.45",
|
"version": "1.1.47",
|
||||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.45.tgz",
|
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.47.tgz",
|
||||||
"integrity": "sha512-cXvGSfhITKI8qsV116u2FTzH5EWZJfgG7d4cpqwF8I8+1tWpD6AsvvGRKq2onR0DNj1jfqsjkXZsm14JMS7Cyg==",
|
"integrity": "sha512-k4xjVPx5FpwBUj0Gw7uvFOTF4Ep8Hok1I6qjwL3pLfwe7Y0REQSAqOwwv9TWBCUtMHxcXfY4PgRLRozcChvTcA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"semver": "^6.3.0"
|
"semver": "^6.3.0"
|
||||||
},
|
},
|
||||||
@@ -12064,9 +12046,9 @@
|
|||||||
"integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8="
|
"integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8="
|
||||||
},
|
},
|
||||||
"resolve": {
|
"resolve": {
|
||||||
"version": "1.14.2",
|
"version": "1.15.0",
|
||||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.14.2.tgz",
|
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.0.tgz",
|
||||||
"integrity": "sha512-EjlOBLBO1kxsUxsKjLt7TAECyKW6fOh1VRkykQkKGzcBbjjPIxBqGh0jf7GJ3k/f5mxMqW3htMD3WdTUVtW8HQ==",
|
"integrity": "sha512-+hTmAldEGE80U2wJJDC1lebb5jWqvTYAfm3YZ1ckk1gBr0MnCqUKlwK1e+anaFljIl+F5tR5IoZcm4ZDA1zMQw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"path-parse": "^1.0.6"
|
"path-parse": "^1.0.6"
|
||||||
}
|
}
|
||||||
@@ -13757,9 +13739,9 @@
|
|||||||
"integrity": "sha512-M8wx+OV7uCGOQ/iLi5d2WHbWW9ad9uBPsW50iezV7LDrZ6iuXkDJSCmTaQgnRKJWOOfPsQrgNFME1LKMRrFmgg=="
|
"integrity": "sha512-M8wx+OV7uCGOQ/iLi5d2WHbWW9ad9uBPsW50iezV7LDrZ6iuXkDJSCmTaQgnRKJWOOfPsQrgNFME1LKMRrFmgg=="
|
||||||
},
|
},
|
||||||
"vue-gettext": {
|
"vue-gettext": {
|
||||||
"version": "2.1.7",
|
"version": "2.1.8",
|
||||||
"resolved": "https://registry.npmjs.org/vue-gettext/-/vue-gettext-2.1.7.tgz",
|
"resolved": "https://registry.npmjs.org/vue-gettext/-/vue-gettext-2.1.8.tgz",
|
||||||
"integrity": "sha512-cRYhrMq1iNRWOBYaXJtgBQPzNm2TgtK91nJdP+8EnO7q1ecMB0E66e719kMfJAcUXVmQRXm+smOUpX8CM5SWEw=="
|
"integrity": "sha512-LzDnD12g/DOqvDcQbwQTeeyS1E8WGs9L2tJoXzISWDinibUsm3fsEaQCo0mTZ0NpDHsk2AK2KzyuWly0Yulp9Q=="
|
||||||
},
|
},
|
||||||
"vue-hot-reload-api": {
|
"vue-hot-reload-api": {
|
||||||
"version": "2.3.3",
|
"version": "2.3.3",
|
||||||
@@ -13880,9 +13862,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"vue-router": {
|
"vue-router": {
|
||||||
"version": "3.1.4",
|
"version": "3.1.5",
|
||||||
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.1.5.tgz",
|
||||||
"integrity": "sha512-pX2BGvZg5/MOXbJoYsRppoZM+0B4LSszvIXQvLPZ7govbgbBorYQ4JHx99lDTjzEBkbTyKfRG+ru1VCnMuVcUg=="
|
"integrity": "sha512-BszkPvhl7I9h334GjckCh7sVFyjTPMMJFJ4Bsrem/Ik+B/9gt5tgrk8k4gGLO4ZpdvciVdg7O41gW4DisQWurg=="
|
||||||
},
|
},
|
||||||
"vue-style-loader": {
|
"vue-style-loader": {
|
||||||
"version": "4.1.2",
|
"version": "4.1.2",
|
||||||
|
|||||||
@@ -25,16 +25,15 @@
|
|||||||
"@babel/register": "^7.8.3",
|
"@babel/register": "^7.8.3",
|
||||||
"@babel/runtime": "^7.8.3",
|
"@babel/runtime": "^7.8.3",
|
||||||
"@fortawesome/fontawesome-free": "^5.12.0",
|
"@fortawesome/fontawesome-free": "^5.12.0",
|
||||||
"@types/leaflet": "^1.5.7",
|
|
||||||
"acorn": "^6.4.0",
|
"acorn": "^6.4.0",
|
||||||
"ajv": "^6.10.2",
|
"ajv": "^6.11.0",
|
||||||
"autoprefixer": "^9.7.3",
|
"autoprefixer": "^9.7.4",
|
||||||
"axios": "^0.19.1",
|
"axios": "^0.19.2",
|
||||||
"axios-mock-adapter": "^1.17.0",
|
"axios-mock-adapter": "^1.17.0",
|
||||||
"babel-eslint": "^10.0.3",
|
"babel-eslint": "^10.0.3",
|
||||||
"babel-loader": "^8.0.6",
|
"babel-loader": "^8.0.6",
|
||||||
"babel-plugin-istanbul": "^6.0.0",
|
"babel-plugin-istanbul": "^6.0.0",
|
||||||
"browserslist": "^4.8.3",
|
"browserslist": "^4.8.5",
|
||||||
"chai": "^4.2.0",
|
"chai": "^4.2.0",
|
||||||
"chalk": "^3.0.0",
|
"chalk": "^3.0.0",
|
||||||
"chart.js": "^2.9.3",
|
"chart.js": "^2.9.3",
|
||||||
@@ -104,11 +103,11 @@
|
|||||||
"url-loader": "^1.1.2",
|
"url-loader": "^1.1.2",
|
||||||
"vue": "^2.6.11",
|
"vue": "^2.6.11",
|
||||||
"vue-fullscreen": "^2.1.5",
|
"vue-fullscreen": "^2.1.5",
|
||||||
"vue-gettext": "^2.1.7",
|
"vue-gettext": "^2.1.8",
|
||||||
"vue-infinite-scroll": "^2.0.2",
|
"vue-infinite-scroll": "^2.0.2",
|
||||||
"vue-loader": "^14.2.4",
|
"vue-loader": "^14.2.4",
|
||||||
"vue-luxon": "^0.7.0",
|
"vue-luxon": "^0.7.0",
|
||||||
"vue-router": "^3.1.4",
|
"vue-router": "^3.1.5",
|
||||||
"vue-style-loader": "^4.1.2",
|
"vue-style-loader": "^4.1.2",
|
||||||
"vue-template-compiler": "^2.6.11",
|
"vue-template-compiler": "^2.6.11",
|
||||||
"vue2-filters": "^0.9.1",
|
"vue2-filters": "^0.9.1",
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import "core-js/stable";
|
|||||||
import "regenerator-runtime/runtime";
|
import "regenerator-runtime/runtime";
|
||||||
import Api from "common/api";
|
import Api from "common/api";
|
||||||
import Notify from "common/notify";
|
import Notify from "common/notify";
|
||||||
import Config from "common/config";
|
|
||||||
import Clipboard from "common/clipboard";
|
import Clipboard from "common/clipboard";
|
||||||
import Components from "component/components";
|
import Components from "component/components";
|
||||||
import Dialogs from "dialog/dialogs";
|
import Dialogs from "dialog/dialogs";
|
||||||
@@ -12,7 +11,7 @@ import Log from "common/log";
|
|||||||
import PhotoPrism from "photoprism.vue";
|
import PhotoPrism from "photoprism.vue";
|
||||||
import Router from "vue-router";
|
import Router from "vue-router";
|
||||||
import Routes from "routes";
|
import Routes from "routes";
|
||||||
import Session from "session";
|
import {session, config} from "session";
|
||||||
import {Settings} from "luxon";
|
import {Settings} from "luxon";
|
||||||
import Socket from "common/websocket";
|
import Socket from "common/websocket";
|
||||||
import Viewer from "common/viewer";
|
import Viewer from "common/viewer";
|
||||||
@@ -24,7 +23,6 @@ import VueFullscreen from "vue-fullscreen";
|
|||||||
import VueInfiniteScroll from "vue-infinite-scroll";
|
import VueInfiniteScroll from "vue-infinite-scroll";
|
||||||
|
|
||||||
// Initialize helpers
|
// Initialize helpers
|
||||||
const config = new Config(window.localStorage, window.clientConfig);
|
|
||||||
const viewer = new Viewer();
|
const viewer = new Viewer();
|
||||||
const clipboard = new Clipboard(window.localStorage, "photo_clipboard");
|
const clipboard = new Clipboard(window.localStorage, "photo_clipboard");
|
||||||
const isPublic = config.getValue("public");
|
const isPublic = config.getValue("public");
|
||||||
@@ -33,7 +31,7 @@ const isPublic = config.getValue("public");
|
|||||||
Vue.prototype.$event = Event;
|
Vue.prototype.$event = Event;
|
||||||
Vue.prototype.$notify = Notify;
|
Vue.prototype.$notify = Notify;
|
||||||
Vue.prototype.$viewer = viewer;
|
Vue.prototype.$viewer = viewer;
|
||||||
Vue.prototype.$session = Session;
|
Vue.prototype.$session = session;
|
||||||
Vue.prototype.$api = Api;
|
Vue.prototype.$api = Api;
|
||||||
Vue.prototype.$log = Log;
|
Vue.prototype.$log = Log;
|
||||||
Vue.prototype.$socket = Socket;
|
Vue.prototype.$socket = Socket;
|
||||||
@@ -70,7 +68,7 @@ const router = new Router({
|
|||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
if (to.matched.some(record => record.meta.admin)) {
|
if (to.matched.some(record => record.meta.admin)) {
|
||||||
if (isPublic || Session.isAdmin()) {
|
if (isPublic || session.isAdmin()) {
|
||||||
next();
|
next();
|
||||||
} else {
|
} else {
|
||||||
next({
|
next({
|
||||||
@@ -79,7 +77,7 @@ router.beforeEach((to, from, next) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else if (to.matched.some(record => record.meta.auth)) {
|
} else if (to.matched.some(record => record.meta.auth)) {
|
||||||
if (isPublic || Session.isUser()) {
|
if (isPublic || session.isUser()) {
|
||||||
next();
|
next();
|
||||||
} else {
|
} else {
|
||||||
next({
|
next({
|
||||||
|
|||||||
@@ -6,9 +6,11 @@ import Socket from "./websocket";
|
|||||||
export default class Session {
|
export default class Session {
|
||||||
/**
|
/**
|
||||||
* @param {Storage} storage
|
* @param {Storage} storage
|
||||||
|
* @param {Config} config
|
||||||
*/
|
*/
|
||||||
constructor(storage) {
|
constructor(storage, config) {
|
||||||
this.auth = false;
|
this.auth = false;
|
||||||
|
this.config = config;
|
||||||
|
|
||||||
if (storage.getItem("session_storage") === "true") {
|
if (storage.getItem("session_storage") === "true") {
|
||||||
this.storage = window.sessionStorage;
|
this.storage = window.sessionStorage;
|
||||||
@@ -26,14 +28,14 @@ export default class Session {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Event.subscribe("session.logout", () => {
|
Event.subscribe("session.logout", () => {
|
||||||
this.onLogout()
|
this.onLogout();
|
||||||
});
|
});
|
||||||
|
|
||||||
Event.subscribe("websocket.connected", () => {
|
Event.subscribe("websocket.connected", () => {
|
||||||
this.sendClientInfo()
|
this.sendClientInfo();
|
||||||
});
|
});
|
||||||
|
|
||||||
this.sendClientInfo()
|
this.sendClientInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
useSessionStorage() {
|
useSessionStorage() {
|
||||||
@@ -64,6 +66,10 @@ export default class Session {
|
|||||||
return this.applyToken(token);
|
return this.applyToken(token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setConfig(values) {
|
||||||
|
this.config.setValues(values);
|
||||||
|
}
|
||||||
|
|
||||||
getToken() {
|
getToken() {
|
||||||
return this.session_token;
|
return this.session_token;
|
||||||
}
|
}
|
||||||
@@ -138,7 +144,7 @@ export default class Session {
|
|||||||
try {
|
try {
|
||||||
Socket.send(JSON.stringify(clientInfo));
|
Socket.send(JSON.stringify(clientInfo));
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
console.log("can't send client info, websocket not connected (yet)")
|
console.log("can't send client info, websocket not connected (yet)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,6 +153,7 @@ export default class Session {
|
|||||||
|
|
||||||
return Api.post("session", {email: email, password: password}).then(
|
return Api.post("session", {email: email, password: password}).then(
|
||||||
(result) => {
|
(result) => {
|
||||||
|
this.setConfig(result.data.config);
|
||||||
this.setToken(result.data.token);
|
this.setToken(result.data.token);
|
||||||
this.setUser(new User(result.data.user));
|
this.setUser(new User(result.data.user));
|
||||||
this.sendClientInfo();
|
this.sendClientInfo();
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ export default [
|
|||||||
name: "settings",
|
name: "settings",
|
||||||
path: "/settings",
|
path: "/settings",
|
||||||
component: Settings,
|
component: Settings,
|
||||||
meta: {title: "Application Settings", auth: true, background: "application-light"},
|
meta: {title: "Settings", auth: true, background: "application-light"},
|
||||||
props: {tab: 0},
|
props: {tab: 0},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
|
import Config from "common/config";
|
||||||
import Session from "common/session";
|
import Session from "common/session";
|
||||||
|
|
||||||
const session = new Session(window.localStorage);
|
export const config = new Config(window.localStorage, window.clientConfig);
|
||||||
|
export const session = new Session(window.localStorage, config);
|
||||||
|
|
||||||
export default session;
|
export default session;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -5,7 +5,6 @@ import (
|
|||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/photoprism/photoprism/internal/config"
|
"github.com/photoprism/photoprism/internal/config"
|
||||||
"github.com/photoprism/photoprism/internal/event"
|
|
||||||
"github.com/photoprism/photoprism/internal/form"
|
"github.com/photoprism/photoprism/internal/form"
|
||||||
"github.com/photoprism/photoprism/internal/session"
|
"github.com/photoprism/photoprism/internal/session"
|
||||||
"github.com/photoprism/photoprism/pkg/txt"
|
"github.com/photoprism/photoprism/pkg/txt"
|
||||||
@@ -32,9 +31,7 @@ func CreateSession(router *gin.RouterGroup, conf *config.Config) {
|
|||||||
|
|
||||||
c.Header("X-Session-Token", token)
|
c.Header("X-Session-Token", token)
|
||||||
|
|
||||||
s := gin.H{"token": token, "user": user}
|
s := gin.H{"token": token, "user": user, "config": conf.ClientConfig()}
|
||||||
|
|
||||||
event.Publish("config.updated", event.Data(conf.ClientConfig()))
|
|
||||||
|
|
||||||
c.JSON(http.StatusOK, s)
|
c.JSON(http.StatusOK, s)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ var wsConnection = websocket.Upgrader{
|
|||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
var wsTimeout = 60 * time.Second
|
var wsTimeout = 90 * time.Second
|
||||||
|
|
||||||
type clientInfo struct {
|
type clientInfo struct {
|
||||||
SessionToken string `json:"session"`
|
SessionToken string `json:"session"`
|
||||||
@@ -33,7 +33,7 @@ var wsAuth = struct {
|
|||||||
mutex sync.RWMutex
|
mutex sync.RWMutex
|
||||||
}{authenticated: make(map[string]bool)}
|
}{authenticated: make(map[string]bool)}
|
||||||
|
|
||||||
func wsReader(ws *websocket.Conn, connId string) {
|
func wsReader(ws *websocket.Conn, connId string, conf *config.Config) {
|
||||||
defer ws.Close()
|
defer ws.Close()
|
||||||
|
|
||||||
ws.SetReadLimit(512)
|
ws.SetReadLimit(512)
|
||||||
@@ -54,19 +54,25 @@ func wsReader(ws *websocket.Conn, connId string) {
|
|||||||
if err := json.Unmarshal(m, &info); err != nil {
|
if err := json.Unmarshal(m, &info); err != nil {
|
||||||
log.Error(err)
|
log.Error(err)
|
||||||
} else {
|
} else {
|
||||||
log.Debugf("websocket: %+v", info)
|
|
||||||
|
|
||||||
if session.Exists(info.SessionToken) {
|
if session.Exists(info.SessionToken) {
|
||||||
|
log.Debug("websocket: authenticated")
|
||||||
|
|
||||||
wsAuth.mutex.Lock()
|
wsAuth.mutex.Lock()
|
||||||
wsAuth.authenticated[connId] = true
|
wsAuth.authenticated[connId] = true
|
||||||
wsAuth.mutex.Unlock()
|
wsAuth.mutex.Unlock()
|
||||||
|
|
||||||
|
ws.SetWriteDeadline(time.Now().Add(30 * time.Second))
|
||||||
|
|
||||||
|
if err := ws.WriteJSON(gin.H{"event": "config.updated", "data": event.Data(conf.ClientConfig())}); err != nil {
|
||||||
|
log.Error(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func wsWriter(ws *websocket.Conn, connId string) {
|
func wsWriter(ws *websocket.Conn, connId string) {
|
||||||
pingTicker := time.NewTicker(10 * time.Second)
|
pingTicker := time.NewTicker(15 * time.Second)
|
||||||
s := event.Subscribe("log.*", "notify.*", "index.*", "upload.*", "import.*", "config.*", "count.*")
|
s := event.Subscribe("log.*", "notify.*", "index.*", "upload.*", "import.*", "config.*", "count.*")
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
@@ -82,7 +88,7 @@ func wsWriter(ws *websocket.Conn, connId string) {
|
|||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-pingTicker.C:
|
case <-pingTicker.C:
|
||||||
ws.SetWriteDeadline(time.Now().Add(10 * time.Second))
|
ws.SetWriteDeadline(time.Now().Add(30 * time.Second))
|
||||||
if err := ws.WriteMessage(websocket.PingMessage, []byte{}); err != nil {
|
if err := ws.WriteMessage(websocket.PingMessage, []byte{}); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -92,7 +98,7 @@ func wsWriter(ws *websocket.Conn, connId string) {
|
|||||||
wsAuth.mutex.RUnlock()
|
wsAuth.mutex.RUnlock()
|
||||||
|
|
||||||
if auth {
|
if auth {
|
||||||
ws.SetWriteDeadline(time.Now().Add(10 * time.Second))
|
ws.SetWriteDeadline(time.Now().Add(30 * time.Second))
|
||||||
|
|
||||||
if err := ws.WriteJSON(gin.H{"event": msg.Name, "data": msg.Fields}); err != nil {
|
if err := ws.WriteJSON(gin.H{"event": msg.Name, "data": msg.Fields}); err != nil {
|
||||||
log.Debug(err)
|
log.Debug(err)
|
||||||
@@ -139,6 +145,6 @@ func Websocket(router *gin.RouterGroup, conf *config.Config) {
|
|||||||
|
|
||||||
go wsWriter(ws, connId)
|
go wsWriter(ws, connId)
|
||||||
|
|
||||||
wsReader(ws, connId)
|
wsReader(ws, connId, conf)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,7 +72,6 @@ func registerRoutes(router *gin.Engine, conf *config.Config) {
|
|||||||
|
|
||||||
// Default HTML page (client-side routing implemented via Vue.js)
|
// Default HTML page (client-side routing implemented via Vue.js)
|
||||||
router.NoRoute(func(c *gin.Context) {
|
router.NoRoute(func(c *gin.Context) {
|
||||||
// Todo: Use PublicClientConfig()
|
c.HTML(http.StatusOK, "index.tmpl", gin.H{"clientConfig": conf.PublicClientConfig()})
|
||||||
c.HTML(http.StatusOK, "index.tmpl", gin.H{"clientConfig": conf.ClientConfig()})
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user