mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-16 12:12:15 +01:00
add linter, prettier and typescript support for jetstream (#1)
* add linter, prettier and typescript support for jetstream * add github actions for lint, build and typecheck * add composer install to build action * fix composer lock * add ext-intl and fixed php version * fix intl php extension install * add tip php extension to github npm build action * fix php version to 8.3.1 * change github php base action * fix primary button default type * updated typescript types from Team to Organization --------- Co-authored-by: Gregor Vostrak <gregorvostrak@Gregors-MacBook-Pro.local>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<script setup>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { useForm } from '@inertiajs/vue3';
|
||||
import ActionSection from '@/Components/ActionSection.vue';
|
||||
@@ -9,7 +9,7 @@ import SecondaryButton from '@/Components/SecondaryButton.vue';
|
||||
import TextInput from '@/Components/TextInput.vue';
|
||||
|
||||
const confirmingUserDeletion = ref(false);
|
||||
const passwordInput = ref(null);
|
||||
const passwordInput = ref<HTMLElement | null>(null);
|
||||
|
||||
const form = useForm({
|
||||
password: '',
|
||||
@@ -18,14 +18,14 @@ const form = useForm({
|
||||
const confirmUserDeletion = () => {
|
||||
confirmingUserDeletion.value = true;
|
||||
|
||||
setTimeout(() => passwordInput.value.focus(), 250);
|
||||
setTimeout(() => passwordInput.value?.focus(), 250);
|
||||
};
|
||||
|
||||
const deleteUser = () => {
|
||||
form.delete(route('current-user.destroy'), {
|
||||
preserveScroll: true,
|
||||
onSuccess: () => closeModal(),
|
||||
onError: () => passwordInput.value.focus(),
|
||||
onError: () => passwordInput.value?.focus(),
|
||||
onFinish: () => form.reset(),
|
||||
});
|
||||
};
|
||||
@@ -39,17 +39,15 @@ const closeModal = () => {
|
||||
|
||||
<template>
|
||||
<ActionSection>
|
||||
<template #title>
|
||||
Delete Account
|
||||
</template>
|
||||
<template #title> Delete Account </template>
|
||||
|
||||
<template #description>
|
||||
Permanently delete your account.
|
||||
</template>
|
||||
<template #description> Permanently delete your account. </template>
|
||||
|
||||
<template #content>
|
||||
<div class="max-w-xl text-sm text-gray-600 dark:text-gray-400">
|
||||
Once your account is deleted, all of its resources and data will be permanently deleted. Before deleting your account, please download any data or information that you wish to retain.
|
||||
Once your account is deleted, all of its resources and data will
|
||||
be permanently deleted. Before deleting your account, please
|
||||
download any data or information that you wish to retain.
|
||||
</div>
|
||||
|
||||
<div class="mt-5">
|
||||
@@ -60,12 +58,13 @@ const closeModal = () => {
|
||||
|
||||
<!-- Delete Account Confirmation Modal -->
|
||||
<DialogModal :show="confirmingUserDeletion" @close="closeModal">
|
||||
<template #title>
|
||||
Delete Account
|
||||
</template>
|
||||
<template #title> Delete Account </template>
|
||||
|
||||
<template #content>
|
||||
Are you sure you want to delete your account? Once your account is deleted, all of its resources and data will be permanently deleted. Please enter your password to confirm you would like to permanently delete your account.
|
||||
Are you sure you want to delete your account? Once your
|
||||
account is deleted, all of its resources and data will be
|
||||
permanently deleted. Please enter your password to confirm
|
||||
you would like to permanently delete your account.
|
||||
|
||||
<div class="mt-4">
|
||||
<TextInput
|
||||
@@ -75,10 +74,11 @@ const closeModal = () => {
|
||||
class="mt-1 block w-3/4"
|
||||
placeholder="Password"
|
||||
autocomplete="current-password"
|
||||
@keyup.enter="deleteUser"
|
||||
/>
|
||||
@keyup.enter="deleteUser" />
|
||||
|
||||
<InputError :message="form.errors.password" class="mt-2" />
|
||||
<InputError
|
||||
:message="form.errors.password"
|
||||
class="mt-2" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -91,8 +91,7 @@ const closeModal = () => {
|
||||
class="ms-3"
|
||||
:class="{ 'opacity-25': form.processing }"
|
||||
:disabled="form.processing"
|
||||
@click="deleteUser"
|
||||
>
|
||||
@click="deleteUser">
|
||||
Delete Account
|
||||
</DangerButton>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user