Merge remote-branch 'misskey/develop'

This commit is contained in:
NoriDev 2023-11-29 16:16:18 +09:00
commit b58b8dd3c7
7 changed files with 35 additions and 22 deletions

View file

@ -30,6 +30,7 @@
- Fix: コードエディタが正しく表示されない問題を修正
- Fix: プロフィールの「ファイル」にセンシティブな画像がある際のデザインを修正
- Fix: 一度に大量の通知が入った際に通知音が音割れする問題を修正
- Fix: 通知のグルーピング設定を変更してもリロードされるまで表示が変わらない問題を修正 #12470
### Server
- Enhance: MFM `$[ruby ]` が他ソフトウェアと連合されるように

View file

@ -208,6 +208,10 @@ export const packedNoteSchema = {
optional: false, nullable: false,
},
},
clippedCount: {
type: 'number',
optional: true, nullable: false,
},
myReaction: {
type: 'object',

View file

@ -216,20 +216,24 @@ export async function common(createVue: () => App<Element>) {
}
}, { immediate: true });
if (defaultStore.state.keepScreenOn) {
if ('wakeLock' in navigator) {
navigator.wakeLock.request('screen')
.then(() => {
document.addEventListener('visibilitychange', async () => {
if (document.visibilityState === 'visible') {
navigator.wakeLock.request('screen');
}
});
})
.catch(() => {
// If Permission fails on an AppleDevice such as Safari
});
// Keep screen on
const onVisibilityChange = () => document.addEventListener('visibilitychange', () => {
if (document.visibilityState === 'visible') {
navigator.wakeLock.request('screen');
}
});
if (defaultStore.state.keepScreenOn && 'wakeLock' in navigator) {
navigator.wakeLock.request('screen')
.then(onVisibilityChange)
.catch(() => {
// On WebKit-based browsers, user activation is required to send wake lock request
// https://webkit.org/blog/13862/the-user-activation-api/
document.addEventListener(
'click',
() => navigator.wakeLock.request('screen').then(onVisibilityChange),
{ once: true },
);
});
}
//#region Fetch user

View file

@ -24,7 +24,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<script lang="ts" setup>
import { onUnmounted, onDeactivated, onMounted, computed, shallowRef, onActivated } from 'vue';
import { onUnmounted, onDeactivated, onMounted, computed, shallowRef, onActivated, watch } from 'vue';
import MkPagination, { Paging } from '@/components/MkPagination.vue';
import XNotification from '@/components/MkNotification.vue';
import MkDateSeparatedList from '@/components/MkDateSeparatedList.vue';
@ -44,7 +44,7 @@ const props = defineProps<{
const pagingComponent = shallowRef<InstanceType<typeof MkPagination>>();
const pagination: Paging = defaultStore.state.useGroupedNotifications ? {
let pagination = $computed(() => defaultStore.reactiveState.useGroupedNotifications.value ? {
endpoint: 'i/notifications-grouped' as const,
limit: 20,
params: computed(() => ({
@ -56,7 +56,7 @@ const pagination: Paging = defaultStore.state.useGroupedNotifications ? {
params: computed(() => ({
excludeTypes: props.excludeTypes ?? undefined,
})),
};
});
function onNotification(notification) {
const isMuted = props.excludeTypes ? props.excludeTypes.includes(notification.type) : false;

View file

@ -186,7 +186,7 @@ watch([$$(backed), $$(contentEl)], () => {
});
// ID
watch(() => props.pagination.params, init, { deep: true });
watch(() => [props.pagination.endpoint, props.pagination.params], init, { deep: true });
watch(queue, (a, b) => {
if (a.size === 0 && b.size === 0) return;

View file

@ -164,7 +164,7 @@ export function play(operationType: OperationType) {
if (sound.type == null || !canPlay) return;
canPlay = false;
playFile(sound).then(() => {
playFile(sound).finally(() => {
// ごく短時間に音が重複しないように
setTimeout(() => {
canPlay = true;

View file

@ -152,10 +152,14 @@ export function getConfig(): UserConfig {
test: {
environment: 'happy-dom',
deps: {
inline: [
// XXX: misskey-dev/browser-image-resizer has no "type": "module"
'browser-image-resizer',
],
optimizer: {
web: {
include: [
// XXX: misskey-dev/browser-image-resizer has no "type": "module"
'browser-image-resizer',
],
},
},
},
},
};