mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
acddd25cfd
Summary: - Remove the empty-folder icon - Add an "Invite team members" button for owners on empty team sites - Add a "Browse Templates" button for all other cases on empty sites - Update intro text for team, including a link to Sprouts - Update intro text for personal/anon. - Include a Free/Pro tag for team sites (for now, only "Free") - Add a "Manage Team" button for owners on home page of all team sites. - Polished the UI of UserManager: add a transition for the background, and delay the appearance of the spinner for fast loads. Test Plan: Fixed up the HomeIntro tests; added test case for Manage Team button Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3459
22 lines
759 B
TypeScript
22 lines
759 B
TypeScript
import {loadUserManager} from 'app/client/lib/imports';
|
|
import {AppModel} from 'app/client/models/AppModel';
|
|
import {FullUser, Organization, UserAPI} from 'app/common/UserAPI';
|
|
|
|
// Opens the user-manager for the given org.
|
|
export async function manageTeamUsers(org: Organization, user: FullUser|null, api: UserAPI) {
|
|
(await loadUserManager()).showUserManagerModal(api, {
|
|
permissionData: api.getOrgAccess(org.id),
|
|
activeUser: user,
|
|
resourceType: 'organization',
|
|
resourceId: org.id,
|
|
resource: org,
|
|
});
|
|
}
|
|
|
|
// Opens the user-manager for the current org in the given AppModel.
|
|
export async function manageTeamUsersApp(app: AppModel) {
|
|
if (app.currentOrg) {
|
|
return manageTeamUsers(app.currentOrg, app.currentValidUser, app.api);
|
|
}
|
|
}
|