This commit is contained in:
かっこかり 2025-05-29 13:38:47 +09:00 committed by GitHub
commit 2f02141f19
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 26 additions and 12 deletions

View File

@ -225,6 +225,7 @@
### Client ### Client
- Feat: 設定の検索を追加(実験的) - Feat: 設定の検索を追加(実験的)
- Enhance: 設定項目の再配置 - Enhance: 設定項目の再配置
- Enhance: 「デバイスのダークモードと同期する」を有効にしている際のカラーモード切替設定の挙動を視覚的にわかりやすく
### Server ### Server
- Fix: DBマイグレーション際にシステムアカウントのユーザーID判定が正しくない問題を修正 - Fix: DBマイグレーション際にシステムアカウントのユーザーID判定が正しくない問題を修正

View File

@ -26,9 +26,12 @@ import { onMounted, ref } from 'vue';
import * as os from '@/os.js'; import * as os from '@/os.js';
import { prefer } from '@/preferences.js'; import { prefer } from '@/preferences.js';
defineProps<{ const props = withDefaults(defineProps<{
message: string; message: string;
}>(); duration?: number;
}>(), {
duration: 4000,
});
const emit = defineEmits<{ const emit = defineEmits<{
(ev: 'closed'): void; (ev: 'closed'): void;
@ -40,7 +43,7 @@ const showing = ref(true);
onMounted(() => { onMounted(() => {
window.setTimeout(() => { window.setTimeout(() => {
showing.value = false; showing.value = false;
}, 4000); }, props.duration);
}); });
</script> </script>

View File

@ -214,9 +214,10 @@ export function pageWindow(path: string) {
}); });
} }
export function toast(message: string) { export function toast(message: string, duration?: number) {
const { dispose } = popup(MkToast, { const { dispose } = popup(MkToast, {
message, message,
duration,
}, { }, {
closed: () => dispose(), closed: () => dispose(),
}); });

View File

@ -7,9 +7,12 @@ SPDX-License-Identifier: AGPL-3.0-only
<SearchMarker path="/settings/theme" :label="i18n.ts.theme" :keywords="['theme']" icon="ti ti-palette"> <SearchMarker path="/settings/theme" :label="i18n.ts.theme" :keywords="['theme']" icon="ti ti-palette">
<div class="_gaps_m"> <div class="_gaps_m">
<div v-adaptive-border class="rfqxtzch _panel"> <div v-adaptive-border class="rfqxtzch _panel">
<div class="toggle"> <div
class="toggle"
:class="{ disabled: syncDeviceDarkMode }"
>
<div class="toggleWrapper"> <div class="toggleWrapper">
<input id="dn" v-model="darkMode" type="checkbox" class="dn"/> <input id="dn" v-model="darkMode" type="checkbox" class="dn" :disabled="syncDeviceDarkMode"/>
<label for="dn" class="toggle"> <label for="dn" class="toggle">
<span class="before">{{ i18n.ts.light }}</span> <span class="before">{{ i18n.ts.light }}</span>
<span class="after">{{ i18n.ts.dark }}</span> <span class="after">{{ i18n.ts.dark }}</span>
@ -350,13 +353,19 @@ definePage(() => ({
position: relative; position: relative;
padding: 26px 0; padding: 26px 0;
text-align: center; text-align: center;
overflow: clip;
&.disabled { &.disabled::after {
opacity: 0.7; position: absolute;
z-index: 3;
&, * { content: '';
cursor: not-allowed !important; top: 0;
} left: 0;
width: 100%;
height: 100%;
background-color: var(--panel);
opacity: .5;
cursor: not-allowed;
} }
> .toggleWrapper { > .toggleWrapper {