-
-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(riot-v5): upgrade remove-registry-url dialog
- Loading branch information
Showing
3 changed files
with
73 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<!-- | ||
Copyright (C) 2016-2021 Jones Magloire @Joxit | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Affero General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Affero General Public License for more details. | ||
You should have received a copy of the GNU Affero General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
--> | ||
<remove-registry-url> | ||
<material-popup opened="{ props.opened }" onClick="{ props.onClose }"> | ||
<div slot="title">Remove your Registry Server ?</div> | ||
<div slot="content"> | ||
<ul class="list"> | ||
<li each="{ url in getRegistryServers() }"> | ||
<span> | ||
<material-button onClick="{ remove }" url="{ url }" rounded="true" waves-color="rgba(158,158,158,.4)" | ||
waves-center="true"> | ||
<i class="material-icons">delete</i> | ||
</material-button> | ||
<span class="url">{ url }</span> | ||
</span> | ||
</li> | ||
</ul> | ||
</div> | ||
<div slot="action"> | ||
<material-button class="dialog-button" waves-color="rgba(158,158,158,.4)" onClick="{ props.onClose }"> | ||
Close | ||
</material-button> | ||
</div> | ||
</material-popup> | ||
<script> | ||
import { | ||
getRegistryServers, | ||
updateHistory | ||
} from '../../scripts/utils'; | ||
import router from '../../scripts/router'; | ||
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)); | ||
setTimeout(() => this.update(), 100); | ||
}, | ||
getRegistryServers | ||
} | ||
</script> | ||
<style> | ||
:host material-popup .popup { | ||
max-height: calc(95% - 2em); | ||
} | ||
:host material-popup .popup material-button { | ||
margin-right: 1em; | ||
} | ||
:host material-popup .popup material-button .content i.material-icons { | ||
color: #777; | ||
} | ||
</style> | ||
</remove-registry-url> |
This file was deleted.
Oops, something went wrong.