Skip to content

Commit

Permalink
Merge branch 'master' of github.com:supertokens/dashboard into feat/u…
Browse files Browse the repository at this point in the history
…ser-creation
  • Loading branch information
Chakravarthy7102 committed Dec 20, 2023
2 parents 1904fe7 + 435c332 commit f011c1b
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 19 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

## [0.9.1] - 2023-12-19

- Improve UX when showing feature not enabled message for UserRoles recipe.

## [0.9.0] - 2023-11-17

- Adds user roles and permissions feature to dashboard.
Expand Down
2 changes: 1 addition & 1 deletion build/static/css/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/static/css/main.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/static/js/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/static/js/bundle.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dashboard",
"version": "0.9.0",
"version": "0.9.1",
"private": true,
"dependencies": {
"@babel/core": "^7.16.0",
Expand Down
9 changes: 9 additions & 0 deletions src/ui/components/alert/alert.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@
& > div {
color: #a44915;
}

a {
color: #a44915;
font-weight: 500;
}
}

a:hover {
background: transparent !important;
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/ui/components/alert/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ import "./alert.scss";
type AlertProps = {
type?: "primary";
title: string;
content: string;
children: React.ReactNode;
};

export default function Alert({ content, title, type = "primary" }: AlertProps) {
export default function Alert({ children, title, type = "primary" }: AlertProps) {
return (
<div className={`alert ${type}`}>
<span>{title}</span>
<div>{content}</div>
<div>{children}</div>
</div>
);
}
11 changes: 7 additions & 4 deletions src/ui/components/userDetail/userRoles/UserRolesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,13 @@ export default function UserRolesList() {
) : null}
</>
) : (
<Alert
title="Feature is not enabled"
content="Please enable this feature first to manage your user roles and permissions!"
/>
<Alert title="Feature is not enabled">
Enable this feature to manage user roles and permissions. Start by initializing the
UserRoles recipe in the recipeList on the backend. For more details, see{" "}
<a href="https://supertokens.com/docs/userdashboard/managing-user-roles-and-permissions">
this page.
</a>
</Alert>
)}
</>
</div>
Expand Down
11 changes: 7 additions & 4 deletions src/ui/pages/userroles/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,13 @@ export default function UserRolesList() {
function renderContent() {
if (isFeatureEnabled === false) {
return (
<Alert
title="Feature is not enabled"
content="Please enable this feature first to manage your user roles and permissions!"
/>
<Alert title="Feature is not enabled">
Enable this feature to manage user roles and permissions. Start by initializing the UserRoles recipe
in the recipeList on the backend. For more details, see{" "}
<a href="https://supertokens.com/docs/userdashboard/managing-user-roles-and-permissions">
this page.
</a>
</Alert>
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
* under the License.
*/

export const package_version = "0.9.0";
export const package_version = "0.9.1";

0 comments on commit f011c1b

Please sign in to comment.