merge: upstream

This commit is contained in:
Marie 2023-12-23 02:09:23 +01:00
commit 5db583a3eb
701 changed files with 50809 additions and 13660 deletions

View file

@ -64,7 +64,7 @@ export function openInstanceMenu(ev: MouseEvent) {
text: i18n.ts.charts,
icon: 'ph-chart-line ph-bold ph-lg',
to: '/about#charts',
}, null, {
}, { type: 'divider' }, {
type: 'link',
text: i18n.ts.ads,
icon: 'ph-flag ph-bold ph-lg',
@ -79,29 +79,29 @@ export function openInstanceMenu(ev: MouseEvent) {
text: i18n.ts.tools,
icon: 'ph-toolbox ph-bold ph-lg',
children: toolsMenuItems(),
}, null, (instance.impressumUrl) ? {
}, { type: 'divider' }, (instance.impressumUrl) ? {
text: i18n.ts.impressum,
icon: 'ph-newspaper-clipping ph-bold ph-lg',
action: () => {
window.open(instance.impressumUrl, '_blank');
window.open(instance.impressumUrl, '_blank', 'noopener');
},
} : undefined, (instance.tosUrl) ? {
text: i18n.ts.termsOfService,
icon: 'ph-notebook ph-bold ph-lg',
action: () => {
window.open(instance.tosUrl, '_blank');
window.open(instance.tosUrl, '_blank', 'noopener');
},
} : undefined, (instance.privacyPolicyUrl) ? {
text: i18n.ts.privacyPolicy,
icon: 'ph-shield ph-bold ph-lg',
action: () => {
window.open(instance.privacyPolicyUrl, '_blank');
window.open(instance.privacyPolicyUrl, '_blank', 'noopener');
},
} : undefined, (!instance.impressumUrl && !instance.tosUrl && !instance.privacyPolicyUrl) ? undefined : null, {
} : undefined, (!instance.impressumUrl && !instance.tosUrl && !instance.privacyPolicyUrl) ? undefined : { type: 'divider' }, {
text: i18n.ts.help,
icon: 'ph-question ph-bold ph-lg',
action: () => {
window.open('https://misskey-hub.net/help.html', '_blank');
window.open('https://misskey-hub.net/docs/for-users/', '_blank', 'noopener');
},
}, ($i) ? {
text: i18n.ts._initialTutorial.launchTutorial,

View file

@ -63,7 +63,7 @@ const XUpload = defineAsyncComponent(() => import('./upload.vue'));
const dev = _DEV_;
let notifications = $ref<Misskey.entities.Notification[]>([]);
const notifications = ref<Misskey.entities.Notification[]>([]);
function onNotification(notification: Misskey.entities.Notification, isClient = false) {
if (document.visibilityState === 'visible') {
@ -72,13 +72,13 @@ function onNotification(notification: Misskey.entities.Notification, isClient =
useStream().send('readNotification');
}
notifications.unshift(notification);
notifications.value.unshift(notification);
window.setTimeout(() => {
if (notifications.length > 3) notifications.pop();
if (notifications.value.length > 3) notifications.value.pop();
}, 500);
window.setTimeout(() => {
notifications = notifications.filter(x => x.id !== notification.id);
notifications.value = notifications.value.filter(x => x.id !== notification.id);
}, 6000);
}

View file

@ -47,9 +47,9 @@ const props = defineProps<{
refreshIntervalSec?: number;
}>();
const instances = ref<Misskey.entities.Instance[]>([]);
const instances = ref<Misskey.entities.FederationInstance[]>([]);
const fetching = ref(true);
let key = $ref(0);
const key = ref(0);
const tick = () => {
os.api('federation/instances', {
@ -58,7 +58,7 @@ const tick = () => {
}).then(res => {
instances.value = res;
fetching.value = false;
key++;
key.value++;
});
};

View file

@ -44,7 +44,7 @@ const props = defineProps<{
const items = ref([]);
const fetching = ref(true);
let key = $ref(0);
const key = ref(0);
const tick = () => {
window.fetch(`/api/fetch-rss?url=${props.url}`, {}).then(res => {
@ -54,7 +54,7 @@ const tick = () => {
}
items.value = feed.items;
fetching.value = false;
key++;
key.value++;
});
});
};

View file

@ -50,7 +50,7 @@ const props = defineProps<{
const notes = ref<Misskey.entities.Note[]>([]);
const fetching = ref(true);
let key = $ref(0);
const key = ref(0);
const tick = () => {
if (props.userListId == null) return;
@ -59,7 +59,7 @@ const tick = () => {
}).then(res => {
notes.value = res;
fetching.value = false;
key++;
key.value++;
});
};

View file

@ -14,7 +14,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<script lang="ts" setup>
import { onUnmounted } from 'vue';
import { onUnmounted, ref } from 'vue';
import { useStream } from '@/stream.js';
import { i18n } from '@/i18n.js';
import MkButton from '@/components/MkButton.vue';
@ -23,14 +23,14 @@ import { defaultStore } from '@/store.js';
const zIndex = os.claimZIndex('high');
let hasDisconnected = $ref(false);
const hasDisconnected = ref(false);
function onDisconnected() {
hasDisconnected = true;
hasDisconnected.value = true;
}
function resetDisconnected() {
hasDisconnected = false;
hasDisconnected.value = false;
}
function reload() {