mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 11:42:30 +03:00
UBERF-6638: fix colours for statuses (#5620)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
parent
f98765af3a
commit
4fe6e5e62c
@ -30,12 +30,14 @@
|
||||
<Icon {icon} size={'medium'} />
|
||||
{/if}
|
||||
{#if iconComponent}
|
||||
{#await getResource(iconComponent) then component}
|
||||
<svelte:component this={component} size={'smaller'} {...value.iconProps} />
|
||||
{/await}
|
||||
<div class="icon-place">
|
||||
{#await getResource(iconComponent) then component}
|
||||
<svelte:component this={component} size={'smaller'} {...value.iconProps} />
|
||||
{/await}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<span class="ml-2 max-w-120 overflow-label searchResult">
|
||||
<span class="ml-1 max-w-120 overflow-label searchResult">
|
||||
{#if value.shortTitle !== undefined}
|
||||
<span class="shortTitle">{value.shortTitle}</span>
|
||||
{/if}
|
||||
@ -44,6 +46,9 @@
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.icon-place {
|
||||
width: 20px;
|
||||
}
|
||||
.searchResult {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
@ -104,6 +104,7 @@
|
||||
props={{
|
||||
value: message,
|
||||
hideLink: true,
|
||||
space: object.space,
|
||||
boundary,
|
||||
type: canGroup ? 'short' : 'default'
|
||||
}}
|
||||
|
@ -51,6 +51,7 @@
|
||||
<Component
|
||||
is={objectPresenter.presenter}
|
||||
props={{
|
||||
space: value.space,
|
||||
value,
|
||||
showNotify,
|
||||
skipLabel,
|
||||
|
@ -17,7 +17,7 @@
|
||||
import { DisplayActivityMessage, ActivityMessagePreviewType } from '@hcengineering/activity'
|
||||
import { getClient } from '@hcengineering/presentation'
|
||||
import { Action, Component } from '@hcengineering/ui'
|
||||
import { Class, Doc, Ref } from '@hcengineering/core'
|
||||
import { Class, Doc, Ref, Space } from '@hcengineering/core'
|
||||
|
||||
import activity from '../../plugin'
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
export let readonly = false
|
||||
export let type: ActivityMessagePreviewType = 'full'
|
||||
export let actions: Action[] = []
|
||||
export let space: Ref<Space> | undefined = undefined
|
||||
|
||||
const client = getClient()
|
||||
const hierarchy = client.getHierarchy()
|
||||
@ -42,7 +43,8 @@
|
||||
value,
|
||||
type,
|
||||
readonly,
|
||||
actions
|
||||
actions,
|
||||
space
|
||||
}}
|
||||
on:click
|
||||
/>
|
||||
|
@ -23,11 +23,13 @@
|
||||
import AddedAttributesPresenter from './attributes/AddedAttributesPresenter.svelte'
|
||||
import RemovedAttributesPresenter from './attributes/RemovedAttributesPresenter.svelte'
|
||||
import SetAttributesPresenter from './attributes/SetAttributesPresenter.svelte'
|
||||
import { Ref, Space } from '@hcengineering/core'
|
||||
|
||||
export let viewlet: DocUpdateMessageViewlet | undefined
|
||||
export let attributeUpdates: DocAttributeUpdates
|
||||
export let attributeModel: AttributeModel
|
||||
export let preview = false
|
||||
export let space: Ref<Space> | undefined = undefined
|
||||
|
||||
const client = getClient()
|
||||
const hierarchy = client.getHierarchy()
|
||||
@ -39,7 +41,7 @@
|
||||
</script>
|
||||
|
||||
{#if presenter}
|
||||
<Component is={presenter} props={{ value: attributeUpdates }} />
|
||||
<Component is={presenter} props={{ value: attributeUpdates, space }} />
|
||||
{:else}
|
||||
{#if attributeUpdates.added.length}
|
||||
<AddedAttributesPresenter {viewlet} {attributeModel} values={attributeUpdates.added} {preview} />
|
||||
@ -52,6 +54,7 @@
|
||||
{viewlet}
|
||||
{attributeModel}
|
||||
values={attributeUpdates.set}
|
||||
{space}
|
||||
prevValue={attributeUpdates.prevValue}
|
||||
{preview}
|
||||
/>
|
||||
|
@ -23,7 +23,7 @@
|
||||
} from '@hcengineering/activity'
|
||||
import { Person, PersonAccount } from '@hcengineering/contact'
|
||||
import { personAccountByIdStore, personByIdStore } from '@hcengineering/contact-resources'
|
||||
import { Account, AttachedDoc, Class, Collection, Doc, Ref } from '@hcengineering/core'
|
||||
import { Account, AttachedDoc, Class, Collection, Doc, Ref, Space } from '@hcengineering/core'
|
||||
import { IntlString } from '@hcengineering/platform'
|
||||
import { createQuery, getClient } from '@hcengineering/presentation'
|
||||
import { Component, ShowMore, Action } from '@hcengineering/ui'
|
||||
@ -53,6 +53,7 @@
|
||||
export let hoverStyles: 'borderedHover' | 'filledHover' = 'borderedHover'
|
||||
export let hideLink = false
|
||||
export let type: ActivityMessageViewType = 'default'
|
||||
export let space: Ref<Space> | undefined = undefined
|
||||
export let onClick: (() => void) | undefined = undefined
|
||||
|
||||
const client = getClient()
|
||||
@ -206,7 +207,7 @@
|
||||
/>
|
||||
</ShowMore>
|
||||
{:else if value.attributeUpdates && attributeModel}
|
||||
<DocUpdateMessageAttributes attributeUpdates={value.attributeUpdates} {attributeModel} {viewlet} />
|
||||
<DocUpdateMessageAttributes attributeUpdates={value.attributeUpdates} {attributeModel} {viewlet} {space} />
|
||||
{/if}
|
||||
</svelte:fragment>
|
||||
</ActivityMessageTemplate>
|
||||
|
@ -22,7 +22,7 @@
|
||||
import { Action, Component, Icon } from '@hcengineering/ui'
|
||||
import { createQuery, getClient } from '@hcengineering/presentation'
|
||||
import { IntlString } from '@hcengineering/platform'
|
||||
import { AttachedDoc, Class, Collection, Doc, Ref } from '@hcengineering/core'
|
||||
import { AttachedDoc, Class, Collection, Doc, Ref, Space } from '@hcengineering/core'
|
||||
import { AttributeModel } from '@hcengineering/view'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import { buildRemovedDoc, checkIsObjectRemoved } from '@hcengineering/view-resources'
|
||||
@ -36,6 +36,7 @@
|
||||
export let readonly = false
|
||||
export let type: ActivityMessagePreviewType = 'full'
|
||||
export let actions: Action[] = []
|
||||
export let space: Ref<Space> | undefined = undefined
|
||||
|
||||
const client = getClient()
|
||||
const hierarchy = client.getHierarchy()
|
||||
@ -118,7 +119,13 @@
|
||||
preview
|
||||
/>
|
||||
{:else if value.attributeUpdates && attributeModel}
|
||||
<DocUpdateMessageAttributes attributeUpdates={value.attributeUpdates} {attributeModel} {viewlet} preview />
|
||||
<DocUpdateMessageAttributes
|
||||
attributeUpdates={value.attributeUpdates}
|
||||
{attributeModel}
|
||||
{space}
|
||||
{viewlet}
|
||||
preview
|
||||
/>
|
||||
{/if}
|
||||
</span>
|
||||
</BaseMessagePreview>
|
||||
|
@ -16,7 +16,7 @@
|
||||
import { Icon, IconEdit, Component } from '@hcengineering/ui'
|
||||
import { ObjectPresenter } from '@hcengineering/view-resources'
|
||||
import { getClient } from '@hcengineering/presentation'
|
||||
import { Doc } from '@hcengineering/core'
|
||||
import { Doc, Ref, Space } from '@hcengineering/core'
|
||||
import { AttributeModel } from '@hcengineering/view'
|
||||
import { DocAttributeUpdates, DocUpdateMessageViewlet } from '@hcengineering/activity'
|
||||
|
||||
@ -27,6 +27,7 @@
|
||||
export let attributeModel: AttributeModel
|
||||
export let values: Values
|
||||
export let preview = false
|
||||
export let space: Ref<Space> | undefined = undefined
|
||||
|
||||
const client = getClient()
|
||||
|
||||
@ -38,13 +39,16 @@
|
||||
|
||||
$: attrViewletConfig = viewlet?.config?.[attributeModel.key]
|
||||
$: attributeIcon = attrViewletConfig?.icon ?? attributeModel.icon ?? IconEdit
|
||||
$: space = typeof attributeValues[0] === 'object' ? attributeValues[0]?.space : undefined
|
||||
$: _space = space ?? (typeof attributeValues[0] === 'object' ? attributeValues[0]?.space : undefined)
|
||||
</script>
|
||||
|
||||
<div class="content overflow-label" class:preview>
|
||||
<span class="mr-1">
|
||||
{#if attrViewletConfig?.iconPresenter}
|
||||
<Component is={attrViewletConfig?.iconPresenter} props={{ value: attributeValues[0], space, size: 'small' }} />
|
||||
<Component
|
||||
is={attrViewletConfig?.iconPresenter}
|
||||
props={{ value: attributeValues[0], space: _space, size: 'small' }}
|
||||
/>
|
||||
{:else}
|
||||
<Icon icon={attributeIcon} size="small" />
|
||||
{/if}
|
||||
|
@ -19,12 +19,14 @@
|
||||
|
||||
import ChangeAttributesTemplate from './ChangeAttributesTemplate.svelte'
|
||||
import { getIsTextType } from '../../../utils'
|
||||
import { Ref, Space } from '@hcengineering/core'
|
||||
|
||||
export let viewlet: DocUpdateMessageViewlet | undefined
|
||||
export let attributeModel: AttributeModel
|
||||
export let values: DocAttributeUpdates['set']
|
||||
export let prevValue: any
|
||||
export let preview = false
|
||||
export let space: Ref<Space> | undefined = undefined
|
||||
|
||||
$: attrViewletConfig = viewlet?.config?.[attributeModel.key]
|
||||
$: attributeIcon = attrViewletConfig?.icon ?? attributeModel.icon ?? IconEdit
|
||||
@ -66,7 +68,7 @@
|
||||
{/if}
|
||||
{/if}
|
||||
{:else}
|
||||
<ChangeAttributesTemplate {viewlet} {attributeModel} {values} {preview}>
|
||||
<ChangeAttributesTemplate {viewlet} {attributeModel} {values} {preview} {space}>
|
||||
<svelte:fragment slot="text">
|
||||
<Label label={attributeModel.label} />
|
||||
<span class="lower"><Label label={activity.string.Set} /></span>
|
||||
|
@ -242,6 +242,7 @@
|
||||
<InboxNotificationPresenter
|
||||
value={group[0]}
|
||||
{viewlets}
|
||||
space={value.space}
|
||||
on:click={(e) => {
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
|
@ -14,7 +14,7 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { getClient } from '@hcengineering/presentation'
|
||||
import { matchQuery } from '@hcengineering/core'
|
||||
import { Ref, Space, matchQuery } from '@hcengineering/core'
|
||||
import notification, {
|
||||
ActivityInboxNotification,
|
||||
ActivityNotificationViewlet,
|
||||
@ -32,6 +32,7 @@
|
||||
|
||||
export let value: DisplayActivityInboxNotification
|
||||
export let viewlets: ActivityNotificationViewlet[] = []
|
||||
export let space: Ref<Space> | undefined = undefined
|
||||
|
||||
const client = getClient()
|
||||
|
||||
@ -99,6 +100,6 @@
|
||||
on:click
|
||||
/>
|
||||
{:else}
|
||||
<ActivityMessagePreview value={displayMessage} {actions} on:click />
|
||||
<ActivityMessagePreview value={displayMessage} {actions} {space} on:click />
|
||||
{/if}
|
||||
{/if}
|
||||
|
@ -16,11 +16,12 @@
|
||||
import view from '@hcengineering/view'
|
||||
import { getClient } from '@hcengineering/presentation'
|
||||
import { Component } from '@hcengineering/ui'
|
||||
import { Class, Doc, Ref } from '@hcengineering/core'
|
||||
import { Class, Doc, type Ref, type Space } from '@hcengineering/core'
|
||||
import { ActivityNotificationViewlet, DisplayInboxNotification } from '@hcengineering/notification'
|
||||
|
||||
export let value: DisplayInboxNotification
|
||||
export let viewlets: ActivityNotificationViewlet[] = []
|
||||
export let space: Ref<Space> | undefined = undefined
|
||||
|
||||
const client = getClient()
|
||||
const hierarchy = client.getHierarchy()
|
||||
@ -29,5 +30,5 @@
|
||||
</script>
|
||||
|
||||
{#if objectPresenter}
|
||||
<Component is={objectPresenter.presenter} props={{ value, viewlets }} on:click />
|
||||
<Component is={objectPresenter.presenter} props={{ value, viewlets, space }} on:click />
|
||||
{/if}
|
||||
|
Loading…
Reference in New Issue
Block a user