Skip to content

Commit 4a8f831

Browse files
committed
refactor: quaserify the styles
1 parent 52f52d8 commit 4a8f831

5 files changed

Lines changed: 22 additions & 32 deletions

File tree

examples/vue-quasar/src/components/AnnotationToolbar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,6 @@ const toggleTool = (toolId: string) => {
8181

8282
<style scoped>
8383
.annotation-toolbar {
84-
border-bottom: 1px solid #cfd4da;
84+
border-bottom: 1px solid var(--q-color-grey-4);
8585
}
8686
</style>

examples/vue-quasar/src/components/PageControls.vue

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,27 @@ const handleNextPage = () => {
8989
}
9090
};
9191
92-
const handleInputChange = (value: string) => {
92+
const handleInputChange = (value: string | number | null) => {
9393
// Only allow numeric input
94-
const numericValue = value.replace(/[^0-9]/g, '');
94+
const numericValue = String(value ?? '').replace(/[^0-9]/g, '');
9595
inputValue.value = numericValue;
9696
};
9797
9898
const isPreviousDisabled = computed(() => state.value.currentPage === 1);
9999
const isNextDisabled = computed(() => state.value.currentPage === state.value.totalPages);
100100
</script>
101101
<template>
102-
<div @mouseenter="handleMouseEnter" @mouseleave="handleMouseLeave" class="page-controls">
103-
<q-card flat bordered class="page-controls-card row items-center q-gutter-sm">
102+
<div
103+
@mouseenter="handleMouseEnter"
104+
@mouseleave="handleMouseLeave"
105+
class="page-controls"
106+
:style="{ opacity: isVisible ? 1 : 0 }"
107+
>
108+
<q-card
109+
flat
110+
bordered
111+
class="row q-gutter-sm bg-grey-1 rounded-borders q-px-sm q-py-xs items-center"
112+
>
104113
<!-- Previous page button -->
105114
<q-btn
106115
flat
@@ -112,7 +121,7 @@ const isNextDisabled = computed(() => state.value.currentPage === state.value.to
112121
/>
113122

114123
<!-- Page input form -->
115-
<form @submit.prevent="handlePageSubmit" class="page-form row items-center q-gutter-xs">
124+
<form @submit.prevent="handlePageSubmit" class="page-form row q-gutter-xs items-center">
116125
<q-input
117126
dense
118127
outlined
@@ -123,8 +132,8 @@ const isNextDisabled = computed(() => state.value.currentPage === state.value.to
123132
@keyup.enter.prevent="handlePageSubmit"
124133
hide-bottom-space
125134
/>
126-
<span class="page-text">/</span>
127-
<span class="page-text">{{ state.totalPages }}</span>
135+
<span class="page-text text-grey-6">/</span>
136+
<span class="page-text text-grey-6">{{ state.totalPages }}</span>
128137
</form>
129138

130139
<!-- Next page button -->
@@ -147,22 +156,14 @@ const isNextDisabled = computed(() => state.value.currentPage === state.value.to
147156
left: 50%;
148157
transform: translateX(-50%);
149158
z-index: 1000;
150-
opacity: v-bind(isVisible ? 1: 0);
151159
transition: opacity 0.2s ease-in-out;
152160
}
153161
154-
.page-controls-card {
155-
background-color: #f8f9fa;
156-
padding: 6px 10px;
157-
border-radius: 10px;
158-
}
159-
160162
.page-input {
161163
width: 48px;
162164
}
163165
164166
.page-text {
165-
color: #6c757d;
166167
font-size: 14px;
167168
}
168169
</style>

examples/vue-quasar/src/components/RedactToolbar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,6 @@ const handleClearPending = () => {
7070

7171
<style scoped>
7272
.redact-toolbar {
73-
border-bottom: 1px solid #cfd4da;
73+
border-bottom: 1px solid var(--q-color-grey-4);
7474
}
7575
</style>

examples/vue-quasar/src/components/Toolbar.vue

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ const handlePrintDialogClose = () => {
254254

255255
<q-space />
256256

257-
<div class="mode-tabs-container">
257+
<div class="mode-tabs-container row items-center">
258258
<q-tabs
259259
v-model="mode"
260260
dense
@@ -293,12 +293,7 @@ const handlePrintDialogClose = () => {
293293

294294
<style scoped>
295295
.toolbar {
296-
border-bottom: 1px solid #cfd4da;
297-
}
298-
299-
.mode-tabs-container {
300-
display: flex;
301-
align-items: center;
296+
border-bottom: 1px solid var(--q-color-grey-4);
302297
}
303298
304299
.mode-tabs :deep(.q-tab__label) {

examples/vue-quasar/src/components/ZoomControls.vue

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ const isMarqueeZoomActive = computed(() => {
6868
});
6969
</script>
7070
<template>
71-
<div class="zoom-controls row items-center q-gutter-xs">
71+
<div class="zoom-controls row q-gutter-xs bg-grey-2 rounded-borders q-pa-xs items-center">
7272
<!-- Zoom Level Display with Menu -->
7373
<q-btn
7474
flat
7575
dense
76-
class="zoom-display-btn row items-center no-wrap"
76+
class="zoom-display-btn row no-wrap items-center"
7777
:color="menuOpen ? 'primary' : undefined"
7878
>
7979
<span class="zoom-level">{{ zoomPercentage }}%</span>
@@ -144,12 +144,6 @@ const isMarqueeZoomActive = computed(() => {
144144
</template>
145145

146146
<style scoped>
147-
.zoom-controls {
148-
background-color: rgba(0, 0, 0, 0.04);
149-
border-radius: 6px;
150-
padding: 2px 6px;
151-
}
152-
153147
.zoom-display-btn {
154148
min-width: auto;
155149
padding: 0 8px;

0 commit comments

Comments
 (0)