✨ Blur keys by default
This commit is contained in:
@ -1,6 +1,11 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { EditIcon } from "lucide-vue-next";
|
import { EditIcon } from "lucide-vue-next";
|
||||||
import { TrashIcon, AlertCircleIcon } from "lucide-vue-next";
|
import {
|
||||||
|
TrashIcon,
|
||||||
|
AlertCircleIcon,
|
||||||
|
EyeIcon,
|
||||||
|
EyeOffIcon,
|
||||||
|
} from "lucide-vue-next";
|
||||||
import { ref, watch } from "vue";
|
import { ref, watch } from "vue";
|
||||||
|
|
||||||
const deleteConfirm = ref(false);
|
const deleteConfirm = ref(false);
|
||||||
@ -10,14 +15,22 @@ watch(deleteConfirm, (value) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
defineProps(["keyData", "edit"]);
|
const props = defineProps(["keyData", "edit"]);
|
||||||
defineEmits(["delete", "edit"]);
|
defineEmits(["delete", "edit"]);
|
||||||
|
|
||||||
|
const blurKey = ref(!props.edit);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<p class="key">{{ keyData.key }}</p>
|
<div class="key-container">
|
||||||
|
<p class="key" :class="blurKey ? 'blur' : ''">{{ keyData.key }}</p>
|
||||||
|
<div @click="blurKey = !blurKey" class="icons">
|
||||||
|
<EyeIcon v-if="blurKey" :size="18" />
|
||||||
|
<EyeOffIcon v-else :size="18" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<p class="notes" v-if="edit">{{ keyData.notes }}</p>
|
<p class="notes" v-if="edit">{{ keyData.notes }}</p>
|
||||||
<div class="permissions">
|
<div class="permissions">
|
||||||
<div
|
<div
|
||||||
@ -46,10 +59,23 @@ defineEmits(["delete", "edit"]);
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.key-container {
|
||||||
|
padding: 15px 10px 0px 10px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.key {
|
.key {
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
padding: 15px 10px 0px 10px;
|
transition: 0.3s filter;
|
||||||
|
}
|
||||||
|
|
||||||
|
.key.blur {
|
||||||
|
filter: blur(8px);
|
||||||
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notes {
|
.notes {
|
||||||
@ -78,4 +104,11 @@ defineEmits(["delete", "edit"]);
|
|||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icons {
|
||||||
|
cursor: pointer;
|
||||||
|
opacity: 0.6;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Reference in New Issue
Block a user