diff --git a/package.json b/package.json
index beac0f9..f8b971b 100644
--- a/package.json
+++ b/package.json
@@ -2,6 +2,10 @@
"name": "docker-registry-ui",
"version": "2.1.0",
"scripts": {
+ "format": "npm run format-html && npm run format-js && npm run format-riot",
+ "format-html": "find src rollup rollup.config.js -name '*.html' -exec prettier --config .prettierrc -w --parser html {} \\;",
+ "format-js": "find src rollup rollup.config.js -name '*.js' -exec prettier --config .prettierrc -w {} \\;",
+ "format-riot": "find src rollup rollup.config.js -name '*.riot' -exec prettier --config .prettierrc -w --parser html {} \\;",
"start": "rollup -c -w --environment ROLLUP_SERVE:true",
"build": "rollup -c",
"build:electron": "npm run build && cd examples/electron && npm install && npm run dist"
@@ -25,8 +29,8 @@
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.1.3",
"core-js": "^3.19.1",
- "js-beautify": "^1.14.0",
"node-sass": "^7.0.1",
+ "prettier": "^2.6.2",
"riot": "^6.1.2",
"riot-mui": "github:joxit/riot-5-mui#4d68d7f",
"rollup": "^2.59.0",
diff --git a/rollup/license.js b/rollup/license.js
index f8f9728..54b7102 100644
--- a/rollup/license.js
+++ b/rollup/license.js
@@ -15,4 +15,4 @@ export default `/*
* along with this program. If not, see .
*
* @license AGPL
- */`
\ No newline at end of file
+ */`;
diff --git a/src/components/catalog/catalog-element.riot b/src/components/catalog/catalog-element.riot
index f8fd495..01a1c0b 100644
--- a/src/components/catalog/catalog-element.riot
+++ b/src/components/catalog/catalog-element.riot
@@ -96,10 +96,10 @@ along with this program. If not, see .
onAuthentication: props.onAuthentication,
});
oReq.addEventListener('load', function () {
- if (this.status == 200) {
+ if (this.status === 200) {
const nbTags = (JSON.parse(this.responseText).tags || []).length;
self.update({ nbTags });
- } else if (this.status == 404) {
+ } else if (this.status === 404) {
props.onNotify('Server not found', true);
} else {
props.onNotify(this.responseText, true);
diff --git a/src/components/catalog/catalog.riot b/src/components/catalog/catalog.riot
index 370d78a..4d05184 100644
--- a/src/components/catalog/catalog.riot
+++ b/src/components/catalog/catalog.riot
@@ -73,14 +73,14 @@ along with this program. If not, see .
onAuthentication: this.props.onAuthentication,
});
oReq.addEventListener('load', function () {
- if (this.status == 200) {
+ if (this.status === 200) {
repositories = JSON.parse(this.responseText).repositories || [];
repositories.sort();
repositories = repositories.reduce(function (acc, e) {
const slash = e.indexOf('/');
if (slash > 0) {
const repoName = e.substring(0, slash) + '/';
- if (acc.length == 0 || acc[acc.length - 1].repo != repoName) {
+ if (acc.length === 0 || acc[acc.length - 1].repo != repoName) {
acc.push({
repo: repoName,
images: [],
@@ -92,7 +92,7 @@ along with this program. If not, see .
acc.push(e);
return acc;
}, []);
- } else if (this.status == 404) {
+ } else if (this.status === 404) {
self.props.onNotify('Server not found', true);
} else {
self.props.onNotify(this.responseText);
diff --git a/src/components/dialogs/add-registry-url.riot b/src/components/dialogs/add-registry-url.riot
index 10b1804..41df728 100644
--- a/src/components/dialogs/add-registry-url.riot
+++ b/src/components/dialogs/add-registry-url.riot
@@ -31,9 +31,7 @@
-
\ No newline at end of file
+
diff --git a/src/components/dialogs/change-registry-url.riot b/src/components/dialogs/change-registry-url.riot
index 9aac35b..bae4937 100644
--- a/src/components/dialogs/change-registry-url.riot
+++ b/src/components/dialogs/change-registry-url.riot
@@ -32,10 +32,7 @@
-
\ No newline at end of file
+
diff --git a/src/components/dialogs/confirm-delete-image.riot b/src/components/dialogs/confirm-delete-image.riot
index 85006a2..efc82bf 100644
--- a/src/components/dialogs/confirm-delete-image.riot
+++ b/src/components/dialogs/confirm-delete-image.riot
@@ -52,7 +52,7 @@
const oReq = new Http({ onAuthentication });
const self = this;
oReq.addEventListener('loadend', function () {
- if (this.status == 200 || this.status == 202) {
+ if (this.status === 200 || this.status === 202) {
oReq.getContentDigest(function (digest) {
if (!digest) {
onNotify(ERROR_CAN_NOT_READ_CONTENT_DIGEST);
@@ -60,7 +60,7 @@
self.deleteImage({ name, tag, digest }, opts);
}
});
- } else if (this.status == 404) {
+ } else if (this.status === 404) {
onNotify(`Manifest for ${name}:${tag} not found`, true);
} else {
onNotify(this.responseText);
@@ -77,10 +77,10 @@
const { registryUrl, ignoreError, onNotify, onAuthentication, onClick } = opts;
const oReq = new Http({ onAuthentication });
oReq.addEventListener('loadend', function () {
- if (this.status == 200 || this.status == 202) {
+ if (this.status === 200 || this.status === 202) {
router.taglist(name);
onNotify(`Deleting ${name}:${tag} image. Run \`registry garbage-collect config.yml\` on your registry`);
- } else if (this.status == 404) {
+ } else if (this.status === 404) {
ignoreError ||
onNotify({
message: 'Digest not found for this image in your registry.',
diff --git a/src/components/dialogs/dialogs-menu.riot b/src/components/dialogs/dialogs-menu.riot
index c560f54..c0ad257 100644
--- a/src/components/dialogs/dialogs-menu.riot
+++ b/src/components/dialogs/dialogs-menu.riot
@@ -15,18 +15,35 @@
along with this program. If not, see .
-->
-
-
-
+
+
+
more_vert
-
+
-
\ No newline at end of file
+
diff --git a/src/components/dialogs/remove-registry-url.riot b/src/components/dialogs/remove-registry-url.riot
index 8bfbad1..2a00241 100644
--- a/src/components/dialogs/remove-registry-url.riot
+++ b/src/components/dialogs/remove-registry-url.riot
@@ -21,8 +21,13 @@ along with this program. If not, see .
-
+ delete{ url }
@@ -37,18 +42,15 @@ along with this program. If not, see .
-
\ No newline at end of file
+
diff --git a/src/components/docker-registry-ui.riot b/src/components/docker-registry-ui.riot
index dc2e3f4..2878922 100644
--- a/src/components/docker-registry-ui.riot
+++ b/src/components/docker-registry-ui.riot
@@ -19,35 +19,63 @@ along with this program. If not, see .
Docker Registry UI
-
+
-
+
-
+
-
+
-
+
-
\ No newline at end of file
+
diff --git a/src/components/search-bar.riot b/src/components/search-bar.riot
index 5a5efe2..77fffd1 100644
--- a/src/components/search-bar.riot
+++ b/src/components/search-bar.riot
@@ -1,9 +1,7 @@
-
\ No newline at end of file
+
diff --git a/src/components/tag-list/image-content-digest.riot b/src/components/tag-list/image-content-digest.riot
index 9fef135..96f26a4 100644
--- a/src/components/tag-list/image-content-digest.riot
+++ b/src/components/tag-list/image-content-digest.riot
@@ -39,12 +39,12 @@ Copyright (C) 2016-2021 Jones Magloire @Joxit
onResize(chars) {
if (chars !== this.state.chars) {
this.update({
- chars
+ chars,
});
}
},
getTitle(image, chars) {
- return chars >= 70 ? '' : (image.digest || '');
+ return chars >= 70 ? '' : image.digest || '';
},
getDigest(image, chars) {
if (chars >= 70) {
@@ -54,7 +54,7 @@ Copyright (C) 2016-2021 Jones Magloire @Joxit
} else {
return image.digest && image.digest.slice(0, chars) + '...';
}
- }
- }
+ },
+ };
-
\ No newline at end of file
+
diff --git a/src/components/tag-list/image-size.riot b/src/components/tag-list/image-size.riot
index ed8fe2f..3cbff04 100644
--- a/src/components/tag-list/image-size.riot
+++ b/src/components/tag-list/image-size.riot
@@ -17,9 +17,7 @@
{ getImageSize(props.image) }
-
\ No newline at end of file
+
diff --git a/src/components/tag-list/pagination.riot b/src/components/tag-list/pagination.riot
index 99ce37a..17187d0 100644
--- a/src/components/tag-list/pagination.riot
+++ b/src/components/tag-list/pagination.riot
@@ -17,14 +17,16 @@ along with this program. If not, see .
-
-
\ No newline at end of file
+
+
diff --git a/src/components/tag-list/remove-image.riot b/src/components/tag-list/remove-image.riot
index 1e086d8..f9796c5 100644
--- a/src/components/tag-list/remove-image.riot
+++ b/src/components/tag-list/remove-image.riot
@@ -15,29 +15,35 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
-->
-
+ delete
-
+
-
\ No newline at end of file
+
diff --git a/src/components/tag-list/tag-list.riot b/src/components/tag-list/tag-list.riot
index a8cd1b3..437a90b 100644
--- a/src/components/tag-list/tag-list.riot
+++ b/src/components/tag-list/tag-list.riot
@@ -16,15 +16,13 @@ along with this program. If not, see .
-->
-
Sourced from { state.registryName + '/' + props.image }
{ state.tags.length } tags
@@ -36,30 +34,31 @@ along with this program. If not, see .
-
+
-
\ No newline at end of file
+
diff --git a/src/components/tag-list/tag-table.riot b/src/components/tag-list/tag-table.riot
index 1083e00..795d3b9 100644
--- a/src/components/tag-list/tag-table.riot
+++ b/src/components/tag-list/tag-table.riot
@@ -15,39 +15,61 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
-->
-
+
-
+
+ onclick="{() => onPageReorder('date') }"
+ >
Creation date