Add launch-on login option
See [#5244][0]. [0]: https://github.com/signalapp/Signal-Desktop/pull/5244
This commit is contained in:
parent
b41dab2704
commit
75d54e7737
|
@ -1383,7 +1383,7 @@
|
||||||
},
|
},
|
||||||
"spellCheckDescription": {
|
"spellCheckDescription": {
|
||||||
"message": "Enable spell check of text entered in message composition box",
|
"message": "Enable spell check of text entered in message composition box",
|
||||||
"description": "Description of the media permission description"
|
"description": "Description of the spell check setting"
|
||||||
},
|
},
|
||||||
"spellCheckWillBeEnabled": {
|
"spellCheckWillBeEnabled": {
|
||||||
"message": "Spell check will be enabled the next time Signal starts.",
|
"message": "Spell check will be enabled the next time Signal starts.",
|
||||||
|
@ -1393,6 +1393,10 @@
|
||||||
"message": "Spell check will be disabled the next time Signal starts.",
|
"message": "Spell check will be disabled the next time Signal starts.",
|
||||||
"description": "Shown when the user disables spellcheck to indicate that they must restart Signal."
|
"description": "Shown when the user disables spellcheck to indicate that they must restart Signal."
|
||||||
},
|
},
|
||||||
|
"autoLaunchDescription": {
|
||||||
|
"message": "Open at computer login",
|
||||||
|
"description": "Description for the automatic launch setting"
|
||||||
|
},
|
||||||
"clearDataHeader": {
|
"clearDataHeader": {
|
||||||
"message": "Clear Data",
|
"message": "Clear Data",
|
||||||
"description": "Header in the settings dialog for the section dealing with data deletion"
|
"description": "Header in the settings dialog for the section dealing with data deletion"
|
||||||
|
|
|
@ -36,6 +36,7 @@ const getInitialData = async () => ({
|
||||||
countMutedConversations: await window.getCountMutedConversations(),
|
countMutedConversations: await window.getCountMutedConversations(),
|
||||||
|
|
||||||
spellCheck: await window.getSpellCheck(),
|
spellCheck: await window.getSpellCheck(),
|
||||||
|
autoLaunch: await window.getAutoLaunch(),
|
||||||
|
|
||||||
incomingCallNotification: await window.getIncomingCallNotification(),
|
incomingCallNotification: await window.getIncomingCallNotification(),
|
||||||
callRingtoneNotification: await window.getCallRingtoneNotification(),
|
callRingtoneNotification: await window.getCallRingtoneNotification(),
|
||||||
|
|
|
@ -152,6 +152,12 @@
|
||||||
window.setSpellCheck(val);
|
window.setSpellCheck(val);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
new CheckboxView({
|
||||||
|
el: this.$('.auto-launch-setting'),
|
||||||
|
name: 'auto-launch-setting',
|
||||||
|
value: window.initialData.autoLaunch,
|
||||||
|
setFn: window.setAutoLaunch,
|
||||||
|
});
|
||||||
if (Settings.isHideMenuBarSupported()) {
|
if (Settings.isHideMenuBarSupported()) {
|
||||||
new CheckboxView({
|
new CheckboxView({
|
||||||
el: this.$('.menu-bar-setting'),
|
el: this.$('.menu-bar-setting'),
|
||||||
|
@ -259,6 +265,7 @@
|
||||||
spellCheckDirtyText: appStartSpellCheck
|
spellCheckDirtyText: appStartSpellCheck
|
||||||
? i18n('spellCheckWillBeDisabled')
|
? i18n('spellCheckWillBeDisabled')
|
||||||
: i18n('spellCheckWillBeEnabled'),
|
: i18n('spellCheckWillBeEnabled'),
|
||||||
|
autoLaunchDescription: i18n('autoLaunchDescription'),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onClose() {
|
onClose() {
|
||||||
|
|
3
main.js
3
main.js
|
@ -1554,6 +1554,9 @@ installSettingsSetter('badge-count-muted-conversations');
|
||||||
installSettingsGetter('spell-check');
|
installSettingsGetter('spell-check');
|
||||||
installSettingsSetter('spell-check', true);
|
installSettingsSetter('spell-check', true);
|
||||||
|
|
||||||
|
installSettingsGetter('auto-launch');
|
||||||
|
installSettingsSetter('auto-launch');
|
||||||
|
|
||||||
installSettingsGetter('always-relay-calls');
|
installSettingsGetter('always-relay-calls');
|
||||||
installSettingsSetter('always-relay-calls');
|
installSettingsSetter('always-relay-calls');
|
||||||
installSettingsGetter('call-ringtone-notification');
|
installSettingsGetter('call-ringtone-notification');
|
||||||
|
|
|
@ -68,6 +68,10 @@ try {
|
||||||
window.getServerPublicParams = () => config.serverPublicParams;
|
window.getServerPublicParams = () => config.serverPublicParams;
|
||||||
window.getSfuUrl = () => config.sfuUrl;
|
window.getSfuUrl = () => config.sfuUrl;
|
||||||
window.isBehindProxy = () => Boolean(config.proxyUrl);
|
window.isBehindProxy = () => Boolean(config.proxyUrl);
|
||||||
|
window.getAutoLaunch = () => app.getLoginItemSettings().openAtLogin;
|
||||||
|
window.setAutoLaunch = value => {
|
||||||
|
app.setLoginItemSettings({ openAtLogin: Boolean(value) });
|
||||||
|
};
|
||||||
|
|
||||||
function setSystemTheme() {
|
function setSystemTheme() {
|
||||||
window.systemTheme = nativeTheme.shouldUseDarkColors ? 'dark' : 'light';
|
window.systemTheme = nativeTheme.shouldUseDarkColors ? 'dark' : 'light';
|
||||||
|
@ -251,6 +255,9 @@ try {
|
||||||
installGetter('spell-check', 'getSpellCheck');
|
installGetter('spell-check', 'getSpellCheck');
|
||||||
installSetter('spell-check', 'setSpellCheck');
|
installSetter('spell-check', 'setSpellCheck');
|
||||||
|
|
||||||
|
installGetter('auto-launch', 'getAutoLaunch');
|
||||||
|
installSetter('auto-launch', 'setAutoLaunch');
|
||||||
|
|
||||||
installGetter('always-relay-calls', 'getAlwaysRelayCalls');
|
installGetter('always-relay-calls', 'getAlwaysRelayCalls');
|
||||||
installSetter('always-relay-calls', 'setAlwaysRelayCalls');
|
installSetter('always-relay-calls', 'setAlwaysRelayCalls');
|
||||||
|
|
||||||
|
|
|
@ -118,6 +118,10 @@
|
||||||
{{ spellCheckDirtyText }}
|
{{ spellCheckDirtyText }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class='auto-launch-setting'>
|
||||||
|
<input type='checkbox' name='auto-launch-setting' id='auto-launch-setting' />
|
||||||
|
<label for='auto-launch-setting'>{{ autoLaunchDescription }}</label>
|
||||||
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<div class='calling-setting'>
|
<div class='calling-setting'>
|
||||||
<h3>{{ calling }}</h3>
|
<h3>{{ calling }}</h3>
|
||||||
|
|
|
@ -64,6 +64,9 @@ window.setHideMenuBar = makeSetter('hide-menu-bar');
|
||||||
window.getSpellCheck = makeGetter('spell-check');
|
window.getSpellCheck = makeGetter('spell-check');
|
||||||
window.setSpellCheck = makeSetter('spell-check');
|
window.setSpellCheck = makeSetter('spell-check');
|
||||||
|
|
||||||
|
window.getAutoLaunch = makeGetter('auto-launch');
|
||||||
|
window.setAutoLaunch = makeSetter('auto-launch');
|
||||||
|
|
||||||
window.getAlwaysRelayCalls = makeGetter('always-relay-calls');
|
window.getAlwaysRelayCalls = makeGetter('always-relay-calls');
|
||||||
window.setAlwaysRelayCalls = makeSetter('always-relay-calls');
|
window.setAlwaysRelayCalls = makeSetter('always-relay-calls');
|
||||||
|
|
||||||
|
|
|
@ -431,6 +431,9 @@ export async function startApp(): Promise<void> {
|
||||||
setAlwaysRelayCalls: (value: boolean) =>
|
setAlwaysRelayCalls: (value: boolean) =>
|
||||||
window.storage.put('always-relay-calls', value),
|
window.storage.put('always-relay-calls', value),
|
||||||
|
|
||||||
|
getAutoLaunch: () => window.getAutoLaunch(),
|
||||||
|
setAutoLaunch: (value: boolean) => window.setAutoLaunch(value),
|
||||||
|
|
||||||
// eslint-disable-next-line eqeqeq
|
// eslint-disable-next-line eqeqeq
|
||||||
isPrimary: () => window.textsecure.storage.user.getDeviceId() == '1',
|
isPrimary: () => window.textsecure.storage.user.getDeviceId() == '1',
|
||||||
getSyncRequest: () =>
|
getSyncRequest: () =>
|
||||||
|
|
|
@ -1225,6 +1225,14 @@
|
||||||
"updated": "2021-02-26T18:44:56.450Z",
|
"updated": "2021-02-26T18:44:56.450Z",
|
||||||
"reasonDetail": "Static selector, read-only access"
|
"reasonDetail": "Static selector, read-only access"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"rule": "jQuery-$(",
|
||||||
|
"path": "js/views/settings_view.js",
|
||||||
|
"line": " el: this.$('.auto-launch-setting'),",
|
||||||
|
"reasonCategory": "usageTrusted",
|
||||||
|
"updated": "2021-05-11T20:38:03.542Z",
|
||||||
|
"reasonDetail": "Protected from arbitrary input"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"rule": "jQuery-append(",
|
"rule": "jQuery-append(",
|
||||||
"path": "js/views/settings_view.js",
|
"path": "js/views/settings_view.js",
|
||||||
|
@ -14233,4 +14241,4 @@
|
||||||
"updated": "2021-03-18T21:41:28.361Z",
|
"updated": "2021-03-18T21:41:28.361Z",
|
||||||
"reasonDetail": "A generic hook. Typically not to be used with non-DOM values."
|
"reasonDetail": "A generic hook. Typically not to be used with non-DOM values."
|
||||||
}
|
}
|
||||||
]
|
]
|
|
@ -133,6 +133,8 @@ declare global {
|
||||||
dataURLToBlobSync: any;
|
dataURLToBlobSync: any;
|
||||||
loadImage: any;
|
loadImage: any;
|
||||||
isBehindProxy: () => boolean;
|
isBehindProxy: () => boolean;
|
||||||
|
getAutoLaunch: () => boolean;
|
||||||
|
setAutoLaunch: (value: boolean) => void;
|
||||||
|
|
||||||
PQueue: typeof PQueue;
|
PQueue: typeof PQueue;
|
||||||
PQueueType: PQueue;
|
PQueueType: PQueue;
|
||||||
|
|
Loading…
Reference in New Issue