-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into 33-special-transcription-characters
- Loading branch information
Showing
6 changed files
with
214 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<script setup lang="ts"> | ||
import { AppWindowIcon, CheckIcon } from "lucide-vue-next"; | ||
const props = defineProps(["isMobile"]); | ||
const router = useRouter(); | ||
const route = useRoute(); | ||
const windowsStore = useWindowsStore(); | ||
const { setWindowArrangement } = windowsStore; | ||
const { arrangement: currentArrangement, registry } = storeToRefs(windowsStore); | ||
</script> | ||
|
||
<template> | ||
<MenubarMenu> | ||
<MenubarTrigger aria-label="Windows" class="ml-auto"> | ||
<AppWindowIcon class="h-6 w-6" /> | ||
</MenubarTrigger> | ||
<MenubarContent align="end"> | ||
<template v-if="registry.size === 0"> | ||
<MenubarLabel>No windows open</MenubarLabel> | ||
</template> | ||
<template v-else> | ||
<MenubarLabel>Windows ({{ registry.size }})</MenubarLabel> | ||
<MenubarSeparator /> | ||
<MenubarItem | ||
v-for="[id, item] of registry" | ||
:key="id" | ||
@select=" | ||
() => { | ||
// @ts-expect-error Property missing in upstream types. | ||
if (item.winbox.min) { | ||
// @ts-expect-error Method missing in upstream types. | ||
item.winbox.restore(); | ||
} | ||
item.winbox.focus(); | ||
/** Windows are only displayed on `/`. */ | ||
if (route.path !== '/') { | ||
void router.push('/'); | ||
} | ||
} | ||
" | ||
> | ||
{{ item.winbox.title }} | ||
</MenubarItem> | ||
<template v-if="$props.isMobile === false"> | ||
<MenubarSeparator /> | ||
<MenubarLabel>Arrangement</MenubarLabel> | ||
<MenubarSeparator /> | ||
<MenubarItem | ||
v-for="(arrangement, id) of arrangements" | ||
:key="id" | ||
class="justify-between" | ||
@select=" | ||
() => { | ||
setWindowArrangement(id); | ||
} | ||
" | ||
> | ||
{{ arrangement.label }} | ||
<CheckIcon v-if="id === currentArrangement" class="h-4 w-4" /> | ||
</MenubarItem> | ||
</template> | ||
</template> | ||
</MenubarContent> | ||
</MenubarMenu> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule vicav-app-api
added at
7ae96b