Просмотр исходного кода

enhance: don't show tags icon if a page has tags

Tienson Qin 2 лет назад
Родитель
Сommit
bb9da0781e

+ 4 - 2
src/main/frontend/components/db_based/page.cljs

@@ -185,8 +185,10 @@
              (if collapsed?
                (if (or has-tags? @*hover? config/publishing?)
                  [:<>
-                  (shui-ui/button {:variant :ghost :size :sm :class "fade-link"}
-                                  (ui/icon "tags"))
+                  (if has-tags?
+                    [:div.px-1]
+                    (shui-ui/button {:variant :ghost :size :sm :class "fade-link"}
+                      (ui/icon "tags")))
                   (if (and config/publishing? (seq (set/intersection #{"class" "property"} types)))
                     [:div
                      [:div.opacity-50.pointer.text-sm "Expand for more info"]]

+ 1 - 12
src/main/frontend/components/page.cljs

@@ -387,18 +387,7 @@
                  (cond untitled? [:span.opacity-50 (t :untitled)]
                        nested? (component-block/map-inline {} (gp-mldoc/inline->edn title (mldoc/get-default-config
                                                                                             (:block/format page))))
-                       :else title))])]
-
-           ;; (when (and db-based? (not whiteboard-page?))
-           ;;   [:div.absolute.bottom-2.left-0
-           ;;    [:div.page-add-tags.flex.flex-row.items-center.flex-wrap.gap-2.ml-2
-           ;;     (when (and (empty? (:block/tags page)) @*hover? (not config/publishing?))
-           ;;       (db-page/page-tags page tags-property *hover? *configuring?))
-
-           ;;     (when (or (some #(contains? #{"class" "property"} %) (:block/type page))
-           ;;               (not (db-property-handler/block-has-viewable-properties? page)))
-           ;;       (db-page/page-configure page *hover? *configuring?))]])
-           ])))))
+                       :else title))])]])))))
 
 (defn- page-mouse-over
   [e *control-show? *all-collapsed?]

+ 1 - 1
src/main/frontend/components/page.css

@@ -389,7 +389,7 @@ html.is-native-ios {
 
 .page-info {
     min-height: 46px;
-    margin-left: -21px;
+    margin-left: -15px;
 }
 
 .sidebar-item .page-info {