aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/pages/list
diff options
context:
space:
mode:
authorQuentin Gliech <quentingliech@gmail.com>2022-02-16 10:27:26 +0100
committerQuentin Gliech <quentingliech@gmail.com>2022-02-16 10:27:26 +0100
commitce50269639988e39fe4e27cc8c309a9d5c75c958 (patch)
treed6ccbc61dcabc065acce19497a7e26f49d905139 /webui/src/pages/list
parent11d51bee9e2a535e5308bb6f1d23cab351d66923 (diff)
downloadgit-bug-ce50269639988e39fe4e27cc8c309a9d5c75c958.tar.gz
webui: upgrade most dependencies
Also reformat everything with prettier
Diffstat (limited to 'webui/src/pages/list')
-rw-r--r--webui/src/pages/list/FilterToolbar.tsx58
-rw-r--r--webui/src/pages/list/ListIdentities.graphql20
-rw-r--r--webui/src/pages/list/ListLabels.graphql16
-rw-r--r--webui/src/pages/list/ListQuery.tsx12
4 files changed, 56 insertions, 50 deletions
diff --git a/webui/src/pages/list/FilterToolbar.tsx b/webui/src/pages/list/FilterToolbar.tsx
index 4ac579f5..0c7a9e4f 100644
--- a/webui/src/pages/list/FilterToolbar.tsx
+++ b/webui/src/pages/list/FilterToolbar.tsx
@@ -110,36 +110,38 @@ function FilterToolbar({ query, queryLocation }: Props) {
const containsValue = (key: string, value: string): boolean =>
hasKey(key) && params[key].indexOf(value) !== -1;
const loc = pipe(stringify, queryLocation);
- const replaceParam = (key: string, value: string) => (
- params: Query
- ): Query => ({
- ...params,
- [key]: [value],
- });
- const toggleParam = (key: string, value: string) => (
- params: Query
- ): Query => ({
- ...params,
- [key]: params[key] && params[key].includes(value) ? [] : [value],
- });
- const toggleOrAddParam = (key: string, value: string) => (
- params: Query
- ): Query => {
- const values = params[key];
- return {
+ const replaceParam =
+ (key: string, value: string) =>
+ (params: Query): Query => ({
+ ...params,
+ [key]: [value],
+ });
+ const toggleParam =
+ (key: string, value: string) =>
+ (params: Query): Query => ({
...params,
- [key]:
- params[key] && params[key].includes(value)
- ? values.filter((v) => v !== value)
- : values
- ? [...values, value]
- : [value],
+ [key]: params[key] && params[key].includes(value) ? [] : [value],
+ });
+ const toggleOrAddParam =
+ (key: string, value: string) =>
+ (params: Query): Query => {
+ const values = params[key];
+ return {
+ ...params,
+ [key]:
+ params[key] && params[key].includes(value)
+ ? values.filter((v) => v !== value)
+ : values
+ ? [...values, value]
+ : [value],
+ };
};
- };
- const clearParam = (key: string) => (params: Query): Query => ({
- ...params,
- [key]: [],
- });
+ const clearParam =
+ (key: string) =>
+ (params: Query): Query => ({
+ ...params,
+ [key]: [],
+ });
return (
<Toolbar className={classes.toolbar}>
diff --git a/webui/src/pages/list/ListIdentities.graphql b/webui/src/pages/list/ListIdentities.graphql
index 73073ae8..1d909496 100644
--- a/webui/src/pages/list/ListIdentities.graphql
+++ b/webui/src/pages/list/ListIdentities.graphql
@@ -1,13 +1,13 @@
query ListIdentities {
- repository {
- allIdentities {
- nodes {
- id
- humanId
- name
- email
- displayName
- }
- }
+ repository {
+ allIdentities {
+ nodes {
+ id
+ humanId
+ name
+ email
+ displayName
+ }
}
+ }
}
diff --git a/webui/src/pages/list/ListLabels.graphql b/webui/src/pages/list/ListLabels.graphql
index 8b2f561a..35f25e25 100644
--- a/webui/src/pages/list/ListLabels.graphql
+++ b/webui/src/pages/list/ListLabels.graphql
@@ -1,10 +1,14 @@
query ListLabels {
- repository {
- validLabels {
- nodes {
- name,
- color{R,G,B}
- }
+ repository {
+ validLabels {
+ nodes {
+ name
+ color {
+ R
+ G
+ B
}
+ }
}
+ }
}
diff --git a/webui/src/pages/list/ListQuery.tsx b/webui/src/pages/list/ListQuery.tsx
index 9aefd02d..c2f71ef0 100644
--- a/webui/src/pages/list/ListQuery.tsx
+++ b/webui/src/pages/list/ListQuery.tsx
@@ -304,12 +304,12 @@ function ListQuery() {
const loc = pipe(stringify, queryLocation);
const qparams: Query = parse(query);
- const replaceParam = (key: string, value: string) => (
- params: Query
- ): Query => ({
- ...params,
- [key]: [value],
- });
+ const replaceParam =
+ (key: string, value: string) =>
+ (params: Query): Query => ({
+ ...params,
+ [key]: [value],
+ });
return (
<Paper className={classes.main}>