ADD: Persist devicePreviewModel
This commit is contained in:
@@ -50,7 +50,7 @@ export const useStore = defineStore('main', {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
previewDeviceModel: 'nanoOne',
|
previewDeviceModel: localStorage.getItem('previewDeviceModel') || 'nanoOne',
|
||||||
screenOrientation: 90,
|
screenOrientation: 90,
|
||||||
|
|
||||||
// device state as received from the device
|
// device state as received from the device
|
||||||
@@ -197,6 +197,7 @@ export const useStore = defineStore('main', {
|
|||||||
},
|
},
|
||||||
switchPreviewDeviceModel() {
|
switchPreviewDeviceModel() {
|
||||||
this.previewDeviceModel = this.previewDeviceModel === 'nanoOne' ? 'nanoZero' : 'nanoOne'
|
this.previewDeviceModel = this.previewDeviceModel === 'nanoOne' ? 'nanoZero' : 'nanoOne'
|
||||||
|
localStorage.setItem('previewDeviceModel', this.previewDeviceModel)
|
||||||
},
|
},
|
||||||
cycleScreenOrientation() {
|
cycleScreenOrientation() {
|
||||||
this.screenOrientation = (this.screenOrientation + 90) % 360
|
this.screenOrientation = (this.screenOrientation + 90) % 360
|
||||||
|
|||||||
Reference in New Issue
Block a user