mirror of
https://github.com/penpot/penpot.git
synced 2025-05-19 09:06:12 +02:00
✨ Show current page in browser title
This commit is contained in:
parent
0008a2aa48
commit
6383dc0952
16 changed files with 202 additions and 15 deletions
|
@ -17,7 +17,7 @@
|
|||
[app.main.ui.dashboard.project-menu :refer [project-menu]]
|
||||
[app.main.ui.icons :as i]
|
||||
[app.util.dom :as dom]
|
||||
[app.util.i18n :as i18n :refer [t]]
|
||||
[app.util.i18n :as i18n :refer [tr]]
|
||||
[app.util.keyboard :as kbd]
|
||||
[app.util.router :as rt]
|
||||
[okulary.core :as l]
|
||||
|
@ -27,7 +27,6 @@
|
|||
[{:keys [team project] :as props}]
|
||||
(let [local (mf/use-state {:menu-open false
|
||||
:edition false})
|
||||
locale (mf/deref i18n/locale)
|
||||
project-id (:id project)
|
||||
team-id (:id team)
|
||||
|
||||
|
@ -56,7 +55,7 @@
|
|||
[:header.dashboard-header
|
||||
(if (:is-default project)
|
||||
[:div.dashboard-title
|
||||
[:h1 (t locale "labels.drafts")]]
|
||||
[:h1 (tr "labels.drafts")]]
|
||||
|
||||
(if (:edition @local)
|
||||
[:& inline-edition {:content (:name project)
|
||||
|
@ -77,7 +76,7 @@
|
|||
:on-click toggle-pin}
|
||||
i/pin]]))
|
||||
[:a.btn-secondary.btn-small {:on-click on-create-clicked}
|
||||
(t locale "dashboard.new-file")]]))
|
||||
(tr "dashboard.new-file")]]))
|
||||
|
||||
(defn files-ref
|
||||
[project-id]
|
||||
|
@ -94,6 +93,10 @@
|
|||
(mf/use-effect
|
||||
(mf/deps (:id project))
|
||||
(fn []
|
||||
(dom/set-html-title (tr "title.dashboard.files"
|
||||
(if (:is-default project)
|
||||
(tr "labels.drafts")
|
||||
(:name project))))
|
||||
(st/emit! (dd/fetch-files {:project-id (:id project)})
|
||||
(dd/clear-selected-files))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue