Skip to content

Commit 4724dcf

Browse files
committed
format
1 parent a110526 commit 4724dcf

3 files changed

Lines changed: 13 additions & 16 deletions

File tree

frontend/src/modules/fields/components/FieldTypeBadge.vue

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import { cn } from '@/shared/utils/general' // your utility for class merging
55
import { computed, useAttrs } from 'vue'
66
77
interface Props {
8-
type: FieldType,
9-
monochrome?: boolean
8+
type: FieldType
9+
monochrome?: boolean
1010
}
1111
1212
const props = withDefaults(defineProps<Props>(), {
13-
monochrome: false
13+
monochrome: false,
1414
})
1515
1616
const attrs = useAttrs()
@@ -35,15 +35,13 @@ const colorClass = {
3535
3636
const baseClass = 'text-xs tracking-widest uppercase'
3737
38-
const color = computed(() => (props.monochrome ? 'bg-muted text-foreground' : colorClass[props.type]))
39-
40-
const finalClass = computed(() => cn(
41-
baseClass,
42-
color,
43-
color.value,
44-
attrs.class as string | undefined
45-
))
38+
const color = computed(() =>
39+
props.monochrome ? 'bg-muted text-foreground' : colorClass[props.type]
40+
)
4641
42+
const finalClass = computed(() =>
43+
cn(baseClass, color, color.value, attrs.class as string | undefined)
44+
)
4745
</script>
4846

4947
<template>

frontend/src/modules/switchboard/components/ResetPanel.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const { mutate: handleReset, isPending: isResetting } = useMutation({
3737
<Button variant="destructive" :disabled="isResetting" @click="handleReset"> Reset </Button>
3838
<div
3939
v-if="!isLoading"
40-
class="flex flex-wrap items-center gap-2 transition-opacity duration-300 text-muted-foreground text-xs font-mono"
40+
class="text-muted-foreground flex flex-wrap items-center gap-2 font-mono text-xs transition-opacity duration-300"
4141
>
4242
<Badge variant="outline" class="min-h-[1.5rem] min-w-[14ch] text-center">
4343
<Transition name="fade-slide" mode="out-in">
@@ -59,7 +59,7 @@ const { mutate: handleReset, isPending: isResetting } = useMutation({
5959
</div>
6060
<div
6161
v-if="isLoading"
62-
class="flex flex-wrap items-center gap-2 transition-opacity duration-300 text-muted-foreground text-xs font-mono"
62+
class="text-muted-foreground flex flex-wrap items-center gap-2 font-mono text-xs transition-opacity duration-300"
6363
>
6464
<Skeleton class="h-[1.5rem] w-[14ch] rounded-md" />
6565
<Skeleton class="h-[1.5rem] w-[14ch] rounded-md" />
@@ -68,4 +68,4 @@ const { mutate: handleReset, isPending: isResetting } = useMutation({
6868
</div>
6969
</template>
7070
</SwitchboardSection>
71-
</template>
71+
</template>

frontend/src/router/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ const router = createRouter({
1010
scrollBehavior(to, from, savedPosition) {
1111
if (savedPosition) {
1212
return savedPosition
13-
}
14-
else {
13+
} else {
1514
return { top: 0, behavior: 'smooth' }
1615
}
1716
},

0 commit comments

Comments
 (0)