Ajout du panneau de configuration (non-fonctionnel)
parent
c19297d034
commit
d6b17868c0
|
|
@ -39,6 +39,7 @@ features = [
|
||||||
'HtmlInputElement',
|
'HtmlInputElement',
|
||||||
'HtmlOListElement',
|
'HtmlOListElement',
|
||||||
'KeyboardEvent',
|
'KeyboardEvent',
|
||||||
|
'NamedNodeMap',
|
||||||
'Node',
|
'Node',
|
||||||
'NodeList',
|
'NodeList',
|
||||||
'Window',
|
'Window',
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<title>Kikikoz</title>
|
<title>Kikikoz</title>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import {default as init, ajoute, ajoute_kp, next, intervalle_orateurice} from './pkg/kikikoz.js';
|
import {default as init, ajoute, ajoute_kp, next, intervalle_orateurice, toggle_conf_visible} from './pkg/kikikoz.js';
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
await init()
|
await init()
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
window.ajoute_kp = ajoute_kp;
|
window.ajoute_kp = ajoute_kp;
|
||||||
window.next = next;
|
window.next = next;
|
||||||
window.intervalle_orateurice = intervalle_orateurice;
|
window.intervalle_orateurice = intervalle_orateurice;
|
||||||
|
window.toggle_conf_visible = toggle_conf_visible;
|
||||||
window.setInterval(intervalle_orateurice, 1000);
|
window.setInterval(intervalle_orateurice, 1000);
|
||||||
</script>
|
</script>
|
||||||
<link rel="stylesheet" href="kikikoz.css"/>
|
<link rel="stylesheet" href="kikikoz.css"/>
|
||||||
|
|
@ -22,8 +23,7 @@
|
||||||
<main>
|
<main>
|
||||||
<h1>Kikikoz</h1>
|
<h1>Kikikoz</h1>
|
||||||
|
|
||||||
<button>Configuration</button>
|
<p class="orateurice" visible="true">
|
||||||
<p class="orateurice">
|
|
||||||
<span id="orateurice" class="personne" onclick="intervalle_orateurice()">Personne</span> <span id="compte"></span> <button onclick="next()">Hop!</button>
|
<span id="orateurice" class="personne" onclick="intervalle_orateurice()">Personne</span> <span id="compte"></span> <button onclick="next()">Hop!</button>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
@ -46,8 +46,9 @@
|
||||||
<button onclick='ajoute("queue_b")'>+</button></p>
|
<button onclick='ajoute("queue_b")'>+</button></p>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
<button onClick="toggle_conf_visible()">Configuration</button>
|
||||||
</main>
|
</main>
|
||||||
<aside id="configuration">
|
<aside id="configuration" class="hidden">
|
||||||
<h2>Configuration</h2>
|
<h2>Configuration</h2>
|
||||||
<p> Pas d'options pour le moment, revenez dans une version ultérieure.</p>
|
<p> Pas d'options pour le moment, revenez dans une version ultérieure.</p>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
|
||||||
|
|
@ -60,3 +60,7 @@ aside#configuration {
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
|
||||||
14
src/lib.rs
14
src/lib.rs
|
|
@ -14,6 +14,20 @@ fn le_document() -> web_sys::Document {
|
||||||
window.document().expect("pas_de_document")
|
window.document().expect("pas_de_document")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[wasm_bindgen]
|
||||||
|
pub fn toggle_conf_visible() {
|
||||||
|
let document = le_document();
|
||||||
|
let conf = document
|
||||||
|
.get_element_by_id("configuration")
|
||||||
|
.expect("pas de conf");
|
||||||
|
let hidden = conf.class_list().contains("hidden");
|
||||||
|
if hidden {
|
||||||
|
conf.class_list().remove_1("hidden");
|
||||||
|
} else {
|
||||||
|
conf.class_list().add_1("hidden");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[wasm_bindgen]
|
#[wasm_bindgen]
|
||||||
pub fn intervalle_orateurice() {
|
pub fn intervalle_orateurice() {
|
||||||
let document = le_document();
|
let document = le_document();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue