mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 08:18:42 +00:00
* feat(database): assign and mention identities behind a field option - Collaborator fields get `include_identities` and long text fields `long_text_include_identities`, both off by default. - With the option on, active identities of the workspace can be assigned or suggested as mentions; they are shown with their icon and renamed in realtime, and they never receive notifications. - Turning the collaborator option off backs up the column, deletes the identity assignments and strips identities from the view defaults, so the update can be undone. - Identities can author row comments and be mentioned in them. - Exports write an identity as `Name <identity>`. * refactor: hide internal emails in collaborator exports through one check * fix: import a personal view only for a person, without a query per owner * fix: show collaborator identities with the icon of the user subject type * refactor: drop a redundant local import of the core handler * fix: unify identity icons and space field options * fix: keep identity field menus and saved mentions readable * fix: limit identity mention suggestions to row comments * perf: prefetch available collaborators once per workspace * fix: use workspace members as authors of generated rows * fix: resolve linked collaborator values by member email * fix: use workspace collaborators for field pickers and paste * refactor: move identity avatar styles to the avatar stylesheet * fix: address review feedback on identity collaborators
79 lines
2.1 KiB
Vue
79 lines
2.1 KiB
Vue
<template>
|
|
<div class="row-history-entry__field-content">
|
|
<div v-if="entry.before[fieldIdentifier]">
|
|
<div
|
|
class="row-history-entry__diff row-history-entry__diff--removed row-history-entry__diff--full-width"
|
|
>
|
|
<RichTextEditor
|
|
:editable="false"
|
|
:enable-rich-text-formatting="true"
|
|
:mentionable-users="
|
|
$store.getters['workspace/getCollaborators'](workspace.id)
|
|
"
|
|
:model-value="beforeValue"
|
|
></RichTextEditor>
|
|
</div>
|
|
</div>
|
|
<div v-if="entry.after[fieldIdentifier]">
|
|
<div
|
|
class="row-history-entry__diff row-history-entry__diff--added row-history-entry__diff--full-width"
|
|
>
|
|
<RichTextEditor
|
|
:editable="false"
|
|
:enable-rich-text-formatting="true"
|
|
:mentionable-users="
|
|
$store.getters['workspace/getCollaborators'](workspace.id)
|
|
"
|
|
:model-value="afterValue"
|
|
></RichTextEditor>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import RichTextEditor from '@baserow/modules/core/components/editor/RichTextEditor.vue'
|
|
import { replaceImagesWithPlaceholder } from '@baserow/modules/core/editor/richTextImageUtils'
|
|
|
|
export default {
|
|
name: 'RowHistoryFieldText',
|
|
components: { RichTextEditor },
|
|
props: {
|
|
workspaceId: {
|
|
type: Number,
|
|
required: true,
|
|
},
|
|
entry: {
|
|
type: Object,
|
|
required: true,
|
|
},
|
|
fieldIdentifier: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
field: {
|
|
type: Object,
|
|
required: false,
|
|
default: null,
|
|
},
|
|
},
|
|
computed: {
|
|
workspace() {
|
|
return this.$store.getters['workspace/get'](this.workspaceId)
|
|
},
|
|
// History serves the stored snapshot, whose image refs the editor renders as
|
|
// literal markdown here because images are off. Show the alt text instead.
|
|
beforeValue() {
|
|
return replaceImagesWithPlaceholder(
|
|
this.entry.before[this.fieldIdentifier]
|
|
)
|
|
},
|
|
afterValue() {
|
|
return replaceImagesWithPlaceholder(
|
|
this.entry.after[this.fieldIdentifier]
|
|
)
|
|
},
|
|
},
|
|
}
|
|
</script>
|