mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
fix: lint issues resolved
chore: npm run format
This commit is contained in:
@@ -6,13 +6,13 @@
|
||||
export let error = '';
|
||||
export let placeholder = '';
|
||||
export let inputType = 'text';
|
||||
export let items: { label: string; value: any }[] = [];
|
||||
export let initialValue: any = null;
|
||||
export let onConfirm: (value: any) => void;
|
||||
export let items: { label: string; value: unknown }[] = [];
|
||||
export let initialValue: unknown = null;
|
||||
export let onConfirm: (value: unknown) => void;
|
||||
export let onCancel: () => void;
|
||||
export let confirmButtonText = '';
|
||||
|
||||
let inputValue: any = '';
|
||||
let inputValue: string | unknown[] | boolean = '';
|
||||
|
||||
$: if (!show) {
|
||||
inputValue =
|
||||
@@ -84,7 +84,7 @@
|
||||
<div
|
||||
class="mb-4 max-h-60 overflow-y-auto rounded border border-neutral-700 bg-neutral-800 p-2"
|
||||
>
|
||||
{#each items as item}
|
||||
{#each items as item (item.label)}
|
||||
<label
|
||||
class="flex cursor-pointer items-center gap-2 rounded p-2 text-white hover:bg-neutral-700"
|
||||
>
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
href={resolve(`/login${returnParam}`)}
|
||||
class="rounded bg-neutral-700 px-3 py-1 text-white hover:bg-neutral-800">Login</a
|
||||
>
|
||||
<!-- eslint-disable svelte/no-navigation-without-resolve -->
|
||||
<a
|
||||
href={data.options?.registration_enabled ? resolve(`/register${returnParam}`) : '#'}
|
||||
class="rounded bg-neutral-700 px-3 py-1 text-white hover:bg-neutral-800 {data.options
|
||||
@@ -48,6 +49,7 @@
|
||||
? ''
|
||||
: 'cursor-not-allowed bg-neutral-800 text-neutral-500!'}">Register</a
|
||||
>
|
||||
<!-- eslint-enable svelte/no-navigation-without-resolve -->
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
let showDeleteModal = false;
|
||||
let showRoleModal = false;
|
||||
let modalError = '';
|
||||
let newDisplayName = '';
|
||||
|
||||
$: isOwner = data.user && $user ? data.user.uuid === $user.uuid : false;
|
||||
|
||||
@@ -183,7 +182,6 @@
|
||||
<button
|
||||
on:click={() => {
|
||||
showEditModal = true;
|
||||
newDisplayName = data.user.displayName || data.user.username;
|
||||
modalError = '';
|
||||
}}
|
||||
class="flex items-center gap-2 rounded bg-neutral-700 px-4 py-2 text-sm font-medium transition-colors hover:bg-neutral-600"
|
||||
@@ -279,7 +277,7 @@
|
||||
show={showDeleteModal}
|
||||
mode="confirm"
|
||||
title="Delete Account"
|
||||
message={`This action cannot be undone. ${isOwner ? 'All your' : 'This user\'s'} pastes and account data will be permanently deleted.`}
|
||||
message={`This action cannot be undone. ${isOwner ? 'All your' : "This user's"} pastes and account data will be permanently deleted.`}
|
||||
confirmButtonText="Delete Account"
|
||||
error={modalError}
|
||||
onConfirm={() => handleDeleteAccount()}
|
||||
|
||||
Reference in New Issue
Block a user