-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client): add input for manual test (#29)
- Loading branch information
1 parent
5cb0094
commit aeff56b
Showing
3 changed files
with
41 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<template> | ||
<div flex gap-2> | ||
<NButton :disabled="isTesting" @click="test"> | ||
<span v-if="!isTesting"> | ||
Test | ||
</span> | ||
<Icon v-else name="line-md:loading-twotone-loop" /> | ||
</NButton> | ||
<NTextInput v-model="text"> | ||
<template #icon> | ||
<NButton rounded-xl p-1 @click="reset"> | ||
<Icon name="maki:cross-11" /> | ||
</NButton> | ||
</template> | ||
</NTextInput> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref } from 'vue' | ||
import useTestHydration from '~/composables/useTestHydration' | ||
const text = ref('') | ||
const { isTesting, testPath } = useTestHydration() | ||
function reset () { | ||
text.value = '' | ||
} | ||
function test () { | ||
const path = text.value.startsWith('/') ? text.value : '/' + text.value | ||
testPath(path) | ||
} | ||
</script> |
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