misc: use pin.laebl
This commit is contained in:
1 parent
03dd34a0e4
commit
3ef517e3e9
3 files changed
+5
-14
No files matched your search
@@ -24,7 +24,7 @@ export interface Link {
|
|||||||
label?: string
|
label?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export const defaultLinks: Link[] = [
|
export const getDefaultLinks = (): Link[] => [
|
||||||
{
|
{
|
||||||
url: '/',
|
url: '/',
|
||||||
label: t.get('nav.home'),
|
label: t.get('nav.home'),
|
||||||
|
|||||||
@@ -2,15 +2,9 @@
|
|||||||
import {
|
import {
|
||||||
ArrowLeftOnRectangle,
|
ArrowLeftOnRectangle,
|
||||||
Bookmark,
|
Bookmark,
|
||||||
ChevronDoubleRight,
|
|
||||||
Cog6Tooth,
|
Cog6Tooth,
|
||||||
GlobeAlt,
|
|
||||||
Home,
|
|
||||||
Icon,
|
|
||||||
Identification,
|
Identification,
|
||||||
Inbox,
|
Inbox,
|
||||||
MagnifyingGlass,
|
|
||||||
ServerStack,
|
|
||||||
UserCircle,
|
UserCircle,
|
||||||
UserGroup,
|
UserGroup,
|
||||||
} from 'svelte-hero-icons'
|
} from 'svelte-hero-icons'
|
||||||
@@ -21,13 +15,10 @@
|
|||||||
import ProfileButton from '$lib/components/ui/sidebar/ProfileButton.svelte'
|
import ProfileButton from '$lib/components/ui/sidebar/ProfileButton.svelte'
|
||||||
import { flip } from 'svelte/animate'
|
import { flip } from 'svelte/animate'
|
||||||
import { expoOut } from 'svelte/easing'
|
import { expoOut } from 'svelte/easing'
|
||||||
import { Badge, Button } from 'mono-svelte'
|
import { Badge } from 'mono-svelte'
|
||||||
import { DEFAULT_INSTANCE_URL, LINKED_INSTANCE_URL } from '$lib/instance.js'
|
|
||||||
import Expandable from '$lib/components/ui/Expandable.svelte'
|
import Expandable from '$lib/components/ui/Expandable.svelte'
|
||||||
import EndPlaceholder from '../EndPlaceholder.svelte'
|
import EndPlaceholder from '../EndPlaceholder.svelte'
|
||||||
import Application from '../../../../routes/admin/applications/Application.svelte'
|
|
||||||
import { t } from '$lib/translations'
|
import { t } from '$lib/translations'
|
||||||
import ItemList from '$lib/components/lemmy/generic/ItemList.svelte'
|
|
||||||
import { iconOfLink } from '../navbar/link'
|
import { iconOfLink } from '../navbar/link'
|
||||||
import { goto } from '$app/navigation'
|
import { goto } from '$app/navigation'
|
||||||
import { page } from '$app/stores'
|
import { page } from '$app/stores'
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
import Section from './Section.svelte'
|
import Section from './Section.svelte'
|
||||||
import ToggleSetting from './ToggleSetting.svelte'
|
import ToggleSetting from './ToggleSetting.svelte'
|
||||||
import { locale, locales, t } from '$lib/translations'
|
import { locale, locales, t } from '$lib/translations'
|
||||||
import { defaultLinks, iconOfLink } from '$lib/components/ui/navbar/link'
|
import { getDefaultLinks, iconOfLink } from '$lib/components/ui/navbar/link'
|
||||||
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||||
import Slider from '$lib/components/input/Slider.svelte'
|
import Slider from '$lib/components/input/Slider.svelte'
|
||||||
|
|
||||||
@@ -186,7 +186,7 @@
|
|||||||
{$t('settings.navigation.pins.description')}
|
{$t('settings.navigation.pins.description')}
|
||||||
</span>
|
</span>
|
||||||
<div class="flex items-center gap-1 flex-wrap">
|
<div class="flex items-center gap-1 flex-wrap">
|
||||||
{#each defaultLinks as pin}
|
{#each getDefaultLinks() as pin}
|
||||||
<Popover openOnHover placement="bottom">
|
<Popover openOnHover placement="bottom">
|
||||||
<Button
|
<Button
|
||||||
size="square-md"
|
size="square-md"
|
||||||
@@ -208,7 +208,7 @@
|
|||||||
padding="none"
|
padding="none"
|
||||||
class="px-4 py-2 flex flex-col"
|
class="px-4 py-2 flex flex-col"
|
||||||
>
|
>
|
||||||
<span class="font-medium text-lg">{pin.label}</span>
|
<span class="font-medum text-base">{pin.label}</span>
|
||||||
<code class="bg-slate-50 dark:!bg-zinc-950 !rounded-md">
|
<code class="bg-slate-50 dark:!bg-zinc-950 !rounded-md">
|
||||||
{pin.url}
|
{pin.url}
|
||||||
</code>
|
</code>
|
||||||
|
|||||||
Reference in new issue
Block a user