Merge pull request #1532 from GNS3/bugfix/1435

Fix interface labels are not persistant
This commit is contained in:
Jeremy Grossmann 2024-12-23 15:13:50 +07:00 committed by GitHub
commit 180c65351b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,6 +37,12 @@ export class MapSettingsService {
} else {
localStorage.setItem('openReadme', 'false');
}
if (localStorage.getItem('showInterfaceLabels')) {
this.showInterfaceLabels = localStorage.getItem('showInterfaceLabels') === 'true' ? true : false;
} else {
localStorage.setItem('showInterfaceLabels', 'true');
}
}
public getSymbolScaling(): boolean {
@ -78,6 +84,12 @@ export class MapSettingsService {
toggleShowInterfaceLabels(value: boolean) {
this.showInterfaceLabels = value;
localStorage.removeItem('showInterfaceLabels');
if (value) {
localStorage.setItem('showInterfaceLabels', 'true');
} else {
localStorage.setItem('showInterfaceLabels', 'false');
}
}
toggleIntegrateInterfaceLabels(value: boolean) {