Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
93b4390
update react and less
MichaelBuessemeyer Mar 29, 2021
e848bbd
use antd auto upgrade script
MichaelBuessemeyer Mar 29, 2021
51e3c73
update antd
MichaelBuessemeyer Mar 29, 2021
f19bd18
Button.Group to Space
grittaweisheit Mar 30, 2021
01e5dfc
autosize to autoSize
grittaweisheit Mar 30, 2021
4d2f6d4
use icon instead of iconType
MichaelBuessemeyer Mar 30, 2021
16de2ee
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
MichaelBuessemeyer Mar 30, 2021
9eb5428
start icon replacing
grittaweisheit Mar 30, 2021
198f52a
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
grittaweisheit Mar 30, 2021
e2319a2
replace icons
grittaweisheit Mar 30, 2021
7df03ff
fix rest of icons
grittaweisheit Mar 30, 2021
2b63bf2
first from migration
MichaelBuessemeyer Mar 30, 2021
f849ea1
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
MichaelBuessemeyer Mar 30, 2021
f50a9b1
fix autocomplete and start select
grittaweisheit Mar 30, 2021
1acd470
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
grittaweisheit Mar 30, 2021
20682e8
fix linting
MichaelBuessemeyer Mar 30, 2021
d664ebe
further select
grittaweisheit Mar 30, 2021
634ebc6
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
grittaweisheit Mar 30, 2021
7755e55
finish select
grittaweisheit Mar 30, 2021
05ef4f3
button group to 0 sized space
grittaweisheit Mar 30, 2021
e2f5a94
tabs and button danger rewrites
grittaweisheit Mar 30, 2021
706ead5
upgrade onboarding
MichaelBuessemeyer Mar 31, 2021
7f3fce2
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
MichaelBuessemeyer Mar 31, 2021
4361a53
fix icon margin
daniel-wer Mar 31, 2021
05790d9
forms in admin dataset folder
grittaweisheit Mar 31, 2021
0d99fe3
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
grittaweisheit Mar 31, 2021
6957322
fix dataset_add_boss_view
daniel-wer Mar 31, 2021
e906791
dirty half fix
grittaweisheit Mar 31, 2021
7593d32
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
grittaweisheit Mar 31, 2021
dc1662f
fix it
grittaweisheit Mar 31, 2021
7ad565b
fix dataset upload view
grittaweisheit Mar 31, 2021
ebb2acb
login
grittaweisheit Mar 31, 2021
779d0a0
project, scripts, statistics, time, job
grittaweisheit Mar 31, 2021
dd3b384
fix dataset upload view
grittaweisheit Apr 1, 2021
a0c9dd1
task_create_bulk_view form migration
daniel-wer Apr 1, 2021
26a082e
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
daniel-wer Apr 1, 2021
60f6a32
fix onboarding & migrate auth token view
MichaelBuessemeyer Apr 1, 2021
e2b11b2
task_create_form_view form migration
daniel-wer Apr 1, 2021
a9b1797
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
daniel-wer Apr 1, 2021
4b0907b
task_search_form migration
daniel-wer Apr 1, 2021
e41a2da
dashboard/dataset, merger modal, fix import view
grittaweisheit Apr 1, 2021
6a9b5a3
fix dataset import
grittaweisheit Apr 1, 2021
2495b5c
task_type_create_view form migration, first part
daniel-wer Apr 1, 2021
47bf9b9
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
daniel-wer Apr 1, 2021
3a2c500
migrate change password view and finish reset passwordview
MichaelBuessemeyer Apr 1, 2021
43d3c9c
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
MichaelBuessemeyer Apr 1, 2021
86da7f8
improve password validation for 2 password form items
MichaelBuessemeyer Apr 1, 2021
75ff5a0
migrate registration form and splotlight registration form
MichaelBuessemeyer Apr 1, 2021
66b1363
task_type_create_view form migration, second part
daniel-wer Apr 1, 2021
1f3fa39
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
daniel-wer Apr 1, 2021
c97cb95
migrate team creation form and fix flow errors
daniel-wer Apr 1, 2021
2703d08
migrate start reset password view
MichaelBuessemeyer Apr 6, 2021
3cf1a96
Merge branch 'master' into upgrade-antd
MichaelBuessemeyer Apr 6, 2021
41fdf47
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
MichaelBuessemeyer Apr 6, 2021
ba44ebf
migrate validation.js
MichaelBuessemeyer Apr 6, 2021
6a6a8dd
fully migrate validation.js
MichaelBuessemeyer Apr 6, 2021
dab35d6
fix project_create_view and remove usage of HOCs
philippotto Apr 6, 2021
06fe18b
never pass null to Select component in merge_modal_view
philippotto Apr 6, 2021
7c8f3ee
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
philippotto Apr 6, 2021
2e91d5e
fix #5358 and remove volume switch
daniel-wer Apr 6, 2021
de2b11b
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
daniel-wer Apr 6, 2021
6953121
migrate custom validators
MichaelBuessemeyer Apr 6, 2021
663692d
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
MichaelBuessemeyer Apr 6, 2021
c1d0ea9
migrate organization-form
philippotto Apr 6, 2021
1f4fc58
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
philippotto Apr 6, 2021
935d0a5
fix missing-key-warning
philippotto Apr 6, 2021
81ae8dd
fix editable_text_icon
philippotto Apr 6, 2021
35de4da
fix style of navbar links
philippotto Apr 6, 2021
2fe04a9
fix tests
MichaelBuessemeyer Apr 6, 2021
2a89f1e
fix a validation method test
MichaelBuessemeyer Apr 6, 2021
6444900
fix button styles in navbar/toolbar
philippotto Apr 6, 2021
59da84c
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
philippotto Apr 6, 2021
8101724
fix various issues in dataset import view
daniel-wer Apr 6, 2021
b3621c8
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
daniel-wer Apr 6, 2021
a1d3f81
fix styling of view-mode-switcher
philippotto Apr 6, 2021
517f036
fix warning in AsyncIconButton
philippotto Apr 6, 2021
85ac3a6
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
philippotto Apr 6, 2021
3eddf39
fix up some remaining style issues in navbar
philippotto Apr 6, 2021
79f48e1
remove unused import
philippotto Apr 6, 2021
1fee83f
fix flow
philippotto Apr 6, 2021
b5e59f5
fix constant expression and make linting rule throw an error for that…
philippotto Apr 6, 2021
1db94ed
fix wrong bg color in save button
philippotto Apr 6, 2021
7bdfbf1
reformat create script view
MichaelBuessemeyer Apr 6, 2021
342d07a
fix registration form
daniel-wer Apr 6, 2021
22cb223
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
daniel-wer Apr 6, 2021
9ea08e1
fix icon in layout menu
philippotto Apr 6, 2021
a63b22c
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
philippotto Apr 6, 2021
55eef00
fix background color for read-only
philippotto Apr 6, 2021
00daea4
small fixes, formatting and remove unneccessary code
daniel-wer Apr 6, 2021
2b6f7e7
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
daniel-wer Apr 6, 2021
8285f40
make back-link also clickable in publication details view
philippotto Apr 6, 2021
dce8ab1
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
philippotto Apr 6, 2021
6eddec7
fix rare scrollbar in navbar and don't use 'my' when using admin-view…
philippotto Apr 6, 2021
11b48c1
add margin to save-button in dataset-settings
philippotto Apr 6, 2021
20d52fc
fix neuroglancer import view
daniel-wer Apr 6, 2021
572442d
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
daniel-wer Apr 6, 2021
7c26059
fix promises inside validators that were not returned
daniel-wer Apr 6, 2021
6d6352a
immediately update the no-allowed-teams warning in sharing settings o…
philippotto Apr 6, 2021
13e480b
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
philippotto Apr 6, 2021
08f156f
throw error in case of null ref
philippotto Apr 6, 2021
4898076
fix missing updates when collapsing expandable tables (the workaround…
philippotto Apr 6, 2021
e5ecddf
use componentDidUpdate instead of shouldComponentUpdate
daniel-wer Apr 6, 2021
e573bb3
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
daniel-wer Apr 6, 2021
0663b90
fix wording in share-dataset-modal
philippotto Apr 6, 2021
14d7592
fix missing key warning in explorative view
philippotto Apr 6, 2021
1b6d933
somewhat improve padding of tabs in version-view
philippotto Apr 6, 2021
3d513c5
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
philippotto Apr 6, 2021
e49fc09
fix styling of trees and groups in trees tab
philippotto Apr 6, 2021
6a8c32b
fix organization edit view initialization of form, fix flow
daniel-wer Apr 6, 2021
f6a1a2d
fix onboarding and icon margin for withoutIconMargin class
daniel-wer Apr 6, 2021
1827f8b
fix exp domain modal alignment
grittaweisheit Apr 6, 2021
9d90578
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
grittaweisheit Apr 6, 2021
dfb823e
remove autofocus from task create form
grittaweisheit Apr 6, 2021
386b116
some refactoring
MichaelBuessemeyer Apr 6, 2021
a4077fa
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
MichaelBuessemeyer Apr 6, 2021
573838a
make text in permissions and team modal reappear
grittaweisheit Apr 6, 2021
245ad6d
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
grittaweisheit Apr 6, 2021
e22fde3
stop overlap in tree view list
grittaweisheit Apr 7, 2021
8aa6e4a
fix dataset settings layer icons
grittaweisheit Apr 7, 2021
b4777a1
fix styling of buttons in 3d viewport
philippotto Apr 7, 2021
cce000c
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
philippotto Apr 7, 2021
6d4724c
remove unneccessary forceUpdate
daniel-wer Apr 7, 2021
998a83c
fix margin in merge-modal-view
philippotto Apr 7, 2021
5aa7cfe
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
philippotto Apr 7, 2021
48a95a0
fix entry of new experience domain in experience-domain-modal
philippotto Apr 7, 2021
895e2e3
slightly refactor task type create view
MichaelBuessemeyer Apr 7, 2021
7b21618
use row expand icon style of version 3 of antd
MichaelBuessemeyer Apr 7, 2021
d1f25f5
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
MichaelBuessemeyer Apr 7, 2021
bf3e45c
add comment to css rule of old row expansion icon
MichaelBuessemeyer Apr 7, 2021
15e735e
changelog
fm3 Apr 7, 2021
d32b4a2
add link to github issue
MichaelBuessemeyer Apr 7, 2021
4f51cc7
Merge branch 'upgrade-antd' of github.com:scalableminds/webknossos in…
MichaelBuessemeyer Apr 7, 2021
8521818
avoid activation filter being null
MichaelBuessemeyer Apr 7, 2021
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
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"rules": {
"array-callback-return": "warn",
"class-methods-use-this": "off",
"no-constant-condition": "error",
"eslint-comments/disable-enable-pair": ["error", { "allowWholeFile": true }],
"eslint-comments/no-unused-disable": "error",
"flowtype/no-types-missing-file-annotation": "off",
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
[Commits](https://github.com/scalableminds/webknossos/compare/21.04.0...HEAD)

### Added
-
- Upgraded UI library antd to version 4, creating a slightly more modern look and behavior of many UI elements. [#5350](https://github.com/scalableminds/webknossos/pull/5350)

### Changed
- webKnossos is now part of the [image.sc support community](https://forum.image.sc/tag/webknossos). [#5332](https://github.com/scalableminds/webknossos/pull/5332)
Expand Down
5 changes: 2 additions & 3 deletions flow-typed/npm/antd_vx.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ declare module "antd" {
}
declare class FormItem<P> extends React$Component<P> {}
declare export class Form<P> extends React$Component<P> {
static create: (
options?: Object,
) => (React$ComponentType<P>) => React$ComponentType<$Diff<P, { form: any }>>;
static useForm: () => [Object];
static Item: typeof FormItem;
}
declare class LayoutContent<P> extends React$Component<P> {}
Expand Down Expand Up @@ -124,6 +122,7 @@ declare module "antd" {
static TreeNode: typeof TreeTreeNode;
}
declare export class Tooltip<P> extends React$Component<P> {}
declare export class Space<P> extends React$Component<P> {}
declare class StepsStep<P> extends React$Component<P> {}
declare export class Steps<P> extends React$Component<P> {
static Step: typeof StepsStep;
Expand Down
5 changes: 3 additions & 2 deletions frontend/javascripts/admin/auth/accept_invite_view.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @flow

import { Button, Icon, Result, Layout, Spin } from "antd";
import { Button, Result, Layout, Spin } from "antd";
import { GiftTwoTone } from "@ant-design/icons";
import { useHistory } from "react-router-dom";
import { AsyncButton } from "components/async_clickables";
import React, { useState } from "react";
Expand Down Expand Up @@ -103,7 +104,7 @@ export default function AcceptInviteView({
/>
<Spin spinning={targetOrganization == null}>
<Result
icon={<Icon type="gift" theme="twoTone" />}
icon={<GiftTwoTone />}
title={
<div>
You have been invited to the organization &ldquo;{targetOrganizationName}&rdquo;!
Expand Down
116 changes: 53 additions & 63 deletions frontend/javascripts/admin/auth/auth_token_view.js
Original file line number Diff line number Diff line change
@@ -1,88 +1,78 @@
// @flow
import React from "react";
import { Form, Input, Button, Col, Row, Spin } from "antd";
import React, { useState, useEffect } from "react";
import { CopyOutlined, SwapOutlined } from "@ant-design/icons";
import { Input, Button, Col, Row, Spin, Form } from "antd";
import Clipboard from "clipboard-js";
import { getAuthToken, revokeAuthToken } from "admin/admin_rest_api";
import Toast from "libs/toast";

const FormItem = Form.Item;

type State = {
isLoading: boolean,
currentToken: string,
};
function AuthTokenView() {
const [isLoading, setIsLoading] = useState<boolean>(true);
const [currentToken, setCurrentToken] = useState<string>("");
const [form] = Form.useForm();

class AuthTokenView extends React.PureComponent<{}, State> {
state = {
isLoading: true,
currentToken: "",
};

componentDidMount() {
this.fetchData();
}
useEffect(() => {
fetchData();
}, []);

async fetchData(): Promise<void> {
async function fetchData(): Promise<void> {
const token = await getAuthToken();

this.setState({
isLoading: false,
currentToken: token,
});
setCurrentToken(token);
setIsLoading(false);
}

handleRevokeToken = async (): Promise<void> => {
const handleRevokeToken = async (): Promise<void> => {
try {
this.setState({ isLoading: true });
setIsLoading(true);
await revokeAuthToken();
const token = await getAuthToken();
this.setState({ currentToken: token });
setCurrentToken(token);
} finally {
this.setState({ isLoading: false });
setIsLoading(false);
}
};

copyTokenToClipboard = async () => {
await Clipboard.copy(this.state.currentToken);
const copyTokenToClipboard = async () => {
await Clipboard.copy(currentToken);
Toast.success("Token copied to clipboard");
};

render() {
return (
<div>
<Row type="flex" justify="center" style={{ padding: 50 }} align="middle">
<Col span={8}>
<Spin size="large" spinning={this.state.isLoading}>
<h3>Auth Token</h3>
<Form>
<FormItem>
<Input.Group compact>
<Input value={this.state.currentToken} style={{ width: "90%" }} readOnly />
<Button onClick={this.copyTokenToClipboard} icon="copy" />
</Input.Group>
</FormItem>
<FormItem>
<Button icon="swap" onClick={this.handleRevokeToken}>
Revoke Token
</Button>
</FormItem>
</Form>
</Spin>
</Col>
</Row>
<Row type="flex" justify="center" align="middle">
<Col span={8}>
An Auth Token is a series of symbols that serves to authenticate you. It is used in
communication with the backend API and sent with every request to verify your identity.
<br />
You should revoke it if somebody else has acquired your token or you have the suspicion
this has happened.{" "}
<a href="https://docs.webknossos.org/reference/rest_api#authentication">Read more</a>
</Col>
</Row>
</div>
);
}
return (
<div>
<Row type="flex" justify="center" style={{ padding: 50 }} align="middle">
<Col span={8}>
<Spin size="large" spinning={isLoading}>
<h3>Auth Token</h3>
<Form form={form}>
<FormItem>
<Input.Group compact>
<Input value={currentToken} style={{ width: "90%" }} readOnly />
<Button onClick={copyTokenToClipboard} icon={<CopyOutlined />} />
</Input.Group>
</FormItem>
<FormItem>
<Button icon={<SwapOutlined />} onClick={handleRevokeToken}>
Revoke Token
</Button>
</FormItem>
</Form>
</Spin>
</Col>
</Row>
<Row type="flex" justify="center" align="middle">
<Col span={8}>
An Auth Token is a series of symbols that serves to authenticate you. It is used in
communication with the backend API and sent with every request to verify your identity.
<br />
You should revoke it if somebody else has acquired your token or you have the suspicion
this has happened.{" "}
<a href="https://docs.webknossos.org/reference/rest_api#authentication">Read more</a>
</Col>
</Row>
</div>
);
}

export default AuthTokenView;
Loading