feat: When writing a note, can toggle visibility with a hotkey
This commit is contained in:
parent
3660f838e7
commit
526c5df522
|
@ -22,6 +22,7 @@ Misskey v13 버전을 대응합니다.
|
|||
- 클라이언트: 모든 계정 로그아웃 버튼과 구분하기 쉽도록 로그아웃 아이콘이 변경됨
|
||||
- 클라이언트: 새 노트 알림이 부드럽게 표시되도록 애니메이션 추가
|
||||
- 클라이언트: UI 애니메이션 줄이기 옵션이 활성화된 경우 새 노트 알림의 애니메이션을 비활성화함
|
||||
- 클라이언트: 노트를 작성할 때, 단축키로 공개 범위를 전환할 수 있음
|
||||
|
||||
### Bugfixes
|
||||
- 클라이언트: (friendly) 타임라인이 아닌 페이지에서 헤더에 블러가 적용되는 문제
|
||||
|
|
|
@ -3,7 +3,9 @@ _lang_: "English"
|
|||
newNoteRecivedNotification: "New note notification"
|
||||
disableRightClick: "Prohibit right click"
|
||||
useEnterToSend: "Press Enter to send"
|
||||
useEnterToSendDescription: "When the option is enabled, you can use the Shift+Enter key for line break."
|
||||
useEnterToSendDescription: "When the option is enabled, you can use the Shift + Enter key for line break."
|
||||
postFormVisibilityHotkey: "Toggle visibility with a hotkey"
|
||||
postFormVisibilityHotkeyDescription: "When writing a note, press Alt(Option) + Shift to switch the visibility range. The hotkey to make it Local only is Ctrl(Cmd) + Alt(Option)."
|
||||
headlineMisskey: "A network connected by notes"
|
||||
introMisskey: "Welcome! CherryPick is an open source, decentralized microblogging service.\nCreate \"notes\" to share your thoughts with everyone around you. 📡\nWith \"reactions\", you can also quickly express your feelings about everyone's notes. 👍\nLet's explore a new world! 🚀"
|
||||
poweredByMisskeyDescription: "{name} is one of the services powered by the open source platform <b>Misskey</b> (referred to as a \"Misskey instance\")."
|
||||
|
|
|
@ -4,6 +4,8 @@ newNoteRecivedNotification: "新しいノート通知"
|
|||
disableRightClick: "右クリックを禁止"
|
||||
useEnterToSend: "Enterキーを押して送信"
|
||||
useEnterToSendDescription: "オプションを有効にすると、行替えはShift+Enterキーでできます。"
|
||||
postFormVisibilityHotkey: "ショートカットキーで公開範囲を切り替える"
|
||||
postFormVisibilityHotkeyDescription: "ノートを作成する際、Alt(Option) + Shiftキーを押すと公開範囲を切り替えることができます。ローカルのみショートカットキーは、Ctrl(Cmd) + Alt(Option)キーです。"
|
||||
headlineMisskey: "ノートでつながるネットワーク"
|
||||
introMisskey: "ようこそ!CherryPickは、オープンソースの分散型マイクロブログサービスです。\n「ノート」を作成して、いま起こっていることを共有したり、あなたについて皆に発信しよう📡\n「リアクション」機能で、皆のノートに素早く反応を追加することもできます👍\n新しい世界を探検しよう🚀"
|
||||
poweredByMisskeyDescription: "{name}は、オープンソースのプラットフォーム<b>Misskey</b>を使ったサービス(Misskeyインスタンスと呼ばれます)のひとつです。"
|
||||
|
|
|
@ -4,6 +4,8 @@ newNoteRecivedNotification: "새 노트 알림"
|
|||
disableRightClick: "우클릭 방지"
|
||||
useEnterToSend: "Enter 키를 눌러 보내기"
|
||||
useEnterToSendDescription: "옵션을 활성화하면 줄 바꿈은 Shift + Enter 키로 할 수 있어요."
|
||||
postFormVisibilityHotkey: "단축키로 공개 범위 전환하기"
|
||||
postFormVisibilityHotkeyDescription: "노트를 작성할 때, Alt(Option) + Shift 키를 누르면 공개 범위를 전환할 수 있어요. 로컬에만 보이게 하는 단축키는 Ctrl(Cmd) + Alt(Option) 키예요."
|
||||
headlineMisskey: "노트로 연결되는 네트워크"
|
||||
introMisskey: "어서오세요! CherryPick은 오픈 소스 분산형 마이크로 블로그 서비스에요.\n\"노트\" 를 작성해서, 지금 일어나고 있는 일을 공유하거나, 당신만의 이야기를 모두에게 발신할 수 있어요📡\n\"리액션\" 기능으로, 친구의 노트에 총알같이 반응을 추가할 수도 있어요👍\n새로운 세계를 탐험해 보세요🚀"
|
||||
poweredByMisskeyDescription: "{name}은(는) 오픈소스 플랫폼<b>Misskey</b>를 사용한 서비스(Misskey 인스턴스라고 불립니다) 중 하나입니다."
|
||||
|
|
|
@ -454,6 +454,14 @@ function onKeydown(ev: KeyboardEvent) {
|
|||
if ((ev.which === 10 || ev.which === 13) && (ev.ctrlKey || ev.metaKey) && canPost) post();
|
||||
}
|
||||
|
||||
if (defaultStore.state.postFormVisibilityHotkey) {
|
||||
if (ev.shiftKey && ev.altKey && (visibility === 'specified')) visibility = 'public';
|
||||
else if (ev.shiftKey && ev.altKey && (visibility === 'public')) visibility = 'home';
|
||||
else if (ev.shiftKey && ev.altKey && (visibility === 'home')) visibility = 'followers';
|
||||
else if (ev.shiftKey && ev.altKey && (visibility === 'followers')) visibility = 'specified';
|
||||
if ((ev.ctrlKey || ev.metaKey) && ev.altKey) localOnly = !localOnly;
|
||||
}
|
||||
|
||||
if (ev.which === 27) emit('esc');
|
||||
typing();
|
||||
}
|
||||
|
|
|
@ -34,6 +34,10 @@
|
|||
<template #label>{{ i18n.ts.useEnterToSend }}</template>
|
||||
<template #caption>{{ i18n.ts.useEnterToSendDescription }}</template>
|
||||
</MkSwitch>
|
||||
<MkSwitch v-model="postFormVisibilityHotkey">
|
||||
<template #label>{{ i18n.ts.postFormVisibilityHotkey }}</template>
|
||||
<template #caption>{{ i18n.ts.postFormVisibilityHotkeyDescription }}</template>
|
||||
</MkSwitch>
|
||||
</div>
|
||||
<MkSelect v-model="serverDisconnectedBehavior">
|
||||
<template #label>{{ i18n.ts.whenServerDisconnected }}</template>
|
||||
|
@ -171,6 +175,7 @@ const useReactionPickerForContextMenu = computed(defaultStore.makeGetterSetter('
|
|||
const squareAvatars = computed(defaultStore.makeGetterSetter('squareAvatars'));
|
||||
const aiChanMode = computed(defaultStore.makeGetterSetter('aiChanMode'));
|
||||
const useEnterToSend = computed(defaultStore.makeGetterSetter('useEnterToSend'));
|
||||
const postFormVisibilityHotkey = computed(defaultStore.makeGetterSetter('postFormVisibilityHotkey'));
|
||||
const newNoteRecivedNotificationBehavior = computed(defaultStore.makeGetterSetter('newNoteRecivedNotificationBehavior'));
|
||||
|
||||
watch(lang, () => {
|
||||
|
|
|
@ -85,6 +85,7 @@ const defaultStoreSaveKeys: (keyof typeof defaultStore['state'])[] = [
|
|||
'numberOfPageCache',
|
||||
'aiChanMode',
|
||||
'useEnterToSend',
|
||||
'postFormVisibilityHotkey',
|
||||
'newNoteRecivedNotificationBehavior',
|
||||
];
|
||||
const coldDeviceStorageSaveKeys: (keyof typeof ColdDeviceStorage.default)[] = [
|
||||
|
|
|
@ -275,6 +275,10 @@ export const defaultStore = markRaw(new Storage('base', {
|
|||
where: 'device',
|
||||
default: false,
|
||||
},
|
||||
postFormVisibilityHotkey: {
|
||||
where: 'device',
|
||||
default: true,
|
||||
},
|
||||
newNoteRecivedNotificationBehavior: {
|
||||
where: 'device',
|
||||
default: 'count' as 'default' | 'count' | 'none',
|
||||
|
|
Loading…
Reference in a new issue