feature: more fixes to make it amazing
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
@@ -14,27 +12,17 @@ const props = defineProps({
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
titleColor: {
|
||||
type: String,
|
||||
default: 'text-white'
|
||||
},
|
||||
batteryLevel: {
|
||||
type: Number,
|
||||
default: 80
|
||||
}
|
||||
})
|
||||
|
||||
const currentTime = ref(new Date().toLocaleTimeString('en-US', { hour12: false, hour: '2-digit', minute: '2-digit' }))
|
||||
|
||||
setInterval(() => {
|
||||
currentTime.value = new Date().toLocaleTimeString('en-US', { hour12: false, hour: '2-digit', minute: '2-digit' })
|
||||
}, 1000)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<header class="h-12 border-b border-zinc-800 flex items-center justify-between px-4 bg-zinc-900/90 backdrop-blur z-20 shrink-0 select-none">
|
||||
<div class="flex items-center gap-2">
|
||||
<h1 class="font-bold text-sm uppercase tracking-tight" :class="titleColor">{{ title }}</h1>
|
||||
<h1 class="font-bold text-sm uppercase tracking-tight text-white">{{ title }}</h1>
|
||||
|
||||
<!-- Badge - can be string or array -->
|
||||
<template v-if="badge">
|
||||
@@ -68,9 +56,6 @@ setInterval(() => {
|
||||
<div class="absolute -right-0.75 top-1/2 -translate-y-1/2 w-0.5 h-1.5 bg-zinc-600 rounded-r-[1px]"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Time -->
|
||||
<span class="font-mono text-[10px] text-zinc-500">{{ currentTime }}</span>
|
||||
</div>
|
||||
</header>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user