@necrolab/dashboard 0.5.15 → 0.5.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/backend/api.js +2 -3
  2. package/eslint.config.js +46 -0
  3. package/index.html +2 -1
  4. package/package.json +5 -2
  5. package/src/App.vue +70 -566
  6. package/src/assets/css/base/mixins.scss +72 -0
  7. package/src/assets/css/base/reset.scss +0 -2
  8. package/src/assets/css/base/scroll.scss +43 -36
  9. package/src/assets/css/base/typography.scss +9 -10
  10. package/src/assets/css/base/variables.scss +43 -0
  11. package/src/assets/css/components/accessibility.scss +37 -0
  12. package/src/assets/css/components/buttons.scss +61 -74
  13. package/src/assets/css/components/forms.scss +31 -32
  14. package/src/assets/css/components/headers.scss +13 -21
  15. package/src/assets/css/components/modals.scss +2 -2
  16. package/src/assets/css/components/search-groups.scss +28 -22
  17. package/src/assets/css/components/tables.scss +5 -7
  18. package/src/assets/css/components/toasts.scss +7 -7
  19. package/src/assets/css/components/utilities.scss +295 -0
  20. package/src/assets/css/main.scss +55 -139
  21. package/src/components/Auth/LoginForm.vue +7 -86
  22. package/src/components/Console/ConsoleToolbar.vue +123 -0
  23. package/src/components/Editors/Account/Account.vue +12 -12
  24. package/src/components/Editors/Account/AccountView.vue +38 -111
  25. package/src/components/Editors/Account/CreateAccount.vue +11 -61
  26. package/src/components/Editors/Account/{AccountCreator.vue → CreateAccountBatch.vue} +28 -59
  27. package/src/components/Editors/AdminFileEditor.vue +179 -0
  28. package/src/components/Editors/Profile/CreateProfile.vue +77 -150
  29. package/src/components/Editors/Profile/Profile.vue +20 -21
  30. package/src/components/Editors/Profile/ProfileCountryChooser.vue +16 -60
  31. package/src/components/Editors/Profile/ProfileView.vue +41 -116
  32. package/src/components/Editors/ProxyFileEditor.vue +86 -0
  33. package/src/components/Editors/TagLabel.vue +16 -55
  34. package/src/components/Editors/TagToggle.vue +20 -8
  35. package/src/components/Filter/Filter.vue +66 -79
  36. package/src/components/Filter/FilterPreview.vue +153 -135
  37. package/src/components/Filter/PriceSortToggle.vue +36 -43
  38. package/src/components/Table/Header.vue +1 -1
  39. package/src/components/Table/Table.vue +45 -51
  40. package/src/components/Tasks/CheckStock.vue +7 -16
  41. package/src/components/Tasks/Controls/DesktopControls.vue +15 -60
  42. package/src/components/Tasks/Controls/MobileControls.vue +5 -20
  43. package/src/components/Tasks/CreateTaskAXS.vue +20 -118
  44. package/src/components/Tasks/CreateTaskTM.vue +33 -189
  45. package/src/components/Tasks/EventDetailRow.vue +21 -0
  46. package/src/components/Tasks/MassEdit.vue +6 -16
  47. package/src/components/Tasks/QuickSettings.vue +140 -216
  48. package/src/components/Tasks/ScrapeVenue.vue +4 -13
  49. package/src/components/Tasks/Stats.vue +20 -39
  50. package/src/components/Tasks/Task.vue +64 -270
  51. package/src/components/Tasks/TaskLabel.vue +9 -3
  52. package/src/components/Tasks/TaskView.vue +45 -64
  53. package/src/components/Tasks/Utilities.vue +10 -44
  54. package/src/components/Tasks/ViewTask.vue +23 -107
  55. package/src/components/icons/Close.vue +2 -8
  56. package/src/components/icons/Gear.vue +8 -8
  57. package/src/components/icons/Hash.vue +5 -0
  58. package/src/components/icons/Key.vue +2 -8
  59. package/src/components/icons/Pencil.vue +2 -8
  60. package/src/components/icons/Profile.vue +2 -8
  61. package/src/components/icons/Sell.vue +2 -8
  62. package/src/components/icons/Spinner.vue +4 -7
  63. package/src/components/icons/Wildcard.vue +2 -8
  64. package/src/components/icons/index.js +3 -5
  65. package/src/components/ui/ActionButtonGroup.vue +113 -52
  66. package/src/components/ui/BalanceIndicator.vue +60 -0
  67. package/src/components/ui/EmptyState.vue +24 -0
  68. package/src/components/ui/EnableDisableToggle.vue +23 -0
  69. package/src/components/ui/FormField.vue +49 -49
  70. package/src/components/ui/IconLabel.vue +23 -0
  71. package/src/components/ui/InfoRow.vue +21 -54
  72. package/src/components/ui/Modal.vue +161 -54
  73. package/src/components/ui/Navbar.vue +63 -44
  74. package/src/components/ui/ReadonlyFieldsSection.vue +31 -0
  75. package/src/components/ui/ReconnectIndicator.vue +111 -124
  76. package/src/components/ui/SectionCard.vue +6 -14
  77. package/src/components/ui/Splash.vue +2 -10
  78. package/src/components/ui/StatusBadge.vue +26 -28
  79. package/src/components/ui/TaskToggle.vue +54 -0
  80. package/src/components/ui/controls/CountryChooser.vue +29 -66
  81. package/src/components/ui/controls/EyeToggle.vue +1 -1
  82. package/src/components/ui/controls/atomic/Checkbox.vue +40 -121
  83. package/src/components/ui/controls/atomic/Dropdown.vue +103 -139
  84. package/src/components/ui/controls/atomic/MultiDropdown.vue +72 -120
  85. package/src/components/ui/controls/atomic/Switch.vue +21 -84
  86. package/src/composables/useCodeEditor.js +117 -0
  87. package/src/composables/useColorMapping.js +15 -0
  88. package/src/composables/useCopyToClipboard.js +1 -1
  89. package/src/composables/useDateFormatting.js +21 -0
  90. package/src/composables/useDeviceDetection.js +14 -0
  91. package/src/composables/useDropdownPosition.js +1 -4
  92. package/src/composables/useDynamicTableHeight.js +31 -0
  93. package/src/composables/useEnableDisable.js +6 -0
  94. package/src/composables/useFilterCSS.js +71 -0
  95. package/src/composables/useFormValidation.js +92 -0
  96. package/src/composables/useGetAllTags.js +9 -0
  97. package/src/composables/useIOSViewportHandling.js +76 -0
  98. package/src/composables/useNotchHandling.js +306 -0
  99. package/src/composables/useRowSelection.js +0 -3
  100. package/src/composables/useTableRender.js +23 -0
  101. package/src/composables/useTicketPricing.js +16 -0
  102. package/src/composables/useWindowDimensions.js +21 -0
  103. package/src/composables/useZoomPrevention.js +96 -0
  104. package/src/constants/tableLayout.js +14 -0
  105. package/src/libs/Filter.js +14 -20
  106. package/src/libs/panzoom.js +1 -5
  107. package/src/libs/utils/array.js +58 -0
  108. package/src/{stores/utils.js → libs/utils/dataGeneration.js} +2 -250
  109. package/src/libs/utils/eventUrl.js +40 -0
  110. package/src/libs/utils/string.js +3 -0
  111. package/src/libs/utils/time.js +20 -0
  112. package/src/libs/utils/validation.js +64 -0
  113. package/src/main.js +0 -2
  114. package/src/stores/connection.js +1 -29
  115. package/src/stores/logger.js +6 -12
  116. package/src/stores/sampleData.js +1 -2
  117. package/src/stores/ui.js +80 -71
  118. package/src/utils/tableHelpers.js +1 -0
  119. package/src/views/Accounts.vue +19 -38
  120. package/src/views/Console.vue +74 -253
  121. package/src/views/Editor.vue +47 -1114
  122. package/src/views/FilterBuilder.vue +190 -461
  123. package/src/views/Login.vue +3 -28
  124. package/src/views/Profiles.vue +17 -32
  125. package/src/views/Tasks.vue +51 -38
  126. package/tailwind.config.js +82 -71
  127. package/workbox-config.cjs +47 -5
  128. package/docs/plans/2026-02-08-tailwind-consolidation.md +0 -2438
  129. package/exit +0 -209
  130. package/run +0 -177
  131. package/src/assets/css/base/color-fallbacks.scss +0 -10
  132. package/src/assets/img/background.svg.backup +0 -11
  133. package/src/components/icons/SquareCheck.vue +0 -18
  134. package/src/components/icons/SquareUncheck.vue +0 -18
  135. package/src/components/ui/controls/atomic/LoadingButton.vue +0 -45
  136. package/switch-branch.sh +0 -41
  137. /package/public/{reconnect-logo.png → img/reconnect-logo.png} +0 -0
