More consistent shared styling between credential and session cards.

This commit is contained in:
Leo Vasanko
2025-10-04 08:32:27 -06:00
parent 591ea626bf
commit 79b6c50a9c
3 changed files with 24 additions and 21 deletions
@@ -83,13 +83,8 @@ const qrCanvas = ref(null)
const displayUrl = computed(() => url.value ? url.value.replace(/^[^:]+:\/\//,'') : '')
const expirationMessage = computed(() => {
if (!expires.value) return '⚠️ Expires soon and can only be used once.'
const timeStr = formatDate(expires.value)
if (timeStr.startsWith('In ')) {
return `⚠️ Expires ${timeStr.substring(3)} and can only be used once.`
} else {
return `⚠️ Expires ${timeStr} and can only be used once.`
}
return `⚠️ Expires ${timeStr.startsWith('In ') ? timeStr.substring(3) : timeStr} and can only be used once.`
})
async function fetchLink() {
+12 -3
View File
@@ -30,8 +30,11 @@
</div>
</div>
<div class="item-details">
<div class="session-details">Last used: {{ formatDate(session.last_renewed) }}</div>
<div class="session-meta-info">{{ session.user_agent }} {{ session.ip }}</div>
<div class="session-dates">
<span class="date-label">Last used:</span>
<span class="date-value">{{ formatDate(session.last_renewed) }}</span>
<span class="session-meta-info">{{ session.user_agent }} {{ session.ip }}</span>
</div>
</div>
</div>
</template>
@@ -61,4 +64,10 @@ const sessionHostLabel = (session) => {
if (!session || !session.host) return 'Unbound host'
return session.host
}
</script>
</script>
<style>
.session-meta-info {
grid-column: span 2;
}
</style>