Merge remote-tracking branch 'misskey-original/develop' into develop

# Conflicts:
#	locales/index.d.ts
#	locales/ja-JP.yml
#	package.json
#	packages/backend/src/server/api/endpoints/admin/emoji/copy.ts
#	packages/backend/src/server/api/endpoints/admin/meta.ts
#	packages/backend/src/server/api/endpoints/channels/timeline.ts
#	packages/backend/src/server/api/endpoints/notes/featured.ts
#	packages/frontend/src/components/MkButton.vue
#	packages/frontend/src/components/MkClickerGame.vue
#	packages/frontend/src/components/MkDialog.vue
#	packages/frontend/src/components/MkDrive.vue
#	packages/frontend/src/components/MkEmojiEditDialog.vue
#	packages/frontend/src/components/MkEmojiPicker.section.vue
#	packages/frontend/src/components/MkEmojiPicker.vue
#	packages/frontend/src/components/MkFollowButton.vue
#	packages/frontend/src/components/MkInstanceTicker.vue
#	packages/frontend/src/components/MkLaunchPad.vue
#	packages/frontend/src/components/MkMenu.vue
#	packages/frontend/src/components/MkNote.vue
#	packages/frontend/src/components/MkNoteSimple.vue
#	packages/frontend/src/components/MkPostForm.vue
#	packages/frontend/src/components/MkRadio.vue
#	packages/frontend/src/components/MkSignupDialog.form.vue
#	packages/frontend/src/components/MkSwitch.vue
#	packages/frontend/src/custom-emojis.ts
#	packages/frontend/src/pages/about.emojis.vue
#	packages/frontend/src/pages/about.vue
#	packages/frontend/src/pages/admin/index.vue
#	packages/frontend/src/pages/admin/other-settings.vue
#	packages/frontend/src/pages/custom-emojis-manager.vue
#	packages/frontend/src/pages/settings/general.vue
#	packages/frontend/src/pages/settings/mute-block.vue
#	packages/frontend/src/pages/timeline.vue
#	packages/frontend/src/pages/user/home.vue
#	packages/frontend/src/pages/user/index.files.vue
#	packages/frontend/src/scripts/get-note-menu.ts
#	packages/frontend/src/store.ts
#	packages/frontend/src/ui/_common_/stream-indicator.vue
#	packages/frontend/src/ui/classic.sidebar.vue
#	packages/frontend/src/ui/universal.vue
#	packages/frontend/src/ui/universal.widgets.vue
#	packages/frontend/vite.config.ts
#	packages/misskey-js/etc/misskey-js.api.md
#	packages/misskey-js/src/api.types.ts
#	packages/misskey-js/src/entities.ts
#	packages/misskey-js/src/streaming.types.ts
This commit is contained in:
mattyatea 2023-12-13 07:08:57 +09:00
commit 8c4a08c383
404 changed files with 42042 additions and 11250 deletions

View file

@ -64,7 +64,7 @@ export function openInstanceMenu(ev: MouseEvent) {
text: i18n.ts.charts,
icon: 'ti ti-chart-line',
to: '/about#charts',
}, null, {
}, { type: 'divider' }, {
type: 'link',
text: i18n.ts.ads,
icon: 'ti ti-ad',
@ -79,29 +79,29 @@ export function openInstanceMenu(ev: MouseEvent) {
text: i18n.ts.tools,
icon: 'ti ti-tool',
children: toolsMenuItems(),
}, null, (instance.impressumUrl) ? {
}, { type: 'divider' }, (instance.impressumUrl) ? {
text: i18n.ts.impressum,
icon: 'ti ti-file-invoice',
action: () => {
window.open(instance.impressumUrl, '_blank');
window.open(instance.impressumUrl, '_blank', 'noopener');
},
} : undefined, (instance.tosUrl) ? {
text: i18n.ts.termsOfService,
icon: 'ti ti-notebook',
action: () => {
window.open(instance.tosUrl, '_blank');
window.open(instance.tosUrl, '_blank', 'noopener');
},
} : undefined, (instance.privacyPolicyUrl) ? {
text: i18n.ts.privacyPolicy,
icon: 'ti ti-shield-lock',
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: 'ti ti-help-circle',
action: () => {
window.open('https://misskey-hub.net/help.html', '_blank');
window.open('https://misskey-hub.net/help.html', '_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,20 +23,20 @@ import { defaultStore } from '@/store.js';
const zIndex = os.claimZIndex('high');
let hasDisconnected = $ref(false);
let timeoutId = $ref<number>();
const hasDisconnected = ref(false);
let timeoutId = ref<number>();
function onDisconnected() {
if (isReloading) return;
window.clearTimeout(timeoutId);
timeoutId = window.setTimeout(() => {
hasDisconnected = true;
window.clearTimeout(timeoutId.value);
timeoutId.value = window.setTimeout(() => {
hasDisconnected.value = true;
}, 1000 * 10);
}
function resetDisconnected() {
window.clearTimeout(timeoutId);
hasDisconnected = false;
window.clearTimeout(timeoutId.value);
hasDisconnected.value = false;
}
function reload() {