diff --git a/models/tracker/src/plugin.ts b/models/tracker/src/plugin.ts index b006899de4..1f69e517be 100644 --- a/models/tracker/src/plugin.ts +++ b/models/tracker/src/plugin.ts @@ -34,7 +34,6 @@ export default mergeIds(trackerId, tracker, { GotoProjects: '' as IntlString, GotoTrackerApplication: '' as IntlString, SearchIssue: '' as IntlString, - NewRelatedIssue: '' as IntlString, Parent: '' as IntlString }, component: { diff --git a/packages/theme/styles/_layouts.scss b/packages/theme/styles/_layouts.scss index fe05f42589..4ff720e74f 100644 --- a/packages/theme/styles/_layouts.scss +++ b/packages/theme/styles/_layouts.scss @@ -665,6 +665,7 @@ a.no-line { .text-xs { font-size: .625rem; } .text-sm { font-size: .75rem; } .text-md { font-size: .8125rem; } +.text-normal { font-size: var(--body-font-size); } .text-base { font-size: 1rem; /* 16px */ line-height: 1.5rem; /* 24px */ diff --git a/packages/theme/styles/common.scss b/packages/theme/styles/common.scss index ad663ff6f7..81a2e14e59 100644 --- a/packages/theme/styles/common.scss +++ b/packages/theme/styles/common.scss @@ -302,12 +302,43 @@ color: var(--caption-color); } &__title { - flex-grow: 1; min-width: 0; font-weight: 500; font-size: 1rem; - color: var(--caption-color); + color: var(--caption-color); + + &:not(.short) { flex-grow: 1; } } + &__header { + display: flex; + align-items: center; + flex-grow: 1; + margin: 0 .5rem 0 .75rem; + padding: .25rem .75rem; + height: 100%; + min-width: 0; + font-weight: 500; + font-size: 1rem; + color: var(--caption-color); + background: var(--header-bg-color); + border-radius: .5rem .5rem 0 0; + } + &__counter { + display: flex; + align-items: center; + flex-wrap: nowrap; + flex-shrink: 0; + padding: 0.25rem 0.5rem; + min-width: 1.325rem; + text-align: center; + font-weight: 500; + font-size: 1rem; + line-height: 1rem; + color: var(--accent-color); + background-color: var(--body-color); + border: 1px solid var(--divider-color); + border-radius: 1rem; + } &__tag { padding: .125rem .25rem; min-width: 0; diff --git a/plugins/tracker-assets/lang/en.json b/plugins/tracker-assets/lang/en.json index d1d81fafab..fd9f288b55 100644 --- a/plugins/tracker-assets/lang/en.json +++ b/plugins/tracker-assets/lang/en.json @@ -260,6 +260,7 @@ "Capacity": "Capacity", "CapacityValue": "of {value}d", "NewRelatedIssue": "New related issue", + "RelatedIssuesNotFound": "Related issues not found", "AddedReference": "Added reference", "AddedAsBlocked": "Marked as blocked", diff --git a/plugins/tracker-assets/lang/ru.json b/plugins/tracker-assets/lang/ru.json index f7756baa9c..af3948be25 100644 --- a/plugins/tracker-assets/lang/ru.json +++ b/plugins/tracker-assets/lang/ru.json @@ -260,6 +260,7 @@ "Capacity": "Вместимость", "CapacityValue": "из {value}d", "NewRelatedIssue": "Завести связанную задачу", + "RelatedIssuesNotFound": "Связанные задачи не найдены", "AddedReference": "Добавлена зависимость", "AddedAsBlocked": "Отмечено как заблокировано", diff --git a/plugins/tracker-resources/src/components/icons/AddIssueDuo.svelte b/plugins/tracker-resources/src/components/icons/AddIssueDuo.svelte new file mode 100644 index 0000000000..6408204319 --- /dev/null +++ b/plugins/tracker-resources/src/components/icons/AddIssueDuo.svelte @@ -0,0 +1,29 @@ + + + + + + + diff --git a/plugins/tracker-resources/src/components/issues/edit/SubIssueList.svelte b/plugins/tracker-resources/src/components/issues/edit/SubIssueList.svelte index 4ef2705a8b..71e60d27ea 100644 --- a/plugins/tracker-resources/src/components/issues/edit/SubIssueList.svelte +++ b/plugins/tracker-resources/src/components/issues/edit/SubIssueList.svelte @@ -23,6 +23,7 @@ export let issues: Issue[] | undefined = undefined export let viewlet: Viewlet export let viewOptions: ViewOptions + export let disableHeader = false // Extra properties export let teams: Map, Team> | undefined @@ -45,5 +46,6 @@ {query} flatHeaders={true} props={{ teams, issueStatuses }} + {disableHeader} /> {/if} diff --git a/plugins/tracker-resources/src/components/issues/related/RelatedIssues.svelte b/plugins/tracker-resources/src/components/issues/related/RelatedIssues.svelte index 801b715911..58885d359f 100644 --- a/plugins/tracker-resources/src/components/issues/related/RelatedIssues.svelte +++ b/plugins/tracker-resources/src/components/issues/related/RelatedIssues.svelte @@ -13,17 +13,22 @@ // limitations under the License. --> -
- {#if subIssues !== undefined && viewlet !== undefined} - {#if issueStatuses.size > 0 && teams} - - {:else} -
-
- {/if} +{#if subIssues !== undefined && viewlet !== undefined} + {#if issueStatuses.size > 0 && teams && subIssues.length > 0} + {:else} -
- +
+
+ +
+
+
+ +
dispatch('add-issue')}> +
{/if} -
+{:else} +
+ +
+{/if} diff --git a/plugins/tracker-resources/src/components/issues/related/RelatedIssuesSection.svelte b/plugins/tracker-resources/src/components/issues/related/RelatedIssuesSection.svelte index 37d0d29105..a72e10eae0 100644 --- a/plugins/tracker-resources/src/components/issues/related/RelatedIssuesSection.svelte +++ b/plugins/tracker-resources/src/components/issues/related/RelatedIssuesSection.svelte @@ -1,15 +1,20 @@
@@ -25,30 +40,40 @@
- + + {#if headerRemoval} +
+ +
+ {#if extraHeaders} + {#each extraHeaders as extra} + + {/each} + {/if} + {subIssues.length} +
+
+ {:else} + + {/if}
{#if viewlet && viewOptions} {/if}
-
- {#if viewlet} - - {/if} -
+ {#if viewlet} + + {/if}
diff --git a/plugins/tracker-resources/src/plugin.ts b/plugins/tracker-resources/src/plugin.ts index e9cf6825d7..d9cbd0c332 100644 --- a/plugins/tracker-resources/src/plugin.ts +++ b/plugins/tracker-resources/src/plugin.ts @@ -208,6 +208,7 @@ export default mergeIds(trackerId, tracker, { AddBlockedBy: '' as IntlString, AddIsBlocking: '' as IntlString, AddRelatedIssue: '' as IntlString, + RelatedIssuesNotFound: '' as IntlString, RelatedIssue: '' as IntlString, BlockedIssue: '' as IntlString, BlockingIssue: '' as IntlString, diff --git a/plugins/tracker/src/index.ts b/plugins/tracker/src/index.ts index 1e151a491f..bde2a5baa1 100644 --- a/plugins/tracker/src/index.ts +++ b/plugins/tracker/src/index.ts @@ -533,5 +533,8 @@ export default plugin(trackerId, { }, resolver: { Location: '' as Resource<(loc: Location) => Promise> + }, + string: { + NewRelatedIssue: '' as IntlString } }) diff --git a/plugins/view-resources/src/components/EditDoc.svelte b/plugins/view-resources/src/components/EditDoc.svelte index 8f12734d6e..0aed4dba5b 100644 --- a/plugins/view-resources/src/components/EditDoc.svelte +++ b/plugins/view-resources/src/components/EditDoc.svelte @@ -371,7 +371,9 @@ {/if} {/each} {#if editorFooter} - +
+ +
{/if} {/if} diff --git a/plugins/view-resources/src/components/list/ListCategories.svelte b/plugins/view-resources/src/components/list/ListCategories.svelte index 3b1128781e..90161b29b9 100644 --- a/plugins/view-resources/src/components/list/ListCategories.svelte +++ b/plugins/view-resources/src/components/list/ListCategories.svelte @@ -17,8 +17,8 @@ import { IntlString } from '@hcengineering/platform' import { getClient } from '@hcengineering/presentation' import { AnyComponent } from '@hcengineering/ui' - import view, { AttributeModel, BuildModelKey, ViewOptions } from '@hcengineering/view' - import { buildModel, getCategories, getPresenter, groupBy } from '../../utils' + import { AttributeModel, BuildModelKey, ViewOptions } from '@hcengineering/view' + import { buildModel, getCategories, getPresenter, groupBy, getAdditionalHeader } from '../../utils' import { noCategory } from '../../viewOptions' import ListCategory from './ListCategory.svelte' @@ -51,7 +51,6 @@ }) const client = getClient() - const hierarchy = client.getHierarchy() let itemModels: AttributeModel[] @@ -78,18 +77,7 @@ return res } - $: extraHeaders = getAdditionalHeader(_class) - - function getAdditionalHeader (_class: Ref>): AnyComponent[] | undefined { - const clazz = hierarchy.getClass(_class) - let mixinClazz = hierarchy.getClass(_class) - let presenterMixin = hierarchy.as(clazz, view.mixin.ListHeaderExtra) - while (presenterMixin.presenters === undefined && mixinClazz.extends !== undefined) { - presenterMixin = hierarchy.as(mixinClazz, view.mixin.ListHeaderExtra) - mixinClazz = hierarchy.getClass(mixinClazz.extends) - } - return presenterMixin.presenters - } + $: extraHeaders = getAdditionalHeader(client, _class) {#each categories as category, i} diff --git a/plugins/view-resources/src/components/list/ListHeader.svelte b/plugins/view-resources/src/components/list/ListHeader.svelte index 080912fe1b..2fc31c0cab 100644 --- a/plugins/view-resources/src/components/list/ListHeader.svelte +++ b/plugins/view-resources/src/components/list/ListHeader.svelte @@ -81,7 +81,7 @@ {/each} {/if} {#if limited < items.length} -
+
{limited}
/
{items.length} @@ -95,7 +95,7 @@ }} /> {:else} - {items.length} + {items.length} {/if}
{#if createItemDialog !== undefined && createItemLabel !== undefined} @@ -138,22 +138,4 @@ .row:not(:last-child) { border-bottom: 1px solid var(--accent-bg-color); } - - .counter { - display: flex; - align-items: center; - flex-wrap: nowrap; - flex-shrink: 0; - margin-left: 1rem; - padding: 0.25rem 0.5rem; - min-width: 1.325rem; - text-align: center; - font-weight: 500; - font-size: 1rem; - line-height: 1rem; - color: var(--accent-color); - background-color: var(--body-color); - border: 1px solid var(--divider-color); - border-radius: 1rem; - } diff --git a/plugins/view-resources/src/components/list/ListItem.svelte b/plugins/view-resources/src/components/list/ListItem.svelte index 829286aad1..0a94d5bbbd 100644 --- a/plugins/view-resources/src/components/list/ListItem.svelte +++ b/plugins/view-resources/src/components/list/ListItem.svelte @@ -71,7 +71,6 @@ bind:this={elem} class="listGrid antiList__row row gap-2 flex-grow" class:checking={checked} - class:mListGridFixed={selected} class:mListGridSelected={selected} on:contextmenu on:focus diff --git a/plugins/view-resources/src/index.ts b/plugins/view-resources/src/index.ts index cdd64f5047..1813bd5e6b 100644 --- a/plugins/view-resources/src/index.ts +++ b/plugins/view-resources/src/index.ts @@ -109,7 +109,8 @@ export { getObjectPreview, isCollectionAttr, LoadingProps, - setActiveViewletId + setActiveViewletId, + getAdditionalHeader } from './utils' export * from './viewOptions' export { diff --git a/plugins/view-resources/src/utils.ts b/plugins/view-resources/src/utils.ts index e7ca0e124a..6adbb2d773 100644 --- a/plugins/view-resources/src/utils.ts +++ b/plugins/view-resources/src/utils.ts @@ -627,3 +627,18 @@ export async function moveToSpace ( ...extra }) } + +/** + * @public + */ +export function getAdditionalHeader (client: TxOperations, _class: Ref>): AnyComponent[] | undefined { + const hierarchy = client.getHierarchy() + const clazz = hierarchy.getClass(_class) + let mixinClazz = hierarchy.getClass(_class) + let presenterMixin = hierarchy.as(clazz, view.mixin.ListHeaderExtra) + while (presenterMixin.presenters === undefined && mixinClazz.extends !== undefined) { + presenterMixin = hierarchy.as(mixinClazz, view.mixin.ListHeaderExtra) + mixinClazz = hierarchy.getClass(mixinClazz.extends) + } + return presenterMixin.presenters +}