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,
|
||||
LockClosed,
|
||||
LockOpen,
|
||||
Megaphone,
|
||||
ShieldExclamation,
|
||||
Trash,
|
||||
} from 'svelte-hero-icons'
|
||||
@@ -138,11 +139,13 @@
|
||||
loading={pinning}
|
||||
disabled={pinning}
|
||||
>
|
||||
<Icon src={InformationCircle} size="16" mini />
|
||||
<div class="flex flex-col text-left">
|
||||
<span>{item.post.featured_community ? 'Unpin' : 'Pin'}</span>
|
||||
<Icon src={Megaphone} size="16" mini />
|
||||
<div
|
||||
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)}
|
||||
<span class="opacity-80 text-xs">Community</span>
|
||||
<span class="text-xs opacity-80">Community</span>
|
||||
{/if}
|
||||
</div>
|
||||
</MenuButton>
|
||||
@@ -179,10 +182,11 @@
|
||||
on:click={() =>
|
||||
pin(isPostView(item) ? !item.post.featured_local : false, true)}
|
||||
>
|
||||
<Icon src={InformationCircle} size="16" mini />
|
||||
<div class="flex flex-col text-left">
|
||||
<span>{item.post.featured_local ? 'Unpin' : 'Pin'}</span>
|
||||
|
||||
<Icon src={Megaphone} size="16" mini />
|
||||
<div
|
||||
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>
|
||||
</div>
|
||||
</MenuButton>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
Icon,
|
||||
InformationCircle,
|
||||
LockClosed,
|
||||
Megaphone,
|
||||
Trash,
|
||||
} from 'svelte-hero-icons'
|
||||
import { getInstance } from '$lib/lemmy.js'
|
||||
@@ -94,9 +95,9 @@
|
||||
</Badge>
|
||||
{/if}
|
||||
{#if featured}
|
||||
<Badge label="Pinned" color="green">
|
||||
<Icon src={InformationCircle} mini size="14" />
|
||||
Pinned
|
||||
<Badge label="Featured" color="green">
|
||||
<Icon src={Megaphone} mini size="14" />
|
||||
Featured
|
||||
</Badge>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
InformationCircle,
|
||||
LockClosed,
|
||||
LockOpen,
|
||||
Megaphone,
|
||||
QuestionMarkCircle,
|
||||
Trash,
|
||||
UserMinus,
|
||||
@@ -95,14 +96,14 @@
|
||||
}
|
||||
case 'postFeature': {
|
||||
return {
|
||||
icon: InformationCircle,
|
||||
icon: Megaphone,
|
||||
class: 'text-green-600 dark:text-green-400',
|
||||
text: 'Featured Post',
|
||||
}
|
||||
}
|
||||
case 'postUnfeature': {
|
||||
return {
|
||||
icon: InformationCircle,
|
||||
icon: Megaphone,
|
||||
class: 'text-red-600 dark:text-red-400',
|
||||
text: 'Unfeatured Post',
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user