Skip to content

Commit

Permalink
🚸 Make more obvious right that is granted by adding user (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericlinagora committed Apr 2, 2024
1 parent 080bea2 commit 26dc16c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions tdrive/frontend/public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
"scenes.app.workspaces.create_company.group_data.group_main_activity.other": "Other",
"components.drive_dropzone.uploading": "Uploading...",
"components.user_picker.modal_no_result": "No results found",
"components.user_picker.modal.result_add.none": "No rights",
"components.user_picker.modal.result_add.read": "Grant read",
"components.user_picker.modal.result_add.write": "Grant write",
"components.user_picker.modal.result_add.manage": "Grant full",
"components.user_picker.modal.result_add.remove": "Remove rights",
"components.user_picker.modal_results_trucated": "First {{$1}} results of {{$2}} shown...",
"components.users_picker.add_me": "Add me",
"scenes.app.workspaces.create_company.invitations.title": "Configure your workspace.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ import { SearchIcon } from '@heroicons/react/solid';
import { Info } from '@atoms/text';
import Languages from '@features/global/services/languages-service';
import _ from 'lodash';
import { DriveFileAccessLevel } from 'app/features/drive/types';


export default (props: {
className?: string;
onChange: (users: UserType[]) => void;
initialUsers: UserType[];
level: DriveFileAccessLevel;
}) => {
const [users, setUsers] = useState<UserType[]>(props.initialUsers);
const { search, result, query } = useSearchUsers({ scope: 'company' });
Expand Down Expand Up @@ -73,7 +75,7 @@ export default (props: {
}}
size="sm"
>
{Languages.t('general.add')}
{Languages.t('components.user_picker.modal.result_add.' + props.level)}
</Button>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ const UserAccessSelector = ({ id, disabled }: { id: string; disabled: boolean })
<div className="grow">
<SelectUsers
className="rounded-r-none"
level={level}
onChange={(users: UserType[]) => {
const id = users[0]?.id;
update({
Expand Down

0 comments on commit 26dc16c

Please sign in to comment.