mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2026-02-19 21:29:51 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c3c27e215 | ||
|
|
6318ccfdf5 | ||
|
|
686b1709b2 | ||
|
|
e79a20a5e5 |
10
.github/ISSUE_TEMPLATE/custom.md
vendored
10
.github/ISSUE_TEMPLATE/custom.md
vendored
@@ -1,10 +0,0 @@
|
||||
---
|
||||
name: Custom issue template
|
||||
about: Describe this issue template's purpose here.
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
|
||||
2
dist/docker-registry-ui.js
vendored
2
dist/docker-registry-ui.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "docker-registry-ui",
|
||||
"version": "2.5.5",
|
||||
"version": "2.5.7",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"format": "npm run format-html && npm run format-js && npm run format-riot",
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<p>This request <span>may</span> has been blocked; the content must be served over HTTPS.</p>
|
||||
<p>
|
||||
You may unset the option `<span>REGISTRY_URL</span>` and set the registry server container URL in
|
||||
`<span>NGINX_PROXY_PASS_URL</span>`. It's usually the name of your container, and it should be on the shame
|
||||
`<span>NGINX_PROXY_PASS_URL</span>`. It's usually the name of your container, and it should be on the same
|
||||
network as the UI.
|
||||
</p>
|
||||
<p>You can check the issue <a href="https://github.com/Joxit/docker-registry-ui/issues/277">#277</a>.</p>
|
||||
|
||||
@@ -129,7 +129,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
.sort(self.tagComparator);
|
||||
window.requestAnimationFrame(self.onResize);
|
||||
self.update({
|
||||
page: Math.min(state.page, getNumPages(tags)),
|
||||
page: Math.min(state.page, getNumPages(tags, props.tagsPerPage)),
|
||||
tags,
|
||||
});
|
||||
} else if (this.status === 404) {
|
||||
@@ -153,7 +153,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
},
|
||||
|
||||
onPageUpdate(idx) {
|
||||
const labels = getPageLabels(this.state.page, getNumPages(this.state.tags));
|
||||
const labels = getPageLabels(this.state.page, getNumPages(this.state.tags, this.props.tagsPerPage));
|
||||
const page = labels[idx].page;
|
||||
this.update({
|
||||
page: page,
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
if (latest && latest.tag_name) {
|
||||
this.update({ tag_name: latest.tag_name, latest });
|
||||
}
|
||||
if (!latest || isNaN(expires) || new Date().getTime() > expires) {
|
||||
if (isNaN(expires) || new Date().getTime() > expires) {
|
||||
this.checkForUpdates(props, state);
|
||||
}
|
||||
},
|
||||
@@ -64,16 +64,22 @@
|
||||
const self = this;
|
||||
|
||||
oReq.addEventListener('load', function () {
|
||||
localStorage.setItem(EXPIRES, new Date().getTime() + ONE_DAY);
|
||||
if (this.status === 200) {
|
||||
const latest = parseJSON(this.responseText);
|
||||
if (latest && self.tag_name !== latest.tag_name && !isNewestVersion(props.version, latest.tag_name)) {
|
||||
props.onNotify('A new version of Docker Registry UI is available!');
|
||||
}
|
||||
localStorage.setItem(LATEST, this.responseText);
|
||||
localStorage.setItem(EXPIRES, new Date().getTime() + ONE_DAY);
|
||||
self.update({ tag_name: latest.tag_name, latest });
|
||||
} else {
|
||||
props.onNotify('Cannot check for new updates. See the browser console.');
|
||||
} else if (this.status !== 404) {
|
||||
// Should not notify if the project is not found.
|
||||
props.onNotify('Cannot check for new updates. Will try again in 24 hours. See the browser console.');
|
||||
|
||||
console.error(
|
||||
`Cannot check for new Docker Registry UI updates. This is most likely a GitHub issue. You don't need to worry about it.`
|
||||
);
|
||||
|
||||
console.error(`Got status code ${this.status} from Github API with response ${this.responseText}`);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user