Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85807377
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/components/navigation/navigation_entry.js b/src/components/navigation/navigation_entry.js
index 1a7832afe0..fdbdcac3ce 100644
--- a/src/components/navigation/navigation_entry.js
+++ b/src/components/navigation/navigation_entry.js
@@ -16,29 +16,17 @@ import { faThumbtack } from '@fortawesome/free-solid-svg-icons'
library.add(faThumbtack)
const NavigationEntry = {
- props: ['item', 'showPin'],
+ inheritAttrs: false,
+ props: {
+ item: {
+ type: Object,
+ required: true,
+ },
+ showPin: Boolean
+ },
components: {
OptionalRouterLink,
},
- methods: {
- isPinned(value) {
- return this.pinnedItems.has(value)
- },
- togglePin(value) {
- if (this.isPinned(value)) {
- useSyncConfigStore().removeCollectionPreference({
- path: 'collections.pinnedNavItems',
- value,
- })
- } else {
- useSyncConfigStore().addCollectionPreference({
- path: 'collections.pinnedNavItems',
- value,
- })
- }
- useSyncConfigStore().pushSyncConfig()
- },
- },
computed: {
routeTo() {
return routeTo(this.item, this.currentUser)
@@ -61,6 +49,25 @@ const NavigationEntry = {
new Set(store.prefsStorage.collections.pinnedNavItems),
}),
},
+ methods: {
+ isPinned(value) {
+ return this.pinnedItems.has(value)
+ },
+ togglePin(value) {
+ if (this.isPinned(value)) {
+ useSyncConfigStore().removeCollectionPreference({
+ path: 'collections.pinnedNavItems',
+ value,
+ })
+ } else {
+ useSyncConfigStore().addCollectionPreference({
+ path: 'collections.pinnedNavItems',
+ value,
+ })
+ }
+ useSyncConfigStore().pushSyncConfig()
+ },
+ },
}
export default NavigationEntry
diff --git a/src/components/navigation/navigation_entry.vue b/src/components/navigation/navigation_entry.vue
index 4b42e63cb9..d010e7c4cf 100644
--- a/src/components/navigation/navigation_entry.vue
+++ b/src/components/navigation/navigation_entry.vue
@@ -7,13 +7,13 @@
class="NavigationEntry menu-item"
:class="{ '-active': isActive }"
:aria-label="item.labelRaw ?? $t(item.label)"
- v-bind="$attrs"
>
<component
:is="routeTo ? 'a' : 'button'"
class="main-link"
:href="href"
@click="navigate"
+ v-bind="$attrs"
>
<span>
<FAIcon
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Wed, Oct 14, 10:30 AM (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1787100
Default Alt Text
(2 KB)
Attached To
Mode
rPUFE pleroma-fe-upstream
Attached
Detach File
Event Timeline
Log In to Comment