feat: add PUBLIC_INSTANCE_TYPE env var
This commit is contained in:
9 files changed
+37
-68
No files matched your search
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { browser } from '$app/environment'
|
||||
import { site } from '$lib/client/lemmy.svelte'
|
||||
import Location from '$lib/components/lemmy/dropdowns/Location.svelte'
|
||||
import Sort from '$lib/components/lemmy/dropdowns/Sort.svelte'
|
||||
import ViewSelect from '$lib/components/lemmy/dropdowns/ViewSelect.svelte'
|
||||
@@ -10,7 +11,6 @@
|
||||
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||
import Pageination from '$lib/components/ui/Pageination.svelte'
|
||||
import { t } from '$lib/i18n/translations.js'
|
||||
import { site } from '$lib/client/lemmy.svelte'
|
||||
import { postFeeds } from '$lib/lemmy/postfeed.svelte.js'
|
||||
import { settings, SSR_ENABLED } from '$lib/settings.svelte.js'
|
||||
import Button from 'mono-svelte/button/Button.svelte'
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
<script lang="ts">
|
||||
import { preventDefault } from 'svelte/legacy'
|
||||
|
||||
import { goto } from '$app/navigation'
|
||||
import { page } from '$app/state'
|
||||
import { profile } from '$lib/auth.svelte'
|
||||
import { client, mayBeIncompatible, site } from '$lib/client/lemmy.svelte'
|
||||
import { DEFAULT_CLIENT_TYPE, type ClientType } from '$lib/client/base'
|
||||
import { client } from '$lib/client/lemmy.svelte'
|
||||
import ErrorContainer, {
|
||||
clearErrorScope,
|
||||
pushError,
|
||||
@@ -17,7 +16,6 @@
|
||||
} from '$lib/instance.svelte.js'
|
||||
import { errorMessage } from '$lib/lemmy/error'
|
||||
import { DOMAIN_REGEX_FORMS } from '$lib/util.svelte.js'
|
||||
import { MINIMUM_VERSION } from '$lib/version.js'
|
||||
import { Button, Note, Option, Select, TextInput, toast } from 'mono-svelte'
|
||||
import {
|
||||
Icon,
|
||||
@@ -25,7 +23,6 @@
|
||||
QuestionMarkCircle,
|
||||
UserCircle,
|
||||
} from 'svelte-hero-icons'
|
||||
import { DEFAULT_CLIENT_TYPE, type ClientType } from '$lib/client/base'
|
||||
|
||||
interface Props {
|
||||
ref?: string
|
||||
@@ -110,19 +107,23 @@
|
||||
</svelte:head>
|
||||
|
||||
<div class="max-w-xl w-full mx-auto h-max my-auto">
|
||||
<form onsubmit={preventDefault(logIn)} class="flex flex-col gap-5">
|
||||
<form
|
||||
onsubmit={e => {
|
||||
e.preventDefault()
|
||||
logIn()
|
||||
}}
|
||||
class="flex flex-col gap-5"
|
||||
>
|
||||
<div class="flex flex-col">
|
||||
{@render children?.()}
|
||||
<Header>{$t('account.login')}</Header>
|
||||
{#if site.data && mayBeIncompatible(MINIMUM_VERSION, site.data.version.replace('v', ''))}
|
||||
<Note>
|
||||
{$t('account.versionGate', {
|
||||
version: `v${MINIMUM_VERSION}`,
|
||||
})}
|
||||
</Note>
|
||||
{/if}
|
||||
<ErrorContainer class="pt-2" scope={page.route.id} />
|
||||
</div>
|
||||
{#if data.client.name == 'piefed'}
|
||||
<Note>
|
||||
{$t('account.piefedGate')}
|
||||
</Note>
|
||||
{/if}
|
||||
<div class="flex flex-row w-full items-center gap-2">
|
||||
<TextInput
|
||||
id="username"
|
||||
|
||||
@@ -3,16 +3,14 @@
|
||||
|
||||
import { goto } from '$app/navigation'
|
||||
import { page } from '$app/state'
|
||||
import { profile } from '$lib/auth.svelte'
|
||||
import { DEFAULT_CLIENT_TYPE, type ClientType } from '$lib/client/base'
|
||||
import { validateInstance } from '$lib/client/lemmy.svelte'
|
||||
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||
import { t } from '$lib/i18n/translations'
|
||||
import { LINKED_INSTANCE_URL } from '$lib/instance.svelte'
|
||||
import { mayBeIncompatible } from '$lib/client/lemmy.svelte'
|
||||
import { site, validateInstance } from '$lib/client/lemmy.svelte'
|
||||
import { DOMAIN_REGEX_FORMS } from '$lib/util.svelte'
|
||||
import { MINIMUM_VERSION } from '$lib/version'
|
||||
import { Button, Note, Option, Select, TextInput, toast } from 'mono-svelte'
|
||||
import { profile } from '$lib/auth.svelte'
|
||||
import { DEFAULT_CLIENT_TYPE, type ClientType } from '$lib/client/base'
|
||||
import { Button, Option, Select, TextInput, toast } from 'mono-svelte'
|
||||
|
||||
interface Props {
|
||||
ref?: string
|
||||
@@ -64,13 +62,6 @@
|
||||
<div class="flex flex-col gap-2">
|
||||
{@render children?.()}
|
||||
<Header>{$t('account.addGuest')}</Header>
|
||||
{#if site.data && mayBeIncompatible(MINIMUM_VERSION, site.data.version.replace('v', ''))}
|
||||
<Note>
|
||||
{$t('account.versionGate', {
|
||||
version: `v${MINIMUM_VERSION}`,
|
||||
})}
|
||||
</Note>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="inline-flex items-center gap-2">
|
||||
<TextInput
|
||||
|
||||
Reference in new issue
Block a user