forked from FoundKeyGang/FoundKey
client: improve error message for empty gallery posts
closes FoundKeyGang/FoundKey#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."
|
noBotProtectionWarning: "Schutz vor Bots ist nicht konfiguriert."
|
||||||
configure: "Konfigurieren"
|
configure: "Konfigurieren"
|
||||||
postToGallery: "Neuen Galeriebeitrag erstellen"
|
postToGallery: "Neuen Galeriebeitrag erstellen"
|
||||||
|
attachmentRequired: "Mindestens 1 Anhang ist erforderlich."
|
||||||
gallery: "Galerie"
|
gallery: "Galerie"
|
||||||
recentPosts: "Neue Beiträge"
|
recentPosts: "Neue Beiträge"
|
||||||
popularPosts: "Beliebte Beiträge"
|
popularPosts: "Beliebte Beiträge"
|
||||||
|
|
|
@ -756,6 +756,7 @@ noMaintainerInformationWarning: "Maintainer information is not configured."
|
||||||
noBotProtectionWarning: "Bot protection is not configured."
|
noBotProtectionWarning: "Bot protection is not configured."
|
||||||
configure: "Configure"
|
configure: "Configure"
|
||||||
postToGallery: "Create new gallery post"
|
postToGallery: "Create new gallery post"
|
||||||
|
attachmentRequired: "At least 1 attachment is required."
|
||||||
gallery: "Gallery"
|
gallery: "Gallery"
|
||||||
recentPosts: "Recent posts"
|
recentPosts: "Recent posts"
|
||||||
popularPosts: "Popular posts"
|
popularPosts: "Popular posts"
|
||||||
|
|
|
@ -66,6 +66,14 @@ function remove(file) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function save() {
|
async function save() {
|
||||||
|
if (files.length === 0) {
|
||||||
|
os.alert({
|
||||||
|
type: 'error',
|
||||||
|
text: i18n.ts.attachmentRequired,
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (props.postId) {
|
if (props.postId) {
|
||||||
await os.apiWithDialog('gallery/posts/update', {
|
await os.apiWithDialog('gallery/posts/update', {
|
||||||
postId: props.postId,
|
postId: props.postId,
|
||||||
|
|
Loading…
Reference in a new issue