mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 13:04:23 +00:00
Add a little success pop up.
Some checks are pending
Build and Push Latest Image / build-and-push (push) Waiting to run
Some checks are pending
Build and Push Latest Image / build-and-push (push) Waiting to run
This commit is contained in:
parent
b5217e04fe
commit
5445a3d1c0
2 changed files with 18 additions and 0 deletions
|
@ -18,6 +18,7 @@ const user = ref("");
|
|||
const enterFirstName = ref();
|
||||
const isLoggedIn = ref(false);
|
||||
const useremail = ref();
|
||||
const sendSuccess = ref(false);
|
||||
const userData = ref({
|
||||
userAccount: "",
|
||||
firstName: "",
|
||||
|
@ -83,11 +84,19 @@ const submitCustomApiKey = async () => {
|
|||
if (response.error) {
|
||||
console.error("Error updating user data:", response.error);
|
||||
}
|
||||
sendSuccessSystem();
|
||||
} catch (error) {
|
||||
console.error("Failed to submit change:", error);
|
||||
}
|
||||
};
|
||||
|
||||
const sendSuccessSystem = () => {
|
||||
sendSuccess.value = true;
|
||||
setTimeout(() => {
|
||||
sendSuccess.value = false;
|
||||
}, 3000);
|
||||
};
|
||||
|
||||
const checkValidApiKey = () => {
|
||||
const apiKey = customApiKey.value;
|
||||
if (!apiKey) {
|
||||
|
@ -110,6 +119,7 @@ const deleteAccount = async () => {
|
|||
method: "DELETE",
|
||||
});
|
||||
const res = await req.json();
|
||||
sendSuccessSystem();
|
||||
console.log(res);
|
||||
};
|
||||
|
||||
|
@ -218,6 +228,13 @@ const submitUserPassword = async () => {
|
|||
{{ t("settings.loginButton") }}
|
||||
</button>
|
||||
</form>
|
||||
<div
|
||||
v-if="sendSuccess"
|
||||
class="flex flex-col items-center justify-center h-full align-center text-center absloute inset-0 p-1 bg-gray-200/50 backdrop-blur-sm text-black w-full absolute align-middle z-[20]"
|
||||
>
|
||||
<BadgeCheckIcon class="w-12 h-12 p-1/2 m-1 text-blue-600" />
|
||||
Success!
|
||||
</div>
|
||||
<div class="justify-center align-center text-center">
|
||||
<h1 class="text-3xl text-bold p-2">
|
||||
{{ t("settings.greet")
|
||||
|
|
|
@ -15,6 +15,7 @@ export default defineEventHandler(async (event) => {
|
|||
// Use Static values for now.
|
||||
const requestChange = body.action || "";
|
||||
const apiKeyqq = body.value.match(clearBadDataRegex);
|
||||
console.log(apiKeyqq);
|
||||
const allowedColumns = ["firstname", "email"];
|
||||
|
||||
if (!allowedColumns.includes(requestChange)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue