mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
improve: only show 'Add "domain.tld" as an application for mailto links?' message after login (firefox shows the message on every reload otherwise).
This commit is contained in:
parent
c75c0e9ed1
commit
ceeb55acf2
1 changed files with 10 additions and 6 deletions
|
|
@ -177,6 +177,7 @@ export class AppUser extends AbstractApp {
|
||||||
}
|
}
|
||||||
|
|
||||||
logout() {
|
logout() {
|
||||||
|
localStorage.removeItem('register_protocol_offered');
|
||||||
Remote.request('Logout', () => rl.logoutReload(Settings.app('customLogoutLink')));
|
Remote.request('Logout', () => rl.logoutReload(Settings.app('customLogoutLink')));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -253,12 +254,15 @@ export class AppUser extends AbstractApp {
|
||||||
|
|
||||||
setTimeout(() => mailToHelper(SettingsGet('mailToEmail')), 500);
|
setTimeout(() => mailToHelper(SettingsGet('mailToEmail')), 500);
|
||||||
|
|
||||||
|
if (!localStorage.getItem('register_protocol_offered')) {
|
||||||
// When auto-login is active
|
// When auto-login is active
|
||||||
navigator.registerProtocolHandler?.(
|
navigator.registerProtocolHandler?.(
|
||||||
'mailto',
|
'mailto',
|
||||||
location.protocol + '//' + location.host + location.pathname + '?mailto&to=%s',
|
location.protocol + '//' + location.host + location.pathname + '?mailto&to=%s',
|
||||||
(SettingsGet('title') || 'SnappyMail')
|
(SettingsGet('title') || 'SnappyMail')
|
||||||
);
|
);
|
||||||
|
localStorage.setItem('register_protocol_offered', '1');
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.logout();
|
this.logout();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue