Skip to content

Commit 403591d

Browse files
committed
feat: refactoring
1 parent af8ae27 commit 403591d

File tree

9 files changed

+25
-185
lines changed

9 files changed

+25
-185
lines changed

ui/package-lock.json

Lines changed: 9 additions & 81 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
},
1818
"dependencies": {
1919
"@iconify/vue": "^5.0.0",
20-
"pinia": "^3.0.3",
2120
"vue": "^3.5.18",
2221
"vue-router": "^4.5.1"
2322
},
@@ -35,13 +34,11 @@
3534
"eslint": "^9.31.0",
3635
"eslint-plugin-vue": "~10.3.0",
3736
"jiti": "^2.4.2",
38-
"moment": "^2.30.1",
3937
"npm-run-all2": "^8.0.4",
4038
"postcss": "^8.5.6",
4139
"prettier": "3.6.2",
4240
"tailwindcss": "^3.4.17",
4341
"typescript": "~5.8.0",
44-
"uuid": "^11.1.0",
4542
"vite": "^7.0.6",
4643
"vite-plugin-vue-devtools": "^8.0.0",
4744
"vue-tsc": "^3.0.4"

ui/src/assets/base.css

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,24 @@
1-
/* color palette from <https://github.com/vuejs/theme> */
1+
/* Simplified light-only theme */
22
:root {
33
--vt-c-white: #ffffff;
44
--vt-c-white-soft: #f8f8f8;
55
--vt-c-white-mute: #f2f2f2;
6-
7-
--vt-c-black: #181818;
8-
--vt-c-black-soft: #222222;
9-
--vt-c-black-mute: #282828;
10-
116
--vt-c-indigo: #2c3e50;
12-
137
--vt-c-divider-light-1: rgba(60, 60, 60, 0.29);
148
--vt-c-divider-light-2: rgba(60, 60, 60, 0.12);
15-
--vt-c-divider-dark-1: rgba(84, 84, 84, 0.65);
16-
--vt-c-divider-dark-2: rgba(84, 84, 84, 0.48);
17-
189
--vt-c-text-light-1: var(--vt-c-indigo);
1910
--vt-c-text-light-2: rgba(60, 60, 60, 0.66);
20-
--vt-c-text-dark-1: var(--vt-c-white);
21-
--vt-c-text-dark-2: rgba(235, 235, 235, 0.64);
2211
}
2312

2413
/* semantic color variables for this project */
2514
:root {
2615
--color-background: var(--vt-c-white);
2716
--color-background-soft: var(--vt-c-white-soft);
2817
--color-background-mute: var(--vt-c-white-mute);
29-
3018
--color-border: var(--vt-c-divider-light-2);
3119
--color-border-hover: var(--vt-c-divider-light-1);
32-
3320
--color-heading: var(--vt-c-text-light-1);
3421
--color-text: var(--vt-c-text-light-1);
35-
3622
--section-gap: 160px;
3723
}
3824

