mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2025-04-27 07:29:54 +03:00
feat: add option for default registries when SINGLE_REGISTRY=false
This commit is contained in:
parent
f4455703ca
commit
8fcae3cda4
6 changed files with 42 additions and 15 deletions
|
@ -32,7 +32,7 @@
|
|||
</material-popup>
|
||||
<script>
|
||||
import {
|
||||
getRegistryServers
|
||||
addRegistryServers
|
||||
} from '../../scripts/utils';
|
||||
import router from '../../scripts/router';
|
||||
|
||||
|
@ -51,9 +51,7 @@
|
|||
if (!input.value.startsWith('http')) {
|
||||
return this.props.onNotify('The input field should start with http:// or https://.', true);
|
||||
}
|
||||
const url = input.value.trim().replace(/\/*$/, '');
|
||||
const registryServer = getRegistryServers().filter(e => e !== url);
|
||||
localStorage.setItem('registryServer', JSON.stringify([url].concat(registryServer)));
|
||||
const url = addRegistryServers(input.value);
|
||||
router.home()
|
||||
this.props.onServerChange(url);
|
||||
this.props.onClose()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue