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