Skip to content

Commit cecf931

Browse files
committed
style(ui): improve layout and styling across components
- components/Versions.vue: Use small button styles for version badges; update tooltip colors. - components/connections/ConnectionsToolbar.vue: Refactor toolbar layout and spacing. - components/DataUsageTable.vue: Improve mobile sort button layout. - pages/config.vue: Adjust input widths for better responsiveness. - pages/connections.vue: Add padding to container. - pages/logs.vue: Add padding to container; fine-tune table cell spacing. - pages/overview.vue: Add padding to container; adjust collapse icon size.
1 parent baa0ec2 commit cecf931

File tree

9 files changed

+23
-27
lines changed

9 files changed

+23
-27
lines changed

components/DataUsageTable.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ const currentViewLabel = computed(() => {
460460
</div>
461461
<div class="flex flex-1 gap-2">
462462
<button
463-
class="flex-1 rounded px-2 py-1 text-xs transition-colors"
463+
class="flex h-9 flex-1 items-center justify-center rounded px-2 py-1 text-xs transition-colors"
464464
:class="
465465
sortField === 'label'
466466
? 'bg-primary text-primary-content'
@@ -479,7 +479,7 @@ const currentViewLabel = computed(() => {
479479
/>
480480
</button>
481481
<button
482-
class="flex-1 rounded px-2 py-1 text-xs transition-colors"
482+
class="flex h-9 flex-1 items-center justify-center rounded px-2 py-1 text-xs transition-colors"
483483
:class="
484484
sortField === 'duration'
485485
? 'bg-primary text-primary-content'
@@ -498,7 +498,7 @@ const currentViewLabel = computed(() => {
498498
/>
499499
</button>
500500
<button
501-
class="flex-1 rounded px-2 py-1 text-xs transition-colors"
501+
class="flex h-9 flex-1 items-center justify-center rounded px-2 py-1 text-xs transition-colors"
502502
:class="
503503
sortField === 'upload'
504504
? 'bg-primary text-primary-content'
@@ -517,7 +517,7 @@ const currentViewLabel = computed(() => {
517517
/>
518518
</button>
519519
<button
520-
class="flex-1 rounded px-2 py-1 text-xs transition-colors"
520+
class="flex h-9 flex-1 items-center justify-center rounded px-2 py-1 text-xs transition-colors"
521521
:class="
522522
sortField === 'download'
523523
? 'bg-primary text-primary-content'
@@ -536,7 +536,7 @@ const currentViewLabel = computed(() => {
536536
/>
537537
</button>
538538
<button
539-
class="flex-1 rounded px-2 py-1 text-xs transition-colors"
539+
class="flex h-9 flex-1 items-center justify-center rounded px-2 py-1 text-xs transition-colors"
540540
:class="
541541
sortField === 'total'
542542
? 'bg-primary text-primary-content'

components/Modal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ defineExpose({ open, close })
4141
}"
4242
>
4343
<div
44-
class="flex max-h-[90vh] flex-col overflow-hidden rounded-2xl p-0 transition-all duration-200 ease-[cubic-bezier(0.4,0,0.2,1)]"
44+
class="modal-box flex max-h-[90vh] flex-col overflow-hidden rounded-2xl p-0 transition-all duration-200 ease-[cubic-bezier(0.4,0,0.2,1)]"
4545
:class="
4646
isOpen
4747
? 'translate-y-0 scale-100 opacity-100'

components/Versions.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -289,15 +289,15 @@ watch(
289289
<div
290290
ref="frontendReference"
291291
role="button"
292-
class="version-badge relative flex w-full cursor-pointer items-center justify-center overflow-visible rounded-md p-2 transition-all duration-200 ease-in-out"
292+
class="btn relative btn-sm"
293293
@click="handleFrontendUpgrade"
294294
@mouseenter="onFrontendMouseEnter"
295295
@mouseleave="onFrontendMouseLeave"
296296
>
297297
<!-- Update indicator -->
298298
<span
299299
v-if="frontendRelease?.isUpdateAvailable"
300-
class="absolute top-0 right-0 inline-grid translate-x-1/2 -translate-y-1/2"
300+
class="absolute top-2 right-2 inline-grid translate-x-1/2 -translate-y-1/2"
301301
>
302302
<span
303303
class="col-start-1 row-start-1 h-2 w-2 animate-ping rounded-full bg-info"
@@ -326,14 +326,14 @@ watch(
326326
v-if="isFrontendTooltipOpen"
327327
ref="frontendFloating"
328328
:style="frontendFloatingStyles"
329-
class="z-70 max-h-96 overflow-y-auto rounded-xl bg-neutral p-4 text-neutral-content shadow-xl"
329+
class="z-70 max-h-96 overflow-y-auto rounded-xl bg-base-100 p-4 text-neutral-content shadow-xl"
330330
@mouseenter="onFrontendTooltipMouseEnter"
331331
@mouseleave="onFrontendTooltipMouseLeave"
332332
>
333333
<!-- Arrow -->
334334
<div
335335
ref="frontendArrow"
336-
class="absolute h-2 w-2 rotate-45 bg-neutral"
336+
class="absolute h-2 w-2 rotate-45 bg-base-100"
337337
:style="frontendArrowStyles"
338338
/>
339339
<Changelog
@@ -348,15 +348,15 @@ watch(
348348
<div
349349
ref="backendReference"
350350
role="button"
351-
class="version-badge relative flex w-full cursor-pointer items-center justify-center overflow-visible rounded-md p-2 transition-all duration-200 ease-in-out"
351+
class="btn relative btn-sm"
352352
@click="handleBackendUpgrade"
353353
@mouseenter="onBackendMouseEnter"
354354
@mouseleave="onBackendMouseLeave"
355355
>
356356
<!-- Update indicator -->
357357
<span
358358
v-if="backendRelease?.isUpdateAvailable"
359-
class="absolute top-0 right-0 inline-grid translate-x-1/2 -translate-y-1/2"
359+
class="absolute top-2 right-2 inline-grid translate-x-1/2 -translate-y-1/2"
360360
>
361361
<span
362362
class="col-start-1 row-start-1 h-2 w-2 animate-ping rounded-full bg-info"
@@ -385,14 +385,14 @@ watch(
385385
v-if="isBackendTooltipOpen"
386386
ref="backendFloating"
387387
:style="backendFloatingStyles"
388-
class="z-70 max-h-96 overflow-y-auto rounded-xl bg-neutral p-4 text-neutral-content shadow-xl"
388+
class="z-70 max-h-96 overflow-y-auto rounded-xl bg-base-100 p-4 text-neutral-content shadow-xl"
389389
@mouseenter="onBackendTooltipMouseEnter"
390390
@mouseleave="onBackendTooltipMouseLeave"
391391
>
392392
<!-- Arrow -->
393393
<div
394394
ref="backendArrow"
395-
class="absolute h-2 w-2 rotate-45 bg-neutral"
395+
class="absolute h-2 w-2 rotate-45 bg-base-100"
396396
:style="backendArrowStyles"
397397
/>
398398
<Changelog

components/connections/ConnectionsToolbar.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,7 @@ const { t } = useI18n()
114114
</option>
115115
</select>
116116
</div>
117-
</div>
118117

119-
<!-- Toolbar Row 2: Sort + Search + Actions -->
120-
<div class="flex flex-wrap items-center gap-2">
121118
<div class="flex shrink-0 items-center gap-1.5">
122119
<span
123120
class="hidden text-[0.8125rem] whitespace-nowrap text-base-content/60 sm:inline-block"

pages/config.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ const activeSection = ref<'core' | 'xd' | 'tools'>('core')
170170
</script>
171171

172172
<template>
173-
<div class="flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-2">
173+
<div class="flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto">
174174
<!-- Loading State -->
175175
<div v-if="isLoading" class="flex h-64 items-center justify-center">
176176
<div class="flex flex-col items-center gap-4">
@@ -792,7 +792,7 @@ const activeSection = ref<'core' | 'xd' | 'tools'>('core')
792792
<input
793793
v-model="remoteConfigURL"
794794
type="url"
795-
class="input-bordered input flex-1"
795+
class="input-bordered input w-full"
796796
:placeholder="t('remoteConfigURLPlaceholder')"
797797
/>
798798
<Button
@@ -955,7 +955,7 @@ const activeSection = ref<'core' | 'xd' | 'tools'>('core')
955955
<input
956956
v-model="dnsQuery.name"
957957
type="search"
958-
class="input-bordered input flex-1 font-mono"
958+
class="input-bordered input w-full font-mono"
959959
placeholder="google.com"
960960
@input="onDnsQueryInput"
961961
/>

pages/logs.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,9 @@ const tableSizeClass = computed(() =>
367367
:style="{ animationDelay: `${(index % 20) * 15}ms` }"
368368
>
369369
<td
370-
v-for="col in columns"
370+
v-for="(col, index) in columns"
371371
:key="col.id"
372+
:class="index === 0 ? 'py-1 leading-6' : ''"
372373
class="border-b border-base-content/5"
373374
>
374375
<component :is="() => col.render(row.original)" />

pages/overview.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -380,9 +380,7 @@ watch(
380380
</script>
381381

382382
<template>
383-
<div
384-
class="flex h-full flex-col gap-4 overflow-x-hidden overflow-y-auto p-1 pr-2 sm:pr-3"
385-
>
383+
<div class="flex h-full flex-col gap-4 overflow-x-hidden overflow-y-auto">
386384
<!-- Stats Grid -->
387385
<div
388386
class="-m-1 grid min-w-0 grid-cols-2 gap-3 p-1 sm:grid-cols-3 xl:grid-cols-6"
@@ -620,7 +618,7 @@ watch(
620618
<h3>{{ t('networkTopology') }}</h3>
621619
</div>
622620
<button
623-
class="flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border-none bg-transparent text-base-content transition-colors duration-200 hover:bg-base-content/10"
621+
class="flex h-6 w-6 cursor-pointer items-center justify-center rounded-full border-none bg-transparent text-base-content transition-colors duration-200 hover:bg-base-content/10"
624622
>
625623
<IconChevronDown
626624
:size="20"

pages/proxies.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ const ProviderProxyNodes = defineComponent({
479479
</script>
480480

481481
<template>
482-
<div class="flex h-full flex-col gap-3 overflow-y-auto p-2">
482+
<div class="flex h-full flex-col gap-3 overflow-y-auto">
483483
<!-- Header with Tabs and Actions -->
484484
<div class="animate-fade-slide-in flex flex-wrap items-center gap-3">
485485
<!-- Tabs -->

pages/rules.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const providersTotalSize = computed(() =>
119119
</script>
120120

121121
<template>
122-
<div class="rules-page flex h-full flex-col gap-3 overflow-y-auto p-2">
122+
<div class="rules-page flex h-full flex-col gap-3 overflow-y-auto">
123123
<!-- Loading State -->
124124
<div v-if="isLoading" class="flex flex-1 items-center justify-center">
125125
<div class="flex flex-col items-center gap-4">

0 commit comments

Comments
 (0)