Skip to content

Commit

Permalink
fix: scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
Zephyruso committed Jan 8, 2025
1 parent aafd607 commit 238f5fe
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 24 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<title>zashboard</title>
<meta
name="viewport"
content="width=device-width, initial-scale=1.0,viewport-fit=cover"
content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1, viewport-fit=cover"
/>
<meta
name="description"
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@
"@tanstack/vue-table": "^8.20.5",
"@tanstack/vue-virtual": "^3.11.2",
"@types/echarts": "^4.9.22",
"@types/hammerjs": "^2.0.46",
"@types/reconnectingwebsocket": "^1.0.10",
"@vueuse/core": "^12.2.0",
"axios": "^1.7.9",
"countup.js": "^2.8.0",
"dayjs": "^1.11.13",
"dompurify": "^3.2.3",
"echarts": "^5.6.0",
"hammerjs": "^2.0.8",
"lodash": "^4.17.21",
"misans": "^4.0.0",
"prettier-plugin-organize-imports": "^4.1.0",
Expand Down
33 changes: 23 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/components/connections/ConnectionTable.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div
ref="parentRef"
class="h-full overflow-y-auto bg-clip-content p-2"
class="h-full overflow-y-auto p-2"
@touchstart.stop
@touchmove.stop
@touchend.stop
Expand Down
4 changes: 2 additions & 2 deletions src/components/proxies/ProxyNodeGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<div
:class="
twMerge(
'grid grid-cols-2 gap-2 overflow-x-hidden',
truncateProxyName && 'max-h-96 overflow-y-auto',
'grid grid-cols-2 gap-2 overflow-y-auto overflow-x-hidden',
truncateProxyName && 'max-h-96',
proxyCardSize === PROXY_CARD_SIZE.LARGE
? isSidebarCollapsed
? hasTwoColumns
Expand Down
14 changes: 8 additions & 6 deletions src/views/HomePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

<div
class="drawer-content fixed bottom-0 flex h-full w-full flex-col overflow-hidden bg-base-200/40 md:relative md:w-auto"
ref="contentRef"
>
<component
v-if="ctrlComp && isSidebarCollapsed"
Expand All @@ -19,15 +18,18 @@
:horizontal="true"
/>
<div class="relative h-0 flex-1">
<div class="absolute h-full w-full overflow-y-auto">
<RouterView />
<div class="absolute flex h-full w-full flex-col overflow-y-auto">
<RouterView class="max-sm:min-h-[calc(100%+1px)]" />
<div
class="shrink-0 md:hidden"
:class="isPWA ? 'max-md:h-[5.5rem]' : 'max-md:h-14'"
/>
</div>
</div>
<div :class="`btm-nav glass z-30 bg-none md:hidden ${isPWA ? 'h-[5.5rem] pb-8' : 'h-14'}`">
<div
:class="`btm-nav glass z-30 bg-none md:hidden ${isPWA ? 'h-[5.5rem] pb-8' : 'h-14'}`"
ref="swiperRef"
>
<button
v-for="r in renderRoutes"
:key="r"
Expand Down Expand Up @@ -114,8 +116,8 @@ const ctrlComp = computed(() => {
return ctrlsMap[route.name as keyof typeof ctrlsMap]
})
const contentRef = ref()
const { direction } = useSwipe(contentRef, { threshold: 15 })
const swiperRef = ref()
const { direction } = useSwipe(swiperRef, { threshold: 15 })
const getNextRouteName = () => {
const routeName = route.name as ROUTE_NAME
Expand Down
2 changes: 1 addition & 1 deletion src/views/OverviewPage.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="flex flex-col gap-2 overflow-y-auto p-2">
<div class="flex flex-col gap-2 p-2">
<ChartsCard />
<NetworkCard />
<div class="flex-1"></div>
Expand Down
2 changes: 1 addition & 1 deletion src/views/ProxiesPage.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="overflow-y-auto p-2">
<div class="p-2">
<template v-if="isLargeScreen && twoColumnProxyGroup && renderGroups.length > 1">
<div class="grid grid-cols-2 gap-1">
<div
Expand Down
2 changes: 1 addition & 1 deletion src/views/RulesPage.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<template v-if="rulesTabShow === RULE_TAB_TYPE.PROVIDER">
<div class="flex flex-col gap-1 overflow-y-auto overflow-x-hidden p-2">
<div class="flex flex-col gap-1 overflow-x-hidden p-2">
<RuleProvider
v-for="(ruleProvider, index) in renderRulesProvider"
:key="ruleProvider.name"
Expand Down
2 changes: 1 addition & 1 deletion src/views/SettingsPage.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="grid grid-cols-1 gap-2 overflow-y-auto p-2">
<div class="grid grid-cols-1 gap-2 p-2">
<ZashboardSettings />

<template v-if="!splitOverviewPage">
Expand Down

0 comments on commit 238f5fe

Please sign in to comment.