From bc8c32cfcd69b32cd3c1e0d72e15014317f08a55 Mon Sep 17 00:00:00 2001 From: DE BAERDEMAEKER Mathieu Date: Tue, 9 Jun 2020 17:27:18 +0200 Subject: [PATCH 1/4] feature(Header): change header bar for adapt it with the current environnement --- public/global.css | 8 + src/components/Header/Header.scss | 102 +---- src/components/Header/Header.svelte | 75 +--- src/components/MainView/MainView.scss | 160 +++---- src/components/MainView/MainView.svelte | 4 +- src/components/Profile/Profile.scss | 480 ++++++++++---------- src/components/Settings/Settings.scss | 570 ++++++++++++------------ src/components/Tag/Tag.scss | 71 +-- 8 files changed, 655 insertions(+), 815 deletions(-) diff --git a/public/global.css b/public/global.css index 7406c22..04a7b2c 100644 --- a/public/global.css +++ b/public/global.css @@ -58,6 +58,10 @@ input:disabled { background: #ccc; } +::-webkit-scrollbar-corner { + background-color: #fff; +} + @media (prefers-color-scheme: dark) { body { background-color: #222; @@ -66,6 +70,10 @@ input:disabled { ::-webkit-scrollbar-thumb { background: #666; } + + ::-webkit-scrollbar-corner { + background-color: #444; + } } button.link { diff --git a/src/components/Header/Header.scss b/src/components/Header/Header.scss index 612b1e0..f0dd801 100644 --- a/src/components/Header/Header.scss +++ b/src/components/Header/Header.scss @@ -9,106 +9,12 @@ width: 100%; height: 100%; -webkit-app-region: drag; -} - -.window-controls { - display: grid; - grid-template-columns: repeat(3, 32px); - position: absolute; - top: 0; - right: 0; - height: 100%; - font-size: 10px; - -webkit-app-region: no-drag; -} - -.window-controls .button { - position: relative; - grid-row: 1 / span 1; - user-select: none; - cursor: default; - vertical-align: middle; - border: 0; - background-color: transparent; -} - -.window-controls .button:before { - content: ''; - position: absolute; - left: 50%; - top: 50%; - width: 16px; - height: 16px; - border-radius: 50%; - background-color: rgba(33, 33, 33, 0.8); - transform: translateX(-50%) translateY(-50%); -} - -.window-controls .button:after { - content: attr(data-icon); - opacity: 0; - position: absolute; - left: 50%; - top: 50%; - width: 16px; - height: 16px; - line-height: 16px; - font-family: sans-serif; - font-size: 0.6rem; - transform: translateX(-50%) translateY(-50%); -} - -.window-controls .button:hover:after { - opacity: 1; -} - -.window-controls .min-button { - grid-column: 1; -} - -.window-controls .max-button, -.window-controls .restore-button { - grid-column: 2; -} - -.window-controls .close-button { - grid-column: 3; -} - -.window-controls .close-button:before { - background-color: #fe6057; -} - -.window-controls .min-button:before { - background-color: #ffbf2b; -} - -.window-controls .restore-button:before, -.window-controls .max-button:before { - background-color: #28cd41; -} - -.window-controls .restore-button { - display: none; -} - -.window-title { - grid-column: 1; display: flex; - align-items: center; - font-size: 0.8rem; - line-height: 1; - color: #333; - font-family: sans-serif; - padding-left: 0.5rem; - overflow-x: hidden; -} + flex-direction: row; -.window-title .titlebar-title { - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - padding-left: 0.5rem; + &--windows { + justify-content: flex-end; + } } @media (prefers-color-scheme: dark) { diff --git a/src/components/Header/Header.svelte b/src/components/Header/Header.svelte index 35b30e3..138baae 100644 --- a/src/components/Header/Header.svelte +++ b/src/components/Header/Header.svelte @@ -1,70 +1,23 @@
-
-
- - - - -
+
+ {#if currentPlatform === 'others'} + + {:else} + + {/if}
\ No newline at end of file diff --git a/src/components/MainView/MainView.scss b/src/components/MainView/MainView.scss index 865d34e..aa63f60 100644 --- a/src/components/MainView/MainView.scss +++ b/src/components/MainView/MainView.scss @@ -1,96 +1,100 @@ .skz-pullrequests-list { - margin-bottom: 0; - list-style: none; - - li:not(:last-child) { - margin-bottom: 1rem; - } - - &__empty { - position: absolute; - top: 50%; - width: 100%; - text-align: center; - transform: translateY(-50%); - } + margin-bottom: 0; + list-style: none; + + li:not(:last-child) { + margin-bottom: 1rem; + } + + &__empty { + position: absolute; + top: 50%; + width: 100%; + text-align: center; + transform: translateY(-50%); + } } .skz-fetching-status { - font-size: 0.6rem; - color: #000; - font-weight: normal; + font-size: 0.6rem; + color: #000; + font-weight: normal; } .skz-pullrequests__search-container { - margin-bottom: 1rem; + margin-bottom: 1rem; } .skz-pullrequests { - margin: -1rem; - display: flex; - flex-direction: column; - height: calc(100vh - 250px); - font-family: 'Source Sans Pro', sans-serif; - - &__list-container { - position: relative; - padding-bottom: 1rem; - display: flex; - justify-content: space-between; - } - - &__list { - list-style: none; - display: flex; - flex-flow: wrap; - width: 85%; - - > :global(:nth-child(n + 6)) { - display: none; - } - - &--show > :global(:nth-child(n)) { - display: block; - } - - &-more { - background-color: transparent; - color: #fff; - font-size: x-small; - margin-bottom: 0.5rem; - width: 15%; - height: 2rem; - - &:hover { - text-decoration: underline; - cursor: pointer; - } - } - } + margin: -1rem; + display: flex; + flex-direction: column; + height: calc(100vh - 250px); + font-family: 'Source Sans Pro', sans-serif; + + &__list-container { + position: relative; + padding-bottom: 1rem; + display: flex; + justify-content: space-between; + } + + &__list { + list-style: none; + display: flex; + flex-flow: wrap; + width: 85%; + + > :global(:nth-child(n + 6)) { + display: none; + } + + &--show > :global(:nth-child(n)) { + display: block; + } + + &-more { + background-color: transparent; + color: #000; + font-size: x-small; + margin-bottom: 0.5rem; + width: 15%; + height: 2rem; + + &:hover { + text-decoration: underline; + cursor: pointer; + } + + @media (prefers-color-scheme: dark) { + color: #fff; + } + } + } } .skz-refresh-button { - border: 0; - font-size: 1rem; - background-color: transparent; - text-decoration: underline; - cursor: pointer; - - &:hover { - text-decoration: none; - } - - @media (prefers-color-scheme: dark) { - color: #fff; - } + border: 0; + font-size: 1rem; + background-color: transparent; + text-decoration: underline; + cursor: pointer; + + &:hover { + text-decoration: none; + } + + @media (prefers-color-scheme: dark) { + color: #fff; + } } @media (prefers-color-scheme: dark) { - .skz-fetching-status { - color: #aaa; - } + .skz-fetching-status { + color: #aaa; + } - .skz-pullrequests-list__empty { - color: #ccc; - } + .skz-pullrequests-list__empty { + color: #ccc; + } } diff --git a/src/components/MainView/MainView.svelte b/src/components/MainView/MainView.svelte index 875ce01..67f4f68 100644 --- a/src/components/MainView/MainView.svelte +++ b/src/components/MainView/MainView.svelte @@ -126,7 +126,9 @@ {/each} - + {#if tags.length > 5} + + {/if} {/if}