feature(client): Added option to suppress warning when disconnected from server

This commit is contained in:
NoriDev 2022-09-07 15:06:01 +09:00
parent c064fcfcae
commit b9090f3214
7 changed files with 9 additions and 4 deletions

View file

@ -8,12 +8,13 @@
-->
## 12.x.x-cp-2.3.0 (unreleased)
이 버전부터는 기존 버전과 연결되지 않고, 새로 포크되어 작업되고 있습니다.
이 버전부터는 기존 버전과 연결되지 않고, 새로 포크되어 작업되고 있습니다. 따라서 기존 버전에 있던 기능들이 다시 명시될 수 있습니다.
### Improvements
- 클라이언트: Google Translate 서비스 추가 (thanks lapy)
- 클라이언트: Google Translate 서비스 추가 (thanks @ltlapy)
- 클라이언트: DeepL과 Google Translate를 선택할 수 있는 옵션 추가
- 클라이언트: Enter 키를 눌러 보내기 옵션 추가
- 클라이언트: 서버와 연결이 끊어졌을 때 경고를 표시하지 않는 옵션 추가
## 12.x.x-cp-2.x.x (unreleased)_legacy

View file

@ -1056,6 +1056,7 @@ _serverDisconnectedBehavior:
reload: "Automatically reload"
dialog: "Show warning dialog"
quiet: "Show unobtrusive warning"
none: "No warning"
_channel:
create: "Create channel"
edit: "Edit channel"

View file

@ -1073,6 +1073,7 @@ _serverDisconnectedBehavior:
reload: "自動でリロード"
dialog: "ダイアログで警告"
quiet: "控えめに警告"
none: "警告なし"
_channel:
create: "チャンネルを作成"

View file

@ -1047,6 +1047,7 @@ _serverDisconnectedBehavior:
reload: "자동으로 새로고침"
dialog: "경고창 표시"
quiet: "조용히 경고"
none: "알리지 않음"
_channel:
create: "채널 생성"
edit: "채널 편집"

View file

@ -317,7 +317,7 @@ import { getAccountFromId } from '@/scripts/get-account-from-id';
if (!canceled) {
location.reload();
}
}
} else if (defaultStore.state.serverDisconnectedBehavior === 'none') {}
});
stream.on('emojiAdded', emojiData => {

View file

@ -38,6 +38,7 @@
<option value="reload">{{ i18n.ts._serverDisconnectedBehavior.reload }}</option>
<option value="dialog">{{ i18n.ts._serverDisconnectedBehavior.dialog }}</option>
<option value="quiet">{{ i18n.ts._serverDisconnectedBehavior.quiet }}</option>
<option value="none">{{ i18n.ts._serverDisconnectedBehavior.none }}</option>
</FormSelect>
</FormSection>

View file

@ -121,7 +121,7 @@ export const defaultStore = markRaw(new Storage('base', {
},
serverDisconnectedBehavior: {
where: 'device',
default: 'quiet' as 'quiet' | 'reload' | 'dialog',
default: 'quiet' as 'quiet' | 'reload' | 'dialog' | 'none',
},
nsfw: {
where: 'device',