ADD: Screen orientation button
This commit is contained in:
@@ -43,12 +43,12 @@
|
||||
<MenubarShortcut>⌘N</MenubarShortcut>
|
||||
</MenubarItem>
|
||||
<MenubarSeparator />
|
||||
<MenubarItem @click="store.switchPreviewDeviceModel">
|
||||
Skin: {{ previewDeviceNames[store.previewDeviceModel || 'nanoOne'] }}
|
||||
<MenubarItem @click.prevent="store.cycleScreenOrientation">
|
||||
Orientation: {{ store.screenOrientation }}°
|
||||
</MenubarItem>
|
||||
<MenubarSeparator />
|
||||
<MenubarItem>{{ $t('navbar.device.preferences') }}
|
||||
<MenubarShortcut>⌘,</MenubarShortcut>
|
||||
<MenubarItem @click="store.switchPreviewDeviceModel">
|
||||
Skin: {{ previewDeviceNames[store.previewDeviceModel || 'nanoOne'] }}
|
||||
</MenubarItem>
|
||||
<MenubarSeparator />
|
||||
<MenubarItem>{{ $t('navbar.device.export') }}
|
||||
|
||||
@@ -40,6 +40,7 @@ export const useStore = defineStore('main', {
|
||||
},
|
||||
},
|
||||
previewDeviceModel: 'nanoOne',
|
||||
screenOrientation: 90,
|
||||
}
|
||||
}, getters: {
|
||||
profiles: (state) => state.profileCategories.flatMap(c => c.profiles),
|
||||
@@ -157,6 +158,9 @@ export const useStore = defineStore('main', {
|
||||
switchPreviewDeviceModel() {
|
||||
this.previewDeviceModel = this.previewDeviceModel === 'nanoOne' ? 'nanoZero' : 'nanoOne'
|
||||
},
|
||||
cycleScreenOrientation() {
|
||||
this.screenOrientation = (this.screenOrientation + 90) % 360
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user