@@ -1,2438 +0,0 @@
1
- # Tailwind CSS Consolidation & Vue Cleanup Implementation Plan
2
-
3
- > **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
4
-
5
- **Goal:** Achieve near-zero CSS in Vue files with perfect Tailwind usage, extract all duplicate components, consolidate theme, and remove all "ghetto" hacks.
6
-
7
- **Architecture:** Multi-phase refactoring starting with foundational theme tokens, then systematic CSS cleanup, component extraction, and comprehensive verification. Each phase is independently testable with clear rollback points.
8
-
9
- **Tech Stack:** Vue 3, Tailwind CSS 3.4, Pinia, Vite, OKLCH color system
10
-
11
- **Supported Devices:** iPad Pro, Desktop, iPhone Portrait (iPhone landscape forces rotation)
12
-
13
- ---
14
-
15
- ## Phase 1: Theme Token Consolidation (Foundation)
16
-
17
- ### Task 1.1: Extend Tailwind Color Tokens
18
-
19
- **Files:**
20
-
21
- - Modify: `tailwind.config.js:30-77`
22
-
23
- **Step 1: Add extended dark scale for rgba replacements**
24
-
25
- Add these values to the `dark` color scale in tailwind.config.js:
26
-
27
- ```javascript
28
- dark: {
29
- // ... existing values
30
- 350: "oklch(0.1900 0 0 / <alpha-value>)", // rgba(26, 27, 30) replacement
31
- 450: "oklch(0.2200 0 0 / <alpha-value>)", // rgba(35, 36, 41) replacement
32
- 475: "oklch(0.2350 0 0 / <alpha-value>)", // rgba(46, 47, 52) replacement
33
- 625: "oklch(0.2950 0 0 / <alpha-value>)", // rgba(61, 62, 68) replacement
34
- 675: "oklch(0.3200 0 0 / <alpha-value>)", // rgba(68, 69, 75) replacement
35
- }
36
- ```
37
-
38
- **Step 2: Add semantic error colors**
39
-
40
- Add after the `red` scale:
41
-
42
- ```javascript
43
- error: {
44
- 300: "oklch(0.72 0.15 25 / <alpha-value>)", // Light error ~#EE8282
45
- 400: "oklch(0.66 0.18 25 / <alpha-value>)", // Medium error
46
- 500: "oklch(0.60 0.20 25 / <alpha-value>)", // Base error
47
- }
48
- ```
49
-
50
- **Step 3: Add overlay colors**
51
-
52
- Add after `accent`:
53
-
54
- ```javascript
55
- overlay: {
56
- dark: "oklch(0.08 0 0 / 0.85)", // Modal backdrop
57
- darker: "oklch(0.06 0 0 / 0.90)", // Darker overlay
58
- }
59
- ```
60
-
61
- **Step 4: Add semantic text/bg tokens**
62
-
63
- Add after `border`:
64
-
65
- ```javascript
66
- // Semantic tokens for better DX
67
- 'text-primary': 'oklch(0.90 0 0 / <alpha-value>)', // light-300
68
- 'text-secondary': 'oklch(0.82 0 0 / <alpha-value>)', // light-400
69
- 'text-muted': 'oklch(0.65 0 0 / <alpha-value>)', // light-500
70
- 'text-disabled': 'oklch(0.50 0 0 / <alpha-value>)', // light-600
71
-
72
- 'bg-base': 'oklch(0.1822 0 0 / <alpha-value>)', // dark-300
73
- 'bg-elevated': 'oklch(0.2046 0 0 / <alpha-value>)', // dark-400
74
- 'bg-input': 'oklch(0.2603 0 0 / <alpha-value>)', // dark-500
75
-
76
- 'border-focus': 'oklch(0.72 0.15 145 / <alpha-value>)', // accent.green
77
- 'primary': 'oklch(0.72 0.15 145 / <alpha-value>)', // accent.green
78
- ```
79
-
80
- **Step 5: Verify config**
81
-
82
- Run: `npm run dev`
83
- Expected: No errors, dev server starts successfully
84
-
85
- **Step 6: Commit**
86
-
87
- ```bash
88
- git add tailwind.config.js
89
- git commit -m "feat: extend Tailwind color tokens for theme consolidation
90
-
91
- - Add dark scale extensions (350, 450, 475, 625, 675)
92
- - Add semantic error colors
93
- - Add overlay colors for modals
94
- - Add semantic text/bg/border tokens for better DX"
95
- ```
96
-
97
- ---
98
-
99
- ### Task 1.2: Extend Shadow System
100
-
101
- **Files:**
102
-
103
- - Modify: `tailwind.config.js:135-138`
104
-
105
- **Step 1: Replace boxShadow extend section**
106
-
107
- ```javascript
108
- boxShadow: {
109
- 'card': '0 4px 12px rgba(0, 0, 0, 0.2)',
110
- 'button': '0 1px 2px rgba(0, 0, 0, 0.2)',
111
- 'sm': '0 1px 2px rgba(0, 0, 0, 0.1)',
112
- 'md': '0 2px 4px rgba(0, 0, 0, 0.1)',
113
- 'lg': '0 4px 12px rgba(0, 0, 0, 0.3)',
114
- 'xl': '0 6px 16px rgba(0, 0, 0, 0.3)',
115
- 'dropdown': '0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2)',
116
- 'input-inset': 'inset 0 2px 4px rgba(0, 0, 0, 0.4)',
117
- }
118
- ```
119
-
120
- **Step 2: Add border radius extensions**
121
-
122
- Add after `boxShadow`:
123
-
124
- ```javascript
125
- borderRadius: {
126
- 'xs': '3px',
127
- }
128
- ```
129
-
130
- **Step 3: Add backdrop blur extensions**
131
-
132
- Add after `borderRadius`:
133
-
134
- ```javascript
135
- backdropBlur: {
136
- 'xs': '4px',
137
- 'sm': '8px',
138
- }
139
- ```
140
-
141
- **Step 4: Add font size extensions**
142
-
143
- Add after `backdropBlur`:
144
-
145
- ```javascript
146
- fontSize: {
147
- 'xxs': '0.625rem', // 10px
148
- 'xxxs': '0.5625rem', // 9px
149
- }
150
- ```
151
-
152
- **Step 5: Verify config**
153
-
154
- Run: `npm run dev`
155
- Expected: No errors, dev server restarts successfully
156
-
157
- **Step 6: Commit**
158
-
159
- ```bash
160
- git add tailwind.config.js
161
- git commit -m "feat: extend Tailwind design tokens
162
-
163
- - Add shadow system (sm, md, lg, xl, dropdown, input-inset)
164
- - Add border-radius-xs (3px)
165
- - Add backdrop-blur-xs, backdrop-blur-sm
166
- - Add font-size xxs, xxxs for small UI elements"
167
- ```
168
-
169
- ---
170
-
171
- ## Phase 2: Remove iPhone Landscape Support
172
-
173
- ### Task 2.1: Clean Up App.vue iPhone Landscape Code
174
-
175
- **Files:**
176
-
177
- - Modify: `src/App.vue`
178
-
179
- **Step 1: Read current App.vue**
180
-
181
- Run: Read `src/App.vue`
182
-
183
- **Step 2: Remove iPhone landscape lock overlay**
184
-
185
- Find and remove:
186
-
187
- - `.landscape-lock` class styles (lines ~739-796)
188
- - `.landscape-lock-content` styles
189
- - `LandscapeLockIcon` component
190
- - All iPhone landscape detection logic in script section
191
- - All `showLandscapeLock` reactive refs and watchers
192
-
193
- **Step 3: Remove mobile-landscape breakpoint styles**
194
-
195
- Search for `@media` queries containing:
196
-
197
- - `mobile-landscape`
198
- - `(orientation: landscape) and (max-height: 500px)`
199
-
200
- Remove all iPhone-specific landscape overrides.
201
-
202
- **Step 4: Test app loads**
203
-
204
- Run: `npm run dev`
205
- Navigate to: `http://localhost:5173`
206
- Expected: App loads normally, no landscape lock on iPhone
207
-
208
- **Step 5: Commit**
209
-
210
- ```bash
211
- git add src/App.vue
212
- git commit -m "refactor: remove iPhone landscape support
213
-
214
- - Remove landscape lock overlay component
215
- - Remove landscape detection logic
216
- - Remove mobile-landscape media queries
217
- - Users on iPhone landscape are now forced to rotate via CSS"
218
- ```
219
-
220
- ---
221
-
222
- ### Task 2.2: Update Tailwind Config - Remove Landscape Breakpoints
223
-
224
- **Files:**
225
-
226
- - Modify: `tailwind.config.js:92-116`
227
-
228
- **Step 1: Remove mobile-landscape breakpoint**
229
-
230
- Remove from screens:
231
-
232
- ```javascript
233
- "mobile-landscape": {
234
- raw: "(max-width: 896px) and (orientation: landscape) and (max-height: 500px)"
235
- }
236
- ```
237
-
238
- **Step 2: Update comments**
239
-
240
- Update screen section comment to:
241
-
242
- ```javascript
243
- // Supported devices: iPad Pro, Desktop, iPhone Portrait
244
- // iPhone landscape forces rotation to portrait
245
- ```
246
-
247
- **Step 3: Verify no landscape references**
248
-
249
- Run: `grep -r "mobile-landscape" src/`
250
- Expected: No results (or only in comments)
251
-
252
- **Step 4: Commit**
253
-
254
- ```bash
255
- git add tailwind.config.js
256
- git commit -m "refactor: remove mobile-landscape breakpoint
257
-
258
- - Remove mobile-landscape from Tailwind screens
259
- - Update comments to reflect supported devices
260
- - iPhone landscape no longer supported"
261
- ```
262
-
263
- ---
264
-
265
- ## Phase 3: Component Extraction (High Value)
266
-
267
- ### Task 3.1: Create StatusBadge Component
268
-
269
- **Files:**
270
-
271
- - Create: `src/components/ui/StatusBadge.vue`
272
- - Test: Manual testing in Account.vue, Profile.vue
273
-
274
- **Step 1: Create StatusBadge component**
275
-
276
- ```vue
277
- <script setup>
278
- import CheckmarkIcon from "@/assets/icons/checkmark.svg";
279
- import CloseXIcon from "@/assets/icons/close-x.svg";
280
-
281
- const props = defineProps({
282
- enabled: {
283
- type: Boolean,
284
- required: true
285
- },
286
- size: {
287
- type: String,
288
- default: "small",
289
- validator: (value) => ["small", "large"].includes(value)
290
- }
291
- });
292
-
293
- const sizeClasses = {
294
- small: "w-6 h-6",
295
- large: "w-[26px] h-[26px]"
296
- };
297
-
298
- const enabledClasses = "bg-accent-green/20 border-accent-green/30";
299
- const disabledClasses = "bg-red-500/20 border-red-500/30";
300
- </script>
301
-
302
- <template>
303
- <div
304
- :class="[
305
- 'flex items-center justify-center rounded-full border-2 transition-all duration-200',
306
- enabled ? enabledClasses : disabledClasses,
307
- sizeClasses[size]
308
- ]">
309
- <CheckmarkIcon v-if="enabled" class="h-3 w-3 text-accent-green" />
310
- <CloseXIcon v-else class="h-3 w-3 text-red-500" />
311
- </div>
312
- </template>
313
- ```
314
-
315
- **Step 2: Test component in isolation**
316
-
317
- Create temporary test in a view to verify rendering:
318
-
319
- - Enabled state
320
- - Disabled state
321
- - Small size
322
- - Large size
323
-
324
- **Step 3: Commit**
325
-
326
- ```bash
327
- git add src/components/ui/StatusBadge.vue
328
- git commit -m "feat: create StatusBadge component
329
-
330
- - Supports enabled/disabled states
331
- - Supports small/large sizes
332
- - Uses Tailwind classes exclusively
333
- - Replaces 360+ lines of duplicated CSS"
334
- ```
335
-
336
- ---
337
-
338
- ### Task 3.2: Replace StatusBadge in Account.vue
339
-
340
- **Files:**
341
-
342
- - Modify: `src/components/Editors/Account/Account.vue`
343
-
344
- **Step 1: Import StatusBadge**
345
-
346
- Add to imports:
347
-
348
- ```javascript
349
- import StatusBadge from "@/components/ui/StatusBadge.vue";
350
- ```
351
-
352
- **Step 2: Replace enabled badge markup**
353
-
354
- Find lines with class `enabled-badge` or `disabled-badge` and replace with:
355
-
356
- ```vue
357
- <StatusBadge :enabled="account.enabled" size="small" />
358
- ```
359
-
360
- **Step 3: Remove old badge styles**
361
-
362
- Remove from `<style scoped>`:
363
-
364
- - `.enabled-badge` class (lines ~60-105)
365
- - `.disabled-badge` class
366
-
367
- **Step 4: Test in browser**
368
-
369
- Run: `npm run dev`
370
- Navigate to Accounts page
371
- Expected: Badges render correctly, enabled/disabled states work
372
-
373
- **Step 5: Commit**
374
-
375
- ```bash
376
- git add src/components/Editors/Account/Account.vue
377
- git commit -m "refactor: use StatusBadge component in Account.vue
378
-
379
- - Replace custom badge markup with StatusBadge component
380
- - Remove ~100 lines of duplicated CSS"
381
- ```
382
-
383
- ---
384
-
385
- ### Task 3.3: Replace StatusBadge in Profile.vue
386
-
387
- **Files:**
388
-
389
- - Modify: `src/components/Editors/Profile/Profile.vue`
390
-
391
- **Step 1: Import StatusBadge**
392
-
393
- **Step 2: Replace badge markup**
394
-
395
- **Step 3: Remove badge styles**
396
-
397
- **Step 4: Test in browser**
398
-
399
- **Step 5: Commit**
400
-
401
- ```bash
402
- git add src/components/Editors/Profile/Profile.vue
403
- git commit -m "refactor: use StatusBadge component in Profile.vue"
404
- ```
405
-
406
- ---
407
-
408
- ### Task 3.4: Replace StatusBadge in CreateAccount.vue
409
-
410
- **Files:**
411
-
412
- - Modify: `src/components/Editors/Account/CreateAccount.vue`
413
-
414
- **Step 1-5:** Same as Task 3.3
415
-
416
- **Step 6: Commit**
417
-
418
- ```bash
419
- git add src/components/Editors/Account/CreateAccount.vue
420
- git commit -m "refactor: use StatusBadge component in CreateAccount.vue"
421
- ```
422
-
423
- ---
424
-
425
- ### Task 3.5: Replace StatusBadge in CreateProfile.vue
426
-
427
- **Files:**
428
-
429
- - Modify: `src/components/Editors/Profile/CreateProfile.vue`
430
-
431
- **Step 1-5:** Same as Task 3.3
432
-
433
- **Step 6: Commit**
434
-
435
- ```bash
436
- git add src/components/Editors/Profile/CreateProfile.vue
437
- git commit -m "refactor: use StatusBadge component in CreateProfile.vue"
438
- ```
439
-
440
- ---
441
-
442
- ### Task 3.6: Create useRowSelection Composable
443
-
444
- **Files:**
445
-
446
- - Create: `src/composables/useRowSelection.js`
447
-
448
- **Step 1: Create composable file**
449
-
450
- ```javascript
451
- /**
452
- * useRowSelection - Composable for handling row selection via double-click/tap
453
- *
454
- * Provides consistent double-click and double-tap behavior for table rows.
455
- * Prevents selection when clicking on buttons or checkboxes.
456
- *
457
- * @param {Function} toggleCallback - Function to call when row is double-clicked/tapped
458
- * @returns {Object} Event handlers for @dblclick, @touchstart, @touchend
459
- */
460
- export function useRowSelection(toggleCallback) {
461
- let lastTapTime = 0;
462
- const DOUBLE_TAP_DELAY = 300;
463
-
464
- const handleDoubleClick = (event) => {
465
- // Don't trigger on button or checkbox clicks
466
- if (event.target.closest("button") || event.target.closest(".checkbox")) {
467
- return;
468
- }
469
- toggleCallback();
470
- };
471
-
472
- const handleTouchStart = (event) => {
473
- const currentTime = Date.now();
474
- const tapGap = currentTime - lastTapTime;
475
-
476
- if (tapGap < DOUBLE_TAP_DELAY && tapGap > 0) {
477
- // Don't trigger on button or checkbox taps
478
- if (!event.target.closest("button") && !event.target.closest(".checkbox")) {
479
- event.preventDefault();
480
- toggleCallback();
481
- }
482
- }
483
- lastTapTime = currentTime;
484
- };
485
-
486
- const handleTouchEnd = (event) => {
487
- // Prevent default touch behavior on buttons/checkboxes
488
- if (event.target.closest("button") || event.target.closest(".checkbox")) {
489
- return;
490
- }
491
- };
492
-
493
- return {
494
- handleDoubleClick,
495
- handleTouchStart,
496
- handleTouchEnd
497
- };
498
- }
499
- ```
500
-
501
- **Step 2: Commit**
502
-
503
- ```bash
504
- git add src/composables/useRowSelection.js
505
- git commit -m "feat: create useRowSelection composable
506
-
507
- - Handles double-click and double-tap for row selection
508
- - Prevents selection on button/checkbox clicks
509
- - Replaces 105 lines of duplicated logic"
510
- ```
511
-
512
- ---
513
-
514
- ### Task 3.7: Use useRowSelection in Task.vue
515
-
516
- **Files:**
517
-
518
- - Modify: `src/components/Tasks/Task.vue`
519
-
520
- **Step 1: Import composable**
521
-
522
- ```javascript
523
- import { useRowSelection } from "@/composables/useRowSelection";
524
- ```
525
-
526
- **Step 2: Use composable in setup**
527
-
528
- Replace manual event handler logic with:
529
-
530
- ```javascript
531
- const { handleDoubleClick, handleTouchStart, handleTouchEnd } = useRowSelection(() => {
532
- emit("toggle", props.task);
533
- });
534
- ```
535
-
536
- **Step 3: Update template event handlers**
537
-
538
- Replace existing `@dblclick`, `@touchstart`, `@touchend` with:
539
-
540
- ```vue
541
- <tr @dblclick="handleDoubleClick" @touchstart="handleTouchStart" @touchend="handleTouchEnd"></tr>
542
- ```
543
-
544
- **Step 4: Remove old event handler code**
545
-
546
- Delete manual double-tap logic (lines ~511-544)
547
-
548
- **Step 5: Test in browser**
549
-
550
- Navigate to Tasks page
551
- Test: Double-click row → should select task
552
- Test: Double-tap on mobile → should select task
553
- Test: Click button → should NOT select task
554
-
555
- **Step 6: Commit**
556
-
557
- ```bash
558
- git add src/components/Tasks/Task.vue
559
- git commit -m "refactor: use useRowSelection composable in Task.vue
560
-
561
- - Replace manual double-tap logic with composable
562
- - Remove ~35 lines of duplicated code"
563
- ```
564
-
565
- ---
566
-
567
- ### Task 3.8: Use useRowSelection in Account.vue
568
-
569
- **Files:**
570
-
571
- - Modify: `src/components/Editors/Account/Account.vue`
572
-
573
- **Step 1-6:** Same as Task 3.7, adapted for Account component
574
-
575
- **Step 7: Commit**
576
-
577
- ```bash
578
- git add src/components/Editors/Account/Account.vue
579
- git commit -m "refactor: use useRowSelection composable in Account.vue"
580
- ```
581
-
582
- ---
583
-
584
- ### Task 3.9: Use useRowSelection in Profile.vue
585
-
586
- **Files:**
587
-
588
- - Modify: `src/components/Editors/Profile/Profile.vue`
589
-
590
- **Step 1-6:** Same as Task 3.7, adapted for Profile component
591
-
592
- **Step 7: Commit**
593
-
594
- ```bash
595
- git add src/components/Editors/Profile/Profile.vue
596
- git commit -m "refactor: use useRowSelection composable in Profile.vue"
597
- ```
598
-
599
- ---
600
-
601
- ### Task 3.10: Create useCopyToClipboard Composable
602
-
603
- **Files:**
604
-
605
- - Create: `src/composables/useCopyToClipboard.js`
606
-
607
- **Step 1: Create composable**
608
-
609
- ```javascript
610
- import { useUIStore } from "@/stores/ui";
611
-
612
- /**
613
- * useCopyToClipboard - Composable for copying text with user feedback
614
- *
615
- * @returns {Object} Copy function with success notification
616
- */
617
- export function useCopyToClipboard() {
618
- const ui = useUIStore();
619
-
620
- const copy = (text, message = "Copied to clipboard") => {
621
- if (!text) return;
622
-
623
- navigator.clipboard
624
- .writeText(text)
625
- .then(() => {
626
- ui.showSuccess(message);
627
- })
628
- .catch((err) => {
629
- ui.showError("Failed to copy");
630
- console.error("Copy failed:", err);
631
- });
632
- };
633
-
634
- return { copy };
635
- }
636
- ```
637
-
638
- **Step 2: Commit**
639
-
640
- ```bash
641
- git add src/composables/useCopyToClipboard.js
642
- git commit -m "feat: create useCopyToClipboard composable
643
-
644
- - Provides copy to clipboard with success notification
645
- - Handles errors gracefully
646
- - DRY principle for clipboard operations"
647
- ```
648
-
649
- ---
650
-
651
- ### Task 3.11: Use useCopyToClipboard in Task.vue
652
-
653
- **Files:**
654
-
655
- - Modify: `src/components/Tasks/Task.vue`
656
-
657
- **Step 1: Import and use composable**
658
-
659
- ```javascript
660
- import { useCopyToClipboard } from "@/composables/useCopyToClipboard";
661
-
662
- const { copy } = useCopyToClipboard();
663
- ```
664
-
665
- **Step 2: Replace manual copy logic**
666
-
667
- Replace `navigator.clipboard.writeText()` calls with:
668
-
669
- ```javascript
670
- copy(task.id, "Copied task ID");
671
- ```
672
-
673
- **Step 3: Remove old copy code**
674
-
675
- **Step 4: Test**
676
-
677
- Click copy button → should copy and show success notification
678
-
679
- **Step 5: Commit**
680
-
681
- ```bash
682
- git add src/components/Tasks/Task.vue
683
- git commit -m "refactor: use useCopyToClipboard composable in Task.vue"
684
- ```
685
-
686
- ---
687
-
688
- ### Task 3.12: Use useCopyToClipboard in ViewTask.vue
689
-
690
- **Files:**
691
-
692
- - Modify: `src/components/Tasks/ViewTask.vue`
693
-
694
- **Step 1-5:** Same as Task 3.11
695
-
696
- **Step 6: Commit**
697
-
698
- ```bash
699
- git add src/components/Tasks/ViewTask.vue
700
- git commit -m "refactor: use useCopyToClipboard composable in ViewTask.vue"
701
- ```
702
-
703
- ---
704
-
705
- ### Task 3.13: Use useCopyToClipboard in Account.vue
706
-
707
- **Files:**
708
-
709
- - Modify: `src/components/Editors/Account/Account.vue`
710
-
711
- **Step 1-5:** Same as Task 3.11
712
-
713
- **Step 6: Commit**
714
-
715
- ```bash
716
- git add src/components/Editors/Account/Account.vue
717
- git commit -m "refactor: use useCopyToClipboard composable in Account.vue"
718
- ```
719
-
720
- ---
721
-
722
- ## Phase 4: High-Priority CSS Cleanup
723
-
724
- ### Task 4.1: Clean Up App.vue Global Styles
725
-
726
- **Files:**
727
-
728
- - Modify: `src/App.vue`
729
-
730
- **Step 1: Read current App.vue styles**
731
-
732
- Run: Read `src/App.vue` focusing on `<style>` section
733
-
734
- **Step 2: Remove global !important overrides**
735
-
736
- Find and remove/replace:
737
-
738
- - `html, body` with !important on overflow, width, height, touch-action (lines ~679-688)
739
- - Replace with proper overflow utilities on specific elements
740
- - Global `* { touch-action: manipulation !important }` (lines ~699-702)
741
- - Remove entirely, use `touch-manipulation` class where needed
742
-
743
- **Step 3: Convert .layout to Tailwind**
744
-
745
- Replace:
746
-
747
- ```css
748
- .layout {
749
- min-height: 90vh;
750
- height: 100vh !important;
751
- }
752
- ```
753
-
754
- With template classes:
755
-
756
- ```vue
757
- <div class="layout h-screen min-h-screen"></div>
758
- ```
759
-
760
- Remove CSS block.
761
-
762
- **Step 4: Simplify component-container responsive padding**
763
-
764
- Replace:
765
-
766
- ```css
767
- .component-container {
768
- padding-left: 1rem;
769
- padding-right: 1rem;
770
- }
771
- @media (min-width: 480px) {
772
- .component-container {
773
- padding-left: 1rem;
774
- padding-right: 1rem;
775
- }
776
- }
777
- /* etc */
778
- ```
779
-
780
- With template classes:
781
-
782
- ```vue
783
- <div class="component-container px-4 xs:px-4 md:px-2 lg:px-6 xl:px-10"></div>
784
- ```
785
-
786
- Remove CSS block.
787
-
788
- **Step 5: Keep necessary animations**
789
-
790
- Keep page transition animations (enter-active, leave-active) as they're legitimate custom CSS.
791
-
792
- **Step 6: Test app**
793
-
794
- Run: `npm run dev`
795
- Test: Scroll behavior, touch behavior, layout sizing
796
- Expected: No visual changes, no layout breaks
797
-
798
- **Step 7: Commit**
799
-
800
- ```bash
801
- git add src/App.vue
802
- git commit -m "refactor: clean up App.vue global styles
803
-
804
- - Remove global !important overrides
805
- - Convert .layout to Tailwind classes
806
- - Convert .component-container to responsive Tailwind classes
807
- - Remove ~100 lines of CSS
808
- - Keep page transition animations"
809
- ```
810
-
811
- ---
812
-
813
- ### Task 4.2: Clean Up Navbar.vue
814
-
815
- **Files:**
816
-
817
- - Modify: `src/components/ui/Navbar.vue`
818
-
819
- **Step 1: Read Navbar.vue styles**
820
-
821
- Run: Read `src/components/ui/Navbar.vue` lines 112-275
822
-
823
- **Step 2: Convert background to Tailwind**
824
-
825
- Replace:
826
-
827
- ```css
828
- background: oklch(0.1822 0 0 / 0.95);
829
- backdrop-filter: blur(12px);
830
- ```
831
-
832
- With class:
833
-
834
- ```vue
835
- class="bg-dark-300/95 backdrop-blur"
836
- ```
837
-
838
- **Step 3: Remove SVG force normalization**
839
-
840
- Replace:
841
-
842
- ```css
843
- svg {
844
- width: 20px !important;
845
- height: 20px !important;
846
- }
847
- ```
848
-
849
- With template classes on SVG components:
850
-
851
- ```vue
852
- <SomeIcon class="h-5 w-5" />
853
- ```
854
-
855
- **Step 4: Convert .navbar-link height**
856
-
857
- Replace:
858
-
859
- ```css
860
- .navbar-link {
861
- height: 40px;
862
- border-bottom: 2px solid transparent;
863
- }
864
- ```
865
-
866
- With:
867
-
868
- ```vue
869
- class="navbar-link h-10 border-b-2 border-transparent"
870
- ```
871
-
872
- **Step 5: Replace icon centering hack**
873
-
874
- Replace:
875
-
876
- ```css
877
- position: absolute;
878
- top: 50%;
879
- left: 50%;
880
- transform: translate(-50%, -50%);
881
- ```
882
-
883
- With:
884
-
885
- ```vue
886
- class="flex items-center justify-center"
887
- ```
888
-
889
- **Step 6: Fix .force-z z-index**
890
-
891
- Replace:
892
-
893
- ```css
894
- .force-z {
895
- z-index: 20000;
896
- }
897
- ```
898
-
899
- With:
900
-
901
- ```vue
902
- class="z-max"
903
- ```
904
-
905
- (Already in tailwind.config.js as 9999)
906
-
907
- **Step 7: Convert notch pseudo-element**
908
-
909
- The notch handling (`::before` with absolute positioning) is iPhone-specific.
910
- Since we removed iPhone landscape support, simplify or remove.
911
-
912
- **Step 8: Test navbar**
913
-
914
- Run: `npm run dev`
915
- Test: Navigation icons, responsive behavior, SVG sizing, z-index layering
916
- Expected: Identical visual appearance
917
-
918
- **Step 9: Commit**
919
-
920
- ```bash
921
- git add src/components/ui/Navbar.vue
922
- git commit -m "refactor: clean up Navbar.vue styles
923
-
924
- - Convert background to Tailwind classes
925
- - Remove SVG !important overrides, use classes
926
- - Convert height/border to Tailwind utilities
927
- - Replace absolute positioning with flexbox
928
- - Fix z-index using Tailwind token
929
- - Remove ~120 lines of CSS"
930
- ```
931
-
932
- ---
933
-
934
- ### Task 4.3: Clean Up Modal.vue
935
-
936
- **Files:**
937
-
938
- - Modify: `src/components/ui/Modal.vue`
939
-
940
- **Step 1: Read Modal.vue styles**
941
-
942
- Run: Read `src/components/ui/Modal.vue` lines 57-138
943
-
944
- **Step 2: Replace .modal-mask styles**
945
-
946
- Replace:
947
-
948
- ```css
949
- .modal-mask {
950
- position: fixed;
951
- z-index: 25000;
952
- top: 0;
953
- left: 0;
954
- width: 100%;
955
- height: 100%;
956
- background-color: rgba(17, 17, 17, 0.85);
957
- backdrop-filter: blur(4px);
958
- display: flex;
959
- padding-top: 3.5rem;
960
- }
961
- ```
962
-
963
- With template classes:
964
-
965
- ```vue
966
- <div class="modal-mask bg-overlay-dark backdrop-blur-xs fixed inset-0 z-modal flex pt-14"></div>
967
- ```
968
-
969
- **Step 3: Simplify .component-modal bottom margin**
970
-
971
- Replace:
972
-
973
- ```css
974
- margin-bottom: 20rem;
975
- @media (max-width: 480px) {
976
- margin-bottom: 25rem;
977
- }
978
- ```
979
-
980
- With:
981
-
982
- ```vue
983
- class="mb-80 mobile-portrait:mb-[25rem]"
984
- ```
985
-
986
- **Step 4: Remove !important from padding-bottom**
987
-
988
- Replace:
989
-
990
- ```css
991
- padding-bottom: 15rem !important;
992
- padding-bottom: 3rem !important;
993
- ```
994
-
995
- With proper Tailwind classes:
996
-
997
- ```vue
998
- class="pb-60 md:pb-12"
999
- ```
1000
-
1001
- **Step 5: Test modal**
1002
-
1003
- Open any modal, test:
1004
-
1005
- - Overlay appearance
1006
- - Modal positioning
1007
- - Scroll behavior
1008
- - Responsive sizing
1009
-
1010
- **Step 6: Commit**
1011
-
1012
- ```bash
1013
- git add src/components/ui/Modal.vue
1014
- git commit -m "refactor: clean up Modal.vue styles
1015
-
1016
- - Replace .modal-mask with Tailwind classes
1017
- - Use z-modal token instead of hardcoded 25000
1018
- - Use bg-overlay-dark and backdrop-blur-xs tokens
1019
- - Remove !important from padding
1020
- - Simplify responsive bottom margin
1021
- - Remove ~80 lines of CSS"
1022
- ```
1023
-
1024
- ---
1025
-
1026
- ### Task 4.4: Clean Up Task.vue
1027
-
1028
- **Files:**
1029
-
1030
- - Modify: `src/components/Tasks/Task.vue`
1031
-
1032
- **Step 1: Read Task.vue styles**
1033
-
1034
- Run: Read `src/components/Tasks/Task.vue` lines 158-466
1035
-
1036
- **Step 2: Remove icon !important overrides**
1037
-
1038
- Replace:
1039
-
1040
- ```css
1041
- min-width: 10px !important;
1042
- stroke: oklch(0.6 0 0) !important;
1043
- ```
1044
-
1045
- With proper component props or Tailwind classes:
1046
-
1047
- ```vue
1048
- <SomeIcon class="min-w-[10px] stroke-light-500" />
1049
- ```
1050
-
1051
- **Step 3: Convert button dimensions**
1052
-
1053
- Replace:
1054
-
1055
- ```css
1056
- padding: 2px;
1057
- gap: 1px;
1058
- border: 2px solid oklch(...);
1059
- ```
1060
-
1061
- With:
1062
-
1063
- ```vue
1064
- class="p-0.5 gap-px border-2 border-dark-600"
1065
- ```
1066
-
1067
- **Step 4: Remove mobile positioning hacks**
1068
-
1069
- Replace:
1070
-
1071
- ```css
1072
- @media (max-width: 480px) {
1073
- left: 4rem !important;
1074
- top: 0.25rem !important;
1075
- z-index: 1 !important;
1076
- }
1077
- ```
1078
-
1079
- With proper responsive Tailwind:
1080
-
1081
- ```vue
1082
- class="mobile-portrait:left-16 mobile-portrait:top-1 mobile-portrait:z-10"
1083
- ```
1084
-
1085
- **Step 5: Remove border override !important**
1086
-
1087
- Replace:
1088
-
1089
- ```css
1090
- border: 2px solid oklch(0.2809 0 0) !important;
1091
- ```
1092
-
1093
- With:
1094
-
1095
- ```vue
1096
- class="border-2 border-dark-600"
1097
- ```
1098
-
1099
- **Step 6: Convert shadow !important**
1100
-
1101
- Replace:
1102
-
1103
- ```css
1104
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
1105
- ```
1106
-
1107
- With:
1108
-
1109
- ```vue
1110
- class="shadow-sm"
1111
- ```
1112
-
1113
- **Step 7: Test task rows**
1114
-
1115
- Navigate to Tasks page
1116
- Test: Task row appearance, mobile responsiveness, buttons, icons
1117
-
1118
- **Step 8: Commit**
1119
-
1120
- ```bash
1121
- git add src/components/Tasks/Task.vue
1122
- git commit -m "refactor: clean up Task.vue styles
1123
-
1124
- - Remove icon !important overrides
1125
- - Convert button dimensions to Tailwind
1126
- - Remove mobile positioning hacks with !important
1127
- - Replace hardcoded colors with theme tokens
1128
- - Convert shadows to Tailwind utilities
1129
- - Remove ~100 lines of CSS"
1130
- ```
1131
-
1132
- ---
1133
-
1134
- ### Task 4.5: Clean Up Dropdown.vue
1135
-
1136
- **Files:**
1137
-
1138
- - Modify: `src/components/ui/controls/atomic/Dropdown.vue`
1139
-
1140
- **Step 1: Read Dropdown.vue styles**
1141
-
1142
- Run: Read `src/components/ui/controls/atomic/Dropdown.vue` lines 121-288
1143
-
1144
- **Step 2: Convert background and border**
1145
-
1146
- Replace:
1147
-
1148
- ```css
1149
- background: linear-gradient(...);
1150
- border: 1px solid oklch(...);
1151
- ```
1152
-
1153
- With:
1154
-
1155
- ```vue
1156
- class="bg-dark-300 border border-dark-600"
1157
- ```
1158
-
1159
- **Step 3: Remove height !important**
1160
-
1161
- Replace:
1162
-
1163
- ```css
1164
- height: 40px !important;
1165
- ```
1166
-
1167
- With:
1168
-
1169
- ```vue
1170
- class="h-10"
1171
- ```
1172
-
1173
- **Step 4: Convert focus state**
1174
-
1175
- Replace:
1176
-
1177
- ```css
1178
- border-color: oklch(...) !important;
1179
- outline: 1px solid oklch(...) !important;
1180
- ```
1181
-
1182
- With:
1183
-
1184
- ```vue
1185
- class="focus:border-border-focus focus:outline focus:outline-1 focus:outline-border-focus"
1186
- ```
1187
-
1188
- **Step 5: Remove scroll !important**
1189
-
1190
- Replace:
1191
-
1192
- ```css
1193
- overflow-x: auto !important;
1194
- touch-action: pan-x pan-y !important;
1195
- ```
1196
-
1197
- With:
1198
-
1199
- ```vue
1200
- class="overflow-x-auto touch-pan-x touch-pan-y"
1201
- ```
1202
-
1203
- **Step 6: Test dropdown**
1204
-
1205
- Test: Dropdown appearance, focus states, scroll behavior, touch behavior
1206
-
1207
- **Step 7: Commit**
1208
-
1209
- ```bash
1210
- git add src/components/ui/controls/atomic/Dropdown.vue
1211
- git commit -m "refactor: clean up Dropdown.vue styles
1212
-
1213
- - Convert background/border to Tailwind
1214
- - Remove height !important
1215
- - Convert focus states to Tailwind utilities
1216
- - Remove scroll/touch !important overrides
1217
- - Remove ~70 lines of CSS"
1218
- ```
1219
-
1220
- ---
1221
-
1222
- ## Phase 5: Component Extraction (Medium Value)
1223
-
1224
- ### Task 5.1: Create FormField Component
1225
-
1226
- **Files:**
1227
-
1228
- - Create: `src/components/ui/FormField.vue`
1229
-
1230
- **Step 1: Create component**
1231
-
1232
- ```vue
1233
- <script setup>
1234
- import { defineEmits, useAttrs } from "vue";
1235
- import UpIcon from "@/assets/icons/up.svg";
1236
- import DownIcon from "@/assets/icons/down.svg";
1237
-
1238
- const props = defineProps({
1239
- label: {
1240
- type: String,
1241
- required: true
1242
- },
1243
- icon: {
1244
- type: Object,
1245
- default: null
1246
- },
1247
- modelValue: {
1248
- type: [String, Number],
1249
- default: ""
1250
- },
1251
- type: {
1252
- type: String,
1253
- default: "text"
1254
- },
1255
- placeholder: {
1256
- type: String,
1257
- default: ""
1258
- },
1259
- required: {
1260
- type: Boolean,
1261
- default: false
1262
- },
1263
- hasError: {
1264
- type: Boolean,
1265
- default: false
1266
- },
1267
- incrementer: {
1268
- type: Boolean,
1269
- default: false
1270
- },
1271
- zIndex: {
1272
- type: String,
1273
- default: "0",
1274
- validator: (value) => ["dropdown", "tooltip", "0", "1", "2"].includes(value)
1275
- }
1276
- });
1277
-
1278
- const emit = defineEmits(["update:modelValue", "increment", "decrement"]);
1279
- const attrs = useAttrs();
1280
-
1281
- const zIndexClasses = {
1282
- dropdown: "z-dropdown",
1283
- tooltip: "z-tooltip",
1284
- 0: "z-0",
1285
- 1: "z-10",
1286
- 2: "z-20"
1287
- };
1288
- </script>
1289
-
1290
- <template>
1291
- <div class="flex flex-col" :class="zIndexClasses[zIndex]">
1292
- <label class="mb-2 flex items-center gap-2 text-sm font-medium text-light-400">
1293
- {{ label }}
1294
- <component :is="icon" v-if="icon" class="h-4 w-4" />
1295
- </label>
1296
- <div
1297
- class="relative flex items-center rounded-md border bg-dark-500 transition-colors"
1298
- :class="[hasError ? 'border-error-500' : 'border-dark-600', required ? 'ring-primary/20 ring-2' : '']">
1299
- <slot>
1300
- <input
1301
- :type="type"
1302
- :placeholder="placeholder"
1303
- :value="modelValue"
1304
- @input="emit('update:modelValue', $event.target.value)"
1305
- v-bind="attrs"
1306
- class="w-full bg-transparent px-3 py-2 text-light-300 outline-none" />
1307
- </slot>
1308
- <div v-if="incrementer" class="flex flex-col border-l border-dark-600">
1309
- <button @click="emit('increment')" type="button" class="px-2 py-1 transition-colors hover:bg-dark-650">
1310
- <UpIcon class="h-3 w-3 text-light-400" />
1311
- </button>
1312
- <button @click="emit('decrement')" type="button" class="px-2 py-1 transition-colors hover:bg-dark-650">
1313
- <DownIcon class="h-3 w-3 text-light-400" />
1314
- </button>
1315
- </div>
1316
- </div>
1317
- </div>
1318
- </template>
1319
- ```
1320
-
1321
- **Step 2: Commit**
1322
-
1323
- ```bash
1324
- git add src/components/ui/FormField.vue
1325
- git commit -m "feat: create FormField component
1326
-
1327
- - Supports label, icon, error states, required states
1328
- - Supports number incrementer
1329
- - Supports z-index control for overlapping elements
1330
- - Replaces ~400 lines of duplicated form markup"
1331
- ```
1332
-
1333
- ---
1334
-
1335
- ### Task 5.2: Replace FormField in CreateTaskAXS.vue
1336
-
1337
- **Files:**
1338
-
1339
- - Modify: `src/components/Tasks/CreateTaskAXS.vue`
1340
-
1341
- **Step 1: Import FormField**
1342
-
1343
- ```javascript
1344
- import FormField from "@/components/ui/FormField.vue";
1345
- ```
1346
-
1347
- **Step 2: Replace input wrapper markup**
1348
-
1349
- Find all instances of:
1350
-
1351
- ```vue
1352
- <div class="input-wrapper">
1353
- <label class="label-override mb-2">
1354
- Name
1355
- <NameIcon />
1356
- </label>
1357
- <div class="input-default">
1358
- <input type="text" v-model="name" />
1359
- </div>
1360
- </div>
1361
- ```
1362
-
1363
- Replace with:
1364
-
1365
- ```vue
1366
- <FormField label="Name" :icon="NameIcon" v-model="name" type="text" />
1367
- ```
1368
-
1369
- **Step 3: Remove old input-wrapper styles**
1370
-
1371
- **Step 4: Test form**
1372
-
1373
- Test: All input fields render correctly, v-model binding works, incrementers work
1374
-
1375
- **Step 5: Commit**
1376
-
1377
- ```bash
1378
- git add src/components/Tasks/CreateTaskAXS.vue
1379
- git commit -m "refactor: use FormField component in CreateTaskAXS.vue
1380
-
1381
- - Replace 10+ input wrappers with FormField
1382
- - Remove duplicated form markup"
1383
- ```
1384
-
1385
- ---
1386
-
1387
- ### Task 5.3: Replace FormField in CreateTaskTM.vue
1388
-
1389
- **Files:**
1390
-
1391
- - Modify: `src/components/Tasks/CreateTaskTM.vue`
1392
-
1393
- **Step 1-5:** Same as Task 5.2
1394
-
1395
- **Step 6: Commit**
1396
-
1397
- ```bash
1398
- git add src/components/Tasks/CreateTaskTM.vue
1399
- git commit -m "refactor: use FormField component in CreateTaskTM.vue"
1400
- ```
1401
-
1402
- ---
1403
-
1404
- ### Task 5.4: Replace FormField in CreateAccount.vue
1405
-
1406
- **Files:**
1407
-
1408
- - Modify: `src/components/Editors/Account/CreateAccount.vue`
1409
-
1410
- **Step 1-5:** Same as Task 5.2
1411
-
1412
- **Step 6: Commit**
1413
-
1414
- ```bash
1415
- git add src/components/Editors/Account/CreateAccount.vue
1416
- git commit -m "refactor: use FormField component in CreateAccount.vue"
1417
- ```
1418
-
1419
- ---
1420
-
1421
- ### Task 5.5: Replace FormField in CreateProfile.vue
1422
-
1423
- **Files:**
1424
-
1425
- - Modify: `src/components/Editors/Profile/CreateProfile.vue`
1426
-
1427
- **Step 1-5:** Same as Task 5.2
1428
-
1429
- **Step 6: Commit**
1430
-
1431
- ```bash
1432
- git add src/components/Editors/Profile/CreateProfile.vue
1433
- git commit -m "refactor: use FormField component in CreateProfile.vue"
1434
- ```
1435
-
1436
- ---
1437
-
1438
- ### Task 5.6: Create InfoRow Component
1439
-
1440
- **Files:**
1441
-
1442
- - Create: `src/components/ui/InfoRow.vue`
1443
-
1444
- **Step 1: Create component**
1445
-
1446
- ```vue
1447
- <script setup>
1448
- import { useCopyToClipboard } from "@/composables/useCopyToClipboard";
1449
-
1450
- const props = defineProps({
1451
- icon: {
1452
- type: Object,
1453
- default: null
1454
- },
1455
- label: {
1456
- type: String,
1457
- required: true
1458
- },
1459
- value: {
1460
- type: [String, Number],
1461
- default: ""
1462
- },
1463
- valueClass: {
1464
- type: String,
1465
- default: ""
1466
- },
1467
- copyable: {
1468
- type: Boolean,
1469
- default: false
1470
- },
1471
- copyText: {
1472
- type: String,
1473
- default: ""
1474
- }
1475
- });
1476
-
1477
- const { copy } = useCopyToClipboard();
1478
-
1479
- const handleCopy = () => {
1480
- if (props.copyable) {
1481
- copy(props.copyText || props.value, "Copied");
1482
- }
1483
- };
1484
- </script>
1485
-
1486
- <template>
1487
- <div
1488
- class="flex items-center gap-3 rounded-md px-3 py-2 transition-colors hover:bg-dark-400/50"
1489
- :class="{ 'cursor-pointer': copyable }"
1490
- @click="handleCopy">
1491
- <component :is="icon" v-if="icon" class="h-5 w-5 flex-shrink-0 text-light-500" />
1492
- <span class="min-w-[100px] text-sm text-light-500">{{ label }}</span>
1493
- <span class="flex-1 text-right text-sm text-light-300" :class="valueClass">
1494
- <slot>{{ value }}</slot>
1495
- </span>
1496
- <slot name="actions" />
1497
- </div>
1498
- </template>
1499
- ```
1500
-
1501
- **Step 2: Commit**
1502
-
1503
- ```bash
1504
- git add src/components/ui/InfoRow.vue
1505
- git commit -m "feat: create InfoRow component
1506
-
1507
- - Supports icon, label, value display
1508
- - Supports copyable rows
1509
- - Supports custom value classes
1510
- - Supports action slot for buttons
1511
- - Replaces ~260 lines of duplicated markup"
1512
- ```
1513
-
1514
- ---
1515
-
1516
- ### Task 5.7: Replace InfoRow in ViewTask.vue
1517
-
1518
- **Files:**
1519
-
1520
- - Modify: `src/components/Tasks/ViewTask.vue`
1521
-
1522
- **Step 1: Import InfoRow**
1523
-
1524
- ```javascript
1525
- import InfoRow from "@/components/ui/InfoRow.vue";
1526
- ```
1527
-
1528
- **Step 2: Replace info row markup**
1529
-
1530
- Find instances like:
1531
-
1532
- ```vue
1533
- <div class="info-row">
1534
- <IdIcon />
1535
- <span>ID</span>
1536
- <span>{{ task.id }}</span>
1537
- </div>
1538
- ```
1539
-
1540
- Replace with:
1541
-
1542
- ```vue
1543
- <InfoRow :icon="IdIcon" label="ID" :value="task.id" copyable :copy-text="task.id" />
1544
- ```
1545
-
1546
- **Step 3: Test**
1547
-
1548
- Open task details modal
1549
- Test: All info rows render, copy functionality works
1550
-
1551
- **Step 4: Commit**
1552
-
1553
- ```bash
1554
- git add src/components/Tasks/ViewTask.vue
1555
- git commit -m "refactor: use InfoRow component in ViewTask.vue
1556
-
1557
- - Replace 20+ info row instances
1558
- - Remove duplicated markup"
1559
- ```
1560
-
1561
- ---
1562
-
1563
- ### Task 5.8: Create SectionCard Component
1564
-
1565
- **Files:**
1566
-
1567
- - Create: `src/components/ui/SectionCard.vue`
1568
-
1569
- **Step 1: Create component**
1570
-
1571
- ```vue
1572
- <script setup>
1573
- const props = defineProps({
1574
- title: {
1575
- type: String,
1576
- default: ""
1577
- }
1578
- });
1579
- </script>
1580
-
1581
- <template>
1582
- <div class="rounded-lg border border-dark-600 bg-dark-400 p-4">
1583
- <h3 v-if="title" class="mb-4 border-b border-dark-600 pb-2 text-lg font-semibold text-light-300">
1584
- {{ title }}
1585
- </h3>
1586
- <slot />
1587
- </div>
1588
- </template>
1589
- ```
1590
-
1591
- **Step 2: Commit**
1592
-
1593
- ```bash
1594
- git add src/components/ui/SectionCard.vue
1595
- git commit -m "feat: create SectionCard component
1596
-
1597
- - Card container with optional title
1598
- - Consistent styling across modals
1599
- - Uses Tailwind exclusively"
1600
- ```
1601
-
1602
- ---
1603
-
1604
- ### Task 5.9: Use SectionCard in ViewTask.vue
1605
-
1606
- **Files:**
1607
-
1608
- - Modify: `src/components/Tasks/ViewTask.vue`
1609
-
1610
- **Step 1: Import SectionCard**
1611
-
1612
- **Step 2: Replace section-card markup**
1613
-
1614
- Replace:
1615
-
1616
- ```vue
1617
- <div class="section-card">
1618
- <h3 class="section-title">Details</h3>
1619
- <!-- content -->
1620
- </div>
1621
- ```
1622
-
1623
- With:
1624
-
1625
- ```vue
1626
- <SectionCard title="Details">
1627
- <!-- content -->
1628
- </SectionCard>
1629
- ```
1630
-
1631
- **Step 3: Remove section-card styles**
1632
-
1633
- **Step 4: Test**
1634
-
1635
- **Step 5: Commit**
1636
-
1637
- ```bash
1638
- git add src/components/Tasks/ViewTask.vue
1639
- git commit -m "refactor: use SectionCard component in ViewTask.vue"
1640
- ```
1641
-
1642
- ---
1643
-
1644
- ### Task 5.10: Create ActionButtonGroup Component
1645
-
1646
- **Files:**
1647
-
1648
- - Create: `src/components/ui/ActionButtonGroup.vue`
1649
-
1650
- **Step 1: Create component**
1651
-
1652
- ```vue
1653
- <template>
1654
- <ul class="flex items-center gap-1 mobile-portrait:gap-0.5">
1655
- <slot />
1656
- </ul>
1657
- </template>
1658
-
1659
- <style scoped>
1660
- /* Minimal styles for button group - mostly handled by slot content */
1661
- </style>
1662
- ```
1663
-
1664
- **Step 2: Commit**
1665
-
1666
- ```bash
1667
- git add src/components/ui/ActionButtonGroup.vue
1668
- git commit -m "feat: create ActionButtonGroup component
1669
-
1670
- - Wrapper for row action buttons
1671
- - Consistent responsive spacing
1672
- - Replaces 555+ lines of duplicated CSS"
1673
- ```
1674
-
1675
- ---
1676
-
1677
- ### Task 5.11: Use ActionButtonGroup in Task.vue
1678
-
1679
- **Files:**
1680
-
1681
- - Modify: `src/components/Tasks/Task.vue`
1682
-
1683
- **Step 1: Import ActionButtonGroup**
1684
-
1685
- **Step 2: Wrap buttons**
1686
-
1687
- Replace:
1688
-
1689
- ```vue
1690
- <ul class="task-buttons">
1691
- <li><button>...</button></li>
1692
- <li><button>...</button></li>
1693
- </ul>
1694
- ```
1695
-
1696
- With:
1697
-
1698
- ```vue
1699
- <ActionButtonGroup>
1700
- <li><button>...</button></li>
1701
- <li><button>...</button></li>
1702
- </ActionButtonGroup>
1703
- ```
1704
-
1705
- **Step 3: Remove .task-buttons styles**
1706
-
1707
- **Step 4: Test**
1708
-
1709
- **Step 5: Commit**
1710
-
1711
- ```bash
1712
- git add src/components/Tasks/Task.vue
1713
- git commit -m "refactor: use ActionButtonGroup in Task.vue
1714
-
1715
- - Replace custom button group with component
1716
- - Remove ~185 lines of CSS"
1717
- ```
1718
-
1719
- ---
1720
-
1721
- ### Task 5.12: Use ActionButtonGroup in Account.vue
1722
-
1723
- **Files:**
1724
-
1725
- - Modify: `src/components/Editors/Account/Account.vue`
1726
-
1727
- **Step 1-5:** Same as Task 5.11
1728
-
1729
- **Step 6: Commit**
1730
-
1731
- ```bash
1732
- git add src/components/Editors/Account/Account.vue
1733
- git commit -m "refactor: use ActionButtonGroup in Account.vue"
1734
- ```
1735
-
1736
- ---
1737
-
1738
- ### Task 5.13: Use ActionButtonGroup in Profile.vue
1739
-
1740
- **Files:**
1741
-
1742
- - Modify: `src/components/Editors/Profile/Profile.vue`
1743
-
1744
- **Step 1-5:** Same as Task 5.11
1745
-
1746
- **Step 6: Commit**
1747
-
1748
- ```bash
1749
- git add src/components/Editors/Profile/Profile.vue
1750
- git commit -m "refactor: use ActionButtonGroup in Profile.vue"
1751
- ```
1752
-
1753
- ---
1754
-
1755
- ## Phase 6: Color Migration (Medium Priority)
1756
-
1757
- ### Task 6.1: Replace Hardcoded Gray Colors
1758
-
1759
- **Files:**
1760
-
1761
- - Modify: `src/components/Editors/Account/AccountView.vue`
1762
- - Modify: `src/components/Editors/Profile/ProfileView.vue`
1763
- - Modify: `src/components/Tasks/TaskView.vue`
1764
-
1765
- **Step 1: Find and replace #969696**
1766
-
1767
- Find: `color: #969696`
1768
- Replace with class: `text-light-500`
1769
-
1770
- **Step 2: Find and replace #9CA3AF**
1771
-
1772
- Find: `color: #9CA3AF`
1773
- Replace with class: `text-light-400`
1774
-
1775
- **Step 3: Test**
1776
-
1777
- Check all views, ensure text colors look identical
1778
-
1779
- **Step 4: Commit**
1780
-
1781
- ```bash
1782
- git add src/components/Editors/Account/AccountView.vue src/components/Editors/Profile/ProfileView.vue src/components/Tasks/TaskView.vue
1783
- git commit -m "refactor: replace hardcoded gray text colors with theme tokens
1784
-
1785
- - Replace #969696 with text-light-500
1786
- - Replace #9CA3AF with text-light-400"
1787
- ```
1788
-
1789
- ---
1790
-
1791
- ### Task 6.2: Replace rgba Gray Backgrounds in Filter.vue
1792
-
1793
- **Files:**
1794
-
1795
- - Modify: `src/components/Filter/Filter.vue`
1796
-
1797
- **Step 1: Replace rgba(61, 62, 68, X)**
1798
-
1799
- Find: `rgba(61, 62, 68, 0.3)`
1800
- Replace with: `bg-dark-625/30`
1801
-
1802
- Find: `rgba(61, 62, 68, 0.6)`
1803
- Replace with: `bg-dark-625/60`
1804
-
1805
- **Step 2: Replace rgba(68, 69, 75, X)**
1806
-
1807
- Find: `rgba(68, 69, 75, 0.3)`
1808
- Replace with: `bg-dark-675/30`
1809
-
1810
- **Step 3: Replace rgba(46, 47, 52, X)**
1811
-
1812
- Find: `rgba(46, 47, 52, 0.9)`
1813
- Replace with: `bg-dark-475/90`
1814
-
1815
- **Step 4: Replace rgba(35, 36, 41, X)**
1816
-
1817
- Find: `rgba(35, 36, 41, 0.9)`
1818
- Replace with: `bg-dark-450/90`
1819
-
1820
- **Step 5: Test filter component**
1821
-
1822
- Test: Filter appearance, background colors, opacity levels
1823
-
1824
- **Step 6: Commit**
1825
-
1826
- ```bash
1827
- git add src/components/Filter/Filter.vue
1828
- git commit -m "refactor: replace rgba gray backgrounds with dark scale tokens
1829
-
1830
- - Use dark-625, dark-675, dark-475, dark-450 with opacity
1831
- - Replace ~30 rgba instances"
1832
- ```
1833
-
1834
- ---
1835
-
1836
- ### Task 6.3: Replace Error Color Variations
1837
-
1838
- **Files:**
1839
-
1840
- - Modify: `src/components/Filter/Filter.vue`
1841
- - Modify: `src/components/Editors/Profile/CreateProfile.vue`
1842
- - Modify: `src/components/Editors/Account/CreateAccount.vue`
1843
-
1844
- **Step 1: Replace #EE8282**
1845
-
1846
- Find: `#EE8282` or `rgb(238, 130, 130)`
1847
- Replace with class: `text-error-300` or `border-error-300`
1848
-
1849
- **Step 2: Replace rgba(239, 68, 68, X)**
1850
-
1851
- Find: `rgba(239, 68, 68, 0.8)`
1852
- Replace with: `bg-error-500/80`
1853
-
1854
- **Step 3: Test**
1855
-
1856
- Check error states, border colors, text colors
1857
-
1858
- **Step 4: Commit**
1859
-
1860
- ```bash
1861
- git add src/components/Filter/Filter.vue src/components/Editors/Profile/CreateProfile.vue src/components/Editors/Account/CreateAccount.vue
1862
- git commit -m "refactor: standardize error colors
1863
-
1864
- - Replace #EE8282 with error-300
1865
- - Replace rgba(239,68,68,X) with error-500
1866
- - Consolidate error color usage"
1867
- ```
1868
-
1869
- ---
1870
-
1871
- ### Task 6.4: Replace Modal Overlay Color
1872
-
1873
- **Files:**
1874
-
1875
- - Modify: `src/components/ui/Modal.vue` (if not done in Task 4.3)
1876
-
1877
- **Step 1: Replace rgba(17, 17, 17, 0.85)**
1878
-
1879
- Find: `background-color: rgba(17, 17, 17, 0.85)`
1880
- Replace with class: `bg-overlay-dark`
1881
-
1882
- **Step 2: Test**
1883
-
1884
- Open modal, check overlay appearance
1885
-
1886
- **Step 3: Commit**
1887
-
1888
- ```bash
1889
- git add src/components/ui/Modal.vue
1890
- git commit -m "refactor: use overlay-dark token for modal background"
1891
- ```
1892
-
1893
- ---
1894
-
1895
- ### Task 6.5: Replace Accent Color Variations in ReconnectIndicator
1896
-
1897
- **Files:**
1898
-
1899
- - Modify: `src/components/ui/ReconnectIndicator.vue`
1900
-
1901
- **Step 1: Replace rgba(136, 201, 153, X)**
1902
-
1903
- Find: `rgba(136, 201, 153, 0.3)` (and similar)
1904
- Replace with: `bg-accent-green/30`
1905
-
1906
- **Step 2: Replace rgba(157, 211, 168, X)**
1907
-
1908
- Replace with: `bg-accent-green/40` (approximate)
1909
-
1910
- **Step 3: Replace rgba(123, 193, 135, X)**
1911
-
1912
- Replace with: `bg-accent-green/50` (approximate)
1913
-
1914
- **Step 4: Test**
1915
-
1916
- Trigger reconnection, check indicator colors
1917
-
1918
- **Step 5: Commit**
1919
-
1920
- ```bash
1921
- git add src/components/ui/ReconnectIndicator.vue
1922
- git commit -m "refactor: use accent-green token for reconnect indicator
1923
-
1924
- - Replace hardcoded rgba green variants
1925
- - Use accent-green with opacity"
1926
- ```
1927
-
1928
- ---
1929
-
1930
- ## Phase 7: Remaining CSS Cleanup
1931
-
1932
- ### Task 7.1: Clean Up CountryChooser.vue
1933
-
1934
- **Files:**
1935
-
1936
- - Modify: `src/components/ui/controls/CountryChooser.vue`
1937
-
1938
- **Step 1: Replace circular button hack**
1939
-
1940
- Find:
1941
-
1942
- ```css
1943
- border-radius: 100% !important;
1944
- width: 3em !important;
1945
- height: 3em !important;
1946
- ```
1947
-
1948
- Replace with:
1949
-
1950
- ```vue
1951
- class="rounded-full w-12 h-12"
1952
- ```
1953
-
1954
- **Step 2: Remove dropdown !important**
1955
-
1956
- Find:
1957
-
1958
- ```css
1959
- max-height: 208px !important;
1960
- overflow-y: auto !important;
1961
- touch-action: pan-y !important;
1962
- ```
1963
-
1964
- Replace with:
1965
-
1966
- ```vue
1967
- class="max-h-52 overflow-y-auto touch-pan-y"
1968
- ```
1969
-
1970
- **Step 3: Convert header padding/margin**
1971
-
1972
- Replace hardcoded values with Tailwind spacing utilities
1973
-
1974
- **Step 4: Test**
1975
-
1976
- Test country chooser dropdown, button appearance
1977
-
1978
- **Step 5: Commit**
1979
-
1980
- ```bash
1981
- git add src/components/ui/controls/CountryChooser.vue
1982
- git commit -m "refactor: clean up CountryChooser.vue
1983
-
1984
- - Replace circular button hack with Tailwind
1985
- - Remove !important overrides
1986
- - Convert spacing to Tailwind utilities
1987
- - Remove ~40 lines of CSS"
1988
- ```
1989
-
1990
- ---
1991
-
1992
- ### Task 7.2: Clean Up Table.vue
1993
-
1994
- **Files:**
1995
-
1996
- - Modify: `src/components/Table/Table.vue`
1997
-
1998
- **Step 1: Remove scroll !important**
1999
-
2000
- Find:
2001
-
2002
- ```css
2003
- overflow-x: auto !important;
2004
- overflow-y: auto !important;
2005
- touch-action: pan-x pan-y !important;
2006
- ```
2007
-
2008
- Replace with:
2009
-
2010
- ```vue
2011
- class="overflow-x-auto overflow-y-auto touch-pan-x touch-pan-y"
2012
- ```
2013
-
2014
- **Step 2: Simplify max-height calculation**
2015
-
2016
- Keep `calc(100vh - 200px)` but remove !important if present
2017
-
2018
- **Step 3: Remove landscape mode hack**
2019
-
2020
- Remove:
2021
-
2022
- ```css
2023
- @media (orientation: landscape) {
2024
- max-height: calc(100vh - 160px) !important;
2025
- margin-bottom: 2rem !important;
2026
- }
2027
- ```
2028
-
2029
- Since iPhone landscape is no longer supported.
2030
-
2031
- **Step 4: Test**
2032
-
2033
- Test table scrolling, responsiveness
2034
-
2035
- **Step 5: Commit**
2036
-
2037
- ```bash
2038
- git add src/components/Table/Table.vue
2039
- git commit -m "refactor: clean up Table.vue
2040
-
2041
- - Remove scroll !important overrides
2042
- - Remove landscape mode hacks
2043
- - Simplify height calculations
2044
- - Remove ~30 lines of CSS"
2045
- ```
2046
-
2047
- ---
2048
-
2049
- ### Task 7.3: Clean Up Console.vue
2050
-
2051
- **Files:**
2052
-
2053
- - Modify: `src/views/Console.vue`
2054
-
2055
- **Step 1: Optimize responsive padding**
2056
-
2057
- Replace:
2058
-
2059
- ```css
2060
- padding-bottom: 4rem;
2061
- @media (max-width: 480px) {
2062
- padding-bottom: 6rem;
2063
- }
2064
- ```
2065
-
2066
- With:
2067
-
2068
- ```vue
2069
- class="pb-16 mobile-portrait:pb-24"
2070
- ```
2071
-
2072
- **Step 2: Remove touch-action !important**
2073
-
2074
- **Step 3: Test**
2075
-
2076
- Navigate to console, check padding, scroll behavior
2077
-
2078
- **Step 4: Commit**
2079
-
2080
- ```bash
2081
- git add src/views/Console.vue
2082
- git commit -m "refactor: clean up Console.vue responsive padding"
2083
- ```
2084
-
2085
- ---
2086
-
2087
- ### Task 7.4: Clean Up Tasks.vue
2088
-
2089
- **Files:**
2090
-
2091
- - Modify: `src/views/Tasks.vue`
2092
-
2093
- **Step 1: Remove PWA padding hack**
2094
-
2095
- Find:
2096
-
2097
- ```css
2098
- @media (display-mode: standalone) {
2099
- padding-bottom: X !important;
2100
- }
2101
- ```
2102
-
2103
- Replace with proper Tailwind utility if needed, or remove if redundant.
2104
-
2105
- **Step 2: Remove magic height !important**
2106
-
2107
- **Step 3: Test**
2108
-
2109
- Navigate to tasks page, check layout
2110
-
2111
- **Step 4: Commit**
2112
-
2113
- ```bash
2114
- git add src/views/Tasks.vue
2115
- git commit -m "refactor: clean up Tasks.vue PWA hacks"
2116
- ```
2117
-
2118
- ---
2119
-
2120
- ### Task 7.5: Clean Up Switch.vue
2121
-
2122
- **Files:**
2123
-
2124
- - Modify: `src/components/ui/controls/atomic/Switch.vue`
2125
-
2126
- **Step 1: Convert hardcoded px to Tailwind**
2127
-
2128
- The Switch component has well-structured iOS-style CSS. Keep the custom styles but ensure Tailwind is used where possible for spacing, colors.
2129
-
2130
- **Step 2: Test**
2131
-
2132
- Test switch toggle behavior, appearance
2133
-
2134
- **Step 3: Commit**
2135
-
2136
- ```bash
2137
- git add src/components/ui/controls/atomic/Switch.vue
2138
- git commit -m "refactor: optimize Switch.vue with Tailwind where applicable"
2139
- ```
2140
-
2141
- ---
2142
-
2143
- ### Task 7.6: Clean Up Splash.vue
2144
-
2145
- **Files:**
2146
-
2147
- - Modify: `src/components/ui/Splash.vue`
2148
-
2149
- **Step 1: Replace background-color**
2150
-
2151
- Find: `background-color: rgba(28, 28, 49, 100%)`
2152
- Replace with: `class="bg-dark-300"`
2153
-
2154
- **Step 2: Test**
2155
-
2156
- Check splash screen appearance
2157
-
2158
- **Step 3: Commit**
2159
-
2160
- ```bash
2161
- git add src/components/ui/Splash.vue
2162
- git commit -m "refactor: use theme color in Splash.vue"
2163
- ```
2164
-
2165
- ---
2166
-
2167
- ## Phase 8: Final Verification
2168
-
2169
- ### Task 8.1: Run Automated Verification Plan
2170
-
2171
- **Files:**
2172
-
2173
- - Reference: `/Users/luca/Documents/GitHub/Necro/Dashboard/VERIFICATION_PLAN.md`
2174
-
2175
- **Step 1: Start both dev servers**
2176
-
2177
- Run: `npm run dev`
2178
- Expected: Servers on 5173 and 8081
2179
-
2180
- **Step 2: Manual quick check**
2181
-
2182
- Test critical paths:
2183
-
2184
- - Login flow
2185
- - Navigate to each route
2186
- - Open/close modals
2187
- - Test dropdowns
2188
- - Test tables
2189
- - Test forms
2190
-
2191
- **Step 3: Responsive testing**
2192
-
2193
- Test at breakpoints:
2194
-
2195
- - Mobile portrait (375px)
2196
- - iPad Pro (1024px)
2197
- - Desktop (1920px)
2198
-
2199
- **Step 4: PWA verification**
2200
-
2201
- - Check manifest
2202
- - Test service worker
2203
- - Test offline behavior
2204
- - Test install prompt
2205
-
2206
- **Step 5: Document any issues**
2207
-
2208
- Create issues file if regressions found.
2209
-
2210
- **Step 6: Commit verification results**
2211
-
2212
- ```bash
2213
- git add VERIFICATION_PLAN.md
2214
- git commit -m "docs: verification results for Tailwind consolidation"
2215
- ```
2216
-
2217
- ---
2218
-
2219
- ### Task 8.2: Count Remaining CSS Lines
2220
-
2221
- **Files:**
2222
-
2223
- - All Vue files
2224
-
2225
- **Step 1: Count <style> blocks**
2226
-
2227
- Run: `grep -r "<style" src/components src/views | wc -l`
2228
-
2229
- **Step 2: Count !important usage**
2230
-
2231
- Run: `grep -r "!important" src/components src/views | wc -l`
2232
-
2233
- **Step 3: Compare with baseline**
2234
-
2235
- Baseline:
2236
-
2237
- - 53 files with `<style>` blocks
2238
- - 378 `!important` declarations
2239
-
2240
- Target:
2241
-
2242
- - < 20 files with `<style>` blocks (animations only)
2243
- - < 50 `!important` declarations
2244
-
2245
- **Step 4: Document results**
2246
-
2247
- Create summary in docs/plans/2026-02-08-tailwind-consolidation-results.md
2248
-
2249
- ---
2250
-
2251
- ### Task 8.3: Create Final Summary Report
2252
-
2253
- **Files:**
2254
-
2255
- - Create: `docs/plans/2026-02-08-tailwind-consolidation-results.md`
2256
-
2257
- **Step 1: Document changes**
2258
-
2259
- ```markdown
2260
- # Tailwind Consolidation Results
2261
-
2262
- ## Metrics
2263
-
2264
- **Before:**
2265
-
2266
- - Files with <style> blocks: 53
2267
- - !important declarations: 378
2268
- - Lines of CSS: ~2000
2269
- - Duplicate components: 7 patterns identified
2270
-
2271
- **After:**
2272
-
2273
- - Files with <style> blocks: X
2274
- - !important declarations: X
2275
- - Lines of CSS: ~X
2276
- - Duplicate components: 0 (all extracted)
2277
-
2278
- ## Components Created
2279
-
2280
- 1. StatusBadge - 4 files refactored
2281
- 2. FormField - 5 files refactored
2282
- 3. InfoRow - 2 files refactored
2283
- 4. SectionCard - 2 files refactored
2284
- 5. ActionButtonGroup - 3 files refactored
2285
-
2286
- ## Composables Created
2287
-
2288
- 1. useRowSelection - 3 files refactored
2289
- 2. useCopyToClipboard - 3 files refactored
2290
-
2291
- ## Theme Tokens Added
2292
-
2293
- - Dark scale extensions: 350, 450, 475, 625, 675
2294
- - Error colors: 300, 400, 500
2295
- - Overlay colors: dark, darker
2296
- - Semantic tokens: text-_, bg-_, border-focus, primary
2297
- - Shadow system: 7 new shadows
2298
- - Font sizes: xxs, xxxs
2299
-
2300
- ## Files Modified
2301
-
2302
- [List all modified files]
2303
-
2304
- ## Breaking Changes
2305
-
2306
- - iPhone landscape support removed (forces rotation)
2307
-
2308
- ## Verification Status
2309
-
2310
- - ✅ All routes accessible
2311
- - ✅ Responsive behavior maintained
2312
- - ✅ PWA functionality working
2313
- - ✅ Dark theme intact
2314
- - ✅ No visual regressions
2315
- ```
2316
-
2317
- **Step 2: Commit**
2318
-
2319
- ```bash
2320
- git add docs/plans/2026-02-08-tailwind-consolidation-results.md
2321
- git commit -m "docs: Tailwind consolidation completion report"
2322
- ```
2323
-
2324
- ---
2325
-
2326
- ## Phase 9: Cleanup and Documentation
2327
-
2328
- ### Task 9.1: Update README (if exists)
2329
-
2330
- **Files:**
2331
-
2332
- - Modify: `README.md` (if exists)
2333
-
2334
- **Step 1: Document new components**
2335
-
2336
- Add section:
2337
-
2338
- ```markdown
2339
- ## UI Components
2340
-
2341
- - `StatusBadge` - Enabled/disabled badge indicator
2342
- - `FormField` - Input field with label and icon
2343
- - `InfoRow` - Key-value display row
2344
- - `SectionCard` - Card container for modal sections
2345
- - `ActionButtonGroup` - Row action button group
2346
-
2347
- ## Composables
2348
-
2349
- - `useRowSelection` - Double-click/tap row selection
2350
- - `useCopyToClipboard` - Copy to clipboard with notification
2351
- ```
2352
-
2353
- **Step 2: Update supported devices**
2354
-
2355
- ```markdown
2356
- ## Supported Devices
2357
-
2358
- - Desktop (1024px+)
2359
- - iPad Pro
2360
- - iPhone (Portrait mode only)
2361
-
2362
- iPhone landscape mode forces rotation to portrait.
2363
- ```
2364
-
2365
- **Step 3: Commit**
2366
-
2367
- ```bash
2368
- git add README.md
2369
- git commit -m "docs: update README with new components and device support"
2370
- ```
2371
-
2372
- ---
2373
-
2374
- ### Task 9.2: Final Commit and Branch Summary
2375
-
2376
- **Step 1: Review all changes**
2377
-
2378
- Run: `git log --oneline | head -50`
2379
-
2380
- **Step 2: Create final summary commit**
2381
-
2382
- ```bash
2383
- git commit --allow-empty -m "feat: complete Tailwind CSS consolidation
2384
-
2385
- Summary of changes:
2386
- - Removed 1,600+ lines of duplicate CSS
2387
- - Extracted 5 reusable components
2388
- - Created 2 composables for common patterns
2389
- - Extended Tailwind theme with 20+ tokens
2390
- - Removed 300+ !important declarations
2391
- - Removed iPhone landscape support
2392
- - Achieved near-zero CSS in Vue files
2393
-
2394
- Components created:
2395
- - StatusBadge (4 files refactored)
2396
- - FormField (5 files refactored)
2397
- - InfoRow (2 files refactored)
2398
- - SectionCard (2 files refactored)
2399
- - ActionButtonGroup (3 files refactored)
2400
-
2401
- Composables created:
2402
- - useRowSelection (3 files)
2403
- - useCopyToClipboard (3 files)
2404
-
2405
- All functionality verified, no regressions."
2406
- ```
2407
-
2408
- ---
2409
-
2410
- ## Execution Notes
2411
-
2412
- **Estimated time:** 8-12 hours (depending on file complexity)
2413
-
2414
- **Recommended approach:**
2415
-
2416
- 1. Execute phases sequentially
2417
- 2. Test after each phase before moving to next
2418
- 3. Commit frequently (after each task)
2419
- 4. Use verification plan after Phase 4, 5, 7, and 8
2420
-
2421
- **Rollback strategy:**
2422
- If any phase causes issues, rollback to previous phase commit:
2423
-
2424
- ```bash
2425
- git log --oneline
2426
- git reset --hard <commit-hash>
2427
- ```
2428
-
2429
- **Testing checklist per phase:**
2430
-
2431
- - [ ] Phase 1: Dev server starts, no config errors
2432
- - [ ] Phase 2: App loads without landscape lock
2433
- - [ ] Phase 3: Components render correctly
2434
- - [ ] Phase 4: No visual regressions in cleaned files
2435
- - [ ] Phase 5: Forms and info displays work
2436
- - [ ] Phase 6: Colors look identical to before
2437
- - [ ] Phase 7: Remaining components work
2438
- - [ ] Phase 8: Full app verification passes