Skip to content

Commit

Permalink
feat(friendly): 通知領域とウィジェット領域の表示設定を「設定 - CherryPick」で変更することができる
Browse files Browse the repository at this point in the history
  • Loading branch information
noridev committed Sep 27, 2023
1 parent 7767969 commit 7749bbc
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG_CHERRYPICK.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@

### Client
- Feat: (Friendly) 길게 눌러 계정 메뉴를 표시하는 옵션을 비활성화 할 수 있음
- Feat: (Friendly) 알림 영역과 위젯 영역의 표시 설정을 '설정 - CherryPick'에서 변경할 수 있음
- Feat: about-misskey 페이지에서 클라이언트 버전을 누르면 변경 사항을 볼 수 있음
- Feat: 이미지 압축 방식을 선택할 수 있음
- 사이즈 변경 여부를 선택할 수 있음
Expand Down
6 changes: 4 additions & 2 deletions locales/en-US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ displayBanner: "Display Banner Image"
requireRefresh: "When the page needs to refresh"
performanceWarning: "High resource usage can result in higher device temperatures and faster battery consumption"
photosensitiveSeizuresWarning: "Can cause photosensitive seizures"
friendlyEnableNotifications: "Enable/Disable the notifications area"
friendlyEnableWidgets: "Enable/Disable the widgets area"
friendlyEnableNotifications: "Enable the notifications area"
friendlyDisableNotifications: "Disable the notifications area"
friendlyEnableWidgets: "Enable the widgets area"
friendlyDisableWidgets: "Disable the widgets area"
useBoldFont: "Bold Text"
newNoteReceivedNotification: "When receive a new note notification"
disableRightClick: "Prohibit right click"
Expand Down
2 changes: 2 additions & 0 deletions locales/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ export interface Locale {
"performanceWarning": string;
"photosensitiveSeizuresWarning": string;
"friendlyEnableNotifications": string;
"friendlyDisableNotifications": string;
"friendlyEnableWidgets": string;
"friendlyDisableWidgets": string;
"useBoldFont": string;
"newNoteReceivedNotification": string;
"disableRightClick": string;
Expand Down
6 changes: 4 additions & 2 deletions locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ displayBanner: "バナー画像の表示"
requireRefresh: "ページの更新が必要なとき"
performanceWarning: "リソースを多く使用するため、デバイスの温度が高くなり、バッテリーの消耗が速くなる可能性があります"
photosensitiveSeizuresWarning: "光敏感性発作を起こす可能性があります"
friendlyEnableNotifications: "通知領域を有効化/無効化"
friendlyEnableWidgets: "ウィジェット領域を有効化/無効化"
friendlyEnableNotifications: "通知領域を有効化"
friendlyDisableNotifications: "通知領域を無効化"
friendlyEnableWidgets: "ウィジェット領域を有効化"
friendlyDisableWidgets: "ウィジェット領域を無効化"
useBoldFont: "文字を太くする"
newNoteReceivedNotification: "新しいノート通知を表示するとき"
disableRightClick: "右クリックを禁止"
Expand Down
6 changes: 4 additions & 2 deletions locales/ko-KR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ displayBanner: "배너 이미지 표시"
requireRefresh: "페이지 새로 고침이 필요할 때"
performanceWarning: "리소스를 많이 사용하므로, 디바이스의 온도가 높아지고 배터리의 소모가 빨라질 수 있어요"
photosensitiveSeizuresWarning: "광과민성 발작을 일으킬 수 있어요"
friendlyEnableNotifications: "알림 영역 활성화/비활성화"
friendlyEnableWidgets: "위젯 영역 활성화/비활성화"
friendlyEnableNotifications: "알림 영역 활성화"
friendlyDisableNotifications: "알림 영역 비활성화"
friendlyEnableWidgets: "위젯 영역 활성화"
friendlyDisableWidgets: "위젯 영역 비활성화"
useBoldFont: "볼드체 텍스트"
newNoteReceivedNotification: "새 노트 알림을 표시할 때"
disableRightClick: "우클릭 방지"
Expand Down
6 changes: 6 additions & 0 deletions packages/frontend/src/pages/settings/cherrypick.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ SPDX-License-Identifier: AGPL-3.0-only
<FormSection>
<template #label>Friendly UI</template>
<div class="_gaps_m">
<MkSwitch v-model="friendlyEnableNotifications">{{ i18n.ts.friendlyEnableNotifications }}</MkSwitch>
<MkSwitch v-model="friendlyEnableWidgets">{{ i18n.ts.friendlyEnableWidgets }}</MkSwitch>
<MkSwitch v-model="enableLongPressOpenAccountMenu">{{ i18n.ts._cherrypick.enableLongPressOpenAccountMenu }}</MkSwitch>
</div>
</FormSection>
Expand Down Expand Up @@ -98,11 +100,15 @@ const showFollowingMessageInsteadOfButtonEnabled = computed(defaultStore.makeGet
const mobileHeaderChange = computed(defaultStore.makeGetterSetter('mobileHeaderChange'));
const displayHeaderNavBarWhenScroll = computed(defaultStore.makeGetterSetter('displayHeaderNavBarWhenScroll'));
const renameTheButtonInPostFormToNya = computed(defaultStore.makeGetterSetter('renameTheButtonInPostFormToNya'));
const friendlyEnableNotifications = computed(defaultStore.makeGetterSetter('friendlyEnableNotifications'));
const friendlyEnableWidgets = computed(defaultStore.makeGetterSetter('friendlyEnableWidgets'));
const enableLongPressOpenAccountMenu = computed(defaultStore.makeGetterSetter('enableLongPressOpenAccountMenu'));

watch([
reactableRemoteReactionEnabled,
renameTheButtonInPostFormToNya,
friendlyEnableNotifications,
friendlyEnableWidgets,
], async () => {
await reloadAsk();
});
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend/src/pages/timeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,14 @@ async function reloadAsk() {

const headerActions = $computed(() => [{
icon: friendlyEnableNotifications.value ? 'ti ti-notification' : 'ti ti-notification-off',
text: i18n.ts.friendlyEnableNotifications,
text: friendlyEnableNotifications.value ? i18n.ts.friendlyEnableNotifications : i18n.ts.friendlyDisableNotifications,
handler: () => {
friendlyEnableNotifications.value = !friendlyEnableNotifications.value;
reloadAsk();
},
}, {
icon: friendlyEnableWidgets.value ? 'ti ti-apps' : 'ti ti-apps-off',
text: i18n.ts.friendlyEnableWidgets,
text: friendlyEnableWidgets.value ? i18n.ts.friendlyEnableWidgets : i18n.ts.friendlyDisableWidgets,
handler: () => {
friendlyEnableWidgets.value = !friendlyEnableWidgets.value;
reloadAsk();
Expand Down

0 comments on commit 7749bbc

Please sign in to comment.