-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from stc-community/feat-auth
Feat: multi user account
- Loading branch information
Showing
14 changed files
with
621 additions
and
39 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
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,50 @@ | ||
<script setup lang="ts"> | ||
import { useAccountStore } from "@/store/modules/account"; | ||
import { ref } from "vue"; | ||
import { useLang } from "@/hooks/useLang"; | ||
const { t } = useLang(); | ||
defineOptions({ | ||
name: "account" | ||
}); | ||
const privateKey = ref(""); | ||
const accountStore = useAccountStore(); | ||
const handleSubmit = () => { | ||
const err = accountStore.savePrivateKey(privateKey.value); | ||
if (err) { | ||
window.alert(err); | ||
} else { | ||
window.location.reload(); | ||
} | ||
}; | ||
</script> | ||
<template> | ||
<!-- Put this part before </body> tag --> | ||
<input type="checkbox" id="key-modal" class="modal-toggle" /> | ||
<div class="modal backdrop-blur-sm"> | ||
<div class="modal-box w-11/12 max-w-xl relative"> | ||
<label | ||
for="key-modal" | ||
class="btn btn-sm btn-circle absolute right-2 top-2" | ||
>✕</label | ||
> | ||
|
||
<h3 class="font-bold text-lg">{{ t("common.input private key") }}</h3> | ||
<p class="py-4"> | ||
<input | ||
v-model="privateKey" | ||
type="text" | ||
:placeholder="t('common.input private key here')" | ||
class="input input-bordered input-primary w-full" | ||
/> | ||
</p> | ||
<div class="modal-action"> | ||
<label for="key-modal" class="btn btn-primary" @click="handleSubmit" | ||
>{{ t("common.yay") }}!</label | ||
> | ||
</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
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
Oops, something went wrong.