Skip to content

Commit 4127c8e

Browse files
authored
reduce snackbar display time (#943)
1 parent 377b3f7 commit 4127c8e

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

src/app/core/components/options/configuration/config.component.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@ import { MatSelect } from '@angular/material/select';
1414
import { MatFormField, MatLabel } from '@angular/material/form-field';
1515
import { MatButton } from '@angular/material/button';
1616
import { MatDivider } from '@angular/material/divider';
17-
1817
import { RouterLink } from '@angular/router';
1918

20-
2119
interface IRemoteConfig {
2220
scope: string,
2321
name: string
@@ -98,7 +96,7 @@ export class SettingsConfigComponent implements OnInit, OnDestroy {
9896
this.toast.show("Storage Service: " + error.statusText + ". Signal K configuration must meet the following requirements; 1) Security enabled. 2) Application Data Storage Interface: On. 3) Either Allow Readonly Access enabled, or connecting with a user.", 0, false, null, 'error');
9997
break;
10098

101-
default: this.toast.show("Cannot list configurations: " + error, 3000, false, null, 'error' );
99+
default: this.toast.show("Cannot list configurations: " + error, 0, false, null, 'error' );
102100
break;
103101
}
104102
});
@@ -114,7 +112,7 @@ export class SettingsConfigComponent implements OnInit, OnDestroy {
114112
}
115113

116114
if (this.storageSvc.setConfig(scope, name, conf)) {
117-
this.toast.show(`Configuration [${name}] saved to [${scope}] storage scope`, 1500, true, null, 'success');
115+
this.toast.show(`Configuration [${name}] saved to [${scope}] storage scope`, 1000, true, null, 'success');
118116
if (!dontRefreshConfigList || undefined) {
119117
this.getServerConfigList();
120118
}
@@ -151,7 +149,7 @@ export class SettingsConfigComponent implements OnInit, OnDestroy {
151149

152150
public deleteConfig (scope: string, name: string, forceConfigFileVersion?: number, dontRefreshConfigList?: boolean) {
153151
this.storageSvc.removeItem(scope, name, forceConfigFileVersion);
154-
this.toast.show(`Configuration [${name}] deleted from [${scope}] storage scope`, 1500, false, null, 'success');
152+
this.toast.show(`Configuration [${name}] deleted from [${scope}] storage scope`, 1000, false, null, 'success');
155153
if (!dontRefreshConfigList) {
156154
this.getServerConfigList();
157155
}

src/app/core/components/options/display/display.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export class SettingsDisplayComponent implements OnInit {
104104
this._settings.setSplitShellSwipeDisabled(this.splitShellSwipeDisabled());
105105

106106
this.displayForm().form.markAsPristine();
107-
this.toast.show("Configuration saved", 0, true, null, 'message');
107+
this.toast.show("Configuration saved", 1000, true, null, 'message');
108108
}
109109

110110
protected isAutoNightModeSupported(e: MatSlideToggleChange): void {

src/app/core/components/options/notifications/notifications.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export class SettingsNotificationsComponent {
4646
public saveAllSettings():void {
4747
this.settings.setNotificationConfig(cloneDeep(this.notificationConfig));
4848
this.notificationsForm().form.markAsPristine();
49-
this.toast.show("Configuration saved", 1500, true, null, 'message');
49+
this.toast.show("Configuration saved", 1000, true, null, 'message');
5050
}
5151

5252
public togglePanel(e: MatSlideToggleChange): void {

src/app/core/components/options/units/units.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ export class SettingsUnitsComponent implements OnInit {
4545

4646
submitConfig() {
4747
this.appSettingsService.setDefaultUnits(this.unitsFormGroup.value);
48-
this.toast.show("Configuration saved", 1500, true, null, 'message');
48+
this.toast.show("Configuration saved", 1000, true, null, 'message');
4949
}
5050
}

0 commit comments

Comments
 (0)