Skip to content

Commit

Permalink
fix: settings menu properly visible on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
unxsist committed Aug 12, 2024
1 parent 5f3438a commit d5dadd0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,21 @@ import TabProvider from "./providers/TabProvider";
import DialogProvider from "./providers/DialogProvider";
import DialogHandler from "./components/DialogHandler.vue";
import UpdateHandler from "./components/UpdateHandler.vue";
import { type as getOsType } from "@tauri-apps/api/os";
const osType = ref('');
onMounted(() => {
getOsType().then(os => {
osType.value = os;
})
})
</script>

<template>
<AppLayout
class="bg-accent text-sm rounded-lg border border-border overflow-hidden"
:class="`os:${osType}`"
>
<Suspense>
<SettingsContextProvider>
Expand Down
7 changes: 7 additions & 0 deletions src/assets/main.postcss
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,10 @@ body,
background-color: transparent;
display: none;
}

/* Windows specific changes */
.os\:Windows_NT {
[navigation-settings] {
@apply mb-8;
}
}
3 changes: 2 additions & 1 deletion src/components/Navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,11 @@ watch([context, namespace, clusterAuthenticated], () => {
</NavigationGroup>
</ScrollArea>
</div>
<div class="flex-shrink-0 border-t -ml-2 pl-2 pt-2 mb-0">
<div navigation-settings class="flex-shrink-0 border-t -ml-2 pl-2 pt-2 mb-0">
<NavigationItem
icon="settings"
title="Settings"
:can-pin="false"
:to="{ name: 'Settings' }"
/>
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/components/NavigationItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ const props = withDefaults(
title: string;
to: RouteLocationRaw;
pinned?: boolean;
canPin?: boolean;
shortcut?: number | undefined;
}>(),
{
pinned: false,
canPin: true,
shortcut: undefined,
}
);
Expand Down Expand Up @@ -67,7 +69,7 @@ onUnmounted(() => {
</span>
</span>
</div>
<div class="hidden group-hover/main:block">
<div class="hidden group-hover/main:block" v-if="canPin">
<div
class="group/pin"
@click.prevent="$emit(pinned ? 'unpinned' : 'pinned')"
Expand Down

0 comments on commit d5dadd0

Please sign in to comment.