mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2025-05-02 18:09:56 +03:00
feat(pagination): Add handler to pagination buttons
This commit is contained in:
parent
02210e0943
commit
92fc37adb4
5 changed files with 47 additions and 3 deletions
|
@ -85,7 +85,7 @@ registryUI.removeServer = function(url) {
|
|||
}
|
||||
|
||||
registryUI.updateHistory = function(url) {
|
||||
history.pushState(null, '', (url ? '?url=' + registryUI.encodeURI(url) : '?') + window.location.hash);
|
||||
registryUI.updateQueryString({ url: registryUI.encodeURI(url) })
|
||||
registryUI._url = url;
|
||||
}
|
||||
|
||||
|
@ -100,10 +100,12 @@ registryUI.getUrlQueryParam = function () {
|
|||
};
|
||||
|
||||
registryUI.encodeURI = function(url) {
|
||||
if (!url) { return; }
|
||||
return url.indexOf('&') < 0 ? window.encodeURIComponent(url) : btoa(url);
|
||||
};
|
||||
|
||||
registryUI.decodeURI = function(url) {
|
||||
if (!url) { return; }
|
||||
return url.startsWith('http') ? window.decodeURIComponent(url) : atob(url);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue