diff --git a/CHANGES.md b/CHANGES.md index 111502588..97cc72973 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,6 @@ # CHANGELOG -## :rocket: Next +## :rocket: 1.19.0 ### :boom: Breaking changes & Deprecations @@ -21,6 +21,7 @@ - Create typography style from a selected text layer[Taiga #3041](https://tree.taiga.io/project/penpot/us/3041) - Board as ruler origin [Taiga #4833](https://tree.taiga.io/project/penpot/us/4833) - Access tokens support [Taiga #4460](https://tree.taiga.io/project/penpot/us/4460) +- Show interactions setting at the view mode [Taiga #1330](https://tree.taiga.io/project/issue/us/1330) ### :bug: Bugs fixed - Fix files can be opened from multiple urls [Taiga #5310](https://tree.taiga.io/project/penpot/issue/5310) diff --git a/frontend/src/app/main/ui/workspace/context_menu.cljs b/frontend/src/app/main/ui/workspace/context_menu.cljs index dfae97b10..1557f0abe 100644 --- a/frontend/src/app/main/ui/workspace/context_menu.cljs +++ b/frontend/src/app/main/ui/workspace/context_menu.cljs @@ -461,6 +461,8 @@ is-dangling? (nil? (if local-component? (ctkl/get-component workspace-data component-id) (ctf/get-component workspace-libraries component-file component-id))) + lib-exists? (and (not local-component?) + (some? (get workspace-libraries component-file))) do-add-component #(st/emit! (dwl/add-component)) do-add-multiple-components #(st/emit! (dwl/add-multiple-components)) @@ -568,7 +570,7 @@ (when can-update-main? [:& menu-entry {:title (tr "workspace.shape.menu.reset-overrides") :on-click do-reset-component}]) - (when components-v2 + (when (and components-v2 lib-exists?) [:& menu-entry {:title (tr "workspace.shape.menu.restore-main") :on-click do-restore-component}])] [:* diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/component.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/component.cljs index e31d76543..8aa7743b3 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/component.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/component.cljs @@ -167,6 +167,9 @@ (ctkl/get-component workspace-data component-id) (ctf/get-component workspace-libraries library-id component-id)) is-dangling? (nil? component) + lib-exists? (and (not local-component?) + (some? (get workspace-libraries library-id))) + on-menu-click (mf/use-callback @@ -251,7 +254,7 @@ [[(tr "workspace.shape.menu.detach-instance") do-detach-component] (when can-update-main? [(tr "workspace.shape.menu.reset-overrides") do-reset-component]) - (when components-v2 + (when (and components-v2 lib-exists?) [(tr "workspace.shape.menu.restore-main") do-restore-component])] [[(tr "workspace.shape.menu.detach-instance") do-detach-component] (when can-update-main?