mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
fix: resolve lint issues
chore: npm run format
This commit is contained in:
@@ -51,4 +51,3 @@ The application will be available at http://localhost:5173.
|
|||||||
- Lucide Svelte for icons.
|
- Lucide Svelte for icons.
|
||||||
- Highlight.js for syntax highlighting.
|
- Highlight.js for syntax highlighting.
|
||||||
- TypeScript for type safety.
|
- TypeScript for type safety.
|
||||||
|
|
||||||
|
|||||||
@@ -95,12 +95,12 @@
|
|||||||
<meta property="og:title" content="Create a Paste - Sharpbin" />
|
<meta property="og:title" content="Create a Paste - Sharpbin" />
|
||||||
<meta property="og:description" content="Create and share your pastes easily with Sharpbin." />
|
<meta property="og:description" content="Create and share your pastes easily with Sharpbin." />
|
||||||
<meta property="og:type" content="website" />
|
<meta property="og:type" content="website" />
|
||||||
<meta property="og:url" content="{data.url}" />
|
<meta property="og:url" content={data.url} />
|
||||||
<meta property="og:site_name" content="Sharpbin" />
|
<meta property="og:site_name" content="Sharpbin" />
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<main
|
<main
|
||||||
class="flex min-h-[calc(100vh-60px)] w-full flex-col items-center justify-center bg-neutral-950 text-white pt-5"
|
class="flex min-h-[calc(100vh-60px)] w-full flex-col items-center justify-center bg-neutral-950 pt-5 text-white"
|
||||||
>
|
>
|
||||||
<div class="w-[95%] max-w-7xl rounded border-2 border-neutral-800 bg-neutral-900 p-6">
|
<div class="w-[95%] max-w-7xl rounded border-2 border-neutral-800 bg-neutral-900 p-6">
|
||||||
<h1 class="mb-6 text-center text-4xl font-bold">Create a Paste</h1>
|
<h1 class="mb-6 text-center text-4xl font-bold">Create a Paste</h1>
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
{#if error}
|
{#if error}
|
||||||
<div
|
<div
|
||||||
transition:fly={{ y: 40, duration: 300 }}
|
transition:fly={{ y: 40, duration: 300 }}
|
||||||
class="rounded border border-red-900 bg-red-950 p-2 text-sm text-red-200 mt-2"
|
class="mt-2 rounded border border-red-900 bg-red-950 p-2 text-sm text-red-200"
|
||||||
>
|
>
|
||||||
{error}
|
{error}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -283,7 +283,11 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{data.paste ? (data.paste.title || 'Untitled Paste') + ' - Sharpbin' : 'Paste Not Found - Sharpbin'}</title>
|
<title
|
||||||
|
>{data.paste
|
||||||
|
? (data.paste.title || 'Untitled Paste') + ' - Sharpbin'
|
||||||
|
: 'Paste Not Found - Sharpbin'}</title
|
||||||
|
>
|
||||||
{#if data.paste}
|
{#if data.paste}
|
||||||
<meta property="og:title" content={data.paste.title || 'Untitled Paste'} />
|
<meta property="og:title" content={data.paste.title || 'Untitled Paste'} />
|
||||||
<meta
|
<meta
|
||||||
@@ -297,9 +301,15 @@
|
|||||||
<meta property="og:type" content="article" />
|
<meta property="og:type" content="article" />
|
||||||
<meta property="og:url" content={data.url} />
|
<meta property="og:url" content={data.url} />
|
||||||
<meta property="og:site_name" content="Sharpbin" />
|
<meta property="og:site_name" content="Sharpbin" />
|
||||||
<meta property="og:article:published_time" content={extractDateFromUUIDv7(data.paste.uuid)?.toISOString() ?? ''} />
|
<meta
|
||||||
|
property="og:article:published_time"
|
||||||
|
content={extractDateFromUUIDv7(data.paste.uuid)?.toISOString() ?? ''}
|
||||||
|
/>
|
||||||
{#if data.paste.editedAt}
|
{#if data.paste.editedAt}
|
||||||
<meta property="og:article:modified_time" content={new Date(data.paste.editedAt).toISOString()} />
|
<meta
|
||||||
|
property="og:article:modified_time"
|
||||||
|
content={new Date(data.paste.editedAt).toISOString()}
|
||||||
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
{#if data.paste.author}
|
{#if data.paste.author}
|
||||||
<meta property="og:article:author" content={data.paste.author.username} />
|
<meta property="og:article:author" content={data.paste.author.username} />
|
||||||
@@ -308,7 +318,7 @@
|
|||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<main
|
<main
|
||||||
class="flex w-full min-h-[calc(100vh-60px)] flex-col items-center justify-center bg-neutral-950 text-white pt-5 pb-5"
|
class="flex min-h-[calc(100vh-60px)] w-full flex-col items-center justify-center bg-neutral-950 pt-5 pb-5 text-white"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="max-h-[90vh] w-[95%] max-w-7xl rounded border-2 border-neutral-800 bg-neutral-900 p-4"
|
class="max-h-[90vh] w-[95%] max-w-7xl rounded border-2 border-neutral-800 bg-neutral-900 p-4"
|
||||||
@@ -460,7 +470,7 @@
|
|||||||
|
|
||||||
<div class="overflow-hidden">
|
<div class="overflow-hidden">
|
||||||
<div
|
<div
|
||||||
class="flex flex-col md:flex-row items-center justify-between gap-2 rounded-t-md border-b border-neutral-700 bg-neutral-800 px-3 py-2"
|
class="flex flex-col items-center justify-between gap-2 rounded-t-md border-b border-neutral-700 bg-neutral-800 px-3 py-2 md:flex-row"
|
||||||
>
|
>
|
||||||
<div class="flex items-center gap-2 text-sm text-neutral-300">
|
<div class="flex items-center gap-2 text-sm text-neutral-300">
|
||||||
<span class="font-medium text-neutral-100"
|
<span class="font-medium text-neutral-100"
|
||||||
|
|||||||
@@ -128,16 +128,25 @@
|
|||||||
<svelte:head>
|
<svelte:head>
|
||||||
<title>{data.user?.displayName || data.user?.username} - User Profile</title>
|
<title>{data.user?.displayName || data.user?.username} - User Profile</title>
|
||||||
|
|
||||||
<meta property="og:title" content="{data.user?.displayName || data.user?.username} - User Profile" />
|
<meta
|
||||||
<meta property="og:description" content="View the profile and {pagination.totalCount} paste{pagination.totalCount !== 1 ? 's' : ''} of {data.user?.displayName || data.user?.username} on Sharpbin." />
|
property="og:title"
|
||||||
|
content="{data.user?.displayName || data.user?.username} - User Profile"
|
||||||
|
/>
|
||||||
|
<meta
|
||||||
|
property="og:description"
|
||||||
|
content="View the profile and {pagination.totalCount !== 0
|
||||||
|
? pagination.totalCount
|
||||||
|
: ''} paste{pagination.totalCount !== 1 ? 's' : ''} of {data.user?.displayName ||
|
||||||
|
data.user?.username} on Sharpbin."
|
||||||
|
/>
|
||||||
<meta property="og:type" content="profile" />
|
<meta property="og:type" content="profile" />
|
||||||
<meta property="og:url" content="{data.url}" />
|
<meta property="og:url" content={data.url} />
|
||||||
<meta property="og:site_name" content="Sharpbin" />
|
<meta property="og:site_name" content="Sharpbin" />
|
||||||
<meta property="profile:username" content="{data.user?.username}" />
|
<meta property="profile:username" content={data.user?.username} />
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<main
|
<main
|
||||||
class="flex min-h-[calc(100vh-60px)] w-full flex-col items-center justify-center bg-neutral-950 text-white pt-5"
|
class="flex min-h-[calc(100vh-60px)] w-full flex-col items-center justify-center bg-neutral-950 pt-5 text-white"
|
||||||
>
|
>
|
||||||
<div class="w-[95%] max-w-5xl rounded border-2 border-neutral-800 bg-neutral-900 p-6">
|
<div class="w-[95%] max-w-5xl rounded border-2 border-neutral-800 bg-neutral-900 p-6">
|
||||||
<h1 class="flex items-center justify-center gap-4 text-center text-4xl font-bold">
|
<h1 class="flex items-center justify-center gap-4 text-center text-4xl font-bold">
|
||||||
@@ -150,9 +159,11 @@
|
|||||||
<Ban class="absolute h-7 w-7 text-red-500" />
|
<Ban class="absolute h-7 w-7 text-red-500" />
|
||||||
</span>
|
</span>
|
||||||
{:else if data.user?.roles.includes(1) || data.user?.roles.includes(255)}
|
{:else if data.user?.roles.includes(1) || data.user?.roles.includes(255)}
|
||||||
<span use:tooltip={roles[Math.max(...data.user?.roles) as keyof typeof roles]}>
|
{#if data.user?.roles?.length}
|
||||||
|
<span use:tooltip={roles[Math.max(...data.user.roles) as keyof typeof roles]}>
|
||||||
<ShieldUser class="h-8 w-8 text-neutral-400" />
|
<ShieldUser class="h-8 w-8 text-neutral-400" />
|
||||||
</span>
|
</span>
|
||||||
|
{/if}
|
||||||
{:else}
|
{:else}
|
||||||
<span use:tooltip={'User'}>
|
<span use:tooltip={'User'}>
|
||||||
<User class="h-8 w-8 text-neutral-400" />
|
<User class="h-8 w-8 text-neutral-400" />
|
||||||
|
|||||||
Reference in New Issue
Block a user