0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-08 16:00:19 -05:00

🐛 Fix "move to" menu when duplicated team or project names

This commit is contained in:
Andrés Moya 2022-01-26 12:30:29 +01:00 committed by Andrey Antukh
parent f8a46c56e9
commit d83b362c9f
2 changed files with 4 additions and 2 deletions

View file

@ -75,6 +75,7 @@
- Fix zoom in/out after fit or fill [Taiga #2630](https://tree.taiga.io/project/penpot/issue/2630) - Fix zoom in/out after fit or fill [Taiga #2630](https://tree.taiga.io/project/penpot/issue/2630)
- Normalize zoom levels in workspace and viewer [Taiga #2631](https://tree.taiga.io/project/penpot/issue/2631) - Normalize zoom levels in workspace and viewer [Taiga #2631](https://tree.taiga.io/project/penpot/issue/2631)
- Avoid empty names in projects, files and pages [Taiga #2594](https://tree.taiga.io/project/penpot/issue/2594) - Avoid empty names in projects, files and pages [Taiga #2594](https://tree.taiga.io/project/penpot/issue/2594)
- Fix "move to" menu when duplicated team or project names [Taiga #2655](https://tree.taiga.io/project/penpot/issue/2655)
### :arrow_up: Deps updates ### :arrow_up: Deps updates

View file

@ -6,6 +6,7 @@
(ns app.main.ui.components.context-menu (ns app.main.ui.components.context-menu
(:require (:require
[app.common.data :as d]
[app.main.refs :as refs] [app.main.refs :as refs]
[app.main.ui.components.dropdown :refer [dropdown']] [app.main.ui.components.dropdown :refer [dropdown']]
[app.main.ui.icons :as i] [app.main.ui.icons :as i]
@ -100,13 +101,13 @@
[:span i/arrow-slide] [:span i/arrow-slide]
parent-option]] parent-option]]
[:li.separator]]) [:li.separator]])
(for [[option-name option-handler sub-options] (:options level)] (for [[index [option-name option-handler sub-options]] (d/enumerate (:options level))]
(when option-name (when option-name
(if (= option-name :separator) (if (= option-name :separator)
[:li.separator] [:li.separator]
[:li.context-menu-item [:li.context-menu-item
{:class (dom/classnames :is-selected (and selected (= option-name selected))) {:class (dom/classnames :is-selected (and selected (= option-name selected)))
:key option-name} :key index}
(if-not sub-options (if-not sub-options
[:a.context-menu-action {:on-click #(do (dom/stop-propagation %) [:a.context-menu-action {:on-click #(do (dom/stop-propagation %)
(on-close) (on-close)