Hopefully present chalkboard to people without write permissions in a cleaner format.
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
# shellcheck shell=bash disable=SC2034,SC2154
|
# shellcheck shell=bash disable=SC2034,SC2154
|
||||||
|
|
||||||
pkgname=skald-git
|
pkgname=skald-git
|
||||||
pkgver=0.0.0.r1543.g8ff3161
|
pkgver=0.0.0.r1544.g6cd3ec1
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc='Audio-only hall-based conferencing server'
|
pkgdesc='Audio-only hall-based conferencing server'
|
||||||
arch=('x86_64' 'aarch64')
|
arch=('x86_64' 'aarch64')
|
||||||
|
|||||||
+4
-1
@@ -845,9 +845,12 @@ h1 {
|
|||||||
border: 1px solid #767676;
|
border: 1px solid #767676;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
margin: 0;
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#chalkboard-view-text {
|
||||||
|
margin: 0;
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -79,7 +79,9 @@
|
|||||||
<div id="chalkboard-area">
|
<div id="chalkboard-area">
|
||||||
<h2 id="chalkboard-heading">Virtual chalkboard</h2>
|
<h2 id="chalkboard-heading">Virtual chalkboard</h2>
|
||||||
<textarea id="chalkboard" aria-labelledby="chalkboard-heading" hidden></textarea>
|
<textarea id="chalkboard" aria-labelledby="chalkboard-heading" hidden></textarea>
|
||||||
<pre id="chalkboard-view" tabindex="0" role="region" aria-labelledby="chalkboard-heading" hidden></pre>
|
<div id="chalkboard-view" tabindex="0" aria-labelledby="chalkboard-heading" hidden>
|
||||||
|
<pre id="chalkboard-view-text"></pre>
|
||||||
|
</div>
|
||||||
<button id="chalkboard-copy" type="button" class="btn btn-default" disabled>Copy to clipboard</button>
|
<button id="chalkboard-copy" type="button" class="btn btn-default" disabled>Copy to clipboard</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+8
-3
@@ -2650,6 +2650,7 @@ function flushLiveRegion(elementId) {
|
|||||||
|
|
||||||
let text = state.queue.shift();
|
let text = state.queue.shift();
|
||||||
if(text === undefined) {
|
if(text === undefined) {
|
||||||
|
announcement.replaceChildren();
|
||||||
state.active = false;
|
state.active = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2690,6 +2691,10 @@ function getChalkboardView() {
|
|||||||
return document.getElementById('chalkboard-view');
|
return document.getElementById('chalkboard-view');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getChalkboardViewText() {
|
||||||
|
return document.getElementById('chalkboard-view-text');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} text
|
* @param {string} text
|
||||||
*/
|
*/
|
||||||
@@ -2700,9 +2705,9 @@ function setChalkboardText(text) {
|
|||||||
if(editor && editor.value !== text)
|
if(editor && editor.value !== text)
|
||||||
editor.value = text;
|
editor.value = text;
|
||||||
|
|
||||||
let view = getChalkboardView();
|
let viewText = getChalkboardViewText();
|
||||||
if(view && view.textContent !== text)
|
if(viewText && viewText.textContent !== text)
|
||||||
view.textContent = text;
|
viewText.textContent = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
function chalkboardHasFocus() {
|
function chalkboardHasFocus() {
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ func TestStaticLiveRegionAnnouncementsStayWired(t *testing.T) {
|
|||||||
requireFunctionContains(t, js, "announceLiveRegion", "state.queue.push")
|
requireFunctionContains(t, js, "announceLiveRegion", "state.queue.push")
|
||||||
requireFunctionContains(t, js, "announceLiveRegion", "flushLiveRegion")
|
requireFunctionContains(t, js, "announceLiveRegion", "flushLiveRegion")
|
||||||
requireFunctionContains(t, js, "flushLiveRegion", "appendChild")
|
requireFunctionContains(t, js, "flushLiveRegion", "appendChild")
|
||||||
|
requireFunctionContains(t, js, "flushLiveRegion", "announcement.replaceChildren()")
|
||||||
requireFunctionContains(t, js, "addToChatbox", "announceChat")
|
requireFunctionContains(t, js, "addToChatbox", "announceChat")
|
||||||
requireFunctionContains(t, js, "setUserStatus", "announceUrgent(`${username}: hand raised`)")
|
requireFunctionContains(t, js, "setUserStatus", "announceUrgent(`${username}: hand raised`)")
|
||||||
requireFunctionContains(t, js, "setUserStatus", "announceUrgent(`${username}: hand lowered`)")
|
requireFunctionContains(t, js, "setUserStatus", "announceUrgent(`${username}: hand lowered`)")
|
||||||
@@ -79,11 +80,12 @@ func TestChalkboardReadOnlyViewIsNotAnEditBox(t *testing.T) {
|
|||||||
js := readStaticFile(t, "skald.js")
|
js := readStaticFile(t, "skald.js")
|
||||||
|
|
||||||
requireContains(t, html, `<textarea id="chalkboard" aria-labelledby="chalkboard-heading" hidden>`, "chalkboard editor")
|
requireContains(t, html, `<textarea id="chalkboard" aria-labelledby="chalkboard-heading" hidden>`, "chalkboard editor")
|
||||||
requireContains(t, html, `<pre id="chalkboard-view" tabindex="0" role="region" aria-labelledby="chalkboard-heading" hidden>`, "chalkboard view")
|
requireContains(t, html, `<div id="chalkboard-view" tabindex="0" aria-labelledby="chalkboard-heading" hidden>`, "chalkboard view")
|
||||||
|
requireContains(t, html, `<pre id="chalkboard-view-text"></pre>`, "chalkboard view text")
|
||||||
requireContains(t, css, "white-space: pre-wrap", "chalkboard view")
|
requireContains(t, css, "white-space: pre-wrap", "chalkboard view")
|
||||||
requireContains(t, css, "#chalkboard[hidden]", "chalkboard hidden state")
|
requireContains(t, css, "#chalkboard[hidden]", "chalkboard hidden state")
|
||||||
requireFunctionContains(t, js, "getChalkboardEditor", "return /** @type {HTMLTextAreaElement} */ (")
|
requireFunctionContains(t, js, "getChalkboardEditor", "return /** @type {HTMLTextAreaElement} */ (")
|
||||||
requireFunctionContains(t, js, "setChalkboardText", "view.textContent = text")
|
requireFunctionContains(t, js, "setChalkboardText", "viewText.textContent = text")
|
||||||
requireFunctionContains(t, js, "updateChalkboardAccess", "editor.hidden = !canEdit")
|
requireFunctionContains(t, js, "updateChalkboardAccess", "editor.hidden = !canEdit")
|
||||||
requireFunctionContains(t, js, "updateChalkboardAccess", "view.hidden = canEdit")
|
requireFunctionContains(t, js, "updateChalkboardAccess", "view.hidden = canEdit")
|
||||||
requireFunctionContains(t, js, "applyChalkboardUpdate", "setChalkboardText(text)")
|
requireFunctionContains(t, js, "applyChalkboardUpdate", "setChalkboardText(text)")
|
||||||
|
|||||||
Reference in New Issue
Block a user