♻️ Resolve minor errors on viewer role on dashboard

This commit is contained in:
Eva Marco 2024-10-16 10:37:52 +02:00
parent 6fb65de100
commit 536c25c206
8 changed files with 27 additions and 42 deletions

View file

@ -284,8 +284,4 @@
(watch [_ state _]
(when (contains? (:workspace-libraries state) file-id)
(rx/of (dwl/ext-library-changed file-id modified-at revn changes)
(dwl/notify-sync-file file-id))))))
(dwl/notify-sync-file file-id))))))

View file

@ -361,7 +361,8 @@
[:div {:class (stl/css :table-field :variants)}
(for [{:keys [id] :as item} variants]
[:div {:class (stl/css :variant)
[:div {:class (stl/css-case :variant true
:inhert-variant you-viewer?)
:key (dm/str id)}
[:span {:class (stl/css :label)}
[:& font-variant-display-name {:variant item}]]
@ -384,16 +385,17 @@
:on-click on-cancel}
i/close]]
(when-not you-viewer? [:div {:class (stl/css :table-field :options)}
[:span {:class (stl/css :icon)
:on-click on-menu-open}
i/menu]
(when-not you-viewer?
[:div {:class (stl/css :table-field :options)}
[:span {:class (stl/css :icon)
:on-click on-menu-open}
i/menu]
[:& installed-font-context-menu
{:on-close on-menu-close
:is-open menu-open?
:on-delete on-delete-font
:on-edit on-edit}]]))]))
[:& installed-font-context-menu
{:on-close on-menu-close
:is-open menu-open?
:on-delete on-delete-font
:on-edit on-edit}]]))]))
(mf/defc installed-fonts
[{:keys [fonts you-viewer?] :as props}]

View file

@ -157,6 +157,9 @@
}
}
}
.inhert-variant {
cursor: default;
}
}
.table-field {

View file

@ -33,7 +33,7 @@
:subtitle (when you-viewer? (tr "dashboard.empty-placeholder-libraries-subtitle-viewer-role"))
:class (stl/css :empty-placeholder-libraries)}
(when-not you-viewer?
[:> i18n/tr-html* {:content (tr "dashboard.empty-placeholder-drafts")
[:> i18n/tr-html* {:content (tr "dashboard.empty-placeholder-libraries")
:class (stl/css :placeholder-markdown)
:tag-name "span"}])]