mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-23 16:56:07 +00:00
Fix popups. Increased image size of the assignee. (#2117)
Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
parent
af0b0f3ec2
commit
f6d931cd34
@ -27,7 +27,7 @@
|
|||||||
showPopup,
|
showPopup,
|
||||||
Tooltip
|
Tooltip
|
||||||
} from '@anticrm/ui'
|
} from '@anticrm/ui'
|
||||||
import { createEventDispatcher } from 'svelte'
|
import { createEventDispatcher, afterUpdate } from 'svelte'
|
||||||
import presentation from '..'
|
import presentation from '..'
|
||||||
import { createQuery, getClient } from '../utils'
|
import { createQuery, getClient } from '../utils'
|
||||||
|
|
||||||
@ -156,20 +156,23 @@
|
|||||||
function toAny (obj: any): any {
|
function toAny (obj: any): any {
|
||||||
return obj
|
return obj
|
||||||
}
|
}
|
||||||
|
|
||||||
|
afterUpdate(() => dispatch('changeContent'))
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<FocusHandler {manager} />
|
<FocusHandler {manager} />
|
||||||
|
|
||||||
<div class="selectPopup" class:plainContainer={!shadows} class:width-40={width === 'large'} on:keydown={onKeydown}>
|
<div class="selectPopup" class:plainContainer={!shadows} class:width-40={width === 'large'} on:keydown={onKeydown}>
|
||||||
<div class="header flex-row-center flex-bletween p-1">
|
<div class="header flex-bletween">
|
||||||
<div class="flex-grow">
|
|
||||||
<EditBox kind={'search-style'} focusIndex={1} focus bind:value={search} {placeholder} />
|
<EditBox kind={'search-style'} focusIndex={1} focus bind:value={search} {placeholder} />
|
||||||
</div>
|
|
||||||
|
|
||||||
{#if create !== undefined}
|
{#if create !== undefined}
|
||||||
<Tooltip label={create.label}>
|
<Button
|
||||||
<Button focusIndex={2} kind={'transparent'} icon={IconAdd} on:click={onCreate} />
|
focusIndex={2}
|
||||||
</Tooltip>
|
kind={'transparent'}
|
||||||
|
icon={IconAdd}
|
||||||
|
showTooltip={{ label: create.label }}
|
||||||
|
on:click={onCreate}
|
||||||
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<div class="scroll">
|
<div class="scroll">
|
||||||
|
@ -26,8 +26,7 @@
|
|||||||
getFocusManager,
|
getFocusManager,
|
||||||
Label,
|
Label,
|
||||||
showPopup,
|
showPopup,
|
||||||
Tooltip,
|
LabelAndProps
|
||||||
TooltipAlignment
|
|
||||||
} from '@anticrm/ui'
|
} from '@anticrm/ui'
|
||||||
import { createEventDispatcher } from 'svelte'
|
import { createEventDispatcher } from 'svelte'
|
||||||
import presentation from '..'
|
import presentation from '..'
|
||||||
@ -50,8 +49,8 @@
|
|||||||
export let size: ButtonSize = 'small'
|
export let size: ButtonSize = 'small'
|
||||||
export let justify: 'left' | 'center' = 'center'
|
export let justify: 'left' | 'center' = 'center'
|
||||||
export let width: string | undefined = undefined
|
export let width: string | undefined = undefined
|
||||||
export let labelDirection: TooltipAlignment | undefined = undefined
|
|
||||||
export let focusIndex = -1
|
export let focusIndex = -1
|
||||||
|
export let showTooltip: LabelAndProps | undefined = undefined
|
||||||
|
|
||||||
export let create:
|
export let create:
|
||||||
| {
|
| {
|
||||||
@ -113,7 +112,6 @@
|
|||||||
|
|
||||||
<div bind:this={container} class="min-w-0" class:w-full={width === '100%'}>
|
<div bind:this={container} class="min-w-0" class:w-full={width === '100%'}>
|
||||||
{#if kind !== 'link'}
|
{#if kind !== 'link'}
|
||||||
<Tooltip {label} fill={width === '100%'} direction={labelDirection}>
|
|
||||||
<Button
|
<Button
|
||||||
{focusIndex}
|
{focusIndex}
|
||||||
icon={size === 'x-large' && selected ? undefined : icon}
|
icon={size === 'x-large' && selected ? undefined : icon}
|
||||||
@ -121,6 +119,7 @@
|
|||||||
{size}
|
{size}
|
||||||
{kind}
|
{kind}
|
||||||
{justify}
|
{justify}
|
||||||
|
{showTooltip}
|
||||||
on:click={_click}
|
on:click={_click}
|
||||||
>
|
>
|
||||||
<span slot="content" class="overflow-label disabled">
|
<span slot="content" class="overflow-label disabled">
|
||||||
@ -135,7 +134,6 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</span>
|
</span>
|
||||||
</Button>
|
</Button>
|
||||||
</Tooltip>
|
|
||||||
{:else}
|
{:else}
|
||||||
<Button
|
<Button
|
||||||
{focusIndex}
|
{focusIndex}
|
||||||
@ -144,6 +142,7 @@
|
|||||||
{size}
|
{size}
|
||||||
{kind}
|
{kind}
|
||||||
{justify}
|
{justify}
|
||||||
|
{showTooltip}
|
||||||
on:click={_click}
|
on:click={_click}
|
||||||
>
|
>
|
||||||
<span slot="content" class="overflow-label disabled">
|
<span slot="content" class="overflow-label disabled">
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { createEventDispatcher, afterUpdate } from 'svelte'
|
||||||
import { Contact, getFirstName, Person } from '@anticrm/contact'
|
import { Contact, getFirstName, Person } from '@anticrm/contact'
|
||||||
import type { Class, Doc, FindOptions, Ref } from '@anticrm/core'
|
import type { Class, Doc, FindOptions, Ref } from '@anticrm/core'
|
||||||
import type { Asset, IntlString } from '@anticrm/platform'
|
import type { Asset, IntlString } from '@anticrm/platform'
|
||||||
@ -53,6 +54,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
: undefined
|
: undefined
|
||||||
|
|
||||||
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
|
afterUpdate(() => dispatch('changeContent'))
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<ObjectPopup
|
<ObjectPopup
|
||||||
@ -70,6 +75,7 @@
|
|||||||
create={_create}
|
create={_create}
|
||||||
on:update
|
on:update
|
||||||
on:close
|
on:close
|
||||||
|
on:changeContent={() => dispatch('changeContent')}
|
||||||
>
|
>
|
||||||
<svelte:fragment slot="item" let:item={person}>
|
<svelte:fragment slot="item" let:item={person}>
|
||||||
<div class="flex flex-grow overflow-label">
|
<div class="flex flex-grow overflow-label">
|
||||||
|
@ -123,6 +123,7 @@
|
|||||||
on:fullsize={() => {
|
on:fullsize={() => {
|
||||||
fullSize = !fullSize
|
fullSize = !fullSize
|
||||||
}}
|
}}
|
||||||
|
on:changeContent={fitPopup}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
@ -49,9 +49,7 @@
|
|||||||
{#each value.filter((el) => (el.label ?? el.text ?? '').toLowerCase().includes(search.toLowerCase())) as item}
|
{#each value.filter((el) => (el.label ?? el.text ?? '').toLowerCase().includes(search.toLowerCase())) as item}
|
||||||
<button
|
<button
|
||||||
class="menu-item"
|
class="menu-item"
|
||||||
on:click={() => {
|
on:click={() => dispatch('close', item.id)}
|
||||||
dispatch('close', item.id)
|
|
||||||
}}
|
|
||||||
on:focus={() => dispatch('update', item)}
|
on:focus={() => dispatch('update', item)}
|
||||||
on:mouseover={() => dispatch('update', item)}
|
on:mouseover={() => dispatch('update', item)}
|
||||||
>
|
>
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
import CreateDepartment from './CreateDepartment.svelte'
|
import CreateDepartment from './CreateDepartment.svelte'
|
||||||
import DepartmentCard from './DepartmentCard.svelte'
|
import DepartmentCard from './DepartmentCard.svelte'
|
||||||
import hr from '../plugin'
|
import hr from '../plugin'
|
||||||
import { IconAdd, IconMoreV, Button, eventToHTMLElement, Label, showPopup, ActionIcon, showPanel } from '@anticrm/ui'
|
import { IconAdd, IconMoreV, Button, eventToHTMLElement, Label, showPopup, showPanel } from '@anticrm/ui'
|
||||||
import contact, { Employee } from '@anticrm/contact'
|
import contact, { Employee } from '@anticrm/contact'
|
||||||
import { EmployeePresenter } from '@anticrm/contact-resources'
|
import { EmployeePresenter } from '@anticrm/contact-resources'
|
||||||
import { Menu } from '@anticrm/view-resources'
|
import { Menu } from '@anticrm/view-resources'
|
||||||
@ -113,7 +113,7 @@
|
|||||||
onEmployeeEdit={openLeadEditor}
|
onEmployeeEdit={openLeadEditor}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<ActionIcon icon={IconMoreV} size={'medium'} action={showMenu} />
|
<Button icon={IconMoreV} kind={'transparent'} on:click={showMenu} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -130,10 +130,4 @@
|
|||||||
border: 1px solid var(--theme-zone-border);
|
border: 1px solid var(--theme-zone-border);
|
||||||
background-color: var(--board-card-bg-color);
|
background-color: var(--board-card-bg-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.verticalDivider {
|
|
||||||
width: 1px;
|
|
||||||
margin-left: 0.125rem;
|
|
||||||
background-color: var(--theme-zone-border);
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -75,7 +75,13 @@
|
|||||||
updateResultQuery(search)
|
updateResultQuery(search)
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Button label={hr.string.CreateDepartmentLabel} icon={IconAdd} kind={'primary'} on:click={showCreateDialog} />
|
<Button
|
||||||
|
label={hr.string.CreateDepartmentLabel}
|
||||||
|
icon={IconAdd}
|
||||||
|
kind={'primary'}
|
||||||
|
size={'small'}
|
||||||
|
on:click={showCreateDialog}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Scroller>
|
<Scroller>
|
||||||
|
@ -303,7 +303,6 @@
|
|||||||
value={object}
|
value={object}
|
||||||
size="small"
|
size="small"
|
||||||
kind="no-border"
|
kind="no-border"
|
||||||
tooltipFill={false}
|
|
||||||
on:change={({ detail }) => (currentAssignee = detail)}
|
on:change={({ detail }) => (currentAssignee = detail)}
|
||||||
/>
|
/>
|
||||||
<Component
|
<Component
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
import { AttachedData, Ref } from '@anticrm/core'
|
import { AttachedData, Ref } from '@anticrm/core'
|
||||||
import { getClient, UserBox } from '@anticrm/presentation'
|
import { getClient, UserBox } from '@anticrm/presentation'
|
||||||
import { Issue } from '@anticrm/tracker'
|
import { Issue } from '@anticrm/tracker'
|
||||||
import { ButtonKind, ButtonSize, Tooltip, TooltipAlignment } from '@anticrm/ui'
|
import { ButtonKind, ButtonSize, TooltipAlignment } from '@anticrm/ui'
|
||||||
import contact from '@anticrm/contact'
|
import contact from '@anticrm/contact'
|
||||||
import tracker from '../../plugin'
|
import tracker from '../../plugin'
|
||||||
|
|
||||||
@ -26,7 +26,6 @@
|
|||||||
export let size: ButtonSize = 'large'
|
export let size: ButtonSize = 'large'
|
||||||
export let kind: ButtonKind = 'link'
|
export let kind: ButtonKind = 'link'
|
||||||
export let tooltipAlignment: TooltipAlignment | undefined = undefined
|
export let tooltipAlignment: TooltipAlignment | undefined = undefined
|
||||||
export let tooltipFill = true
|
|
||||||
|
|
||||||
const client = getClient()
|
const client = getClient()
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
@ -45,7 +44,6 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if value}
|
{#if value}
|
||||||
<Tooltip label={tracker.string.AssignTo} direction={tooltipAlignment} fill={tooltipFill}>
|
|
||||||
<UserBox
|
<UserBox
|
||||||
_class={contact.class.Employee}
|
_class={contact.class.Employee}
|
||||||
label={tracker.string.Assignee}
|
label={tracker.string.Assignee}
|
||||||
@ -55,9 +53,9 @@
|
|||||||
titleDeselect={tracker.string.Unassigned}
|
titleDeselect={tracker.string.Unassigned}
|
||||||
{size}
|
{size}
|
||||||
{kind}
|
{kind}
|
||||||
width="100%"
|
width={'100%'}
|
||||||
justify="left"
|
justify={'left'}
|
||||||
|
showTooltip={{ label: tracker.string.AssignTo, direction: tooltipAlignment }}
|
||||||
on:change={({ detail }) => handleAssigneeChanged(detail)}
|
on:change={({ detail }) => handleAssigneeChanged(detail)}
|
||||||
/>
|
/>
|
||||||
</Tooltip>
|
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -97,7 +97,7 @@
|
|||||||
this={presenter.presenter}
|
this={presenter.presenter}
|
||||||
{value}
|
{value}
|
||||||
{defaultName}
|
{defaultName}
|
||||||
avatarSize={'tiny'}
|
avatarSize={'x-small'}
|
||||||
isInteractive={true}
|
isInteractive={true}
|
||||||
shouldShowPlaceholder={true}
|
shouldShowPlaceholder={true}
|
||||||
shouldShowName={shouldShowLabel}
|
shouldShowName={shouldShowLabel}
|
||||||
|
@ -85,7 +85,7 @@
|
|||||||
<StatusEditor value={issue} {statuses} shouldShowLabel kind={'transparent'} />
|
<StatusEditor value={issue} {statuses} shouldShowLabel kind={'transparent'} />
|
||||||
<PriorityEditor value={issue} shouldShowLabel />
|
<PriorityEditor value={issue} shouldShowLabel />
|
||||||
{#if issue.assignee}
|
{#if issue.assignee}
|
||||||
<AssigneeEditor value={issue} tooltipFill={false} />
|
<AssigneeEditor value={issue} />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<IssueStatusActivity {issue} />
|
<IssueStatusActivity {issue} />
|
||||||
|
@ -168,7 +168,7 @@
|
|||||||
defaultName={tracker.string.NoAssignee}
|
defaultName={tracker.string.NoAssignee}
|
||||||
shouldShowPlaceholder={true}
|
shouldShowPlaceholder={true}
|
||||||
isInteractive={false}
|
isInteractive={false}
|
||||||
avatarSize={'tiny'}
|
avatarSize={'x-small'}
|
||||||
/>
|
/>
|
||||||
{:else if headerComponent}
|
{:else if headerComponent}
|
||||||
<Component
|
<Component
|
||||||
|
@ -187,7 +187,6 @@
|
|||||||
value={newIssue}
|
value={newIssue}
|
||||||
size="small"
|
size="small"
|
||||||
kind="no-border"
|
kind="no-border"
|
||||||
tooltipFill={false}
|
|
||||||
on:change={({ detail }) => (newIssue.assignee = detail)}
|
on:change={({ detail }) => (newIssue.assignee = detail)}
|
||||||
/>
|
/>
|
||||||
<Component
|
<Component
|
||||||
|
@ -134,7 +134,7 @@
|
|||||||
{#if issue.dueDate !== null}
|
{#if issue.dueDate !== null}
|
||||||
<DueDateEditor value={issue} />
|
<DueDateEditor value={issue} />
|
||||||
{/if}
|
{/if}
|
||||||
<AssigneeEditor value={issue} tooltipFill={false} />
|
<AssigneeEditor value={issue} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
-->
|
-->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { createEventDispatcher, afterUpdate } from 'svelte'
|
||||||
import type { Class, Doc, Ref } from '@anticrm/core'
|
import type { Class, Doc, Ref } from '@anticrm/core'
|
||||||
import type { Asset } from '@anticrm/platform'
|
import type { Asset } from '@anticrm/platform'
|
||||||
import { getClient } from '@anticrm/presentation'
|
import { getClient } from '@anticrm/presentation'
|
||||||
@ -26,6 +27,7 @@
|
|||||||
export let mode: ViewContextType | undefined = undefined
|
export let mode: ViewContextType | undefined = undefined
|
||||||
|
|
||||||
const client = getClient()
|
const client = getClient()
|
||||||
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
let loaded = 0
|
let loaded = 0
|
||||||
|
|
||||||
@ -40,6 +42,8 @@
|
|||||||
}))
|
}))
|
||||||
loaded = 1
|
loaded = 1
|
||||||
})
|
})
|
||||||
|
|
||||||
|
afterUpdate(() => dispatch('changeContent'))
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if loaded}
|
{#if loaded}
|
||||||
|
Loading…
Reference in New Issue
Block a user