Skip to content

Commit

Permalink
[MS] Batch workspace sharing
Browse files Browse the repository at this point in the history
  • Loading branch information
Ironicbay committed Nov 22, 2024
1 parent 2a721f7 commit 58ee144
Show file tree
Hide file tree
Showing 9 changed files with 462 additions and 77 deletions.
6 changes: 3 additions & 3 deletions client/src/components/workspaces/WorkspaceUserRole.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
:options="options"
:disabled="disabled"
:default-option-key="role"
:appearance="MsAppearance.Clear"
:appearance="MsAppearance.Outline"
@change="onRoleChanged(user, $event.option, $event.oldOption)"
/>
</div>
Expand Down Expand Up @@ -93,8 +93,8 @@ function onRoleChanged(user: UserTuple, newRoleOption: MsOption, oldRoleOption?:
content: '';
position: absolute;
display: block;
width: 90%;
border-bottom: 1px solid var(--parsec-color-light-secondary-disabled);
width: calc(100% - 3rem);
border-bottom: 1px solid var(--parsec-color-light-secondary-medium);
bottom: 0;
right: 0;
}
Expand Down
17 changes: 15 additions & 2 deletions client/src/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@
}
},
"WorkspaceSharing": {
"title": "Share this workspace",
"searchPlaceholder": "e.g.: John Smith",
"currentUserLabel": "Me",
"unshareSuccess": "The workspace is no longer shared with {user}.",
Expand All @@ -331,8 +330,22 @@
"alreadyNotShared": "This workspace is not shared with {user}.",
"alreadyHasRole": "{user} is already {role} on this workspace."
},
"batchSharing": {
"outsiderRoleWarning": "{external} profiles can only have {contributor} or {reader} roles.",
"external": "External",
"contributor": "Contributor",
"reader": "Reader",
"buttonSelect": "Multiple selection",
"buttonFinish": "Finish",
"chooseRole": "Choose a role",
"noChanges": "Selected members were already {role}.",
"someFailed": "Some role assignments failed.",
"allFailed": "And error has occurred, role assignment has failed. (Reason: {reason})",
"updateRoleSuccess": "Selected members' roles have been updated to {role}.",
"unshareSuccess": "The workspace is no longer shared with selected members."
},
"onlyOwnerWarning": "To prevent data loss if you ever leave the organization, we recommend promoting someone else to {owner} on this workspace.",
"owner": "owner",
"owner": "Owner",
"noMatch": "No user found that matches '{query}'."
},
"SettingsModal": {
Expand Down
17 changes: 15 additions & 2 deletions client/src/locales/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@
}
},
"WorkspaceSharing": {
"title": "Partager cet espace de travail",
"searchPlaceholder": "ex : Jean Martin",
"currentUserLabel": "Moi",
"unshareSuccess": "L'espace de travail n'est plus partagé avec {user}.",
Expand All @@ -331,8 +330,22 @@
"alreadyNotShared": "Cet espace de travail n'est pas partagé avec {user}.",
"alreadyHasRole": "{user} est déjà {role} sur cet espace de travail."
},
"batchSharing": {
"outsiderRoleWarning": "Les profils {external} ne peuvent avoir que les rôles {contributor} ou {reader}.",
"external": "Externe",
"contributor": "Contributeur",
"reader": "Lecteur",
"buttonSelect": "Sélection multiple",
"buttonFinish": "Terminer",
"chooseRole": "Choisir un rôle",
"noChanges": "Les membres sélectionnés étaient déjà {role}.",
"someFailed": "Certaines assignations de rôle ont échoué.",
"allFailed": "Une erreur est survenue, les assignations de rôle ont échoué. (Raison : {reason})",
"updateRoleSuccess": "Le rôle des membres sélectionnées est désormais {role}.",
"unshareSuccess": "L'espace de travail n'est plus partagé avec les membres sélectionnés."
},
"onlyOwnerWarning": "Nous vous recommandons de promouvoir quelqu'un d'autre au poste de {owner}. Vous éviterez ainsi de perdre des données si vous quittez l'organisation.",
"owner": "propriétaire",
"owner": "Propriétaire",
"noMatch": "Aucun utilisateur trouvé qui correspond à la recherche '{query}'."
},
"SettingsModal": {
Expand Down
17 changes: 17 additions & 0 deletions client/src/theme/components/inputs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,20 @@
.sc-ion-input-md-h:not(.legacy-input) {
min-height: 0;
}

.workspace-sharing-modal {
.filter-button {
--background: none;
--background-hover: var(--parsec-color-light-secondary-premiere);
color: var(--parsec-color-light-secondary-text);

&::part(native) {
border: none;
padding: 0.5rem 1rem !important;
}

.ms-dropdown-icon {
font-size: 1rem;
}
}
}
6 changes: 3 additions & 3 deletions client/src/theme/components/modals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@
}

.workspace-sharing-modal {
--max-height: var(--parsec-modal-max-height);
--max-height: 700px;

&::part(content) {
min-width: var(--parsec-modal-width-md);
max-width: var(--parsec-modal-width-md);
min-width: var(--parsec-modal-width-lg);
max-width: var(--parsec-modal-width-lg);
height: 100%;
}

Expand Down
Loading

0 comments on commit 58ee144

Please sign in to comment.