diff --git a/backend/src/app/rpc/queries/projects.clj b/backend/src/app/rpc/queries/projects.clj index b3c16fa0d..a69c5ffc8 100644 --- a/backend/src/app/rpc/queries/projects.clj +++ b/backend/src/app/rpc/queries/projects.clj @@ -96,7 +96,7 @@ (retrieve-all-projects conn profile-id))) (def sql:all-projects - "select p1.*, t.name as team_name + "select p1.*, t.name as team_name, t.is_default as default_team from project as p1 inner join team as t on t.id = p1.team_id @@ -108,7 +108,7 @@ tpr.is_admin = true)) and p1.deleted_at is null union - select p2.*, t.name as team_name + select p2.*, t.name as team_name, t.is_default as default_team from project as p2 inner join team as t on t.id = p2.team_id diff --git a/frontend/src/app/main/ui/dashboard/file_menu.cljs b/frontend/src/app/main/ui/dashboard/file_menu.cljs index baff7a735..ea00d75a0 100644 --- a/frontend/src/app/main/ui/dashboard/file_menu.cljs +++ b/frontend/src/app/main/ui/dashboard/file_menu.cljs @@ -45,6 +45,11 @@ (tr "labels.drafts") (:name project))) + team-name (fn [team] + (if (:is-default team) + (tr "dashboard.your-penpot") + (:name team))) + on-new-tab (mf/use-callback (mf/deps file) @@ -147,6 +152,7 @@ #(if (nil? %) {:id (:team-id project) :name (:team-name project) + :is-default (:default-team project) :projects [project]} (update % :projects conj project)))) {} @@ -176,7 +182,7 @@ (when (seq other-teams) [(tr "dashboard.move-to-other-team") nil (for [team other-teams] - [(:name team) nil + [(team-name team) nil (for [sub-project (:projects team)] [(project-name sub-project) (on-move (:id team)