Skip to content

Commit 2d3dd3b

Browse files
committed
Show delete retore events in Entity feed
1 parent d664426 commit 2d3dd3b

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

src/components/entity/feed-entry.vue

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,21 @@ except according to the terms contained in the LICENSE file.
129129
<template #name><actor-link :actor="entry.actor"/></template>
130130
</i18n-t>
131131
</template>
132+
<template v-else-if="entry.action === 'entity.delete'">
133+
<span class="icon-trash"></span>
134+
<i18n-t keypath="title.entity.delete">
135+
<template #name><actor-link :actor="entry.actor"/></template>
136+
</i18n-t>
137+
</template>
138+
<template v-else-if="entry.action === 'entity.restore'">
139+
<span class="icon-recycle"></span>
140+
<i18n-t keypath="title.entity.restore">
141+
<template #label>
142+
<span class="entity-label">{{ entity.currentVersion.label }}</span>
143+
</template>
144+
<template #name><actor-link :actor="entry.actor"/></template>
145+
</i18n-t>
146+
</template>
132147
</template>
133148
<template #body>
134149
<entity-diff v-if="entityVersion != null && entityVersion.version !== 1"/>
@@ -200,6 +215,8 @@ const showBranchData = () => {
200215
color: #bbb;
201216
vertical-align: -2px;
202217
}
218+
.icon-trash { color: #bbb; }
219+
.icon-recycle {color: #bbb; }
203220
204221
.deleted-submission, .entity-label, .source-name { font-weight: normal; }
205222
.deleted-submission { color: $color-danger; }
@@ -282,7 +299,13 @@ const showBranchData = () => {
282299
},
283300
// This text is shown in a list of events. {name} is the name of a Web
284301
// User.
285-
"update_resolve": "Conflict warning resolved by {name}"
302+
"update_resolve": "Conflict warning resolved by {name}",
303+
// This text is shown in a list of events. {name} is the name of a Web
304+
// User.
305+
"delete": "Entity {label} deleted by {name}",
306+
// This text is shown in a list of events. {name} is the name of a Web
307+
// User.
308+
"restore": "Entity {label} undeleted by {name}"
286309
}
287310
},
288311
// This is shown for an update to an Entity when the update was made offline

transifex/strings_en.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2021,6 +2021,14 @@
20212021
"update_resolve": {
20222022
"string": "Conflict warning resolved by {name}",
20232023
"developer_comment": "This text is shown in a list of events. {name} is the name of a Web User."
2024+
},
2025+
"delete": {
2026+
"string": "Entity {label} deleted by {name}",
2027+
"developer_comment": "This text is shown in a list of events. {name} is the name of a Web User."
2028+
},
2029+
"restore": {
2030+
"string": "Entity {label} undeleted by {name}",
2031+
"developer_comment": "This text is shown in a list of events. {name} is the name of a Web User."
20242032
}
20252033
}
20262034
},

0 commit comments

Comments
 (0)