mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-28 03:10:17 +00:00
Fix components. (#2122)
Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
parent
c98a80ff17
commit
ec8b76c299
@ -163,16 +163,19 @@
|
|||||||
<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-bletween">
|
<div class="header flex-between">
|
||||||
<EditBox kind={'search-style'} focusIndex={1} focus bind:value={search} {placeholder} />
|
<EditBox kind={'search-style'} focusIndex={1} focus bind:value={search} {placeholder} />
|
||||||
{#if create !== undefined}
|
{#if create !== undefined}
|
||||||
|
<div class="mx-2">
|
||||||
<Button
|
<Button
|
||||||
focusIndex={2}
|
focusIndex={2}
|
||||||
kind={'transparent'}
|
kind={'transparent'}
|
||||||
|
size={'small'}
|
||||||
icon={IconAdd}
|
icon={IconAdd}
|
||||||
showTooltip={{ label: create.label }}
|
showTooltip={{ label: create.label }}
|
||||||
on:click={onCreate}
|
on:click={onCreate}
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<div class="scroll">
|
<div class="scroll">
|
||||||
|
@ -135,6 +135,7 @@
|
|||||||
width: 40rem;
|
width: 40rem;
|
||||||
height: max-content;
|
height: max-content;
|
||||||
max-width: 40rem;
|
max-width: 40rem;
|
||||||
|
max-height: calc(100vh - 2rem);
|
||||||
|
|
||||||
.antiCard-header {
|
.antiCard-header {
|
||||||
padding: .75rem .75rem .375rem;
|
padding: .75rem .75rem .375rem;
|
||||||
|
@ -303,6 +303,7 @@
|
|||||||
value={object}
|
value={object}
|
||||||
size="small"
|
size="small"
|
||||||
kind="no-border"
|
kind="no-border"
|
||||||
|
width={'min-content'}
|
||||||
on:change={({ detail }) => (currentAssignee = detail)}
|
on:change={({ detail }) => (currentAssignee = detail)}
|
||||||
/>
|
/>
|
||||||
<Component
|
<Component
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
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 width: string = '100%'
|
||||||
|
|
||||||
const client = getClient()
|
const client = getClient()
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
@ -53,7 +54,7 @@
|
|||||||
titleDeselect={tracker.string.Unassigned}
|
titleDeselect={tracker.string.Unassigned}
|
||||||
{size}
|
{size}
|
||||||
{kind}
|
{kind}
|
||||||
width={'100%'}
|
{width}
|
||||||
justify={'left'}
|
justify={'left'}
|
||||||
showTooltip={{ label: tracker.string.AssignTo, direction: tooltipAlignment }}
|
showTooltip={{ label: tracker.string.AssignTo, direction: tooltipAlignment }}
|
||||||
on:change={({ detail }) => handleAssigneeChanged(detail)}
|
on:change={({ detail }) => handleAssigneeChanged(detail)}
|
||||||
|
@ -55,5 +55,13 @@
|
|||||||
font-size: 0.8125rem;
|
font-size: 0.8125rem;
|
||||||
color: var(--content-color);
|
color: var(--content-color);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: var(--caption-color);
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
&:active {
|
||||||
|
color: var(--accent-color);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -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} />
|
<AssigneeEditor value={issue} width={'min-content'} />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<IssueStatusActivity {issue} />
|
<IssueStatusActivity {issue} />
|
||||||
|
@ -17,7 +17,13 @@
|
|||||||
import { flip } from 'svelte/animate'
|
import { flip } from 'svelte/animate'
|
||||||
import { Doc, WithLookup } from '@anticrm/core'
|
import { Doc, WithLookup } from '@anticrm/core'
|
||||||
import { Issue, IssueStatus, Team } from '@anticrm/tracker'
|
import { Issue, IssueStatus, Team } from '@anticrm/tracker'
|
||||||
import { ActionContext, ContextMenu, ListSelectionProvider, SelectDirection } from '@anticrm/view-resources'
|
import {
|
||||||
|
ActionContext,
|
||||||
|
ContextMenu,
|
||||||
|
ListSelectionProvider,
|
||||||
|
SelectDirection,
|
||||||
|
FixedColumn
|
||||||
|
} from '@anticrm/view-resources'
|
||||||
import { showPanel, showPopup } from '@anticrm/ui'
|
import { showPanel, showPopup } from '@anticrm/ui'
|
||||||
import tracker from '../../../plugin'
|
import tracker from '../../../plugin'
|
||||||
import { getIssueId } from '../../../utils'
|
import { getIssueId } from '../../../utils'
|
||||||
@ -77,6 +83,16 @@
|
|||||||
// table.select(offset, of)
|
// table.select(offset, of)
|
||||||
// }
|
// }
|
||||||
})
|
})
|
||||||
|
|
||||||
|
let varsStyle: string = ''
|
||||||
|
const propsWidth: Record<string, number> = { issue: 0 }
|
||||||
|
$: if (propsWidth) {
|
||||||
|
varsStyle = ''
|
||||||
|
for (const key in propsWidth) varsStyle += `--fixed-${key}: ${propsWidth[key]}px;`
|
||||||
|
}
|
||||||
|
const checkWidth = (key: string, result: CustomEvent): void => {
|
||||||
|
if (result !== undefined) propsWidth[key] = result.detail
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<ActionContext
|
<ActionContext
|
||||||
@ -91,6 +107,7 @@
|
|||||||
class:is-dragging={index === draggingIndex}
|
class:is-dragging={index === draggingIndex}
|
||||||
class:is-dragged-over-up={draggingIndex !== null && index < draggingIndex && index === hoveringIndex}
|
class:is-dragged-over-up={draggingIndex !== null && index < draggingIndex && index === hoveringIndex}
|
||||||
class:is-dragged-over-down={draggingIndex !== null && index > draggingIndex && index === hoveringIndex}
|
class:is-dragged-over-down={draggingIndex !== null && index > draggingIndex && index === hoveringIndex}
|
||||||
|
style={varsStyle}
|
||||||
animate:flip={{ duration: 400 }}
|
animate:flip={{ duration: 400 }}
|
||||||
draggable={true}
|
draggable={true}
|
||||||
on:click|self={() => openIssue(issue)}
|
on:click|self={() => openIssue(issue)}
|
||||||
@ -110,22 +127,26 @@
|
|||||||
<div class="draggable-container">
|
<div class="draggable-container">
|
||||||
<div class="draggable-mark"><Circles /></div>
|
<div class="draggable-mark"><Circles /></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-center ml-6 clear-mins">
|
<div class="flex-row-center ml-6 clear-mins gap-2">
|
||||||
<div class="mr-1">
|
<PriorityEditor value={issue} isEditable kind={'list'} size={'small'} justify={'center'} />
|
||||||
<PriorityEditor value={issue} isEditable kind="transparent" justify="center" />
|
<span class="issuePresenter" on:click={() => openIssue(issue)}>
|
||||||
</div>
|
<FixedColumn
|
||||||
<span class="flex-no-shrink text" on:click={() => openIssue(issue)}>
|
width={propsWidth.issue}
|
||||||
|
key={'issue'}
|
||||||
|
justify={'left'}
|
||||||
|
on:update={(result) => checkWidth('issue', result)}
|
||||||
|
>
|
||||||
{getIssueId(currentTeam, issue)}
|
{getIssueId(currentTeam, issue)}
|
||||||
|
</FixedColumn>
|
||||||
</span>
|
</span>
|
||||||
<div class="mx-1">
|
|
||||||
<StatusEditor
|
<StatusEditor
|
||||||
value={issue}
|
value={issue}
|
||||||
statuses={issueStatuses}
|
statuses={issueStatuses}
|
||||||
justify="center"
|
justify="center"
|
||||||
kind="transparent"
|
kind={'list'}
|
||||||
|
size={'small'}
|
||||||
tooltipAlignment="bottom"
|
tooltipAlignment="bottom"
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
<span class="text name" title={issue.title} on:click={() => openIssue(issue)}>
|
<span class="text name" title={issue.title} on:click={() => openIssue(issue)}>
|
||||||
{issue.title}
|
{issue.title}
|
||||||
</span>
|
</span>
|
||||||
@ -146,7 +167,24 @@
|
|||||||
|
|
||||||
.text {
|
.text {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--theme-caption-color);
|
color: var(--caption-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.issuePresenter {
|
||||||
|
flex-shrink: 0;
|
||||||
|
min-width: 0;
|
||||||
|
min-height: 0;
|
||||||
|
font-weight: 500;
|
||||||
|
color: var(--content-color);
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: var(--caption-color);
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
&:active {
|
||||||
|
color: var(--accent-color);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
|
Loading…
Reference in New Issue
Block a user