mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 00:08:25 +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
50 lines
1.0 KiB
Vue
50 lines
1.0 KiB
Vue
<!-- eslint-disable vue/no-v-html -->
|
|
<template>
|
|
<div
|
|
class="card-rich-text field-rich-text--preview"
|
|
v-html="formattedValue"
|
|
></div>
|
|
</template>
|
|
|
|
<script>
|
|
import { parseMarkdown } from '@baserow/modules/core/editor/markdown'
|
|
|
|
export default {
|
|
props: {
|
|
value: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
workspaceId: {
|
|
type: Number,
|
|
required: true,
|
|
},
|
|
enableMentions: {
|
|
type: Boolean,
|
|
default: true,
|
|
},
|
|
enableImages: {
|
|
type: Boolean,
|
|
default: true,
|
|
},
|
|
},
|
|
height: 32,
|
|
computed: {
|
|
formattedValue() {
|
|
const workspace = this.$store.getters['workspace/get'](this.workspaceId)
|
|
const loggedUserId = this.$store.getters['auth/getUserId']
|
|
|
|
return parseMarkdown(this.value, {
|
|
openLinkOnClick: true,
|
|
enableImages: this.enableImages,
|
|
workspaceUsers:
|
|
this.enableMentions && workspace
|
|
? this.$store.getters['workspace/getCollaborators'](workspace.id)
|
|
: null,
|
|
loggedUserId,
|
|
})
|
|
},
|
|
},
|
|
}
|
|
</script>
|