feat: change icon for pinned posts
This commit is contained in:
1 parent
104a2ebade
commit
7490a7d1fd
3 files changed
+19
-13
No files matched your search
@@ -11,6 +11,7 @@
|
|||||||
InformationCircle,
|
InformationCircle,
|
||||||
LockClosed,
|
LockClosed,
|
||||||
LockOpen,
|
LockOpen,
|
||||||
|
Megaphone,
|
||||||
ShieldExclamation,
|
ShieldExclamation,
|
||||||
Trash,
|
Trash,
|
||||||
} from 'svelte-hero-icons'
|
} from 'svelte-hero-icons'
|
||||||
@@ -138,11 +139,13 @@
|
|||||||
loading={pinning}
|
loading={pinning}
|
||||||
disabled={pinning}
|
disabled={pinning}
|
||||||
>
|
>
|
||||||
<Icon src={InformationCircle} size="16" mini />
|
<Icon src={Megaphone} size="16" mini />
|
||||||
<div class="flex flex-col text-left">
|
<div
|
||||||
<span>{item.post.featured_community ? 'Unpin' : 'Pin'}</span>
|
class="flex flex-row gap-2 text-left items-center justify-between w-full"
|
||||||
|
>
|
||||||
|
<span>{item.post.featured_community ? 'Unfeature' : 'Feature'}</span>
|
||||||
{#if isAdmin($profile.user)}
|
{#if isAdmin($profile.user)}
|
||||||
<span class="opacity-80 text-xs">Community</span>
|
<span class="text-xs opacity-80">Community</span>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
</MenuButton>
|
</MenuButton>
|
||||||
@@ -179,10 +182,11 @@
|
|||||||
on:click={() =>
|
on:click={() =>
|
||||||
pin(isPostView(item) ? !item.post.featured_local : false, true)}
|
pin(isPostView(item) ? !item.post.featured_local : false, true)}
|
||||||
>
|
>
|
||||||
<Icon src={InformationCircle} size="16" mini />
|
<Icon src={Megaphone} size="16" mini />
|
||||||
<div class="flex flex-col text-left">
|
<div
|
||||||
<span>{item.post.featured_local ? 'Unpin' : 'Pin'}</span>
|
class="flex flex-row gap-2 text-left items-center justify-between w-full"
|
||||||
|
>
|
||||||
|
<span>{item.post.featured_local ? 'Unfeature' : 'Feature'}</span>
|
||||||
<span class="text-xs opacity-80">Instance</span>
|
<span class="text-xs opacity-80">Instance</span>
|
||||||
</div>
|
</div>
|
||||||
</MenuButton>
|
</MenuButton>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
Icon,
|
Icon,
|
||||||
InformationCircle,
|
InformationCircle,
|
||||||
LockClosed,
|
LockClosed,
|
||||||
|
Megaphone,
|
||||||
Trash,
|
Trash,
|
||||||
} from 'svelte-hero-icons'
|
} from 'svelte-hero-icons'
|
||||||
import { getInstance } from '$lib/lemmy.js'
|
import { getInstance } from '$lib/lemmy.js'
|
||||||
@@ -94,9 +95,9 @@
|
|||||||
</Badge>
|
</Badge>
|
||||||
{/if}
|
{/if}
|
||||||
{#if featured}
|
{#if featured}
|
||||||
<Badge label="Pinned" color="green">
|
<Badge label="Featured" color="green">
|
||||||
<Icon src={InformationCircle} mini size="14" />
|
<Icon src={Megaphone} mini size="14" />
|
||||||
Pinned
|
Featured
|
||||||
</Badge>
|
</Badge>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
InformationCircle,
|
InformationCircle,
|
||||||
LockClosed,
|
LockClosed,
|
||||||
LockOpen,
|
LockOpen,
|
||||||
|
Megaphone,
|
||||||
QuestionMarkCircle,
|
QuestionMarkCircle,
|
||||||
Trash,
|
Trash,
|
||||||
UserMinus,
|
UserMinus,
|
||||||
@@ -95,14 +96,14 @@
|
|||||||
}
|
}
|
||||||
case 'postFeature': {
|
case 'postFeature': {
|
||||||
return {
|
return {
|
||||||
icon: InformationCircle,
|
icon: Megaphone,
|
||||||
class: 'text-green-600 dark:text-green-400',
|
class: 'text-green-600 dark:text-green-400',
|
||||||
text: 'Featured Post',
|
text: 'Featured Post',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case 'postUnfeature': {
|
case 'postUnfeature': {
|
||||||
return {
|
return {
|
||||||
icon: InformationCircle,
|
icon: Megaphone,
|
||||||
class: 'text-red-600 dark:text-red-400',
|
class: 'text-red-600 dark:text-red-400',
|
||||||
text: 'Unfeatured Post',
|
text: 'Unfeatured Post',
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user