client: improve error message for empty gallery posts
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
closes #153 Changelog: Fixed
This commit is contained in:
parent
4dac197dff
commit
a932f91c04
3 changed files with 10 additions and 0 deletions
|
@ -756,6 +756,7 @@ noMaintainerInformationWarning: "Betreiberinformationen sind nicht konfiguriert.
|
|||
noBotProtectionWarning: "Schutz vor Bots ist nicht konfiguriert."
|
||||
configure: "Konfigurieren"
|
||||
postToGallery: "Neuen Galeriebeitrag erstellen"
|
||||
attachmentRequired: "Mindestens 1 Anhang ist erforderlich."
|
||||
gallery: "Galerie"
|
||||
recentPosts: "Neue Beiträge"
|
||||
popularPosts: "Beliebte Beiträge"
|
||||
|
|
|
@ -756,6 +756,7 @@ noMaintainerInformationWarning: "Maintainer information is not configured."
|
|||
noBotProtectionWarning: "Bot protection is not configured."
|
||||
configure: "Configure"
|
||||
postToGallery: "Create new gallery post"
|
||||
attachmentRequired: "At least 1 attachment is required."
|
||||
gallery: "Gallery"
|
||||
recentPosts: "Recent posts"
|
||||
popularPosts: "Popular posts"
|
||||
|
|
|
@ -66,6 +66,14 @@ function remove(file) {
|
|||
}
|
||||
|
||||
async function save() {
|
||||
if (files.length === 0) {
|
||||
os.alert({
|
||||
type: 'error',
|
||||
text: i18n.ts.attachmentRequired,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (props.postId) {
|
||||
await os.apiWithDialog('gallery/posts/update', {
|
||||
postId: props.postId,
|
||||
|
|
Loading…
Reference in a new issue