From ae9327963cdbc914006bbda12107894f0034f43b Mon Sep 17 00:00:00 2001 From: jannesblobel <72493222+jannesblobel@users.noreply.github.com> Date: Sun, 21 Nov 2021 21:52:31 +0100 Subject: [PATCH 1/4] imp:ux add radio button in language delete the tick icon --- .../project/[projectId]/languages.svelte | 47 ++++++++++++------- 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/packages/dashboard/src/routes/project/[projectId]/languages.svelte b/packages/dashboard/src/routes/project/[projectId]/languages.svelte index 3447fc51b5..ac9908643e 100644 --- a/packages/dashboard/src/routes/project/[projectId]/languages.svelte +++ b/packages/dashboard/src/routes/project/[projectId]/languages.svelte @@ -19,6 +19,8 @@ import ISO6391 from 'iso-639-1'; import SetDefaultLanguageModal from '$lib/components/modals/SetDefaultLanguageModal.svelte'; import DeleteLanguageModal from '$lib/components/modals/DeleteLanguageModal.svelte'; + import RadioButton16 from 'carbon-icons-svelte/lib/RadioButton16'; + import RadioButtonChecked16 from 'carbon-icons-svelte/lib/RadioButtonChecked16'; // all modals are interacted with as object which alllows to pass // values such as a language that should be deleted along. @@ -76,6 +78,7 @@ { key: 'isoCode', value: 'Language' }, // { key: 'progress', value: 'Progress' }, // { key: 'words', value: 'Words' }, + { key: 'isDefaultLanguage', value: 'Default Language' }, { key: 'actions', empty: true } ]; @@ -134,31 +137,39 @@ default {/if} + {:else if cell.key === 'isDefaultLanguage'} + {#if row.isDefaultLanguage === false} + - + diff --git a/packages/dashboard/src/routes/project/[projectId]/settings.svelte b/packages/dashboard/src/routes/project/[projectId]/settings.svelte index c7251f45f7..71ba11cc2f 100644 --- a/packages/dashboard/src/routes/project/[projectId]/settings.svelte +++ b/packages/dashboard/src/routes/project/[projectId]/settings.svelte @@ -4,6 +4,8 @@ import { projectStore } from '$lib/stores/projectStore'; import { CodeSnippet, TextInput, Button, Tile } from 'carbon-components-svelte'; import DeleteProjectModal from '$lib/components/modals/DeleteProjectModal.svelte'; + import Save16 from 'carbon-icons-svelte/lib/Save16'; + import Delete16 from 'carbon-icons-svelte/lib/Delete16'; let projectName = $projectStore.data?.project.name; @@ -41,6 +43,7 @@

Danger Zone


- + From 8b8b5380ab2bad650e698b4df8362dd981faf8a5 Mon Sep 17 00:00:00 2001 From: Samuel Stroschein <35429197+samuelstroschein@users.noreply.github.com> Date: Sun, 21 Nov 2021 22:01:55 +0100 Subject: [PATCH 3/4] imp: remove double default language --- .../src/routes/project/[projectId]/languages.svelte | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/dashboard/src/routes/project/[projectId]/languages.svelte b/packages/dashboard/src/routes/project/[projectId]/languages.svelte index 6352c12bdc..3605a077fe 100644 --- a/packages/dashboard/src/routes/project/[projectId]/languages.svelte +++ b/packages/dashboard/src/routes/project/[projectId]/languages.svelte @@ -131,10 +131,7 @@ {#if cell.key === 'isoCode'}

{ISO6391.getName(cell.value)}

- {cell.value} - {#if cell.value === $projectStore.data?.project.default_iso_code} - default - {/if} + {cell.value}
{:else if cell.key === 'isDefaultLanguage'} {#if row.isDefaultLanguage === false} From f7ea012ef2cce2ccf511ccf356f13ec46f9ce371 Mon Sep 17 00:00:00 2001 From: jannesblobel <72493222+jannesblobel@users.noreply.github.com> Date: Sun, 21 Nov 2021 23:23:40 +0100 Subject: [PATCH 4/4] imp: UI ,fix the delet bin on pages (Keys, languages, members) --- .../src/routes/project/[projectId]/keys.svelte | 8 +++++--- .../routes/project/[projectId]/languages.svelte | 5 +---- .../src/routes/project/[projectId]/members.svelte | 15 +++++++++------ 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/packages/dashboard/src/routes/project/[projectId]/keys.svelte b/packages/dashboard/src/routes/project/[projectId]/keys.svelte index 85cd30e9f6..48acf69776 100644 --- a/packages/dashboard/src/routes/project/[projectId]/keys.svelte +++ b/packages/dashboard/src/routes/project/[projectId]/keys.svelte @@ -8,7 +8,7 @@ Tag, Pagination } from 'carbon-components-svelte'; - import TrashCan32 from 'carbon-icons-svelte/lib/TrashCan32'; + import Delete16 from 'carbon-icons-svelte/lib/Delete16'; import TranslationModal from '$lib/components/modals/TranslationModal.svelte'; import { projectStore } from '$lib/stores/projectStore'; import CreateKeyModal from '$lib/components/modals/CreateKeyModal.svelte'; @@ -141,8 +141,10 @@ deleteKeyModal.show({ key: row.key }); }} iconDescription="Delete translation" - icon={TrashCan32} - kind="danger-ghost" + kind="ghost" + icon={Delete16} + tooltipAlignment="start" + tooltipPosition="left" />
{:else} diff --git a/packages/dashboard/src/routes/project/[projectId]/languages.svelte b/packages/dashboard/src/routes/project/[projectId]/languages.svelte index d10f1d5845..6ef509763c 100644 --- a/packages/dashboard/src/routes/project/[projectId]/languages.svelte +++ b/packages/dashboard/src/routes/project/[projectId]/languages.svelte @@ -19,10 +19,7 @@ import DeleteLanguageModal from '$lib/components/modals/DeleteLanguageModal.svelte'; import RadioButton16 from 'carbon-icons-svelte/lib/RadioButton16'; import RadioButtonChecked16 from 'carbon-icons-svelte/lib/RadioButtonChecked16'; -<<<<<<< HEAD import Add16 from 'carbon-icons-svelte/lib/Add16'; -======= ->>>>>>> 34ef389815516e2c2e9798d3bf0a667f480cd5eb // all modals are interacted with as object which alllows to pass // values such as a language that should be deleted along. @@ -163,7 +160,7 @@ {:else if cell.key === 'actions'}