- {{#if status.reblog}}
-
- {{/if}}
+
+ {{#if status.reblog}}
+
+ {{/if}}
- {{{status.content}}}
+ {{#if status.spoiler_text}}
+ {{status.spoiler_text}}
+ {{/if}}
+ {{#if status.spoiler_text}}
+
+
+
+ {{/if}}
+ {{#if !status.spoiler_text || spoilerShown}}
+
+ {{{status.content}}}
+
+ {{/if}}
@@ -37,6 +49,8 @@
grid-template-areas:
".............. status-boosted"
"status-sidebar status-author"
+ "status-sidebar status-spoiler"
+ "status-sidebar status-spoiler-button"
"status-sidebar status-content"
".............. status-toolbar"
"status-media status-media";
@@ -50,6 +64,25 @@
margin: 0 10px 0 0;
}
+ .status-spoiler {
+ grid-area: status-spoiler;
+ word-wrap: break-word;
+ overflow: hidden;
+ white-space: pre-wrap;
+ font-size: 1.1em;
+ margin: 5px;
+ }
+
+ .status-spoiler-button {
+ grid-area: status-spoiler-button;
+ margin: 5px;
+ }
+
+ .status-spoiler-button button {
+ padding: 5px 10px;
+ font-size: 1.1em;
+ }
+
.status-author {
grid-area: status-author;
display: flex;
@@ -94,7 +127,7 @@
}
.status-content {
- margin: 10px 10px 20px 5px;
+ margin: 10px 10px 10px 5px;
grid-area: status-content;
word-wrap: break-word;
overflow: hidden;
@@ -160,6 +193,12 @@
originalStatus: (status) => status.reblog ? status.reblog : status,
originalAccount: (originalStatus) => originalStatus.account,
originalMediaAttachments: (originalStatus) => originalStatus.media_attachments,
+ },
+ methods: {
+ onClickSpoilerButton() {
+ this.set({spoilerShown: !this.get('spoilerShown')})
+ this.fire('recalculateHeight')
+ }
}
}
\ No newline at end of file
diff --git a/routes/_components/StatusListItem.html b/routes/_components/StatusListItem.html
index 56bc54d8..e62a49e2 100644
--- a/routes/_components/StatusListItem.html
+++ b/routes/_components/StatusListItem.html
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/routes/_utils/AsyncLayout.js b/routes/_utils/AsyncLayout.js
index 64430f29..5fdbef88 100644
--- a/routes/_utils/AsyncLayout.js
+++ b/routes/_utils/AsyncLayout.js
@@ -26,6 +26,11 @@ class AsyncLayout {
this._intersectionObserver.unobserve(node)
delete this._onIntersectionCallbacks[key]
}
+
+ disconnect() {
+ this._intersectionObserver.disconnect()
+ this._intersectionObserver = null
+ }
}
export { AsyncLayout }
\ No newline at end of file
diff --git a/routes/_utils/showVideoDialog.js b/routes/_utils/showVideoDialog.js
index 93623ea8..55a4d98e 100644
--- a/routes/_utils/showVideoDialog.js
+++ b/routes/_utils/showVideoDialog.js
@@ -1,6 +1,6 @@
import VideoDialog from '../_components/VideoDialog.html'
-export function showVideoDialog(poster, src, width, height) {
+export function showVideoDialog(poster, src, width, height, description) {
let dialog = document.createElement('dialog')
dialog.classList.add('video-dialog')
dialog.setAttribute('aria-label', 'Video dialog')
@@ -12,7 +12,8 @@ export function showVideoDialog(poster, src, width, height) {
src: src,
dialog: dialog,
width: width,
- height: height
+ height: height,
+ description: description
}
})
videoDialog.showModal()
diff --git a/routes/settings/instances/[instanceName].html b/routes/settings/instances/[instanceName].html
index cc714f8e..d4b53c42 100644
--- a/routes/settings/instances/[instanceName].html
+++ b/routes/settings/instances/[instanceName].html
@@ -9,10 +9,10 @@
{{#if instanceUserAccount}}
Logged in as:
Theme: