-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
126 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,27 @@ | ||
<script setup lang="ts"> | ||
// defineProps<{}>() | ||
const [isKeyMode, toggle] = useToggle(false) | ||
import InputKit from '@/components/widgets/InputKit.vue' | ||
const openKey = useLocalStorage('openKey', '') | ||
</script> | ||
|
||
<template> | ||
<header bg-white> | ||
<h3 animate-bounce> | ||
Logo | ||
<header class="bg-#ecf7fd dark:bg-#1f262a"> | ||
<h3 text-2xl> | ||
🤖️ <span class="text-gradient ">Polyglot</span> | ||
</h3> | ||
<div class="center-y py-2"> | ||
<i mr-2 rotate-115 i-ic:baseline-key /> | ||
<div v-if="isKeyMode" w-55> | ||
<input | ||
v-model="openKey" | ||
type="password" | ||
class="input" | ||
> | ||
<i icon-btn i-carbon-checkmark @click="toggle()" /> | ||
<i icon-btn i-carbon-close @click="toggle()" /> | ||
</div> | ||
<div | ||
v-else | ||
font-sans | ||
cursor-pointer | ||
w-55 @click="toggle()" | ||
> | ||
Key | ||
</div> | ||
<div class="center-y"> | ||
<InputKit v-model="openKey"> | ||
<template #mainText> | ||
Self Key | ||
</template> | ||
</InputKit> | ||
</div> | ||
</header> | ||
</template> | ||
|
||
<style scoped> | ||
.text-gradient { | ||
background-image: var(--accent-gradient); | ||
-webkit-background-clip: text; | ||
-webkit-text-fill-color: transparent; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,32 @@ | ||
<script setup lang="ts"> | ||
// defineProps<{}>() | ||
import Card from './widgets/Card.vue' | ||
const isDark = useDark() | ||
const toggleDark = useToggle(isDark) | ||
</script> | ||
|
||
<template> | ||
<nav rounded-md mr-2 bg-white> | ||
nav | ||
<i icon-btn dark:i-carbon-moon i-carbon:sun /> | ||
<nav class="rounded-md bg-#eaf7fe dark:bg-#1d262a"> | ||
<div h-full flex flex-col p-1> | ||
<div flex-1> | ||
<Card desc="liou" name="liou"> | ||
<div rounded-full w-8 h-8 bg-red /> | ||
</Card> | ||
</div> | ||
<div w-full h-0.2 bg-gray-200 dark:bg-gray-700 /> | ||
<div py-1> | ||
<div | ||
nav-item | ||
@click="() => toggleDark()" | ||
> | ||
<i icon-btn dark:i-carbon-moon i-carbon:sun /> | ||
<span v-if="isDark">Light Mode</span> | ||
<span v-else>Dark Mode</span> | ||
</div> | ||
<div nav-item> | ||
<i icon-btn i-carbon:settings /> | ||
<span>Setting</span> | ||
</div> | ||
</div> | ||
</div> | ||
</nav> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<script setup lang="ts"> | ||
const { name, desc } = defineProps<{ | ||
name: string | ||
desc: string | ||
}>() | ||
</script> | ||
|
||
<template> | ||
<div | ||
p-1 cursor-pointer center-y | ||
m-1 rounded duration-300 | ||
dark="bg-gray-700 hover:bg-gray-600" | ||
bg="gray-500/10 hover:gray-500/20" | ||
> | ||
<div mr-2> | ||
<slot /> | ||
</div> | ||
<div> | ||
<div text-lg font-500> | ||
{{ name }} | ||
</div> | ||
<div text-sm font-300> | ||
{{ desc }} | ||
</div> | ||
</div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<script setup lang="ts"> | ||
const props = defineProps(['modelValue', 'inputType']) | ||
const emit = defineEmits(['update:modelValue']) | ||
const tempValue = ref(props.modelValue) | ||
const [isShowInput, toggle] = useToggle(false) | ||
</script> | ||
|
||
<template> | ||
<slot name="mainIcon"> | ||
<i mr-2 rotate-115 i-ic:baseline-key /> | ||
</slot> | ||
<div v-if="isShowInput"> | ||
<input | ||
v-model="tempValue" | ||
:type="props.inputType || 'password'" | ||
class="input" | ||
> | ||
<i | ||
icon-btn i-carbon-checkmark @click="() => { | ||
$emit('update:modelValue', tempValue) | ||
toggle() | ||
}" | ||
/> | ||
<i icon-btn i-carbon-close @click="toggle()" /> | ||
</div> | ||
<div | ||
v-else | ||
cursor-pointer | ||
@click="toggle()" | ||
> | ||
<slot name="mainText"> | ||
Key | ||
</slot> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters