mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2025-04-29 08: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
|
@ -33,6 +33,7 @@
|
|||
</material-popup>
|
||||
<script>
|
||||
import {
|
||||
addRegistryServers,
|
||||
getRegistryServers
|
||||
} from '../../scripts/utils';
|
||||
import router from '../../scripts/router';
|
||||
|
@ -45,9 +46,7 @@
|
|||
if (!select.value.startsWith('http')) {
|
||||
return this.props.onNotify('The select field should start with http:// or https://.', true);
|
||||
}
|
||||
const url = select.value.trim().replace(/\/*$/, '');
|
||||
const registryServer = getRegistryServers().filter(e => e !== url);
|
||||
localStorage.setItem('registryServer', JSON.stringify([url].concat(registryServer)));
|
||||
const url = addRegistryServers(select.value);
|
||||
router.home()
|
||||
this.props.onServerChange(url);
|
||||
this.props.onClose()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue