From 035a0cdd3c2713a45004e6c73e82a5368cb4565d Mon Sep 17 00:00:00 2001 From: itupix Date: Mon, 4 Jan 2021 11:21:43 +0100 Subject: [PATCH] feat(ui): lists --- public/assets/azure-logo.svg | 1 - public/assets/github-logo.svg | 1 - src/App.svelte | 6 +- src/components/Avatar/Avatar.svelte | 68 +++++++++ src/components/Avatar/index.ts | 1 + .../CustomListSettings.svelte | 71 +++++++++ src/components/CustomListSettings/index.ts | 1 + .../FollowedRepositories.svelte | 5 +- src/components/Labels/Labels.scss | 7 +- src/components/List/List.svelte | 1 - src/components/List/index.ts | 1 - src/components/Main/Main.svelte | 102 +++++++++++-- src/components/Navigation/Navigation.svelte | 9 +- src/components/Pullrequest/Pullrequest.svelte | 144 ++++++++++++------ src/components/Tabs/Tab.svelte | 1 - src/components/Tabs/TabItem.svelte | 1 - src/components/Tabs/Tabs.svelte | 38 ++++- src/components/icons/AzureDevOps.svelte | 12 ++ src/components/icons/Ellipsis.svelte | 3 + src/components/icons/Github.svelte | 15 ++ src/components/icons/Plus.svelte | 18 +++ src/components/icons/index.ts | 17 ++- src/models/skizzle/CustomListType.ts | 12 ++ src/models/skizzle/ViewsEnum.ts | 2 +- src/pages/Home.svelte | 8 +- 25 files changed, 459 insertions(+), 86 deletions(-) delete mode 100644 public/assets/azure-logo.svg delete mode 100644 public/assets/github-logo.svg create mode 100644 src/components/Avatar/Avatar.svelte create mode 100644 src/components/Avatar/index.ts create mode 100644 src/components/CustomListSettings/CustomListSettings.svelte create mode 100644 src/components/CustomListSettings/index.ts delete mode 100644 src/components/List/List.svelte delete mode 100644 src/components/List/index.ts create mode 100644 src/components/icons/AzureDevOps.svelte create mode 100644 src/components/icons/Ellipsis.svelte create mode 100644 src/components/icons/Github.svelte create mode 100644 src/components/icons/Plus.svelte create mode 100644 src/models/skizzle/CustomListType.ts diff --git a/public/assets/azure-logo.svg b/public/assets/azure-logo.svg deleted file mode 100644 index c387e87..0000000 --- a/public/assets/azure-logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/assets/github-logo.svg b/public/assets/github-logo.svg deleted file mode 100644 index ca8b4b1..0000000 --- a/public/assets/github-logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/App.svelte b/src/App.svelte index c2fe826..e1e4d15 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -1,18 +1,18 @@ diff --git a/src/components/Avatar/Avatar.svelte b/src/components/Avatar/Avatar.svelte new file mode 100644 index 0000000..151b8ee --- /dev/null +++ b/src/components/Avatar/Avatar.svelte @@ -0,0 +1,68 @@ + + + + +
+ {#await Service.getAvatar(pullRequest.provider, pullRequest.user.avatar, pullRequest.organizationName)} +

Chargement...

+ {:then avatar} +
{pullRequest.user.name}
+ {#if pullRequest.provider} +
+ +
+ {/if} + {:catch} +

Erreur

+ {/await} +
diff --git a/src/components/Avatar/index.ts b/src/components/Avatar/index.ts new file mode 100644 index 0000000..8ac02f9 --- /dev/null +++ b/src/components/Avatar/index.ts @@ -0,0 +1 @@ +export { default } from './Avatar.svelte'; diff --git a/src/components/CustomListSettings/CustomListSettings.svelte b/src/components/CustomListSettings/CustomListSettings.svelte new file mode 100644 index 0000000..1999091 --- /dev/null +++ b/src/components/CustomListSettings/CustomListSettings.svelte @@ -0,0 +1,71 @@ + + + + +
+ Nouvelle liste +
+
+ + +
+
+ + {#if $projects.length} +
+
+ + +
+
+ {/if} + + {#if $repositories.length} +
+
+ + +
+
+ {/if} + + +
diff --git a/src/components/CustomListSettings/index.ts b/src/components/CustomListSettings/index.ts new file mode 100644 index 0000000..ff8ad81 --- /dev/null +++ b/src/components/CustomListSettings/index.ts @@ -0,0 +1 @@ +export { default } from './CustomListSettings.svelte'; diff --git a/src/components/FollowedRepositories/FollowedRepositories.svelte b/src/components/FollowedRepositories/FollowedRepositories.svelte index a74bbad..24fd7d4 100644 --- a/src/components/FollowedRepositories/FollowedRepositories.svelte +++ b/src/components/FollowedRepositories/FollowedRepositories.svelte @@ -66,10 +66,7 @@ Vous suivez actuellement {followedRepositories.length} repositories sur {ProviderEnum[profile.provider]}.