mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-22 19:11:33 +03:00
feat(planner): remove large view mode (#5043)
Signed-off-by: Eduard Aksamitov <e@euaaaio.ru>
This commit is contained in:
parent
2bb4295f4d
commit
9f198a5428
@ -26,7 +26,6 @@
|
||||
import ToDoPriorityPresenter from './ToDoPriorityPresenter.svelte'
|
||||
|
||||
export let todo: WithLookup<ToDo>
|
||||
export let size: 'small' | 'large' = 'small'
|
||||
export let planned: boolean = true
|
||||
export let isNew: boolean = false
|
||||
|
||||
@ -69,7 +68,7 @@
|
||||
</script>
|
||||
|
||||
<button
|
||||
class="hulyToDoLine-container {size}"
|
||||
class="hulyToDoLine-container"
|
||||
class:hovered
|
||||
class:isDone
|
||||
on:click|stopPropagation={open}
|
||||
@ -90,44 +89,21 @@
|
||||
<ToDoCheckbox checked={isDone} priority={todo.priority} on:value={markDone} />
|
||||
{/if}
|
||||
</div>
|
||||
{#if size === 'small'}
|
||||
<ToDoPriorityPresenter value={todo.priority} muted={isDone} />
|
||||
{/if}
|
||||
<ToDoPriorityPresenter value={todo.priority} muted={isDone} />
|
||||
</div>
|
||||
</div>
|
||||
<WorkItemPresenter {todo} kind={'todo-line'} withoutSpace />
|
||||
{#if size === 'small'}
|
||||
<div class="hulyToDoLine-title hulyToDoLine-top-align top-12 text-left font-regular-14 overflow-label">
|
||||
{todo.title}
|
||||
</div>
|
||||
{:else}
|
||||
<div class="flex-col flex-gap-2 flex-grow text-left">
|
||||
<div class="hulyToDoLine-title hulyToDoLine-top-align top-12 text-left font-regular-14">
|
||||
{todo.title}
|
||||
</div>
|
||||
{#if todo.labels && todo.labels > 0 && todo.priority !== ToDoPriority.NoPriority}
|
||||
<div class="flex-row-center flex-grow flex-gap-2">
|
||||
{#if todo.labels && todo.labels > 0}
|
||||
<Component
|
||||
is={tags.component.LabelsPresenter}
|
||||
props={{ object: todo, value: todo.labels, kind: 'todo' }}
|
||||
/>
|
||||
{/if}
|
||||
<ToDoPriorityPresenter value={todo.priority} muted={isDone} showLabel />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="hulyToDoLine-title hulyToDoLine-top-align top-12 text-left font-regular-14 overflow-label">
|
||||
{todo.title}
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-row-top flex-no-shrink flex-gap-2">
|
||||
{#if size === 'small'}
|
||||
<div class="flex-row-center min-h-6 max-h-6 flex-gap-2">
|
||||
<Component
|
||||
is={tags.component.LabelsPresenter}
|
||||
props={{ object: todo, value: todo.labels, kind: 'todo-compact' }}
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="flex-row-center min-h-6 max-h-6 flex-gap-2">
|
||||
<Component
|
||||
is={tags.component.LabelsPresenter}
|
||||
props={{ object: todo, value: todo.labels, kind: 'todo-compact' }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-no-shrink flex-gap-3 pl-2">
|
||||
{#if events.length > 0}
|
||||
|
@ -20,20 +20,20 @@
|
||||
import type { Project } from '@hcengineering/tracker'
|
||||
import type { ToDosMode } from '..'
|
||||
import { AccordionItem } from '@hcengineering/ui'
|
||||
import { getClient } from '@hcengineering/presentation'
|
||||
import { makeRank } from '@hcengineering/task'
|
||||
import ToDoProjectGroup from './ToDoProjectGroup.svelte'
|
||||
import ToDoDraggable from './ToDoDraggable.svelte'
|
||||
import ToDoDuration from './ToDoDuration.svelte'
|
||||
import ToDoElement from './ToDoElement.svelte'
|
||||
import { dragging } from '../dragging'
|
||||
import ToDoProjectGroup from './ToDoProjectGroup.svelte'
|
||||
import { getClient } from '@hcengineering/presentation'
|
||||
import { makeRank } from '@hcengineering/task'
|
||||
import time from '../plugin'
|
||||
|
||||
export let mode: ToDosMode
|
||||
export let title: IntlString
|
||||
export let todos: WithLookup<ToDo>[]
|
||||
export let showTitle: boolean
|
||||
export let showDuration: boolean
|
||||
export let largeSize: boolean = false
|
||||
export let projects: IdMap<Project>
|
||||
|
||||
function getAllWorkslots (todos: WithLookup<ToDo>[]): WorkSlot[] {
|
||||
@ -111,7 +111,6 @@
|
||||
todos={todos.filter((td) => td.attachedSpace === group._id)}
|
||||
project={group}
|
||||
groupName={title}
|
||||
{largeSize}
|
||||
{mode}
|
||||
/>
|
||||
{/each}
|
||||
@ -121,7 +120,6 @@
|
||||
todos={todos.filter((td) => !hasProject(td.attachedSpace))}
|
||||
project={false}
|
||||
groupName={title}
|
||||
{largeSize}
|
||||
{mode}
|
||||
/>
|
||||
{/if}
|
||||
@ -130,7 +128,7 @@
|
||||
<div class="flex-col p-4 w-full">
|
||||
{#each todos as todo, index}
|
||||
<ToDoDraggable {todo} {index} groupName={title} projectId={false} on:drop={handleDrop}>
|
||||
<ToDoElement {todo} size={largeSize ? 'large' : 'small'} planned={mode !== 'unplanned'} />
|
||||
<ToDoElement {todo} planned={mode !== 'unplanned'} />
|
||||
</ToDoDraggable>
|
||||
{/each}
|
||||
</div>
|
||||
|
@ -38,7 +38,6 @@
|
||||
export let project: Project | false | undefined = undefined
|
||||
export let mode: ToDosMode
|
||||
export let groupName: IntlString
|
||||
export let largeSize: boolean = false
|
||||
|
||||
const client = getClient()
|
||||
|
||||
@ -85,7 +84,7 @@
|
||||
<AccordionItem {id} {icon} {iconProps} {title} {label} size={'medium'} nested>
|
||||
{#each todos as todo, index}
|
||||
<ToDoDraggable {todo} {index} {groupName} {projectId} on:drop={handleDrop}>
|
||||
<ToDoElement {todo} size={largeSize ? 'large' : 'small'} planned={mode !== 'unplanned'} />
|
||||
<ToDoElement {todo} planned={mode !== 'unplanned'} />
|
||||
</ToDoDraggable>
|
||||
{/each}
|
||||
</AccordionItem>
|
||||
|
@ -42,7 +42,6 @@
|
||||
|
||||
const acc = getCurrentAccount() as PersonAccount
|
||||
const user = acc.person
|
||||
let largeSize: boolean = false
|
||||
|
||||
const doneQuery = createQuery()
|
||||
const inboxQuery = createQuery()
|
||||
@ -302,15 +301,6 @@
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
<svelte:fragment slot="actions">
|
||||
<ButtonIcon
|
||||
icon={IconDiff}
|
||||
size={'small'}
|
||||
kind={'tertiary'}
|
||||
pressed={largeSize}
|
||||
on:click={() => (largeSize = !largeSize)}
|
||||
/>
|
||||
</svelte:fragment>
|
||||
</Header>
|
||||
<CreateToDo fullSize />
|
||||
|
||||
@ -323,7 +313,6 @@
|
||||
showDuration={group[0] !== time.string.Unplanned}
|
||||
{mode}
|
||||
{projects}
|
||||
{largeSize}
|
||||
/>
|
||||
{/each}
|
||||
</Scroller>
|
||||
|
Loading…
Reference in New Issue
Block a user