Skip to content

Rework organization page #8679

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Jun 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
4cd2ecd
refactor orga settings in new style
hotzenklotz Jun 6, 2025
d022413
Merge branch 'account-settings-page' into orga-settings-page
hotzenklotz Jun 16, 2025
82fd616
Refactor account settings components and update organization navigation
hotzenklotz Jun 16, 2025
aa95b90
Enhance organization management UI and functionality
hotzenklotz Jun 16, 2025
a2002cb
formatting
hotzenklotz Jun 16, 2025
b7543ea
Enhance organization-related components and UI
hotzenklotz Jun 16, 2025
749861a
fix setting cards buttons
hotzenklotz Jun 16, 2025
44e0966
changelog
hotzenklotz Jun 16, 2025
8716091
Merge branch 'account-settings-page' into orga-settings-page
hotzenklotz Jun 17, 2025
55bf833
Update frontend/javascripts/admin/organization/pricing_plan_utils.ts
hotzenklotz Jun 18, 2025
513011b
applied PR feedback
hotzenklotz Jun 18, 2025
01ae877
Merge branch 'orga-settings-page' of github.com:scalableminds/webknos…
hotzenklotz Jun 18, 2025
67e8819
Show owner email in notifications
hotzenklotz Jun 18, 2025
121c91a
fix pricing plan label
hotzenklotz Jun 18, 2025
203ae75
Merge branch 'account-settings-page' into orga-settings-page
hotzenklotz Jun 23, 2025
df8e81d
do not show upgrade options for custom plans yet
hotzenklotz Jun 23, 2025
66086aa
fix null / infinity on update
hotzenklotz Jun 24, 2025
1903218
appled PR feedback
hotzenklotz Jun 24, 2025
d61a522
apply PR feedback
hotzenklotz Jun 24, 2025
f2ee79d
fix linitng
hotzenklotz Jun 24, 2025
2ed707a
Merge branch 'account-settings-page' into orga-settings-page
hotzenklotz Jun 24, 2025
9599a88
Update frontend/javascripts/admin/organization/upgrade_plan_modal.tsx
hotzenklotz Jun 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/controllers/OrganizationController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class OrganizationController @Inject()(
_ <- Fox.fromBool(request.identity.isAdminOf(organization._id)) ?~> "notAllowed" ~> FORBIDDEN
_ <- organizationDAO.updateFields(organization._id, name, newUserMailingList)
updated <- organizationDAO.findOne(organization._id)
organizationJson <- organizationService.publicWrites(updated)
organizationJson <- organizationService.publicWrites(updated, Some(request.identity))
} yield Ok(organizationJson)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { getAuthToken, revokeAuthToken } from "admin/rest_api";
import { Button, Descriptions, Popover, Spin, Typography } from "antd";
import { useWkSelector } from "libs/react_hooks";
import { useEffect, useState } from "react";
import { AccountSettingsTitle } from "./account_profile_view";
import { SettingsTitle } from "./helpers/settings_title";

const { Text } = Typography;

Expand Down Expand Up @@ -80,7 +80,7 @@ function AccountAuthTokenView() {

return (
<div>
<AccountSettingsTitle
<SettingsTitle
title="API Authorization"
description="Access the WEBKNOSSO Python API with your API token"
/>
Expand Down
6 changes: 3 additions & 3 deletions frontend/javascripts/admin/account/account_password_view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useState } from "react";
import { type RouteComponentProps, withRouter } from "react-router-dom";
import { logoutUserAction } from "viewer/model/actions/user_actions";
import Store from "viewer/store";
import { AccountSettingsTitle } from "./account_profile_view";
import { SettingsTitle } from "./helpers/settings_title";
const FormItem = Form.Item;
const { Password } = Input;

Expand Down Expand Up @@ -186,7 +186,7 @@ function AccountPasswordView({ history }: Props) {

return (
<div>
<AccountSettingsTitle title="Password" description="Manage and update your password" />
<SettingsTitle title="Password" description="Manage and update your password" />
<Descriptions
column={2}
layout="vertical"
Expand All @@ -195,7 +195,7 @@ function AccountPasswordView({ history }: Props) {
style={{ marginBottom: "3rem" }}
/>

<AccountSettingsTitle title="Passkeys" description="Login passwordless with Passkeys" />
<SettingsTitle title="Passkeys" description="Login passwordless with Passkeys" />
<List
className="demo-loadmore-list"
itemLayout="horizontal"
Expand Down
22 changes: 3 additions & 19 deletions frontend/javascripts/admin/account/account_profile_view.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CheckOutlined, DownOutlined } from "@ant-design/icons";
import { updateSelectedThemeOfUser } from "admin/rest_api";
import { Descriptions, Divider, Dropdown, Typography } from "antd";
import { Descriptions, Dropdown } from "antd";
import { useWkSelector } from "libs/react_hooks";
import * as Utils from "libs/utils";
import { getSystemColorTheme } from "theme";
Expand All @@ -9,23 +9,7 @@ import { formatUserName } from "viewer/model/accessors/user_accessor";
import { setThemeAction } from "viewer/model/actions/ui_actions";
import { setActiveUserAction } from "viewer/model/actions/user_actions";
import Store from "viewer/store";

const { Text } = Typography;

export function AccountSettingsTitle({
title,
description,
}: { title: string; description: string }) {
return (
<div>
<h2 style={{ marginBottom: 0 }}>{title}</h2>
<Text type="secondary" style={{ display: "block" }}>
{description}
</Text>
<Divider style={{ margin: "12px 0 32px 0" }} />
</div>
);
}
import { SettingsTitle } from "./helpers/settings_title";

function AccountProfileView() {
const activeUser = useWkSelector((state) => state.activeUser);
Expand Down Expand Up @@ -100,7 +84,7 @@ function AccountProfileView() {

return (
<div>
<AccountSettingsTitle
<SettingsTitle
title="Profile"
description="Manage your personal information and preferences"
/>
Expand Down
31 changes: 31 additions & 0 deletions frontend/javascripts/admin/account/helpers/settings_card.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { InfoCircleOutlined } from "@ant-design/icons";
import { Card, Flex, Popover, Typography } from "antd";

interface SettingsCardProps {
title: string;
description: React.ReactNode;
explanation?: React.ReactNode;
action?: React.ReactNode;
}

export function SettingsCard({ title, description, explanation, action }: SettingsCardProps) {
return (
<Card style={{ minHeight: 105 }}>
<Typography.Text type="secondary" style={{ fontSize: 14 }}>
<Flex justify="space-between">
<div>
{title}

{explanation != null ? (
<Popover content={explanation}>
<InfoCircleOutlined style={{ marginLeft: 4 }} />
</Popover>
) : null}
</div>
{action}
</Flex>
</Typography.Text>
<div style={{ fontSize: 16, marginTop: 4 }}>{description}</div>
</Card>
);
}
21 changes: 21 additions & 0 deletions frontend/javascripts/admin/account/helpers/settings_title.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Divider, Typography } from "antd";

const { Text } = Typography;

export function SettingsTitle({
title,
description,
}: {
title: string;
description: string;
}) {
return (
<div>
<h2 style={{ marginBottom: 0 }}>{title}</h2>
<Text type="secondary" style={{ display: "block" }}>
{description}
</Text>
<Divider style={{ margin: "12px 0 32px 0" }} />
</div>
);
}
Loading