1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-08 05:57:02 +09:00

JS-6439: Update channel alert

This commit is contained in:
Andrew Simachev 2025-02-20 14:35:54 +01:00
parent ec3136459d
commit 031c835615
No known key found for this signature in database
GPG key ID: 1DFE44B21443F0EF
5 changed files with 29 additions and 5 deletions

View file

@ -184,6 +184,11 @@ class Api {
Server.stop(signal).then(() => this.shutdown(win, relaunch));
};
setChannel (win, id) {
UpdateManager.setChannel(id);
this.setConfig(win, { channel: id });
};
setInterfaceLang (win, lang) {
ConfigManager.set({ interfaceLang: lang }, () => {
WindowManager.reloadAll();

View file

@ -276,8 +276,7 @@ class MenuManager {
const channels = ConfigManager.getChannels().map(it => {
it.click = () => {
if (!UpdateManager.isUpdating) {
UpdateManager.setChannel(it.id);
Api.setConfig(this.win, { channel: it.id });
Util.send(this.win, 'commandGlobal', 'releaseChannel', it.id);
};
};
return it;

View file

@ -129,7 +129,6 @@
"commonCreateNew": "Create new",
"commonSetName": "Set of %s",
"commonClear": "Clear",
"commonNewObject": "New Object",
"commonNewSpace": "New Space",
"commonSelectObject": "Select Object",
"commonCopyLink": "Copy Link",
@ -186,6 +185,7 @@
"commonManage": "Manage",
"commonSize": "Size",
"commonLogout": "Log out",
"commonWarning": "Warning",
"pluralDay": "day|days",
"pluralObject": "Object|Objects",
@ -1131,6 +1131,7 @@
"popupConfirmSpeedLimitTitle": "Hold up! Turbo typing detected!",
"popupConfirmSpeedLimitText": "Looks like you're sending messages at lightning speed. Give it a sec before your next one.",
"popupConfirmReleaseChannelText": "<p>Switching to a different release channel will:</p><ul><li>Store your data in a separate sub-directory (your current account data wont carry over).</li><li>Unsynced files or objects may become inaccessible after switching.</li></ul><p>Your current account data remains in its previous location.</p>",
"popupInviteRequestTitle": "Join a space",
"popupInviteRequestText": "You've been invited to join <b>%s</b> space, created by <b>%s</b>. Send a request so space owner can let you in.",

View file

@ -41,8 +41,7 @@
.label { margin: 0px !important; }
}
ul { padding-left: 1.25em; }
ul { padding-left: 1.25em; margin: 0.75em 0px; }
.error { margin-bottom: 0px; }
}

View file

@ -675,6 +675,26 @@ class Keyboard {
break;
};
case 'releaseChannel': {
const cb = () => Renderer.send('setChannel', arg);
if (arg == 'latest') {
cb();
} else {
S.Popup.open('confirm', {
className: 'isLeft',
data: {
icon: 'warning',
bgColor: 'red',
title: translate('commonWarning'),
text: translate('popupConfirmReleaseChannelText'),
onConfirm: () => cb(),
},
});
};
break;
};
};
};