diff --git a/locales/index.js b/locales/index.js index df8f118428..ee260f269d 100644 --- a/locales/index.js +++ b/locales/index.js @@ -14,6 +14,7 @@ const merge = (...args) => args.reduce((a, c) => ({ }), {}); const languages = [ + 'ar-SA', //'cs-CZ', //'da-DK', 'de-DE', diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 3c7dc6640b..38827ea35a 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -509,6 +509,7 @@ addedRelays: "追加済みのリレー" serviceworkerInfo: "プッシュ通知を行うには有効する必要があります。" deletedNote: "削除された投稿" invisibleNote: "非公開の投稿" +enableInfiniteScroll: "自動でもっと見る" _theme: explore: "テーマを探す" diff --git a/src/client/components/drive.vue b/src/client/components/drive.vue index 65eb1cb816..3e7b7d04ae 100644 --- a/src/client/components/drive.vue +++ b/src/client/components/drive.vue @@ -19,17 +19,17 @@ @drop.prevent.stop="onDrop" >
{{ $t('empty-draghover') }}
@@ -116,6 +116,13 @@ export default Vue.extend({ fetching: true, + ilFilesObserver: new IntersectionObserver( + (entries) => entries.some((entry) => entry.isIntersecting) + && !this.fetching && this.moreFiles && + this.fetchMoreFiles() + ), + moreFilesElement: null as Element, + faAngleRight }; }, @@ -127,6 +134,12 @@ export default Vue.extend({ }, mounted() { + if (this.$store.state.device.enableInfiniteScroll && this.$refs.loadMoreFiles) { + this.$nextTick(() => { + this.ilFilesObserver.observe((this.$refs.loadMoreFiles as Vue).$el) + }); + } + this.connection = this.$root.stream.useSharedConnection('drive'); this.connection.on('fileCreated', this.onStreamDriveFileCreated); @@ -143,8 +156,17 @@ export default Vue.extend({ } }, + activated() { + if (this.$store.state.device.enableInfiniteScroll) { + this.$nextTick(() => { + this.ilFilesObserver.observe((this.$refs.loadMoreFiles as Vue).$el) + }); + } + }, + beforeDestroy() { this.connection.dispose(); + this.ilFilesObserver.disconnect(); }, methods: { diff --git a/src/client/components/mfm.ts b/src/client/components/mfm.ts index bfef80f232..122368f74b 100644 --- a/src/client/components/mfm.ts +++ b/src/client/components/mfm.ts @@ -1,5 +1,5 @@ import Vue, { VNode } from 'vue'; -import { MfmForest } from '../../mfm/types'; +import { MfmForest } from '../../mfm/prelude'; import { parse, parsePlain } from '../../mfm/parse'; import MkUrl from './url.vue'; import MkLink from './link.vue'; @@ -53,11 +53,11 @@ export default Vue.component('misskey-flavored-markdown', { if (!this.plain) { const x = text.split('\n') - .map(t => t == '' ? [createElement('br')] : [createElement('span', t), createElement('br')]); + .map(t => t == '' ? [createElement('br')] : [this._v(t), createElement('br')]); // NOTE: this._vはHACK SEE: https://github.com/syuilo/misskey/pull/6399#issuecomment-632820283 x[x.length - 1].pop(); return x; } else { - return [createElement('span', text.replace(/\n/g, ' '))]; + return [this._v(text.replace(/\n/g, ' '))]; } } diff --git a/src/client/components/note-preview.vue b/src/client/components/note-preview.vue index f58ab5fa50..14314889a3 100644 --- a/src/client/components/note-preview.vue +++ b/src/client/components/note-preview.vue @@ -50,15 +50,7 @@ export default Vue.extend({ margin: 0; padding: 0; overflow: hidden; - font-size: 10px; - - @media (min-width: 350px) { - font-size: 12px; - } - - @media (min-width: 500px) { - font-size: 14px; - } + font-size: 0.95em; > .avatar { diff --git a/src/client/components/notes.vue b/src/client/components/notes.vue index 515bc58e2e..c83cbd1aa1 100644 --- a/src/client/components/notes.vue +++ b/src/client/components/notes.vue @@ -7,8 +7,8 @@