diff --git a/src/client/components/media-list.vue b/src/client/components/media-list.vue
index 08722ff91a..3a34ad813e 100644
--- a/src/client/components/media-list.vue
+++ b/src/client/components/media-list.vue
@@ -3,8 +3,8 @@
-
-
+
+
@@ -32,16 +32,39 @@ export default Vue.extend({
},
raw: {
default: false
+ },
+ width: {
+ type: Number
}
},
- mounted() {
+ computed: {
+ gridHeight() {
+ if (this.$refs.gridOuter) {
+ if (this.$props.width) {
+ return this.$props.width * 9 / 16;
+ } else if (this.$refs.gridOuter.clientHeight) {
+ return this.$refs.gridOuter.clientHeight;
+ }
+ return 287;
+ }
+
+ return null;
+ }
+ },
+ /*mounted() {
+ console.log(this.$props.width)
//#region for Safari bug
- if (this.$refs.grid) {
- this.$refs.grid.style.height = this.$refs.grid.clientHeight ? `${this.$refs.grid.clientHeight}px`
- : '287px';
+ if (this.$refs.gridOuter) {
+ if (this.$props.width) {
+ this.$refs.gridInner.style.height = `${this.$props.width * 9 / 16}px`
+ } else if (this.$refs.gridOuter.clientHeight) {
+ this.$refs.gridInner.style.height = `${this.$refs.gridOuter.clientHeight}px`
+ } else {
+ this.$refs.gridInner.style.height = '287px';
+ }
}
//#endregion
- },
+ },*/
methods: {
previewable(file) {
return file.type.startsWith('video') || file.type.startsWith('image');
diff --git a/src/client/components/sub-note-content.vue b/src/client/components/sub-note-content.vue
index e60c197442..63f56c7681 100644
--- a/src/client/components/sub-note-content.vue
+++ b/src/client/components/sub-note-content.vue
@@ -1,5 +1,5 @@
-
+
({{ $t('private') }})
({{ $t('deleted') }})
@@ -9,7 +9,7 @@
({{ $t('withNFiles', { n: note.files.length }) }})
-
+
{{ $t('poll') }}
@@ -39,8 +39,13 @@ export default Vue.extend({
},
data() {
return {
+ width: 0,
+
faReply
};
+ },
+ mounted() {
+ this.width = this.$refs.i.getBoundingClientRect().width
}
});