fix(ui): polish alignments of svg icons

This commit is contained in:
charlie
2022-09-28 11:05:52 +08:00
committed by Tienson Qin
parent 2bb2a1f072
commit 1555652da4
3 changed files with 16 additions and 9 deletions

View File

@@ -40,15 +40,15 @@
(if local?
(let [local-dir (config/get-local-dir url)
graph-name (text-util/get-graph-name-from-path local-dir)]
[:a {:title local-dir
:on-click #(on-click graph)}
[:a.flex.items-center {:title local-dir
:on-click #(on-click graph)}
[:span graph-name (and GraphName [:strong.px-1 "(" GraphName ")"])]
(when remote? [:strong.pr-1 (ui/icon "cloud")])])
(when remote? [:strong.pr-1.flex.items-center (ui/icon "cloud")])])
[:a {:title GraphUUID
:on-click #(on-click graph)}
[:a.flex.items-center {:title GraphUUID
:on-click #(on-click graph)}
(db/get-repo-path (or url GraphName))
(when remote? [:strong.pl-1 (ui/icon "cloud")])])])))
(when remote? [:strong.pl-1.flex.items-center (ui/icon "cloud")])])])))
(rum/defc repos-inner
[repos]
@@ -162,7 +162,7 @@
short-repo-name (if local? (text-util/get-graph-name-from-path repo-path) GraphName)]
(when short-repo-name
{:title [:span.flex.items-center.whitespace-nowrap short-repo-name
(when remote? [:span.pl-1
(when remote? [:span.pl-1.flex.items-center
{:title (str "<" GraphName "> #" GraphUUID)}
(ui/icon "cloud" {:size 18})])]
:hover-detail repo-path ;; show full path on hover

View File

@@ -242,7 +242,7 @@
{:on-click state/toggle-left-sidebar!}
(ui/icon "menu-2" {:size ui/icon-size})]])
[:nav.px-4.flex.flex-col.gap-1
[:nav.px-4.flex.flex-col.gap-1.cp__menubar-repos
{:aria-label "Navigation menu"}
(repo/repos-dropdown)

View File

@@ -552,6 +552,13 @@ html[data-theme='dark'] {
padding: 0;
}
.cp__menubar-repos {
.title-wrap {
line-height: 1.2em;
padding: 1px 0;
}
}
@supports not (overflow-y: overlay) {
.scrollbar-spacing {
overflow-y: auto;
@@ -570,4 +577,4 @@ html[data-theme='dark'] {
.full-height-without-header {
height: calc(100vh - var(--ls-headbar-height) - 4rem);
}
}