Skip to content

Commit

Permalink
fix(flag): change the way how flag action appears in proposal
Browse files Browse the repository at this point in the history
  • Loading branch information
Todmy committed Sep 25, 2023
1 parent c43c35f commit 71a504f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions src/components/SpaceProposalHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ const isCreator = computed(() => props.proposal?.author === web3Account.value);
const threeDotItems = computed(() => {
const items = [
{ text: t('duplicate'), action: 'duplicate' },
{ text: t('report'), action: 'report' }
];
if ((props.isAdmin || props.isModerator) && !props.proposal.flagged)
if ((props.isAdmin || props.isModerator) && !props.proposal.flagged) {
items.push({ text: t('flag'), action: 'flag' });
} else {
items.push({ text: t('report'), action: 'report' });
}
if (props.isAdmin || props.isModerator || isCreator.value)
items.push({ text: t('delete'), action: 'delete' });
return items;
Expand Down Expand Up @@ -157,8 +159,7 @@ watch(
<template #item="{ item }">
<div class="flex items-center gap-2">
<i-ho-document-duplicate v-if="item.action === 'duplicate'" />
<i-ho-flag v-if="item.action === 'report'" />
<i-ho-exclamation v-if="item.action === 'flag'" />
<i-ho-flag v-if="item.action === 'report' || item.action === 'flag'" />
<i-ho-trash v-if="item.action === 'delete'" />
{{ item.text }}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/locales/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
"copyLink": "Copy link",
"duplicate": "Duplicate",
"report": "Report",
"flag": "Flag proposal",
"flag": "Flag",
"joinedSpaces": "Joined spaces",
"joinSpaces": "Join spaces",
"setDelegationToSpace": "Limit delegation to a specific space",
Expand Down

0 comments on commit 71a504f

Please sign in to comment.