mirror of
https://github.com/penpot/penpot.git
synced 2025-02-23 15:26:29 -05:00
✨ Keep plugin url when user is not logged
This commit is contained in:
parent
2f5f31814a
commit
e106f66ac6
4 changed files with 27 additions and 5 deletions
|
@ -170,7 +170,7 @@
|
|||
(let [data
|
||||
(with-meta
|
||||
{:project-id project-id
|
||||
:name (dm/str "Try plugin: " (:name plugin))}
|
||||
:name (dm/str (tr "dashboard.plugins.try-plugin") (:name plugin))}
|
||||
{:on-success (partial navegate-file! plugin)})]
|
||||
(-> (dd/create-file data)
|
||||
(with-meta {::ev/origin "plugin-try-out"})))))
|
||||
|
@ -207,9 +207,9 @@
|
|||
(do
|
||||
(st/emit! (ptk/event ::ev/event {::ev/name "install-plugin" :name (:name plugin) :url plugin-url}))
|
||||
(open-permissions-dialog plugin))
|
||||
(st/emit! (notif/error "Cannot parser the plugin manifest"))))
|
||||
(st/emit! (notif/error (tr "dashboard.plugins.parse-error")))))
|
||||
(fn [_]
|
||||
(st/emit! (notif/error "The plugin URL is incorrect")))))))))
|
||||
(st/emit! (notif/error (tr "dashboard.plugins.bad-url"))))))))))
|
||||
|
||||
(defn use-templates-import
|
||||
[can-edit? template-url default-project-id]
|
||||
|
@ -262,6 +262,7 @@
|
|||
|
||||
can-edit? (dm/get-in team [:permissions :can-edit])
|
||||
template-url (or template-url (:template-url storage/session))
|
||||
plugin-url (or plugin-url (:plugin-url storage/session))
|
||||
|
||||
default-project
|
||||
(mf/with-memo [projects]
|
||||
|
|
|
@ -78,11 +78,14 @@
|
|||
|
||||
|
||||
(defn- store-session-params
|
||||
[{:keys [template]}]
|
||||
[{:keys [template plugin]}]
|
||||
(binding [storage/*sync* true]
|
||||
(when (some? template)
|
||||
(swap! storage/session assoc
|
||||
:template-url template))))
|
||||
:template-url template))
|
||||
(when (some? plugin)
|
||||
(swap! storage/session assoc
|
||||
:plugin-url plugin))))
|
||||
|
||||
(defn on-navigate
|
||||
[router path]
|
||||
|
|
|
@ -6975,6 +6975,15 @@ msgstr "Import failed. The template URL is incorrect"
|
|||
msgid "dashboard.import.no-perms"
|
||||
msgstr "You don’t have permission to import to this team"
|
||||
|
||||
msgid "dashboard.plugins.try-plugin"
|
||||
msgstr "Try plugin: "
|
||||
|
||||
msgid "dashboard.plugins.parse-error"
|
||||
msgstr "Cannot parser the plugin manifest"
|
||||
|
||||
msgid "dashboard.plugins.bad-url"
|
||||
msgstr "The plugin URL is incorrect"
|
||||
|
||||
msgid "labels.notifications"
|
||||
msgstr "Notifications"
|
||||
|
||||
|
|
|
@ -6932,6 +6932,15 @@ msgstr "La importación ha fallado. La URL de la plantilla es incorrecta"
|
|||
msgid "dashboard.import.no-perms"
|
||||
msgstr "No tienes permisos para importar en este equipo"
|
||||
|
||||
msgid "dashboard.plugins.try-plugin"
|
||||
msgstr "Prueba la extensión: "
|
||||
|
||||
msgid "dashboard.plugins.parse-error"
|
||||
msgstr "No se puede analizar el manifiest de la extensión"
|
||||
|
||||
msgid "dashboard.plugins.bad-url"
|
||||
msgstr "La URL de la extensión es incorrecta"
|
||||
|
||||
msgid "labels.notifications"
|
||||
msgstr "Notificaciones"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue