From 3a34b3ae5fffb8a6cc7ca44d5917004da1d2a6d1 Mon Sep 17 00:00:00 2001 From: Eva Date: Mon, 14 Feb 2022 09:46:59 +0100 Subject: [PATCH] :sparkles: Team member redesign --- CHANGES.md | 4 +- .../main/partials/dashboard-sidebar.scss | 6 +- .../styles/main/partials/dashboard-team.scss | 68 +++++- .../styles/main/partials/dashboard.scss | 2 +- .../styles/main/partials/dropdown.scss | 4 + frontend/src/app/main/ui/confirm.cljs | 3 + .../app/main/ui/dashboard/change_owner.cljs | 72 ++++++ .../src/app/main/ui/dashboard/sidebar.cljs | 73 ++---- frontend/src/app/main/ui/dashboard/team.cljs | 221 +++++++++++++----- frontend/translations/en.po | 42 +++- frontend/translations/es.po | 47 +++- 11 files changed, 392 insertions(+), 150 deletions(-) create mode 100644 frontend/src/app/main/ui/dashboard/change_owner.cljs diff --git a/CHANGES.md b/CHANGES.md index f6dfb0227..0991e44a4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,8 @@ ### :boom: Breaking changes ### :sparkles: New features + +- Team members redesign [Taiga #2283](https://tree.taiga.io/project/penpot/us/2283) - Rotation to snap to 15º intervals with shift [Taiga #2437](https://tree.taiga.io/project/penpot/issue/2437) - Support border radius and stroke properties for images [Taiga #497](https://tree.taiga.io/project/penpot/us/497) - Disallow using same password as user email [Taiga #2454](https://tree.taiga.io/project/penpot/us/2454) @@ -27,7 +29,7 @@ ### :bug: Bugs fixed -- Fixed ungroup typography when editing it [Taiga #2391](https://tree.taiga.io/project/penpot/issue/2391) +- Fixed ungroup typography when editing it [Taiga #2391](https://tree.taiga.io/project/penpot/issue/2391) - Fixed error when trying to post an empty comment [Taiga #2603](https://tree.taiga.io/project/penpot/issue/2603) - Fixed missing translation strings [Taiga #2786](https://tree.taiga.io/project/penpot/issue/2786) - Fixed color palette outside viewport [Taiga #2715](https://tree.taiga.io/project/penpot/issue/2715) diff --git a/frontend/resources/styles/main/partials/dashboard-sidebar.scss b/frontend/resources/styles/main/partials/dashboard-sidebar.scss index b3d37d1a2..96134c663 100644 --- a/frontend/resources/styles/main/partials/dashboard-sidebar.scss +++ b/frontend/resources/styles/main/partials/dashboard-sidebar.scss @@ -42,11 +42,11 @@ } .options-dropdown { - left: 117px; + right: 2px; top: 50px; z-index: 12; max-height: 30rem; - min-width: 116px; + min-width: 162px; } .switch-content { @@ -403,7 +403,7 @@ @include animation(0, 0.2s, fadeInUp); li { - height: 40px; + height: 32px; font-size: $fs14; padding: 5px 10px; diff --git a/frontend/resources/styles/main/partials/dashboard-team.scss b/frontend/resources/styles/main/partials/dashboard-team.scss index 94684950d..d84b5f8c0 100644 --- a/frontend/resources/styles/main/partials/dashboard-team.scss +++ b/frontend/resources/styles/main/partials/dashboard-team.scss @@ -41,23 +41,69 @@ } .dashboard-team-members { + .table-row { + background-color: $color-white; + height: 63px; + &:not(:first-child) { + margin-top: 16px; + } + } + .table-field { - // border: 1px solid red; &.name { width: 43%; min-width: 300px; + display: flex; + .member-info { + display: flex; + flex-direction: column; + margin-left: 16px; + .member-name { + font-size: $fs16; + .you { + color: $color-gray-30; + margin-left: 5px; + } + } + .member-email { + color: $color-gray-30; + font-size: $fs12; + } + } + + .member-image { + height: 32px; + width: 32px; + img { + border-radius: 50%; + } + } } - &.email { - width: 43%; - min-width: 300px; - } - - &.permissions { - min-width: 120px; + &.roles { + flex-grow: 1; user-select: none; cursor: default; position: relative; + .rol-selector { + &.has-priv { + border: 1px solid $color-gray-20; + } + min-width: 160px; + height: 32px; + display: flex; + justify-content: space-between; + border-radius: 2px; + padding: 3px 8px; + } + } + + &.actions { + position: relative; + .actions-dropdown { + max-height: 30rem; + min-width: 180px; + } } } @@ -69,9 +115,9 @@ border-radius: 4px; box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.25); z-index: 12; - top: 30px; - left: 0px; - width: 168px; + top: 40px; + left: 6px; + width: 155px; hr { margin: 0; diff --git a/frontend/resources/styles/main/partials/dashboard.scss b/frontend/resources/styles/main/partials/dashboard.scss index 6c786b828..0ffabb0b1 100644 --- a/frontend/resources/styles/main/partials/dashboard.scss +++ b/frontend/resources/styles/main/partials/dashboard.scss @@ -106,7 +106,7 @@ flex-direction: column; max-width: 1040px; width: 100%; - margin-top: 20px; + margin-top: 16px; color: $color-black; } diff --git a/frontend/resources/styles/main/partials/dropdown.scss b/frontend/resources/styles/main/partials/dropdown.scss index 3e480de70..8a2c354e5 100644 --- a/frontend/resources/styles/main/partials/dropdown.scss +++ b/frontend/resources/styles/main/partials/dropdown.scss @@ -20,6 +20,10 @@ height: 40px; padding: 5px 16px; + &.warning { + color: $color-danger; + } + svg { fill: $color-gray-20; height: 12px; diff --git a/frontend/src/app/main/ui/confirm.cljs b/frontend/src/app/main/ui/confirm.cljs index 7e154ef95..a1a62efeb 100644 --- a/frontend/src/app/main/ui/confirm.cljs +++ b/frontend/src/app/main/ui/confirm.cljs @@ -20,6 +20,7 @@ {::mf/register modal/components ::mf/register-as :confirm} [{:keys [message + scd-message title on-accept on-cancel @@ -73,6 +74,8 @@ [:div.modal-content (when (and (string? message) (not= message "")) [:h3 message]) + (when (and (string? scd-message) (not= scd-message "")) + [:h3 scd-message]) (when (string? hint) [:p hint]) (when (> (count items) 0) diff --git a/frontend/src/app/main/ui/dashboard/change_owner.cljs b/frontend/src/app/main/ui/dashboard/change_owner.cljs new file mode 100644 index 000000000..a51624669 --- /dev/null +++ b/frontend/src/app/main/ui/dashboard/change_owner.cljs @@ -0,0 +1,72 @@ +;; This Source Code Form is subject to the terms of the Mozilla Public +;; License, v. 2.0. If a copy of the MPL was not distributed with this +;; file, You can obtain one at http://mozilla.org/MPL/2.0/. +;; +;; Copyright (c) UXBOX Labs SL + +(ns app.main.ui.dashboard.change-owner + (:require + [app.common.spec :as us] + [app.main.data.modal :as modal] + [app.main.refs :as refs] + [app.main.store :as st] + [app.main.ui.components.forms :as fm] + [app.main.ui.icons :as i] + [app.util.i18n :as i18n :refer [tr]] + [cljs.spec.alpha :as s] + [rumext.alpha :as mf])) + +(s/def ::member-id ::us/uuid) +(s/def ::leave-modal-form + (s/keys :req-un [::member-id])) + +(mf/defc leave-and-reassign-modal + {::mf/register modal/components + ::mf/register-as :leave-and-reassign} + [{:keys [profile team accept]}] + (let [form (fm/use-form :spec ::leave-modal-form :initial {}) + members-map (mf/deref refs/dashboard-team-members) + members (vals members-map) + + options (into [{:value "" + :label (tr "modals.leave-and-reassign.select-member-to-promote")}] + (filter #(not= (:label %) (:fullname profile)) + (map #(hash-map :label (:name %) :value (str (:id %))) members))) + + on-cancel (st/emitf (modal/hide)) + on-accept + (fn [_] + (let [member-id (get-in @form [:clean-data :member-id])] + (accept member-id)))] + + [:div.modal-overlay + [:div.modal-container.confirm-dialog + [:div.modal-header + [:div.modal-header-title + [:h2 (tr "modals.leave-and-reassign.title")]] + [:div.modal-close-button + {:on-click on-cancel} i/close]] + + [:div.modal-content.generic-form + [:p (tr "modals.leave-and-reassign.hint1" (:name team))] + + (if (empty? members) + [:p (tr "modals.leave-and-reassign.forbiden")] + [:* + [:& fm/form {:form form} + [:& fm/select {:name :member-id + :options options}]]])] + + [:div.modal-footer + [:div.action-buttons + [:input.cancel-button + {:type "button" + :value (tr "labels.cancel") + :on-click on-cancel}] + + [:input.accept-button + {:type "button" + :class (if (:valid @form) "danger" "btn-disabled") + :disabled (not (:valid @form)) + :value (tr "modals.leave-and-reassign.promote-and-leave") + :on-click on-accept}]]]]])) diff --git a/frontend/src/app/main/ui/dashboard/sidebar.cljs b/frontend/src/app/main/ui/dashboard/sidebar.cljs index 7b5cec3f2..ae3c5c696 100644 --- a/frontend/src/app/main/ui/dashboard/sidebar.cljs +++ b/frontend/src/app/main/ui/dashboard/sidebar.cljs @@ -17,7 +17,6 @@ [app.main.refs :as refs] [app.main.store :as st] [app.main.ui.components.dropdown :refer [dropdown]] - [app.main.ui.components.forms :as fm] [app.main.ui.dashboard.comments :refer [comments-section]] [app.main.ui.dashboard.inline-edition :refer [inline-edition]] [app.main.ui.dashboard.project-menu :refer [project-menu]] @@ -228,58 +227,6 @@ (s/def ::leave-modal-form (s/keys :req-un [::member-id])) -(mf/defc leave-and-reassign-modal - {::mf/register modal/components - ::mf/register-as ::leave-and-reassign} - [{:keys [team accept]}] - (let [form (fm/use-form :spec ::leave-modal-form :initial {}) - - members-map (mf/deref refs/dashboard-team-members) - members (vals members-map) - - options (into [{:value "" - :label (tr "modals.leave-and-reassign.select-member-to-promote")}] - (map #(hash-map :label (:name %) :value (str (:id %))) members)) - - on-cancel (st/emitf (modal/hide)) - on-accept - (fn [_] - (let [member-id (get-in @form [:clean-data :member-id])] - (accept member-id)))] - - [:div.modal-overlay - [:div.modal-container.confirm-dialog - [:div.modal-header - [:div.modal-header-title - [:h2 (tr "modals.leave-and-reassign.title")]] - [:div.modal-close-button - {:on-click on-cancel} i/close]] - - [:div.modal-content.generic-form - [:p (tr "modals.leave-and-reassign.hint1" (:name team))] - - (if (empty? members) - [:p (tr "modals.leave-and-reassign.forbiden")] - [:* - [:p (tr "modals.leave-and-reassign.hint2")] - [:& fm/form {:form form} - [:& fm/select {:name :member-id - :options options}]]])] - - [:div.modal-footer - [:div.action-buttons - [:input.cancel-button - {:type "button" - :value (tr "labels.cancel") - :on-click on-cancel}] - - [:input.accept-button - {:type "button" - :class (if (:valid @form) "primary" "btn-disabled") - :disabled (not (:valid @form)) - :value (tr "modals.leave-and-reassign.promote-and-leave") - :on-click on-accept}]]]]])) - (mf/defc team-options-dropdown [{:keys [team profile] :as props}] (let [go-members (st/emitf (dd/go-to-team-members)) @@ -287,6 +234,7 @@ members-map (mf/deref refs/dashboard-team-members) members (vals members-map) + can-rename? (or (get-in team [:permissions :is-owner]) (get-in team [:permissions :is-admin])) on-success (fn [] @@ -334,11 +282,20 @@ (fn [] (st/emit! (dd/fetch-team-members) (modal/show - {:type ::leave-and-reassign + {:type :leave-and-reassign :profile profile :team team :accept leave-fn}))) + leave-and-close + (st/emitf (modal/show + {:type :confirm + :title (tr "modals.leave-confirm.title") + :message (tr "modals.leave-and-close-confirm.message" (:name team)) + :scd-message (tr "modals.leave-and-close-confirm.hint") + :accept-label (tr "modals.leave-confirm.accept") + :on-accept delete-fn})) + on-delete-clicked (st/emitf (modal/show @@ -352,9 +309,13 @@ [:li {:on-click go-members :data-test "team-members"} (tr "labels.members")] [:li {:on-click go-settings :data-test "team-settings"} (tr "labels.settings")] [:hr] - [:li {:on-click on-rename-clicked :data-test "rename-team"} (tr "labels.rename")] + (when can-rename? + [:li {:on-click on-rename-clicked :data-test "rename-team"} (tr "labels.rename")]) (cond + (= (count members) 1) + [:li {:on-click leave-and-close} (tr "dashboard.leave-team")] + (get-in team [:permissions :is-owner]) [:li {:on-click on-leave-as-owner-clicked :data-test "leave-team"} (tr "dashboard.leave-team")] @@ -363,7 +324,7 @@ (when (get-in team [:permissions :is-owner]) - [:li {:on-click on-delete-clicked :data-test "delete-team"} (tr "dashboard.delete-team")])])) + [:li.warning {:on-click on-delete-clicked :data-test "delete-team"} (tr "dashboard.delete-team")])])) (mf/defc sidebar-team-switch diff --git a/frontend/src/app/main/ui/dashboard/team.cljs b/frontend/src/app/main/ui/dashboard/team.cljs index 6d98ddae7..5dd0b65ee 100644 --- a/frontend/src/app/main/ui/dashboard/team.cljs +++ b/frontend/src/app/main/ui/dashboard/team.cljs @@ -12,15 +12,18 @@ [app.main.data.dashboard :as dd] [app.main.data.messages :as dm] [app.main.data.modal :as modal] + [app.main.data.users :as du] [app.main.refs :as refs] [app.main.store :as st] [app.main.ui.components.dropdown :refer [dropdown]] [app.main.ui.components.file-uploader :refer [file-uploader]] [app.main.ui.components.forms :as fm] + [app.main.ui.dashboard.change-owner] [app.main.ui.dashboard.team-form] [app.main.ui.icons :as i] [app.util.dom :as dom] [app.util.i18n :as i18n :refer [tr]] + [beicon.core :as rx] [cljs.spec.alpha :as s] [rumext.alpha :as mf])) @@ -121,16 +124,79 @@ [:div.action-buttons [:& fm/submit-button {:label (tr "modals.invite-member-confirm.accept")}]]]])) +(mf/defc member-info [{:keys [member profile] :as props}] + (let [is-you? (= (:id profile) (:id member))] + [:* + [:div.member-image + [:img {:src (cfg/resolve-profile-photo-url member)}]] + [:div.member-info + [:div.member-name (:name member) + (when is-you? + [:span.you (tr "labels.you")])] + [:div.member-email (:email member)]]])) + +(mf/defc rol-info [{:keys [member team set-admin set-editor set-owner profile] :as props}] + (let [member-is-owner? (:is-owner member) + member-is-admin? (and (:is-admin member) (not member-is-owner?)) + member-is-editor? (and (:can-edit member) (and (not member-is-admin?) (not member-is-owner?))) + show? (mf/use-state false) + you-owner? (get-in team [:permissions :is-owner]) + you-admin? (get-in team [:permissions :is-admin]) + can-change-rol? (or you-owner? you-admin?) + not-superior? (or you-owner? (and can-change-rol? (or member-is-admin? member-is-editor?))) + role (cond + member-is-owner? "labels.owner" + member-is-admin? "labels.admin" + member-is-editor? "labels.editor" + :else "labels.viewer") + is-you? (= (:id profile) (:id member)) + ] + [:* + (if (and can-change-rol? not-superior? (not (and is-you? you-owner?))) + [:div.rol-selector.has-priv + [:span.rol-label (tr role)] + [:span.icon {:on-click #(reset! show? true)} i/arrow-down]] + [::div.rol-selector + [:span.rol-label (tr role)]]) + + [:& dropdown {:show @show? + :on-close #(reset! show? false)} + [:ul.dropdown.options-dropdown + [:li {:on-click set-admin} (tr "labels.admin")] + [:li {:on-click set-editor} (tr "labels.editor")] + ;; Temporarily disabled viewer role + ;; https://tree.taiga.io/project/uxboxproject/issue/1083 + ;; [:li {:on-click set-viewer} (tr "labels.viewer")] + (when you-owner? + [:li {:on-click (partial set-owner member)} (tr "labels.owner")])]]])) + +(mf/defc member-actions [{:keys [member team delete leave profile] :as props}] + (let [is-owner? (:is-owner member) + owner? (get-in team [:permissions :is-owner]) + admin? (get-in team [:permissions :is-admin]) + show? (mf/use-state false) + is-you? (= (:id profile) (:id member)) + can-delete? (or owner? admin?)] + [:* + (when (or is-you? (and can-delete? (not (and is-owner? (not owner?))))) + [:span.icon {:on-click #(reset! show? true)} [i/actions]]) + [:& dropdown {:show @show? + :on-close #(reset! show? false)} + [:ul.dropdown.actions-dropdown + (when is-you? + [:li {:on-click leave} (tr "dashboard.leave-team")]) + (when (and can-delete? (not is-you?) (not (and is-owner? (not owner?)))) + [:li {:on-click delete} (tr "labels.remove-member")])]]])) + (mf/defc team-member {::mf/wrap [mf/memo]} - [{:keys [team member profile] :as props}] + [{:keys [team member members profile] :as props}] - (let [show? (mf/use-state false) - - set-role + (let [set-role (fn [role] (let [params {:member-id (:id member) :role role}] (st/emit! (dd/update-team-member-role params)))) + owner? (get-in team [:permissions :is-owner]) set-owner-fn (partial set-role :owner) set-admin (partial set-role :admin) @@ -138,15 +204,81 @@ ;; set-viewer (partial set-role :viewer) set-owner - (st/emitf (modal/show - {:type :confirm - :title (tr "modals.promote-owner-confirm.title") - :message (tr "modals.promote-owner-confirm.message") - :accept-label (tr "modals.promote-owner-confirm.accept") - :on-accept set-owner-fn})) + (fn [member] + (st/emit! (modal/show + {:type :confirm + :title (tr "modals.promote-owner-confirm.title") + :message (tr "modals.promote-owner-confirm.message" (:name member)) + :scd-message (tr "modals.promote-owner-confirm.hint") + :accept-label (tr "modals.promote-owner-confirm.accept") + :on-accept set-owner-fn + :accept-style :primary}))) + + delete-member-fn + (st/emitf (dd/delete-team-member {:member-id (:id member)})) + + on-success + (fn [] + (st/emit! (dd/go-to-projects (:default-team-id profile)) + (modal/hide) + (du/fetch-teams))) + + on-error + (fn [{:keys [code] :as error}] + (condp = code + + :no-enough-members-for-leave + (rx/of (dm/error (tr "errors.team-leave.insufficient-members"))) + + :member-does-not-exist + (rx/of (dm/error (tr "errors.team-leave.member-does-not-exists"))) + + :owner-cant-leave-team + (rx/of (dm/error (tr "errors.team-leave.owner-cant-leave"))) + + (rx/throw error))) delete-fn - (st/emitf (dd/delete-team-member {:member-id (:id member)})) + (fn [] + (st/emit! (dd/delete-team (with-meta team {:on-success on-success + :on-error on-error})))) + + leave-fn + (fn [member-id] + (let [params (cond-> {} (uuid? member-id) (assoc :reassign-to member-id))] + (st/emit! (dd/leave-team (with-meta params + {:on-success on-success + :on-error on-error}))))) + + leave-and-close + (st/emitf (modal/show + {:type :confirm + :title (tr "modals.leave-confirm.title") + :message (tr "modals.leave-and-close-confirm.message" (:name team)) + :scd-message (tr "modals.leave-and-close-confirm.hint") + :accept-label (tr "modals.leave-confirm.accept") + :on-accept delete-fn})) + + change-owner-and-leave + (fn [] + (st/emit! (dd/fetch-team-members) + (modal/show + {:type :leave-and-reassign + :profile profile + :team team + :accept leave-fn}))) + + leave + (st/emitf (modal/show + {:type :confirm + :title (tr "modals.leave-confirm.title") + :message (tr "modals.leave-confirm.message") + :accept-label (tr "modals.leave-confirm.accept") + :on-accept leave-fn})) + + preset-leave (cond (= 1 (count members)) leave-and-close + (= true owner?) change-owner-and-leave + :else leave) delete (st/emitf (modal/show @@ -154,50 +286,24 @@ :title (tr "modals.delete-team-member-confirm.title") :message (tr "modals.delete-team-member-confirm.message") :accept-label (tr "modals.delete-team-member-confirm.accept") - :on-accept delete-fn}))] + :on-accept delete-member-fn}))] [:div.table-row - [:div.table-field.name (:name member)] - [:div.table-field.email (:email member)] - [:div.table-field.permissions - [:* - (cond - (:is-owner member) - [:span.label (tr "labels.owner")] - - (:is-admin member) - [:span.label (tr "labels.admin")] - - (:can-edit member) - [:span.label (tr "labels.editor")] - - :else - [:span.label (tr "labels.viewer")]) - - (when (and (not (:is-owner member)) - (or (get-in team [:permissions :is-admin]) - (get-in team [:permissions :is-owner]))) - [:span.icon {:on-click #(reset! show? true)} i/arrow-down])] - - [:& dropdown {:show @show? - :on-close #(reset! show? false)} - [:ul.dropdown.options-dropdown - [:li {:on-click set-admin} (tr "labels.admin")] - [:li {:on-click set-editor} (tr "labels.editor")] - ;; Temporarily disabled viewer role - ;; https://tree.taiga.io/project/uxboxproject/issue/1083 - ;; [:li {:on-click set-viewer} (tr "labels.viewer")] - (when (:is-owner team) - [:* - [:hr] - [:li {:on-click set-owner} (tr "dashboard.promote-to-owner")]]) - [:hr] - (when (and (or (get-in team [:permissions :is-owner]) - (get-in team [:permissions :is-admin])) - (not= (:id profile) - (:id member))) - [:li {:on-click delete} (tr "labels.remove")])]]]])) - + [:div.table-field.name + [:& member-info {:member member :profile profile}]] + [:div.table-field.roles + [:& rol-info {:member member + :team team + :set-admin set-admin + :set-editor set-editor + :set-owner set-owner + :profile profile}]] + [:div.table-field.actions + [:& member-actions {:member member + :profile profile + :team team + :delete delete + :leave preset-leave}]]])) (mf/defc team-members [{:keys [members-map team profile] :as props}] @@ -208,13 +314,12 @@ (d/seek :is-owner))] [:div.dashboard-table [:div.table-header - [:div.table-field.name (tr "labels.name")] - [:div.table-field.email (tr "labels.email")] - [:div.table-field.permissions (tr "labels.permissions")]] + [:div.table-field.name (tr "labels.member")] + [:div.table-field.permissions (tr "labels.role")]] [:div.table-rows - [:& team-member {:member owner :team team :profile profile}] + [:& team-member {:member owner :team team :profile profile :members members-map}] (for [item members] - [:& team-member {:member item :team team :profile profile :key (:id item)}])]])) + [:& team-member {:member item :team team :profile profile :key (:id item) :members members-map}])]])) (mf/defc team-members-page [{:keys [team profile] :as props}] diff --git a/frontend/translations/en.po b/frontend/translations/en.po index 5d0e1a085..e7b70d7a4 100644 --- a/frontend/translations/en.po +++ b/frontend/translations/en.po @@ -1161,6 +1161,14 @@ msgstr "Manage fonts" msgid "labels.members" msgstr "Members" +#: src/app/main/ui/dashboard/team.cljs, src/app/main/ui/dashboard/team.cljs, src/app/main/ui/dashboard/sidebar.cljs +msgid "labels.member" +msgstr "Member" + +#: src/app/main/ui/dashboard/team.cljs, src/app/main/ui/dashboard/team.cljs, src/app/main/ui/dashboard/sidebar.cljs +msgid "labels.you" +msgstr "(you)" + #: src/app/main/ui/dashboard/team.cljs msgid "labels.name" msgstr "Name" @@ -1247,6 +1255,10 @@ msgstr "Release notes" msgid "labels.remove" msgstr "Remove" +#: src/app/main/ui/dashboard/team.cljs +msgid "labels.remove-member" +msgstr "Remove member" + #: src/app/main/ui/dashboard/sidebar.cljs, src/app/main/ui/dashboard/project_menu.cljs, src/app/main/ui/dashboard/file_menu.cljs msgid "labels.rename" msgstr "Rename" @@ -1515,11 +1527,7 @@ msgstr "" #: src/app/main/ui/dashboard/sidebar.cljs msgid "modals.leave-and-reassign.hint1" -msgstr "You are %s owner." - -#: src/app/main/ui/dashboard/sidebar.cljs -msgid "modals.leave-and-reassign.hint2" -msgstr "Select other member to promote before leave" +msgstr "You are the owner of this team. Please select another member to promote to owner before you leave." #: src/app/main/ui/dashboard/sidebar.cljs msgid "modals.leave-and-reassign.promote-and-leave" @@ -1531,7 +1539,7 @@ msgstr "Select a member to promote" #: src/app/main/ui/dashboard/sidebar.cljs msgid "modals.leave-and-reassign.title" -msgstr "Select a member to promote" +msgstr "Before you leave" #: src/app/main/ui/dashboard/sidebar.cljs msgid "modals.leave-confirm.accept" @@ -1541,21 +1549,37 @@ msgstr "Leave team" msgid "modals.leave-confirm.message" msgstr "Are you sure you want to leave this team?" +#: src/app/main/ui/dashboard/sidebar.cljs +msgid "modals.leave-and-close-confirm.message" +msgstr "Are you sure you want to leave the %s team?" + +#: src/app/main/ui/dashboard/sidebar.cljs +msgid "modals.leave-and-close-confirm.hint" +msgstr "As you're the only member of this team, the team will be deleted along with its projects and files." + +#: src/app/main/ui/dashboard/sidebar.cljs +msgid "modals.change-owner-and-leave-confirm.message" +msgstr "You are the owner of this team. Please select another member to promote to owner before you leave." + #: src/app/main/ui/dashboard/sidebar.cljs msgid "modals.leave-confirm.title" msgstr "Leaving team" #: src/app/main/ui/dashboard/team.cljs msgid "modals.promote-owner-confirm.accept" -msgstr "Promote" +msgstr "Transfer ownership" #: src/app/main/ui/dashboard/team.cljs msgid "modals.promote-owner-confirm.message" -msgstr "Are you sure you want to promote this user to owner?" +msgstr "You are the current owner of this team. Are you sure you want to make %s the new owner of the team?" + +#: src/app/main/ui/dashboard/team.cljs +msgid "modals.promote-owner-confirm.hint" +msgstr "If you transfer the ownership, you will change your role to Admin, losing some permissions over this team. " #: src/app/main/ui/dashboard/team.cljs msgid "modals.promote-owner-confirm.title" -msgstr "Promote to owner" +msgstr "New team owner" #: src/app/main/ui/workspace/header.cljs, src/app/main/ui/dashboard/file_menu.cljs msgid "modals.remove-shared-confirm.accept" diff --git a/frontend/translations/es.po b/frontend/translations/es.po index c9df35e38..0b42b8d89 100644 --- a/frontend/translations/es.po +++ b/frontend/translations/es.po @@ -1077,7 +1077,7 @@ msgstr "Editar archivo" #: src/app/main/ui/dashboard/team.cljs, src/app/main/ui/dashboard/team.cljs, src/app/main/ui/dashboard/team.cljs msgid "labels.editor" -msgstr "Editor" +msgstr "Edición" #: src/app/main/ui/dashboard/team.cljs, src/app/main/ui/dashboard/team.cljs msgid "labels.email" @@ -1162,6 +1162,14 @@ msgstr "Administrar fuentes" msgid "labels.members" msgstr "Integrantes" +#: src/app/main/ui/dashboard/team.cljs, src/app/main/ui/dashboard/team.cljs, src/app/main/ui/dashboard/sidebar.cljs +msgid "labels.member" +msgstr "Integrante" + +#: src/app/main/ui/dashboard/team.cljs, src/app/main/ui/dashboard/team.cljs, src/app/main/ui/dashboard/sidebar.cljs +msgid "labels.you" +msgstr "(tú)" + #: src/app/main/ui/dashboard/team.cljs msgid "labels.name" msgstr "Nombre" @@ -1219,7 +1227,7 @@ msgstr "o" #: src/app/main/ui/dashboard/team.cljs, src/app/main/ui/dashboard/team.cljs msgid "labels.owner" -msgstr "Dueño" +msgstr "Propiedad" #: src/app/main/ui/settings/sidebar.cljs, src/app/main/ui/dashboard/sidebar.cljs msgid "labels.password" @@ -1248,6 +1256,10 @@ msgstr "Notas de versión" msgid "labels.remove" msgstr "Quitar" +#: src/app/main/ui/dashboard/team.cljs +msgid "labels.remove-member" +msgstr "Eliminar integrante" + #: src/app/main/ui/dashboard/sidebar.cljs, src/app/main/ui/dashboard/project_menu.cljs, src/app/main/ui/dashboard/file_menu.cljs msgid "labels.rename" msgstr "Renombrar" @@ -1262,7 +1274,7 @@ msgstr "Reintentar" #: src/app/main/ui/dashboard/team.cljs msgid "labels.role" -msgstr "Cargo" +msgstr "Rol" msgid "labels.save" msgstr "Guardar" @@ -1517,11 +1529,8 @@ msgstr "" #: src/app/main/ui/dashboard/sidebar.cljs msgid "modals.leave-and-reassign.hint1" -msgstr "Eres %s dueño." +msgstr "Tienes la propiedad de este equipo. Por favor selecciona otra persona integrante para promover al rol Propiedad." -#: src/app/main/ui/dashboard/sidebar.cljs -msgid "modals.leave-and-reassign.hint2" -msgstr "Promociona otro miembro a dueño antes de abandonar el equipo" #: src/app/main/ui/dashboard/sidebar.cljs msgid "modals.leave-and-reassign.promote-and-leave" @@ -1533,7 +1542,7 @@ msgstr "Selecciona un miembro a promocionar" #: src/app/main/ui/dashboard/sidebar.cljs msgid "modals.leave-and-reassign.title" -msgstr "Selecciona un miembro a promocionar" +msgstr "Antes de que abandones" #: src/app/main/ui/dashboard/sidebar.cljs msgid "modals.leave-confirm.accept" @@ -1543,21 +1552,37 @@ msgstr "Abandonar el equipo" msgid "modals.leave-confirm.message" msgstr "¿Seguro que quieres abandonar este equipo?" +#: src/app/main/ui/dashboard/sidebar.cljs +msgid "modals.leave-and-close-confirm.message" +msgstr " ¿Seguro que quieres abandonar el equipo %s?" + +#: src/app/main/ui/dashboard/sidebar.cljs +msgid "modals.leave-and-close-confirm.hint" +msgstr "Al ser la única persona integrante de este equipo, el equipo será eliminado junto con sus proyectos y archivos." + +#: src/app/main/ui/dashboard/sidebar.cljs +msgid "modals.change-owner-and-leave-confirm.message" +msgstr "Tienes la propiedad de este equipo. Por favor selecciona otra persona integrante para promover al rol Propiedad." + #: src/app/main/ui/dashboard/sidebar.cljs msgid "modals.leave-confirm.title" msgstr "Abandonando el equipo" #: src/app/main/ui/dashboard/team.cljs msgid "modals.promote-owner-confirm.accept" -msgstr "Promocionar" +msgstr "Transferir propiedad" #: src/app/main/ui/dashboard/team.cljs msgid "modals.promote-owner-confirm.message" -msgstr "¿Seguro que quieres promocionar este usuario a dueño?" +msgstr "Tienes la propiedad de este equipo. ¿Seguro que quieres transferir la propiedad del equipo a %s?" + +#: src/app/main/ui/dashboard/team.cljs +msgid "modals.promote-owner-confirm.hint" +msgstr "Si transfieres la propiedad, tu rol cambiará a Administración, perdiendo algunos permisos sobre este equipo." #: src/app/main/ui/dashboard/team.cljs msgid "modals.promote-owner-confirm.title" -msgstr "Promocionar a dueño" +msgstr "Nueva propiedad del equipo" #: src/app/main/ui/workspace/header.cljs, src/app/main/ui/dashboard/file_menu.cljs msgid "modals.remove-shared-confirm.accept"