Albums: Restore deleted album when trying to create it again #2429
This commit is contained in:
parent
d769a1e38b
commit
acc779f107
12 changed files with 193 additions and 193 deletions
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-12-09 00:51+0000\n"
|
||||
"POT-Creation-Date: 2022-06-16 16:58+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -17,313 +17,323 @@ msgstr ""
|
|||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: messages.go:83
|
||||
#: messages.go:85
|
||||
msgid "Unexpected error, please try again"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:84
|
||||
#: messages.go:86
|
||||
msgid "Invalid request"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:85
|
||||
#: messages.go:87
|
||||
msgid "Changes could not be saved"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:86
|
||||
#: messages.go:88
|
||||
msgid "Could not be deleted"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:87
|
||||
#: messages.go:89
|
||||
#, c-format
|
||||
msgid "%s already exists"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:88
|
||||
#: messages.go:90
|
||||
msgid "Not found"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:89
|
||||
#: messages.go:91
|
||||
msgid "File not found"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:90
|
||||
#: messages.go:92
|
||||
msgid "Selection not found"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:91
|
||||
#: messages.go:93
|
||||
msgid "Entity not found"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:92
|
||||
#: messages.go:94
|
||||
msgid "Account not found"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:93
|
||||
#: messages.go:95
|
||||
msgid "User not found"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:94
|
||||
#: messages.go:96
|
||||
msgid "Label not found"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:95
|
||||
#: messages.go:97
|
||||
msgid "Album not found"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:96
|
||||
#: messages.go:98
|
||||
msgid "Subject not found"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:97
|
||||
#: messages.go:99
|
||||
msgid "Person not found"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:98
|
||||
#: messages.go:100
|
||||
msgid "Face not found"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:99
|
||||
#: messages.go:101
|
||||
msgid "Not available in public mode"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:100
|
||||
#: messages.go:102
|
||||
msgid "not available in read-only mode"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:101
|
||||
#: messages.go:103
|
||||
msgid "Please log in and try again"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:102
|
||||
#: messages.go:104
|
||||
msgid "Upload might be offensive"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:103
|
||||
#: messages.go:105
|
||||
msgid "No items selected"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:104
|
||||
#: messages.go:106
|
||||
msgid "Failed creating file, please check permissions"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:105
|
||||
#: messages.go:107
|
||||
msgid "Failed creating folder, please check permissions"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:106
|
||||
#: messages.go:108
|
||||
msgid "Could not connect, please try again"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:107
|
||||
#: messages.go:109
|
||||
msgid "Invalid password, please try again"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:108
|
||||
#: messages.go:110
|
||||
msgid "Feature disabled"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:109
|
||||
#: messages.go:111
|
||||
msgid "No labels selected"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:110
|
||||
#: messages.go:112
|
||||
msgid "No albums selected"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:111
|
||||
#: messages.go:113
|
||||
msgid "No files available for download"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:112
|
||||
#: messages.go:114
|
||||
msgid "Failed to create zip file"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:113
|
||||
#: messages.go:115
|
||||
msgid "Invalid credentials"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:114
|
||||
#: messages.go:116
|
||||
msgid "Invalid link"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:115
|
||||
#: messages.go:117
|
||||
msgid "Invalid name"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:116
|
||||
#: messages.go:118
|
||||
msgid "Busy, please try again later"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:119
|
||||
msgid "Changes successfully saved"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:120
|
||||
msgid "Album created"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:121
|
||||
msgid "Album saved"
|
||||
#, c-format
|
||||
msgid "The wakeup interval is %s, but must be 1h or less"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:122
|
||||
msgid "Changes successfully saved"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:123
|
||||
msgid "Album created"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:124
|
||||
msgid "Album saved"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:125
|
||||
#, c-format
|
||||
msgid "Album %s deleted"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:123
|
||||
#: messages.go:126
|
||||
msgid "Album contents cloned"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:124
|
||||
#: messages.go:127
|
||||
msgid "File removed from stack"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:125
|
||||
msgid "File deleted"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:126
|
||||
#, c-format
|
||||
msgid "Selection added to %s"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:127
|
||||
#, c-format
|
||||
msgid "One entry added to %s"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:128
|
||||
#, c-format
|
||||
msgid "%d entries added to %s"
|
||||
msgid "File deleted"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:129
|
||||
#, c-format
|
||||
msgid "One entry removed from %s"
|
||||
msgid "Selection added to %s"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:130
|
||||
#, c-format
|
||||
msgid "%d entries removed from %s"
|
||||
msgid "One entry added to %s"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:131
|
||||
msgid "Account created"
|
||||
#, c-format
|
||||
msgid "%d entries added to %s"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:132
|
||||
msgid "Account saved"
|
||||
#, c-format
|
||||
msgid "One entry removed from %s"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:133
|
||||
msgid "Account deleted"
|
||||
#, c-format
|
||||
msgid "%d entries removed from %s"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:134
|
||||
msgid "Settings saved"
|
||||
msgid "Account created"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:135
|
||||
msgid "Password changed"
|
||||
msgid "Account saved"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:136
|
||||
msgid "Account deleted"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:137
|
||||
msgid "Settings saved"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:138
|
||||
msgid "Password changed"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:139
|
||||
#, c-format
|
||||
msgid "Import completed in %d s"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:137
|
||||
#: messages.go:140
|
||||
msgid "Import canceled"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:138
|
||||
#: messages.go:141
|
||||
#, c-format
|
||||
msgid "Indexing completed in %d s"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:139
|
||||
msgid "Indexing originals..."
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:140
|
||||
#, c-format
|
||||
msgid "Indexing files in %s"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:141
|
||||
msgid "Indexing canceled"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:142
|
||||
#, c-format
|
||||
msgid "Removed %d files and %d photos"
|
||||
msgid "Indexing originals..."
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:143
|
||||
#, c-format
|
||||
msgid "Moving files from %s"
|
||||
msgid "Indexing files in %s"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:144
|
||||
msgid "Indexing canceled"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:145
|
||||
#, c-format
|
||||
msgid "Removed %d files and %d photos"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:146
|
||||
#, c-format
|
||||
msgid "Moving files from %s"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:147
|
||||
#, c-format
|
||||
msgid "Copying files from %s"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:145
|
||||
#: messages.go:148
|
||||
msgid "Labels deleted"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:146
|
||||
#: messages.go:149
|
||||
msgid "Label saved"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:147
|
||||
#: messages.go:150
|
||||
msgid "Subject saved"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:148
|
||||
#: messages.go:151
|
||||
msgid "Subject deleted"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:149
|
||||
#: messages.go:152
|
||||
msgid "Person saved"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:150
|
||||
#: messages.go:153
|
||||
msgid "Person deleted"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:151
|
||||
#: messages.go:154
|
||||
#, c-format
|
||||
msgid "%d files uploaded in %d s"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:152
|
||||
#: messages.go:155
|
||||
msgid "Selection approved"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:153
|
||||
#: messages.go:156
|
||||
msgid "Selection archived"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:154
|
||||
#: messages.go:157
|
||||
msgid "Selection restored"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:155
|
||||
#: messages.go:158
|
||||
msgid "Selection marked as private"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:156
|
||||
#: messages.go:159
|
||||
msgid "Albums deleted"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:157
|
||||
#: messages.go:160
|
||||
#, c-format
|
||||
msgid "Zip created in %d s"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:158
|
||||
#: messages.go:161
|
||||
msgid "Permanently deleted"
|
||||
msgstr ""
|
||||
|
||||
#: messages.go:162
|
||||
#, c-format
|
||||
msgid "%s has been restored"
|
||||
msgstr ""
|
||||
|
|
|
@ -63,7 +63,6 @@ module.exports = (config) => {
|
|||
},
|
||||
|
||||
files: [
|
||||
"node_modules/@babel/polyfill/dist/polyfill.js",
|
||||
"node_modules/regenerator-runtime/runtime/runtime.js",
|
||||
{ pattern: "tests/unit/**/*_test.js", watched: false },
|
||||
],
|
||||
|
|
82
frontend/package-lock.json
generated
82
frontend/package-lock.json
generated
|
@ -15,7 +15,6 @@
|
|||
"@babel/plugin-proposal-class-properties": "^7.17.12",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.18.0",
|
||||
"@babel/plugin-transform-runtime": "^7.18.2",
|
||||
"@babel/polyfill": "^7.12.1",
|
||||
"@babel/preset-env": "^7.18.2",
|
||||
"@babel/register": "^7.17.7",
|
||||
"@babel/runtime": "^7.18.3",
|
||||
|
@ -1497,23 +1496,6 @@
|
|||
"@babel/core": "^7.0.0-0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/polyfill": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.12.1.tgz",
|
||||
"integrity": "sha512-X0pi0V6gxLi6lFZpGmeNa4zxtwEmCs42isWLNjZZDE0Y8yVfgu0T2OAHlzBbdYlqbW/YXVvoBHpATEM+goCj8g==",
|
||||
"deprecated": "🚨 This package has been deprecated in favor of separate inclusion of a polyfill and regenerator-runtime (when needed). See the @babel/polyfill docs (https://babeljs.io/docs/en/babel-polyfill) for more information.",
|
||||
"dependencies": {
|
||||
"core-js": "^2.6.5",
|
||||
"regenerator-runtime": "^0.13.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/polyfill/node_modules/core-js": {
|
||||
"version": "2.6.12",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz",
|
||||
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==",
|
||||
"deprecated": "core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.",
|
||||
"hasInstallScript": true
|
||||
},
|
||||
"node_modules/@babel/preset-env": {
|
||||
"version": "7.18.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.18.2.tgz",
|
||||
|
@ -3399,9 +3381,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001354",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001354.tgz",
|
||||
"integrity": "sha512-mImKeCkyGDAHNywYFA4bqnLAzTUvVkqPvhY4DV47X+Gl2c5Z8c3KNETnXp14GQt11LvxE8AwjzGxJ+rsikiOzg==",
|
||||
"version": "1.0.30001355",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001355.tgz",
|
||||
"integrity": "sha512-Sd6pjJHF27LzCB7pT7qs+kuX2ndurzCzkpJl6Qct7LPSZ9jn0bkOA8mdgMgmqnQAWLVOOGjLpc+66V57eLtb1g==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
|
@ -4550,9 +4532,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.4.157",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.157.tgz",
|
||||
"integrity": "sha512-gteFnXPKsDAdm1U5vVuyrLnKOaR/x/SY+HjUQoHypLUYWJt4RaWU3PaiTBEkRDJh8/Zd8KC/EFjV+uPaHsjKFA=="
|
||||
"version": "1.4.158",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.158.tgz",
|
||||
"integrity": "sha512-gppO3/+Y6sP432HtvwvuU8S+YYYLH4PmAYvQwqUtt9HDOmEsBwQfLnK9T8+1NIKwAS1BEygIjTaATC4H5EzvxQ=="
|
||||
},
|
||||
"node_modules/emoji-regex": {
|
||||
"version": "8.0.0",
|
||||
|
@ -5197,9 +5179,9 @@
|
|||
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
|
||||
},
|
||||
"node_modules/eslint-plugin-n": {
|
||||
"version": "15.2.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.2.2.tgz",
|
||||
"integrity": "sha512-MLjZVAv4TiCIoXqjibNqCJjLkGHfrOY3XZ0ZBLoW0OnS3o98PUBnzB/kfp8dCz/4A4Y18jjX50PRnqI4ACFY1Q==",
|
||||
"version": "15.2.3",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.2.3.tgz",
|
||||
"integrity": "sha512-H+KC7U5R+3IWTeRnACm/4wlqLvS1Q7M6t7BGhn89qXDkZan8HTAEv3ouIONA0ifDwc2YzPFmyPzHuNLddNK4jw==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"builtins": "^5.0.1",
|
||||
|
@ -10140,9 +10122,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.0.tgz",
|
||||
"integrity": "sha512-nwoX4GMFgxoPC6diHvSwmK/4yU8FFH3V8XWtLQrbj4IBsK2pkYhG4kf/ljF/haaZ/aii+wNJqISrCDPgxGWDVQ==",
|
||||
"version": "2.7.1",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz",
|
||||
"integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==",
|
||||
"bin": {
|
||||
"prettier": "bin-prettier.js"
|
||||
},
|
||||
|
@ -13924,22 +13906,6 @@
|
|||
"@babel/helper-plugin-utils": "^7.16.7"
|
||||
}
|
||||
},
|
||||
"@babel/polyfill": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.12.1.tgz",
|
||||
"integrity": "sha512-X0pi0V6gxLi6lFZpGmeNa4zxtwEmCs42isWLNjZZDE0Y8yVfgu0T2OAHlzBbdYlqbW/YXVvoBHpATEM+goCj8g==",
|
||||
"requires": {
|
||||
"core-js": "^2.6.5",
|
||||
"regenerator-runtime": "^0.13.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"core-js": {
|
||||
"version": "2.6.12",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz",
|
||||
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"@babel/preset-env": {
|
||||
"version": "7.18.2",
|
||||
"resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.18.2.tgz",
|
||||
|
@ -15379,9 +15345,9 @@
|
|||
}
|
||||
},
|
||||
"caniuse-lite": {
|
||||
"version": "1.0.30001354",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001354.tgz",
|
||||
"integrity": "sha512-mImKeCkyGDAHNywYFA4bqnLAzTUvVkqPvhY4DV47X+Gl2c5Z8c3KNETnXp14GQt11LvxE8AwjzGxJ+rsikiOzg=="
|
||||
"version": "1.0.30001355",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001355.tgz",
|
||||
"integrity": "sha512-Sd6pjJHF27LzCB7pT7qs+kuX2ndurzCzkpJl6Qct7LPSZ9jn0bkOA8mdgMgmqnQAWLVOOGjLpc+66V57eLtb1g=="
|
||||
},
|
||||
"chai": {
|
||||
"version": "4.3.6",
|
||||
|
@ -16200,9 +16166,9 @@
|
|||
}
|
||||
},
|
||||
"electron-to-chromium": {
|
||||
"version": "1.4.157",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.157.tgz",
|
||||
"integrity": "sha512-gteFnXPKsDAdm1U5vVuyrLnKOaR/x/SY+HjUQoHypLUYWJt4RaWU3PaiTBEkRDJh8/Zd8KC/EFjV+uPaHsjKFA=="
|
||||
"version": "1.4.158",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.158.tgz",
|
||||
"integrity": "sha512-gppO3/+Y6sP432HtvwvuU8S+YYYLH4PmAYvQwqUtt9HDOmEsBwQfLnK9T8+1NIKwAS1BEygIjTaATC4H5EzvxQ=="
|
||||
},
|
||||
"emoji-regex": {
|
||||
"version": "8.0.0",
|
||||
|
@ -16787,9 +16753,9 @@
|
|||
}
|
||||
},
|
||||
"eslint-plugin-n": {
|
||||
"version": "15.2.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.2.2.tgz",
|
||||
"integrity": "sha512-MLjZVAv4TiCIoXqjibNqCJjLkGHfrOY3XZ0ZBLoW0OnS3o98PUBnzB/kfp8dCz/4A4Y18jjX50PRnqI4ACFY1Q==",
|
||||
"version": "15.2.3",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.2.3.tgz",
|
||||
"integrity": "sha512-H+KC7U5R+3IWTeRnACm/4wlqLvS1Q7M6t7BGhn89qXDkZan8HTAEv3ouIONA0ifDwc2YzPFmyPzHuNLddNK4jw==",
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"builtins": "^5.0.1",
|
||||
|
@ -20089,9 +20055,9 @@
|
|||
"integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g=="
|
||||
},
|
||||
"prettier": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.0.tgz",
|
||||
"integrity": "sha512-nwoX4GMFgxoPC6diHvSwmK/4yU8FFH3V8XWtLQrbj4IBsK2pkYhG4kf/ljF/haaZ/aii+wNJqISrCDPgxGWDVQ=="
|
||||
"version": "2.7.1",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz",
|
||||
"integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g=="
|
||||
},
|
||||
"prettier-linter-helpers": {
|
||||
"version": "1.0.0",
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
"@babel/plugin-proposal-class-properties": "^7.17.12",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.18.0",
|
||||
"@babel/plugin-transform-runtime": "^7.18.2",
|
||||
"@babel/polyfill": "^7.12.1",
|
||||
"@babel/preset-env": "^7.18.2",
|
||||
"@babel/register": "^7.17.7",
|
||||
"@babel/runtime": "^7.18.3",
|
||||
|
@ -42,13 +41,13 @@
|
|||
"babel-plugin-istanbul": "^6.1.1",
|
||||
"browserslist": "^4.20.4",
|
||||
"chai": "^4.3.6",
|
||||
"cheerio": "1.0.0-rc.10",
|
||||
"chrome-finder": "^1.0.7",
|
||||
"core-js": "^3.23.1",
|
||||
"cross-env": "^7.0.3",
|
||||
"css-loader": "^6.7.1",
|
||||
"cssnano": "^5.1.11",
|
||||
"easygettext": "^2.17.0",
|
||||
"cheerio": "1.0.0-rc.10",
|
||||
"eslint": "^8.17.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-config-standard": "^17.0.0",
|
||||
|
|
|
@ -205,7 +205,7 @@ msgstr ""
|
|||
|
||||
#: src/component/photo/toolbar.vue:39
|
||||
#: src/pages/albums.vue:29
|
||||
#: src/pages/albums.vue:494
|
||||
#: src/pages/albums.vue:496
|
||||
#: src/share/albums.vue:27
|
||||
#: src/share/albums.vue:410
|
||||
msgid "All Categories"
|
||||
|
|
|
@ -677,9 +677,11 @@ export default {
|
|||
this.lastId = "";
|
||||
},
|
||||
onUpdate(ev, data) {
|
||||
if (!this.listen) return;
|
||||
|
||||
if (!data || !data.entities || !Array.isArray(data.entities)) {
|
||||
if (!this.listen) {
|
||||
console.log("albums.onUpdate currently not listening", ev, data);
|
||||
return;
|
||||
} else if (!data || !data.entities || !Array.isArray(data.entities)) {
|
||||
console.log("albums.onUpdate received empty data", ev, data);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
9
go.mod
9
go.mod
|
@ -41,7 +41,6 @@ require (
|
|||
github.com/patrickmn/go-cache v2.1.0+incompatible
|
||||
github.com/paulmach/go.geojson v1.4.0
|
||||
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58
|
||||
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b
|
||||
github.com/sevlyar/go-daemon v0.1.5
|
||||
github.com/sirupsen/logrus v1.8.1
|
||||
github.com/stretchr/testify v1.7.2
|
||||
|
@ -68,6 +67,12 @@ require (
|
|||
github.com/olekukonko/tablewriter v0.0.5
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
|
||||
golang.org/x/sys v0.0.0-20220614162138-6c1b26c55098 // indirect
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
|
@ -84,14 +89,12 @@ require (
|
|||
github.com/mandykoh/go-parallel v0.1.0 // indirect
|
||||
github.com/mattn/go-isatty v0.0.14 // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/rivo/uniseg v0.2.0 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
github.com/tidwall/match v1.1.1 // indirect
|
||||
github.com/tidwall/pretty v1.2.0 // indirect
|
||||
github.com/ugorji/go/codec v1.2.7 // indirect
|
||||
golang.org/x/sys v0.0.0-20220614162138-6c1b26c55098 // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
|
||||
google.golang.org/protobuf v1.28.0 // indirect
|
||||
|
|
4
go.sum
4
go.sum
|
@ -168,6 +168,8 @@ github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OI
|
|||
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
|
||||
github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
|
||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
|
||||
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
|
||||
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
|
||||
|
@ -283,8 +285,6 @@ github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfF
|
|||
github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk=
|
||||
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd h1:CmH9+J6ZSsIjUK3dcGsnCnO41eRBOnY12zwkn5qVwgc=
|
||||
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk=
|
||||
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b h1:gQZ0qzfKHQIybLANtM3mBXNUtOfsCFXeTsnBqCsx1KM=
|
||||
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||
github.com/scylladb/termtables v0.0.0-20191203121021-c4c0b6d42ff4/go.mod h1:C1a7PQSMz9NShzorzCiG2fk9+xuCgLkPeCvMHYR2OWg=
|
||||
github.com/sevlyar/go-daemon v0.1.5 h1:Zy/6jLbM8CfqJ4x4RPr7MJlSKt90f00kNM1D401C+Qk=
|
||||
github.com/sevlyar/go-daemon v0.1.5/go.mod h1:6dJpPatBT9eUwM5VCw9Bt6CdX9Tk6UWvhW3MebLDRKE=
|
||||
|
|
|
@ -88,26 +88,42 @@ func CreateAlbum(router *gin.RouterGroup) {
|
|||
a := entity.NewAlbum(f.AlbumTitle, entity.AlbumDefault)
|
||||
a.AlbumFavorite = f.AlbumFavorite
|
||||
|
||||
// Search existing album.
|
||||
if err := a.Find(); err == nil {
|
||||
c.JSON(http.StatusOK, a)
|
||||
return
|
||||
// Existing album?
|
||||
if err := a.Find(); err != nil {
|
||||
// Not found, create new album.
|
||||
err = a.Create()
|
||||
|
||||
// Should never happen.
|
||||
if err != nil {
|
||||
// Report unexpected error.
|
||||
log.Errorf("album: %s (create)", err)
|
||||
AbortUnexpected(c)
|
||||
return
|
||||
}
|
||||
|
||||
event.SuccessMsg(i18n.MsgAlbumCreated)
|
||||
} else {
|
||||
// Exists, restore if necessary.
|
||||
if !a.Deleted() {
|
||||
event.InfoMsg(i18n.ErrAlreadyExists, a.Title())
|
||||
c.JSON(http.StatusOK, a)
|
||||
return
|
||||
} else if err = a.Restore(); err == nil {
|
||||
event.SuccessMsg(i18n.MsgRestored, a.Title())
|
||||
} else {
|
||||
// Report unexpected error.
|
||||
log.Errorf("album: %s (restore)", err)
|
||||
AbortUnexpected(c)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// Create new album.
|
||||
if err := a.Create(); err != nil {
|
||||
AbortAlreadyExists(c, clean.Log(a.AlbumTitle))
|
||||
return
|
||||
}
|
||||
|
||||
event.SuccessMsg(i18n.MsgAlbumCreated)
|
||||
|
||||
// Publish event and create/update YAML backup.
|
||||
UpdateClientConfig()
|
||||
|
||||
PublishAlbumEvent(EntityCreated, a.AlbumUID, c)
|
||||
|
||||
SaveAlbumAsYaml(*a)
|
||||
|
||||
// Return as JSON.
|
||||
c.JSON(http.StatusOK, a)
|
||||
})
|
||||
}
|
||||
|
|
|
@ -223,8 +223,13 @@ func BatchAlbumsDelete(router *gin.RouterGroup) {
|
|||
|
||||
log.Infof("albums: deleting %s", clean.Log(f.String()))
|
||||
|
||||
// Soft delete albums, can be restored.
|
||||
entity.Db().Where("album_uid IN (?)", f.Albums).Delete(&entity.Album{})
|
||||
entity.Db().Where("album_uid IN (?)", f.Albums).Delete(&entity.PhotoAlbum{})
|
||||
|
||||
/*
|
||||
KEEP ENTRIES AS ALBUMS MAY NOW BE RESTORED BY NAME
|
||||
entity.Db().Where("album_uid IN (?)", f.Albums).Delete(&entity.PhotoAlbum{})
|
||||
*/
|
||||
|
||||
UpdateClientConfig()
|
||||
|
||||
|
|
|
@ -77,6 +77,7 @@ const (
|
|||
MsgAlbumsDeleted
|
||||
MsgZipCreatedIn
|
||||
MsgPermanentlyDeleted
|
||||
MsgRestored
|
||||
)
|
||||
|
||||
var Messages = MessageMap{
|
||||
|
@ -158,4 +159,5 @@ var Messages = MessageMap{
|
|||
MsgAlbumsDeleted: gettext("Albums deleted"),
|
||||
MsgZipCreatedIn: gettext("Zip created in %d s"),
|
||||
MsgPermanentlyDeleted: gettext("Permanently deleted"),
|
||||
MsgRestored: gettext("%s has been restored"),
|
||||
}
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
package rnd
|
||||
|
||||
import (
|
||||
uuid "github.com/satori/go.uuid"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
// UUID returns a standard, random UUID as string.
|
||||
// UUID returns a random string based on RFC 4122 (UUID Version 4) or panics.
|
||||
//
|
||||
// The strength of the UUID depends on the "crypto/rand" package.
|
||||
func UUID() string {
|
||||
if id, err := uuid.NewV4(); err != nil {
|
||||
return ""
|
||||
} else {
|
||||
return id.String()
|
||||
}
|
||||
return uuid.NewString()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue