UPD: UPPERCASE PROFILE NAMES

This commit is contained in:
Robert Kossessa
2024-05-19 16:52:48 +02:00
parent d773302317
commit 9d434905e5
3 changed files with 6 additions and 6 deletions

View File

@@ -13,7 +13,7 @@
:class="{ 'bg-zinc-300': selected }" :class="{ 'bg-zinc-300': selected }"
@submit.prevent=" @submit.prevent="
() => { () => {
$emit('rename', profile.name, nameInput) $emit('rename', profile.name, nameInput.toUpperCase())
editing = false editing = false
} }
" "
@@ -23,7 +23,7 @@
v-model="nameInput" v-model="nameInput"
onfocus="this.select()" onfocus="this.select()"
:placeholder="$t('profiles.name_placeholder')" :placeholder="$t('profiles.name_placeholder')"
class="h-full min-w-0 flex-1 rounded-lg bg-transparent pl-8 text-sm transition-all focus-visible:outline-none focus-visible:ring-0" class="h-full min-w-0 flex-1 rounded-lg bg-transparent pl-8 text-sm uppercase transition-all focus-visible:outline-none focus-visible:ring-0"
:class="{ :class="{
'bg-zinc-300 font-semibold text-black hover:bg-zinc-200': selected, 'bg-zinc-300 font-semibold text-black hover:bg-zinc-200': selected,
'text-muted-foreground hover:bg-zinc-800': !selected 'text-muted-foreground hover:bg-zinc-800': !selected
@@ -61,7 +61,7 @@
</span> </span>
<ScrambleText <ScrambleText
ref="profileTitle" ref="profileTitle"
class="transition-colors" class="uppercase transition-colors"
:class="{ 'text-black': selected, 'text-muted-foreground': !selected }" :class="{ 'text-black': selected, 'text-muted-foreground': !selected }"
:text="profile.name" :text="profile.name"
/> />
@@ -146,7 +146,7 @@ const props = defineProps({
type: Object, type: Object,
default: () => ({ default: () => ({
id: '1234', id: '1234',
name: 'Profile Name' name: 'PROFILE NAME'
}), }),
required: true required: true
}, },

View File

@@ -8,7 +8,7 @@
<ChevronRight <ChevronRight
class="mb-0.5 ml-4 inline-block size-4 shrink-0 transition-transform group-data-[state='open']:rotate-90" class="mb-0.5 ml-4 inline-block size-4 shrink-0 transition-transform group-data-[state='open']:rotate-90"
/> />
{{ categoryName ? categoryName : 'Uncategorized' {{ categoryName ? categoryName.toUpperCase() : 'UNCATEGORIZED'
}}<span class="font-heading text-sm text-zinc-600"> }}<span class="font-heading text-sm text-zinc-600">
({{ deviceStore.profilesByTag[categoryName].length || 0 }})</span ({{ deviceStore.profilesByTag[categoryName].length || 0 }})</span
> >

View File

@@ -45,5 +45,5 @@ const secondParts = [
export const randomName = () => { export const randomName = () => {
const first = firstParts[Math.floor(Math.random() * firstParts.length)] const first = firstParts[Math.floor(Math.random() * firstParts.length)]
const second = secondParts[Math.floor(Math.random() * secondParts.length)] const second = secondParts[Math.floor(Math.random() * secondParts.length)]
return `${first} ${second}` return `${first} ${second}`.toUpperCase()
} }