mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-20 02:18:01 +00:00
set default cancel button in message boxes
This commit is contained in:
@@ -73,6 +73,7 @@ export class ConfigSyncSettingsTabComponent extends BaseComponent {
|
||||
message: 'Overwrite the config on the remote side and start syncing?',
|
||||
buttons: ['Overwrite remote and sync', 'Cancel'],
|
||||
defaultId: 1,
|
||||
cancelId: 1,
|
||||
})).response === 1) {
|
||||
return
|
||||
}
|
||||
@@ -89,6 +90,7 @@ export class ConfigSyncSettingsTabComponent extends BaseComponent {
|
||||
message: 'Overwrite the local config and start syncing?',
|
||||
buttons: ['Overwrite local and sync', 'Cancel'],
|
||||
defaultId: 1,
|
||||
cancelId: 1,
|
||||
})).response === 1) {
|
||||
return
|
||||
}
|
||||
|
@@ -106,10 +106,11 @@ export class ProfilesSettingsTabComponent extends BaseComponent {
|
||||
{
|
||||
type: 'warning',
|
||||
message: `Delete "${profile.name}"?`,
|
||||
buttons: ['Keep', 'Delete'],
|
||||
defaultId: 0,
|
||||
buttons: ['Delete', 'Keep'],
|
||||
defaultId: 1,
|
||||
cancelId: 1,
|
||||
}
|
||||
)).response === 1) {
|
||||
)).response === 0) {
|
||||
this.profilesService.providerForProfile(profile)?.deleteProfile(
|
||||
this.profilesService.getConfigProxyForProfile(profile))
|
||||
this.config.store.profiles = this.config.store.profiles.filter(x => x !== profile)
|
||||
@@ -164,16 +165,18 @@ export class ProfilesSettingsTabComponent extends BaseComponent {
|
||||
{
|
||||
type: 'warning',
|
||||
message: `Delete "${group.name}"?`,
|
||||
buttons: ['Keep', 'Delete'],
|
||||
defaultId: 0,
|
||||
buttons: ['Delete', 'Keep'],
|
||||
defaultId: 1,
|
||||
cancelId: 1,
|
||||
}
|
||||
)).response === 1) {
|
||||
)).response === 0) {
|
||||
if ((await this.platform.showMessageBox(
|
||||
{
|
||||
type: 'warning',
|
||||
message: `Delete the group's profiles?`,
|
||||
buttons: ['Move to "Ungrouped"', 'Delete'],
|
||||
defaultId: 0,
|
||||
cancelId: 0,
|
||||
}
|
||||
)).response === 0) {
|
||||
for (const profile of this.profiles.filter(x => x.group === group.name)) {
|
||||
|
@@ -42,10 +42,11 @@ export class VaultSettingsTabComponent extends BaseComponent {
|
||||
{
|
||||
type: 'warning',
|
||||
message: 'Delete vault contents?',
|
||||
buttons: ['Keep', 'Delete'],
|
||||
buttons: ['Delete', 'Keep'],
|
||||
defaultId: 1,
|
||||
cancelId: 1,
|
||||
}
|
||||
)).response === 1) {
|
||||
)).response === 0) {
|
||||
await this.vault.setEnabled(false)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user