summaryrefslogtreecommitdiff
path: root/src/main/resources/META-INF
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2020-08-23 21:51:00 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2020-08-27 21:09:12 +0200
commitd5498fcec7394d2b89667832853e239d5f496e1c (patch)
tree3d9d6ee6c1c175c22026059f4b44b2d954fac6d9 /src/main/resources/META-INF
parente9b14f921cdaa0357aa58f4a72f930981b3042fb (diff)
Add localized texts to Benki post model.
Change-Id: I123cfe2ff06f85dc14c705b21d723d1c68fd2e00
Diffstat (limited to 'src/main/resources/META-INF')
-rw-r--r--src/main/resources/META-INF/resources/bookmarks/MlkBookmarkSubmissionForm.js6
-rw-r--r--src/main/resources/META-INF/resources/lazychat/MlkLazychatSubmissionForm.js4
2 files changed, 7 insertions, 3 deletions
diff --git a/src/main/resources/META-INF/resources/bookmarks/MlkBookmarkSubmissionForm.js b/src/main/resources/META-INF/resources/bookmarks/MlkBookmarkSubmissionForm.js
index 6ecc355..b4d21d3 100644
--- a/src/main/resources/META-INF/resources/bookmarks/MlkBookmarkSubmissionForm.js
+++ b/src/main/resources/META-INF/resources/bookmarks/MlkBookmarkSubmissionForm.js
@@ -173,9 +173,11 @@ export class MlkBookmarkSubmissionForm extends HTMLElement {
let post = await r.json();
this.uriInput.value = post.uri;
- this.titleInput.value = post.title;
- this.descriptionInput.innerText = post.description;
this.visibilityInput.value = post.visibility;
+ if (post.texts['']) {
+ this.titleInput.value = post.texts[''].title;
+ this.descriptionInput.innerText = post.texts[''].description;
+ }
this.loaded = true;
}
diff --git a/src/main/resources/META-INF/resources/lazychat/MlkLazychatSubmissionForm.js b/src/main/resources/META-INF/resources/lazychat/MlkLazychatSubmissionForm.js
index c6334ad..3688527 100644
--- a/src/main/resources/META-INF/resources/lazychat/MlkLazychatSubmissionForm.js
+++ b/src/main/resources/META-INF/resources/lazychat/MlkLazychatSubmissionForm.js
@@ -107,8 +107,10 @@ export class MlkLazychatSubmissionForm extends HTMLElement {
}
let post = await r.json();
- this.textInput.value = post.content;
this.visibilityInput.value = post.visibility;
+ if (post.texts['']) {
+ this.textInput.value = post.texts[''].content;
+ }
this.loaded = true;
}