mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2025-04-30 08:59:54 +03:00
fix(riot-ui): upgrade tag dialogs
This commit is contained in:
parent
f779f43173
commit
ba2107f765
3 changed files with 29 additions and 22 deletions
|
@ -16,16 +16,16 @@
|
||||||
-->
|
-->
|
||||||
<add-registry-url>
|
<add-registry-url>
|
||||||
<material-popup opened="{ props.opened }" onClick="{ props.onClose }">
|
<material-popup opened="{ props.opened }" onClick="{ props.onClose }">
|
||||||
<div slot="title">Add your Server ?</div>
|
<div class="material-popup-title">Add your Server ?</div>
|
||||||
<div slot="content">
|
<div class="material-popup-content">
|
||||||
<material-input onkeyup="{ onKeyUp }" placeholder="Server URL"></material-input>
|
<material-input onkeyup="{ onKeyUp }" label="Server URL" label-color="#666" valid="{ registryUrlValidator }"></material-input>
|
||||||
<span>Write your URL without /v2</span>
|
<span>Write your URL without /v2</span>
|
||||||
</div>
|
</div>
|
||||||
<div slot="action">
|
<div class="material-popup-action">
|
||||||
<material-button class="dialog-button" waves-color="rgba(158,158,158,.4)" onClick="{ add }">
|
<material-button class="dialog-button" waves-color="rgba(158,158,158,.4)" onClick="{ add }" color="#000" inverted>
|
||||||
Add
|
Add
|
||||||
</material-button>
|
</material-button>
|
||||||
<material-button class="dialog-button" waves-color="rgba(158,158,158,.4)" onClick="{ props.onClose }">
|
<material-button class="dialog-button" waves-color="rgba(158,158,158,.4)" onClick="{ props.onClose }" color="#000" inverted>
|
||||||
Cancel
|
Cancel
|
||||||
</material-button>
|
</material-button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -55,6 +55,9 @@
|
||||||
this.props.onClose();
|
this.props.onClose();
|
||||||
setTimeout(() => router.updateUrlQueryParam(url), 100);
|
setTimeout(() => router.updateUrlQueryParam(url), 100);
|
||||||
},
|
},
|
||||||
|
registryUrlValidator(input) {
|
||||||
|
return /^https?:\/\//.test(input) && !/\/v2\/?$/.test(input)
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
</add-registry-url>
|
</add-registry-url>
|
||||||
|
|
|
@ -15,18 +15,18 @@
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
<change-registry-url>
|
<change-registry-url>
|
||||||
<material-popup opened="{ props.opened }" onClick="{ props.onClick }">
|
<material-popup opened="{ props.opened }" onClick="{ props.onClose }">
|
||||||
<div slot="title">Change your Server ?</div>
|
<div class="material-popup-title">Change your Server ?</div>
|
||||||
<div slot="content">
|
<div class="material-popup-content">
|
||||||
<select>
|
<select>
|
||||||
<option each="{ url in getRegistryServers() }" value="{ url }">{ url }</option>
|
<option each="{ url in getRegistryServers() }" value="{ url }">{ url }</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div slot="action">
|
<div class="material-popup-action">
|
||||||
<material-button class="dialog-button" waves-color="rgba(158,158,158,.4)" onClick="{ change }">
|
<material-button class="dialog-button" waves-color="rgba(158,158,158,.4)" onClick="{ change }" color="#000" inverted>
|
||||||
Change
|
Change
|
||||||
</material-button>
|
</material-button>
|
||||||
<material-button class="dialog-button" waves-color="rgba(158,158,158,.4)" onClick="{ props.onClose }">
|
<material-button class="dialog-button" waves-color="rgba(158,158,158,.4)" onClick="{ props.onClose }" color="#000" inverted>
|
||||||
Cancel
|
Cancel
|
||||||
</material-button>
|
</material-button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -62,6 +62,7 @@
|
||||||
background: 0 0;
|
background: 0 0;
|
||||||
border: none;
|
border: none;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
font-size: 1em;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
border-bottom: 1px solid #2f6975;
|
border-bottom: 1px solid #2f6975;
|
||||||
|
|
|
@ -16,17 +16,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
-->
|
-->
|
||||||
<remove-registry-url>
|
<remove-registry-url>
|
||||||
<material-popup opened="{ props.opened }" onClick="{ props.onClose }">
|
<material-popup opened="{ props.opened }" onClick="{ props.onClose }">
|
||||||
<div slot="title">Remove your Registry Server ?</div>
|
<div class="material-popup-title">Remove your Registry Server ?</div>
|
||||||
<div slot="content">
|
<div class="material-popup-content">
|
||||||
<ul class="list">
|
<ul class="list">
|
||||||
<li each="{ url in getRegistryServers() }">
|
<li each="{ url in getRegistryServers() }">
|
||||||
<span>
|
<span>
|
||||||
<material-button
|
<material-button
|
||||||
onClick="{ remove }"
|
onClick="{ remove(url) }"
|
||||||
url="{ url }"
|
url="{ url }"
|
||||||
rounded="true"
|
|
||||||
waves-color="rgba(158,158,158,.4)"
|
waves-color="rgba(158,158,158,.4)"
|
||||||
waves-center="true"
|
waves-center="true"
|
||||||
|
inverted
|
||||||
|
icon
|
||||||
>
|
>
|
||||||
<i class="material-icons">delete</i>
|
<i class="material-icons">delete</i>
|
||||||
</material-button>
|
</material-button>
|
||||||
|
@ -35,8 +36,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div slot="action">
|
<div class="material-popup-action">
|
||||||
<material-button class="dialog-button" waves-color="rgba(158,158,158,.4)" onClick="{ props.onClose }">
|
<material-button class="dialog-button" waves-color="rgba(158,158,158,.4)" onClick="{ props.onClose }" color="#000" inverted>
|
||||||
Close
|
Close
|
||||||
</material-button>
|
</material-button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -44,10 +45,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
<script>
|
<script>
|
||||||
import { getRegistryServers, removeRegistryServers } from '../../scripts/utils';
|
import { getRegistryServers, removeRegistryServers } from '../../scripts/utils';
|
||||||
export default {
|
export default {
|
||||||
remove(event) {
|
remove(url) {
|
||||||
const url = event.currentTarget.attributes.url && event.currentTarget.attributes.url.value;
|
return (event) => {
|
||||||
removeRegistryServers(url);
|
console.log(url, event)
|
||||||
setTimeout(() => this.update(), 100);
|
removeRegistryServers(url);
|
||||||
|
setTimeout(() => this.update(), 100);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
getRegistryServers,
|
getRegistryServers,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue