Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance(frontend): カラーモードの設定画面を視覚的にわかりやすく #13512

Open
wants to merge 26 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d6120f9
enhance(frontend): 「デバイスのダークモードと同期する」を有効にしている際の挙動を視覚的にわかりやすく
kakkokari-gtyih Mar 4, 2024
8f7308f
tweak
kakkokari-gtyih Mar 4, 2024
18c2467
Update Changelog
kakkokari-gtyih Mar 4, 2024
55eee7d
なんだこれは
kakkokari-gtyih Mar 4, 2024
d99a91b
いちおう
kakkokari-gtyih Mar 4, 2024
c442165
Merge branch 'develop' into enh-13161
kakkokari-gtyih Mar 4, 2024
83ef9d1
Update CHANGELOG.md
kakkokari-gtyih Mar 4, 2024
ffd4cec
Merge branch 'develop' into enh-13161
kakkokari-gtyih Mar 5, 2024
d525501
Merge branch 'develop' into enh-13161
kakkokari-gtyih Mar 12, 2024
07a006c
Merge branch 'develop' into enh-13161
kakkokari-gtyih Mar 12, 2024
517a39f
Merge branch 'develop' into enh-13161
kakkokari-gtyih Jun 1, 2024
cc3cfe0
Merge branch 'develop' into enh-13161
kakkokari-gtyih Jun 22, 2024
e96c94e
用途の違う色を使用しないように
kakkokari-gtyih Jun 22, 2024
3f20639
dキーを押した際の挙動も変更
kakkokari-gtyih Jun 22, 2024
b0cad80
キーボードでカラーモードを変更した際にtoastを表示するように
kakkokari-gtyih Jun 22, 2024
052ae75
Merge branch 'develop' into enh-13161
kakkokari-gtyih Jun 22, 2024
f848d86
ショートカットキー周りの変更を一旦全部もとに戻す
kakkokari-gtyih Jun 22, 2024
9c5c470
Merge branch 'enh-13161' of https://github.com/kakkokari-gtyih/misske…
kakkokari-gtyih Jun 22, 2024
f06531d
Merge branch 'develop' into enh-13161
kakkokari-gtyih Jul 7, 2024
49517f1
Merge branch 'develop' into enh-13161
kakkokari-gtyih Jul 10, 2024
a26d6d7
Merge branch 'develop' into enh-13161
kakkokari-gtyih Jul 13, 2024
76f109e
Merge branch 'develop' into enh-13161
kakkokari-gtyih Jul 17, 2024
a2b39a5
Merge branch 'develop' into enh-13161
Sayamame-beans Jul 30, 2024
9fdb157
Merge branch 'develop' into enh-13161
Sayamame-beans Mar 7, 2025
cefa91c
chore: fix incorrect indent(mistook on resolving conflict)
Sayamame-beans Mar 7, 2025
9deaa44
docs(changelog): fix changelog insertion position
Sayamame-beans Mar 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
### Client
- Feat: 設定の検索を追加(実験的)
- Enhance: 設定項目の再配置
- Enhance: 「デバイスのダークモードと同期する」を有効にしている際のカラーモード切替設定の挙動を視覚的にわかりやすく

### Server
- Fix: DBマイグレーション際にシステムアカウントのユーザーID判定が正しくない問題を修正
Expand Down
9 changes: 6 additions & 3 deletions packages/frontend/src/components/MkToast.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ import { onMounted, ref } from 'vue';
import * as os from '@/os.js';
import { defaultStore } from '@/store.js';

defineProps<{
const props = withDefaults(defineProps<{
message: string;
}>();
duration?: number;
}>(), {
duration: 4000,
});

const emit = defineEmits<{
(ev: 'closed'): void;
Expand All @@ -40,7 +43,7 @@ const showing = ref(true);
onMounted(() => {
window.setTimeout(() => {
showing.value = false;
}, 4000);
}, props.duration);
});
</script>

Expand Down
3 changes: 2 additions & 1 deletion packages/frontend/src/os.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,10 @@ export function pageWindow(path: string) {
});
}

export function toast(message: string) {
export function toast(message: string, duration?: number) {
const { dispose } = popup(MkToast, {
message,
duration,
}, {
closed: () => dispose(),
});
Expand Down
25 changes: 17 additions & 8 deletions packages/frontend/src/pages/settings/theme.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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">
<div class="_gaps_m rsljpzjq">
<div v-adaptive-border class="rfqxtzch _panel">
<div class="toggle">
<div
class="toggle"
:class="{ disabled: syncDeviceDarkMode }"
>
<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">
<span class="before">{{ i18n.ts.light }}</span>
<span class="after">{{ i18n.ts.dark }}</span>
Expand Down Expand Up @@ -248,13 +251,19 @@ definePageMetadata(() => ({
position: relative;
padding: 26px 0;
text-align: center;
overflow: clip;

&.disabled {
opacity: 0.7;

&, * {
cursor: not-allowed !important;
}
&.disabled::after {
position: absolute;
z-index: 3;
content: '';
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: var(--panel);
opacity: .5;
cursor: not-allowed;
}

> .toggleWrapper {
Expand Down
Loading