From ae34d53746bde1bacea10b4637081b8468249adc Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Wed, 22 Dec 2021 12:03:28 +0300 Subject: [PATCH] Update archive icon. Add margins. Update space menu. (#700) Signed-off-by: Alexander Platov --- models/task/src/index.ts | 4 +- packages/ui/src/components/Menu.svelte | 4 +- packages/ui/src/components/icons/Edit.svelte | 4 +- packages/ui/src/components/icons/MoreV.svelte | 10 ++ packages/ui/src/index.ts | 1 + .../src/components/statuses/Templates.svelte | 1 + plugins/task-assets/assets/icons.svg | 8 +- plugins/task-assets/src/index.ts | 1 - .../src/components/StatusTableView.svelte | 160 ++++++++---------- .../src/components/icons/Lost.svelte | 6 +- .../src/components/icons/Won.svelte | 9 +- .../src/components/state/EditStatuses.svelte | 2 +- plugins/task/src/index.ts | 1 - plugins/view-assets/assets/icons.svg | 14 +- plugins/view-assets/src/index.ts | 3 +- .../src/components/TableView.svelte | 8 +- plugins/view/src/index.ts | 3 +- .../src/components/SpaceView.svelte | 20 +-- .../components/navigator/TreeElement.svelte | 4 +- 19 files changed, 129 insertions(+), 134 deletions(-) create mode 100644 packages/ui/src/components/icons/MoreV.svelte diff --git a/models/task/src/index.ts b/models/task/src/index.ts index 6193cf198e..f675b8d770 100644 --- a/models/task/src/index.ts +++ b/models/task/src/index.ts @@ -251,7 +251,7 @@ export function createModel (builder: Builder): void { core.space.Model, { label: 'Status' as IntlString, - icon: task.icon.Status, + icon: task.icon.ManageStatuses, component: task.component.StatusTableView }, task.viewlet.StatusTable @@ -382,7 +382,7 @@ export function createModel (builder: Builder): void { core.space.Model, { label: 'Edit Statuses' as IntlString, - icon: view.icon.MoreH, + icon: view.icon.Statuses, action: task.actionImpl.EditStatuses }, task.action.EditStatuses diff --git a/packages/ui/src/components/Menu.svelte b/packages/ui/src/components/Menu.svelte index 35e1ea68fc..b81d9bbd5f 100644 --- a/packages/ui/src/components/Menu.svelte +++ b/packages/ui/src/components/Menu.svelte @@ -37,9 +37,7 @@ action.action(ctx) }}> {#if action.icon} -
- -
+ {/if}
diff --git a/packages/ui/src/components/icons/Edit.svelte b/packages/ui/src/components/icons/Edit.svelte index 852dcf0c92..a050a6e5e9 100644 --- a/packages/ui/src/components/icons/Edit.svelte +++ b/packages/ui/src/components/icons/Edit.svelte @@ -20,6 +20,6 @@ - - + + diff --git a/packages/ui/src/components/icons/MoreV.svelte b/packages/ui/src/components/icons/MoreV.svelte new file mode 100644 index 0000000000..02c23b2ad6 --- /dev/null +++ b/packages/ui/src/components/icons/MoreV.svelte @@ -0,0 +1,10 @@ + + + + + + + diff --git a/packages/ui/src/index.ts b/packages/ui/src/index.ts index b08e966816..5514c4341b 100644 --- a/packages/ui/src/index.ts +++ b/packages/ui/src/index.ts @@ -69,6 +69,7 @@ export { default as IconSearch } from './components/icons/Search.svelte' export { default as IconToDo } from './components/icons/ToDo.svelte' export { default as IconFolder } from './components/icons/Folder.svelte' export { default as IconMoreH } from './components/icons/MoreH.svelte' +export { default as IconMoreV } from './components/icons/MoreV.svelte' export { default as IconFile } from './components/icons/File.svelte' export { default as IconAttachment } from './components/icons/Attachment.svelte' export { default as IconThread } from './components/icons/Thread.svelte' diff --git a/plugins/setting-resources/src/components/statuses/Templates.svelte b/plugins/setting-resources/src/components/statuses/Templates.svelte index 81c4cf1904..9bdd48b0f6 100644 --- a/plugins/setting-resources/src/components/statuses/Templates.svelte +++ b/plugins/setting-resources/src/components/statuses/Templates.svelte @@ -125,4 +125,5 @@ cursor: auto; } } + .item + .item { margin-top: .75rem; } diff --git a/plugins/task-assets/assets/icons.svg b/plugins/task-assets/assets/icons.svg index cdb1d24398..12f25fd1c7 100644 --- a/plugins/task-assets/assets/icons.svg +++ b/plugins/task-assets/assets/icons.svg @@ -6,13 +6,9 @@ - + - - - - - + diff --git a/plugins/task-assets/src/index.ts b/plugins/task-assets/src/index.ts index 2047fdaa96..36e9231e03 100644 --- a/plugins/task-assets/src/index.ts +++ b/plugins/task-assets/src/index.ts @@ -20,7 +20,6 @@ const icons = require('../assets/icons.svg') loadMetadata(task.icon, { Task: `${icons}#task`, Kanban: `${icons}#kanban`, - Status: `${icons}#status`, TodoCheck: `${icons}#todo-check`, TodoUnCheck: `${icons}#todo-uncheck`, ManageStatuses: `${icons}#manage-statuses` diff --git a/plugins/task-resources/src/components/StatusTableView.svelte b/plugins/task-resources/src/components/StatusTableView.svelte index 209ddb2fe9..c8656089f1 100644 --- a/plugins/task-resources/src/components/StatusTableView.svelte +++ b/plugins/task-resources/src/components/StatusTableView.svelte @@ -89,121 +89,109 @@ $: updateQuery() -
-
-
-
{ - doneStatusesView = false - state = undefined - selectedDoneStates.clear() - updateQuery() - }} - > -
-
{ - doneStatusesView = true - state = undefined - selectedDoneStates.clear() - updateQuery() - }} - > -
+
+
+
{ + doneStatusesView = false + state = undefined + selectedDoneStates.clear() + updateQuery() + }} + > +
-
- {#if doneStatusesView} - {#each doneStates as state} -
{ - doneStateClick(state._id) - }} - > - {#if state._class === task.class.WonState} - - {:else} - - {/if} - - {state.title} - -
- {/each} - {:else} - - {/if} +
{ + doneStatusesView = true + state = undefined + selectedDoneStates.clear() + updateQuery() + }} + > +
-
- - - +
+ {#if doneStatusesView} + {#each doneStates as state} +
{ + doneStateClick(state._id) + }} + > + {#if state._class === task.class.WonState} + + {:else} + + {/if} + + {state.title} + +
+ {/each} + {:else} + + {/if}
+
+ +
+ + diff --git a/plugins/task-resources/src/components/icons/Lost.svelte b/plugins/task-resources/src/components/icons/Lost.svelte index e1330d70c4..267e309fbf 100644 --- a/plugins/task-resources/src/components/icons/Lost.svelte +++ b/plugins/task-resources/src/components/icons/Lost.svelte @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. --> + - - - + + diff --git a/plugins/task-resources/src/components/icons/Won.svelte b/plugins/task-resources/src/components/icons/Won.svelte index a314eac348..e0a0a54ab0 100644 --- a/plugins/task-resources/src/components/icons/Won.svelte +++ b/plugins/task-resources/src/components/icons/Won.svelte @@ -13,15 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. --> + - - + + diff --git a/plugins/task-resources/src/components/state/EditStatuses.svelte b/plugins/task-resources/src/components/state/EditStatuses.svelte index 6453aed092..bf12c0d02c 100644 --- a/plugins/task-resources/src/components/state/EditStatuses.svelte +++ b/plugins/task-resources/src/components/state/EditStatuses.svelte @@ -78,7 +78,7 @@
-
+
Manage application statuses within
{spaceInstance?.name}
diff --git a/plugins/task/src/index.ts b/plugins/task/src/index.ts index 31c46aeb95..72ea43c40a 100644 --- a/plugins/task/src/index.ts +++ b/plugins/task/src/index.ts @@ -212,7 +212,6 @@ const task = plugin(taskId, { icon: { Task: '' as Asset, Kanban: '' as Asset, - Status: '' as Asset, TodoCheck: '' as Asset, TodoUnCheck: '' as Asset, ManageStatuses: '' as Asset diff --git a/plugins/view-assets/assets/icons.svg b/plugins/view-assets/assets/icons.svg index b2a852e262..89f737973d 100644 --- a/plugins/view-assets/assets/icons.svg +++ b/plugins/view-assets/assets/icons.svg @@ -1,9 +1,9 @@ - - - + + + @@ -36,7 +36,11 @@ - - + + + + + + diff --git a/plugins/view-assets/src/index.ts b/plugins/view-assets/src/index.ts index b9ed6ba82e..8d4e6ad4b6 100644 --- a/plugins/view-assets/src/index.ts +++ b/plugins/view-assets/src/index.ts @@ -22,7 +22,8 @@ loadMetadata(view.icon, { Delete: `${icons}#delete`, Move: `${icons}#move`, MoreH: `${icons}#more-h`, - Archive: `${icons}#archive` + Archive: `${icons}#archive`, + Statuses: `${icons}#statuses` }) addStringsLoader(viewId, async (lang: string) => await import(`../lang/${lang}.json`)) diff --git a/plugins/view-resources/src/components/TableView.svelte b/plugins/view-resources/src/components/TableView.svelte index 9574d12d47..b35f0cc155 100644 --- a/plugins/view-resources/src/components/TableView.svelte +++ b/plugins/view-resources/src/components/TableView.svelte @@ -29,17 +29,17 @@ $: query = search === '' ? { space } : { $search: search, space } -
+
diff --git a/plugins/view/src/index.ts b/plugins/view/src/index.ts index f7c5519a85..17c4b567e9 100644 --- a/plugins/view/src/index.ts +++ b/plugins/view/src/index.ts @@ -145,7 +145,8 @@ const view = plugin(viewId, { Delete: '' as Asset, MoreH: '' as Asset, Move: '' as Asset, - Archive: '' as Asset + Archive: '' as Asset, + Statuses: '' as Asset } }) export default view diff --git a/plugins/workbench-resources/src/components/SpaceView.svelte b/plugins/workbench-resources/src/components/SpaceView.svelte index 5fe3cff684..ee6e6cb435 100644 --- a/plugins/workbench-resources/src/components/SpaceView.svelte +++ b/plugins/workbench-resources/src/components/SpaceView.svelte @@ -66,13 +66,11 @@ function onSearch(ev: Event) { {#if viewlets.length > 1}
{#each viewlets as viewlet, i} -
{ selected = i }}> -
- - - + +
{ selected = i }}> +
-
+ {/each}
{/if} @@ -103,18 +101,20 @@ function onSearch(ev: Event) { border-radius: .5rem; cursor: pointer; - .icon { color: var(--theme-content-trans-color); } - &:hover .icon { color: var(--theme-caption-color); } + color: var(--theme-content-trans-color); + &:hover { color: var(--theme-caption-color); } &.selected { + color: var(--theme-content-accent-color); background-color: var(--theme-button-bg-enabled); cursor: default; - &:hover .icon { color: var(--theme-content-accent-color); } + &:hover { color: var(--theme-caption-color); } } } } .container { display: flex; flex-direction: column; - height: calc(100% - 9.5rem); + min-height: 0; + height: 100%; } diff --git a/plugins/workbench-resources/src/components/navigator/TreeElement.svelte b/plugins/workbench-resources/src/components/navigator/TreeElement.svelte index dd9a3e8f5a..113365af11 100644 --- a/plugins/workbench-resources/src/components/navigator/TreeElement.svelte +++ b/plugins/workbench-resources/src/components/navigator/TreeElement.svelte @@ -20,7 +20,7 @@ import type { Asset, IntlString } from '@anticrm/platform' import type { Action } from '@anticrm/ui' import type { Ref, Space } from '@anticrm/core' - import { Icon, Label, ActionIcon, Menu, showPopup, IconMoreH } from '@anticrm/ui' + import { Icon, Label, ActionIcon, Menu, showPopup, IconMoreV } from '@anticrm/ui' import { createEventDispatcher } from 'svelte' export let _id: Ref | undefined = undefined @@ -64,7 +64,7 @@
{:else if actions.length > 1}
- +
{/if} {#if notifications > 0 && collapsed}