|
|
@@ -281,37 +281,38 @@
|
|
|
(shui/trigger-as :a
|
|
|
{:tab-index 0
|
|
|
:class "item cp__repos-select-trigger"
|
|
|
- :on-click (fn [^js e]
|
|
|
- (check-multiple-windows? state)
|
|
|
- (some-> (.-target e)
|
|
|
- (.closest "a.item")
|
|
|
- (shui/popup-show!
|
|
|
- (fn [{:keys [id]}]
|
|
|
- [:<>
|
|
|
- (header-fn)
|
|
|
- (for [{:keys [hr item hover-detail title options icon]} (items-fn)]
|
|
|
- (let [on-click' (:on-click options)
|
|
|
- href' (:href options)]
|
|
|
- (if hr
|
|
|
- (shui/dropdown-menu-separator)
|
|
|
- (shui/dropdown-menu-item
|
|
|
- (assoc options
|
|
|
- :title hover-detail
|
|
|
- :on-click (fn [^js e]
|
|
|
- (when on-click'
|
|
|
- (when-not (false? (on-click' e))
|
|
|
- (shui/popup-hide! id)))))
|
|
|
- (or item
|
|
|
- (if href'
|
|
|
- [:a.flex.items-center.w-full
|
|
|
- {:href href' :on-click #(shui/popup-hide! id)
|
|
|
- :style {:color "inherit"}} title]
|
|
|
- [:span.flex.items-center.gap-1.w-full
|
|
|
- icon [:div title]]))))))])
|
|
|
- {:as-dropdown? true
|
|
|
- :auto-focus? false
|
|
|
- :align "start"
|
|
|
- :content-props {:class "repos-list"}})))
|
|
|
+ :on-pointer-down
|
|
|
+ (fn [^js e]
|
|
|
+ (check-multiple-windows? state)
|
|
|
+ (some-> (.-target e)
|
|
|
+ (.closest "a.item")
|
|
|
+ (shui/popup-show!
|
|
|
+ (fn [{:keys [id]}]
|
|
|
+ [:<>
|
|
|
+ (header-fn)
|
|
|
+ (for [{:keys [hr item hover-detail title options icon]} (items-fn)]
|
|
|
+ (let [on-click' (:on-click options)
|
|
|
+ href' (:href options)]
|
|
|
+ (if hr
|
|
|
+ (shui/dropdown-menu-separator)
|
|
|
+ (shui/dropdown-menu-item
|
|
|
+ (assoc options
|
|
|
+ :title hover-detail
|
|
|
+ :on-click (fn [^js e]
|
|
|
+ (when on-click'
|
|
|
+ (when-not (false? (on-click' e))
|
|
|
+ (shui/popup-hide! id)))))
|
|
|
+ (or item
|
|
|
+ (if href'
|
|
|
+ [:a.flex.items-center.w-full
|
|
|
+ {:href href' :on-click #(shui/popup-hide! id)
|
|
|
+ :style {:color "inherit"}} title]
|
|
|
+ [:span.flex.items-center.gap-1.w-full
|
|
|
+ icon [:div title]]))))))])
|
|
|
+ {:as-dropdown? true
|
|
|
+ :auto-focus? false
|
|
|
+ :align "start"
|
|
|
+ :content-props {:class "repos-list"}})))
|
|
|
:title repo-name} ;; show full path on hover
|
|
|
[:div.flex.flex-row.items-center
|
|
|
[:div.flex.relative.graph-icon.rounded
|