diff --git a/src/client/components/autocomplete.vue b/src/client/components/autocomplete.vue index 14a0f15779..f4f3909795 100644 --- a/src/client/components/autocomplete.vue +++ b/src/client/components/autocomplete.vue @@ -6,7 +6,7 @@ - @{{ user | acct }} + @{{ acct(user) }}
  • {{ $t('selectUser') }}
  • @@ -34,6 +34,7 @@ import contains from '../scripts/contains'; import { twemojiSvgBase } from '../../misc/twemoji-base'; import { getStaticImageUrl } from '../scripts/get-static-image-url'; import MkUserSelect from './user-select.vue'; +import { acct } from '../filters/user'; type EmojiDef = { emoji: string; @@ -381,7 +382,9 @@ export default defineComponent({ vm.$once('closed', () => { this.textarea.focus(); }); - } + }, + + acct } }); diff --git a/src/client/components/avatar.vue b/src/client/components/avatar.vue index 3a2cc35e38..004231c163 100644 --- a/src/client/components/avatar.vue +++ b/src/client/components/avatar.vue @@ -1,8 +1,8 @@ @@ -10,6 +10,7 @@ @@ -95,7 +98,7 @@ export default defineComponent({ transform: rotate(-37.5deg) skew(-30deg); } } - + .inner { position: absolute; bottom: 0; diff --git a/src/client/components/drive-window.vue b/src/client/components/drive-window.vue index c9dbb42968..7f976c22d5 100644 --- a/src/client/components/drive-window.vue +++ b/src/client/components/drive-window.vue @@ -2,7 +2,7 @@
    @@ -14,6 +14,7 @@ import { defineComponent } from 'vue'; import XDrive from './drive.vue'; import XWindow from './window.vue'; +import number from '../filters/number'; export default defineComponent({ components: { @@ -25,7 +26,7 @@ export default defineComponent({ type: { type: String, required: false, - default: 'file' + default: 'file' }, multiple: { type: Boolean, @@ -47,7 +48,9 @@ export default defineComponent({ onChangeSelection(xs) { this.selected = xs; - } + }, + + number } }); diff --git a/src/client/components/drive.file.vue b/src/client/components/drive.file.vue index cf6c4869a0..571b751ef4 100644 --- a/src/client/components/drive.file.vue +++ b/src/client/components/drive.file.vue @@ -37,6 +37,7 @@ import copyToClipboard from '../scripts/copy-to-clipboard'; //import updateBanner from '../api/update-banner'; import XFileThumbnail from './drive-file-thumbnail.vue'; import { faDownload, faLink, faICursor, faTrashAlt } from '@fortawesome/free-solid-svg-icons'; +import bytes from '../filters/bytes'; export default defineComponent({ components: { @@ -72,7 +73,7 @@ export default defineComponent({ return this.$parent; }, title(): string { - return `${this.file.name}\n${this.file.type} ${Vue.filter('bytes')(this.file.size)}`; + return `${this.file.name}\n${this.file.type} ${bytes(this.file.size)}`; } }, @@ -181,7 +182,9 @@ export default defineComponent({ this.$root.api('drive/files/delete', { fileId: this.file.id }); - } + }, + + bytes } }); diff --git a/src/client/components/instance-stats.vue b/src/client/components/instance-stats.vue index 851a5bbcd1..59ea57f61b 100644 --- a/src/client/components/instance-stats.vue +++ b/src/client/components/instance-stats.vue @@ -9,15 +9,15 @@
    {{ $t('total') }}
    -
    {{ info.originalUsersCount | number }}
    +
    {{ number(info.originalUsersCount) }}
    {{ $t('dayOverDayChanges') }}
    -
    {{ usersLocalDoD | number }}
    +
    {{ number(usersLocalDoD) }}
    {{ $t('weekOverWeekChanges') }}
    -
    {{ usersLocalWoW | number }}
    +
    {{ number(usersLocalWoW) }}
    @@ -29,15 +29,15 @@
    {{ $t('total') }}
    -
    {{ (info.usersCount - info.originalUsersCount) | number }}
    +
    {{ number((info.usersCount - info.originalUsersCount)) }}
    {{ $t('dayOverDayChanges') }}
    -
    {{ usersRemoteDoD | number }}
    +
    {{ number(usersRemoteDoD) }}
    {{ $t('weekOverWeekChanges') }}
    -
    {{ usersRemoteWoW | number }}
    +
    {{ number(usersRemoteWoW) }}
    @@ -49,15 +49,15 @@
    {{ $t('total') }}
    -
    {{ info.originalNotesCount | number }}
    +
    {{ number(info.originalNotesCount) }}
    {{ $t('dayOverDayChanges') }}
    -
    {{ notesLocalDoD | number }}
    +
    {{ number(notesLocalDoD) }}
    {{ $t('weekOverWeekChanges') }}
    -
    {{ notesLocalWoW | number }}
    +
    {{ number(notesLocalWoW) }}
    @@ -69,15 +69,15 @@
    {{ $t('total') }}
    -
    {{ (info.notesCount - info.originalNotesCount) | number }}
    +
    {{ number((info.notesCount - info.originalNotesCount)) }}
    {{ $t('dayOverDayChanges') }}
    -
    {{ notesRemoteDoD | number }}
    +
    {{ number(notesRemoteDoD) }}
    {{ $t('weekOverWeekChanges') }}
    -
    {{ notesRemoteWoW | number }}
    +
    {{ number(notesRemoteWoW) }}
    @@ -126,6 +126,7 @@ import { defineComponent } from 'vue'; import { faChartBar, faUser, faPencilAlt } from '@fortawesome/free-solid-svg-icons'; import Chart from 'chart.js'; import MkSelect from './ui/select.vue'; +import number from '../filters/number'; const chartLimit = 90; const sum = (...arr) => arr.reduce((r, a) => r.map((b, i) => a[i] + b)); @@ -580,6 +581,8 @@ export default defineComponent({ }] }; }, + + number } }); diff --git a/src/client/components/note-header.vue b/src/client/components/note-header.vue index 2cf06f2cd0..978f670fea 100644 --- a/src/client/components/note-header.vue +++ b/src/client/components/note-header.vue @@ -1,6 +1,6 @@