feat: add option for default registries when SINGLE_REGISTRY=false

This commit is contained in:
Joxit 2021-10-31 15:09:37 +01:00
parent f4455703ca
commit 8fcae3cda4
No known key found for this signature in database
GPG key ID: F526592B8E012263
6 changed files with 42 additions and 15 deletions

View file

@ -38,13 +38,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</material-popup>
<script>
import {
getRegistryServers
getRegistryServers,
removeRegistryServers
} from '../../scripts/utils';
export default {
remove(event) {
const url = event.currentTarget.attributes.url && event.currentTarget.attributes.url.value;
const registryServer = getRegistryServers().filter(e => e !== url);
localStorage.setItem('registryServer', JSON.stringify(registryServer));
removeRegistryServers(url);
setTimeout(() => this.update(), 100);
},
getRegistryServers