Make selectable packages more intuitive

This commit is contained in:
James 2018-09-19 10:51:01 +10:00
parent 5e48f191b4
commit 9d51508e6b
3 changed files with 11 additions and 3 deletions

View File

@ -22,7 +22,7 @@ pub fn download_text(url: &str) -> Result<String, String> {
let mut client = build_client()? let mut client = build_client()?
.get(url) .get(url)
.send() .send()
.map_err(|x| format!("Failed to GET resource: {:?}", v))?; .map_err(|x| format!("Failed to GET resource: {:?}", x))?;
client client
.text() .text()
@ -37,7 +37,7 @@ where
let mut client = build_client()? let mut client = build_client()?
.get(url) .get(url)
.send() .send()
.map_err(|x| format!("Failed to GET resource: {:?}", v))?; .map_err(|x| format!("Failed to GET resource: {:?}", x))?;
let size = match client.headers().get(CONTENT_LENGTH) { let size = match client.headers().get(CONTENT_LENGTH) {
Some(ref v) => v Some(ref v) => v

View File

@ -37,3 +37,11 @@ pre {
.has-padding { .has-padding {
padding: 2rem; padding: 2rem;
} }
.clickable-box {
cursor: pointer;
}
.clickable-box label {
pointer-events: none;
}

View File

@ -102,7 +102,7 @@ const SelectPackages = {
<div class="tile is-ancestor"> <div class="tile is-ancestor">
<div class="tile is-parent" v-for="package in $root.$data.config.packages" :index="package.name"> <div class="tile is-parent" v-for="package in $root.$data.config.packages" :index="package.name">
<div class="tile is-child"> <div class="tile is-child">
<div class="box"> <div class="box clickable-box" v-on:click.capture.stop="package.default = !package.default">
<label class="checkbox"> <label class="checkbox">
<input type="checkbox" v-model="package.default" /> <input type="checkbox" v-model="package.default" />
{{ package.name }} {{ package.name }}