@@ -48,9 +34,6 @@ body {
4834
min-height: 100vh;
4935
color: var(--color-text);
5036
background: var(--color-background);
51-
transition:
52-
color 0.5s,
53-
background-color 0.5s;
5437
line-height: 1.6;
5538
font-family:
5639
Inter,

ui/src/assets/main.css

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -18,85 +18,21 @@ table {
1818
.h2 {
1919
@apply text-gray-900;
2020
}
21-
.h3 {
22-
@apply text-gray-900;
23-
}
24-
.h4 {
25-
@apply text-gray-900;
26-
}
2721
}
2822

2923
@layer components {
30-
.display {
31-
@apply text-[80px] font-semibold leading-[88px] tracking-[-2%];
32-
}
3324
.h1 {
3425
@apply text-[56px] font-semibold leading-[64px] tracking-[0%];
3526
}
3627
.h2 {
3728
@apply text-[40px] font-semibold leading-[48px] tracking-[0%];
3829
}
39-
.h3 {
40-
@apply text-[38px] font-semibold leading-[48px] tracking-[-0.75%];
41-
}
42-
.h4 {
43-
@apply text-[32px] font-semibold leading-[40px] tracking-[-0.2%];
44-
}
45-
.h5 {
46-
@apply text-[16px] font-bold uppercase leading-[20px] tracking-[5%];
47-
}
48-
.h6 {
49-
@apply text-[14px] font-semibold uppercase leading-[16px] tracking-[5%];
50-
}
51-
.body-xl {
52-
@apply text-[24px] font-normal leading-[36px] tracking-[0%];
53-
}
54-
.body-l {
55-
@apply text-[20px] font-normal leading-[32px] tracking-[-0.1%];
56-
}
57-
.body-l-medium {
58-
@apply text-[20px] font-medium leading-[32px] tracking-[-0.1%];
59-
}
60-
.body-l-semibold {
61-
@apply text-[20px] font-semibold leading-[32px] tracking-[-0.1%];
62-
}
63-
.body {
64-
@apply text-[16px] font-normal leading-[24px] tracking-[0%];
65-
}
66-
.body-medium {
67-
@apply text-[16px] font-medium leading-[24px] tracking-[0%];
68-
}
69-
.body-semibold {
70-
@apply text-[16px] font-semibold leading-[24px] tracking-[0%];
71-
}
72-
.caption {
73-
@apply text-[14px] font-normal leading-[20px] tracking-[0%];
74-
}
75-
.caption-medium {
76-
@apply text-[14px] font-medium leading-[20px] tracking-[0%];
77-
}
78-
.caption-semibold {
79-
@apply text-[14px] font-semibold leading-[20px] tracking-[0%];
80-
}
81-
.caption-s {
82-
@apply text-[12px] font-normal leading-[16px] tracking-[0%];
83-
}
84-
.caption-s-medium {
85-
@apply text-[12px] font-medium leading-[16px] tracking-[0%];
86-
}
87-
.caption-s-semibold {
88-
@apply text-[12px] font-semibold leading-[16px] tracking-[0%];
89-
}
9030

9131
/* Survey specific styles */
9232
.background {
9333
@apply absolute inset-0 -z-50;
9434
}
9535

96-
.spinner {
97-
@apply inline w-8 h-8 text-gray-600 animate-spin fill-blue-600;
98-
}
99-
10036
.background-screen {
10137
@apply flex h-screen flex-col items-center justify-center;
10238
}

ui/src/components/app/SurveyRow.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070

7171
<script setup lang="ts">
7272
import { ref, computed } from 'vue'
73-
import moment from 'moment'
7473
import { Icon } from '@iconify/vue'
7574
import type { Survey } from '@/lib/types'
7675
import { SurveyDeliveryStatus, SurveyParseStatus } from '@/lib/types'
@@ -90,7 +89,12 @@ const isLaunched = computed(() => props.survey.delivery_status === SurveyDeliver
9089
const canStartSurvey = computed(() => props.survey.parse_status === SurveyParseStatus.Success && !isLaunched.value)
9190
9291
function formatDate(dateString: string): string {
93-
return moment(dateString).format('MMM D, YYYY')
92+
const date = new Date(dateString)
93+
return date.toLocaleDateString('en-US', {
94+
month: 'short',
95+
day: 'numeric',
96+
year: 'numeric'
97+
})
9498
}
9599
96100
function getParseStatusColor(status: string): string {

ui/src/components/app/survey/SurveyQuestions.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ async function submitAnswer() {
286286
errMessage.value = ''
287287
288288
// Convert answer value based on question type
289-
let processedValue = answerValue.value
289+
let processedValue: string | string[] | number | boolean = answerValue.value
290290
if (currentQuestion.value.type === SurveyQuestionType.Rating) {
291291
processedValue = Number(answerValue.value)
292292
} else if (currentQuestion.value.type === SurveyQuestionType.YesNo) {

0 commit comments

Comments
 (0)