mirror of
https://github.com/haexhub/haex-hub.git
synced 2025-12-16 22:20:51 +01:00
Improve UiDrawer styling and viewport calculations
This commit is contained in:
@ -8,7 +8,7 @@
|
|||||||
description="Workspaces"
|
description="Workspaces"
|
||||||
>
|
>
|
||||||
<template #content>
|
<template #content>
|
||||||
<div class="pl-8 pr-4 h-full overflow-y-auto">
|
<div class="pl-8 pr-4 overflow-y-auto py-8">
|
||||||
<!-- Workspace Cards -->
|
<!-- Workspace Cards -->
|
||||||
<div class="flex flex-col gap-3">
|
<div class="flex flex-col gap-3">
|
||||||
<HaexWorkspaceCard
|
<HaexWorkspaceCard
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
:ui="{
|
:ui="{
|
||||||
content:
|
content:
|
||||||
'pb-[env(safe-area-inset-bottom)] pt-[env(safe-area-inset-top)] w-dvw max-w-md sm:max-w-fit',
|
'pb-[env(safe-area-inset-bottom)] pt-[env(safe-area-inset-top)] ',
|
||||||
...(ui || {}),
|
...(ui || {}),
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
|
|||||||
@ -13,7 +13,7 @@ export interface ViewportDimensions {
|
|||||||
*/
|
*/
|
||||||
export function getViewportDimensions(): ViewportDimensions {
|
export function getViewportDimensions(): ViewportDimensions {
|
||||||
const viewportWidth = window.innerWidth
|
const viewportWidth = window.innerWidth
|
||||||
const viewportHeight = window.innerHeight - 60 // Subtract tab bar height
|
const viewportHeight = window.innerHeight - 40 // Subtract header height
|
||||||
|
|
||||||
// Get safe-area-insets from CSS variables
|
// Get safe-area-insets from CSS variables
|
||||||
const safeAreaTop = parseFloat(
|
const safeAreaTop = parseFloat(
|
||||||
@ -45,11 +45,7 @@ export function getViewportDimensions(): ViewportDimensions {
|
|||||||
*/
|
*/
|
||||||
export function getAvailableContentHeight(): number {
|
export function getAvailableContentHeight(): number {
|
||||||
const dimensions = getViewportDimensions()
|
const dimensions = getViewportDimensions()
|
||||||
return (
|
return dimensions.height - dimensions.safeAreaTop - dimensions.safeAreaBottom
|
||||||
dimensions.height -
|
|
||||||
dimensions.safeAreaTop -
|
|
||||||
dimensions.safeAreaBottom
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user