Merge pull request #369 from laoxong/develop

into master
This commit is contained in:
老兄 2024-09-30 12:28:05 +08:00 committed by GitHub
commit 10e166ca6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 40 additions and 7 deletions

View File

@ -7,7 +7,7 @@ on:
workflow_dispatch: workflow_dispatch:
env: env:
REGISTRY_IMAGE: misskey/misskey REGISTRY_IMAGE: laoxong/misskey
jobs: jobs:
# see https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners # see https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners
@ -20,7 +20,7 @@ jobs:
platform: platform:
- linux/amd64 - linux/amd64
- linux/arm64 - linux/arm64
if: github.repository == 'misskey-dev/misskey' if: github.repository == 'laoxong/misskey'
steps: steps:
- name: Prepare - name: Prepare
run: | run: |

View File

@ -25,7 +25,7 @@ jobs:
matrix: matrix:
platform: platform:
- linux/amd64 - linux/amd64
- linux/arm64 # - linux/arm64
steps: steps:
- name: Prepare - name: Prepare
run: | run: |

View File

@ -19,7 +19,7 @@ jobs:
env: env:
NODE_OPTIONS: "--max_old_space_size=7168" NODE_OPTIONS: "--max_old_space_size=7168"
if: github.repository == 'misskey-dev/misskey'
steps: steps:
- uses: actions/checkout@v4.1.1 - uses: actions/checkout@v4.1.1
if: github.event_name != 'pull_request_target' if: github.event_name != 'pull_request_target'

2
.gitignore vendored
View File

@ -78,3 +78,5 @@ vite.config.ts.timestamp-*
# VSCode addon # VSCode addon
.favorites.json .favorites.json
/dump.rdb

View File

@ -1,3 +1,15 @@
## Unreleased
### General
-
### Client
-
### Server
-
## 2024.9.0 ## 2024.9.0
### General ### General

View File

@ -545,7 +545,7 @@ function loadConversation() {
}); });
} }
onMounted(()=>{ onMounted(() => {
loadReplies(); loadReplies();
loadConversation(); loadConversation();
}); });

View File

@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<template> <template>
<MkPullToRefresh :refresher="() => reload()"> <MkPullToRefresh :refresher="() => reload()">
<MkPagination ref="pagingComponent" :pagination="pagination"> <MkPagination ref="pagingComponent" :pagination="pagination" @queue="onQueue">
<template #empty> <template #empty>
<div class="_fullinfo"> <div class="_fullinfo">
<img :src="infoImageUrl" class="_ghost"/> <img :src="infoImageUrl" class="_ghost"/>
@ -36,6 +36,7 @@ import { infoImageUrl } from '@/instance.js';
import { defaultStore } from '@/store.js'; import { defaultStore } from '@/store.js';
import MkPullToRefresh from '@/components/MkPullToRefresh.vue'; import MkPullToRefresh from '@/components/MkPullToRefresh.vue';
import * as Misskey from 'misskey-js'; import * as Misskey from 'misskey-js';
import { misskeyApi } from '@/scripts/misskey-api';
const props = defineProps<{ const props = defineProps<{
excludeTypes?: typeof notificationTypes[number][]; excludeTypes?: typeof notificationTypes[number][];
@ -65,9 +66,26 @@ function onNotification(notification) {
if (!isMuted) { if (!isMuted) {
pagingComponent.value?.prepend(notification); pagingComponent.value?.prepend(notification);
onQueue();
} }
} }
let queued = false;
function checkAllNotificationsCanRead() {
queued = false;
if (!document.hasFocus()) { onQueue(); return; }
if (!(pagingComponent.value?.queue.size) && !(props.excludeTypes?.length)) {
misskeyApi('notifications/mark-all-as-read');
}
}
function onQueue() {
if (queued) return;
queued = true;
setTimeout(() => checkAllNotificationsCanRead(), 2000);
}
function reload() { function reload() {
return new Promise<void>((res) => { return new Promise<void>((res) => {
pagingComponent.value?.reload().then(() => { pagingComponent.value?.reload().then(() => {

View File

@ -173,6 +173,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</div> </div>
<MkSelect v-model="serverDisconnectedBehavior"> <MkSelect v-model="serverDisconnectedBehavior">
<template #label>{{ i18n.ts.whenServerDisconnected }}</template> <template #label>{{ i18n.ts.whenServerDisconnected }}</template>
<option :value="null">什么都不做</option>
<option value="reload">{{ i18n.ts._serverDisconnectedBehavior.reload }}</option> <option value="reload">{{ i18n.ts._serverDisconnectedBehavior.reload }}</option>
<option value="dialog">{{ i18n.ts._serverDisconnectedBehavior.dialog }}</option> <option value="dialog">{{ i18n.ts._serverDisconnectedBehavior.dialog }}</option>
<option value="quiet">{{ i18n.ts._serverDisconnectedBehavior.quiet }}</option> <option value="quiet">{{ i18n.ts._serverDisconnectedBehavior.quiet }}</option>

View File

@ -206,7 +206,7 @@ export const defaultStore = markRaw(new Storage('base', {
}, },
serverDisconnectedBehavior: { serverDisconnectedBehavior: {
where: 'device', where: 'device',
default: 'quiet' as 'quiet' | 'reload' | 'dialog', default: null as null | 'quiet' | 'reload' | 'dialog',
}, },
nsfw: { nsfw: {
where: 'device', where: 'device',