adds a refresh room name button to the new call page
This commit is contained in:
parent
ccc6c892a6
commit
c72493d043
|
@ -116,9 +116,12 @@ var nouns = [
|
|||
"sloth",
|
||||
"swan",
|
||||
];
|
||||
function refreshRoomName() {
|
||||
var adjective = adjectives[Math.floor(Math.random() * adjectives.length)];
|
||||
var noun = nouns[Math.floor(Math.random() * nouns.length)];
|
||||
noun = noun.charAt(0).toUpperCase() + noun.substring(1);
|
||||
adjective = adjective.charAt(0).toUpperCase() + adjective.substring(1);
|
||||
document.getElementById("input-01").value = adjective + noun;
|
||||
}
|
||||
|
||||
var adjective = adjectives[Math.floor(Math.random() * adjectives.length)];
|
||||
var noun = nouns[Math.floor(Math.random() * nouns.length)];
|
||||
noun = noun.charAt(0).toUpperCase() + noun.substring(1);
|
||||
adjective = adjective.charAt(0).toUpperCase() + adjective.substring(1);
|
||||
document.getElementById("input-01").value = adjective + noun;
|
||||
refreshRoomName();
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
<div class="cta-action">
|
||||
<div class="mb-24">
|
||||
<label class="form-label screen-reader" for="input-01"
|
||||
>This is a label</label
|
||||
>Room Name</label
|
||||
>
|
||||
<div class="form-group-desktop">
|
||||
<input
|
||||
|
@ -107,6 +107,12 @@
|
|||
id="input-01"
|
||||
value="PurpleSquid"
|
||||
/>
|
||||
<button
|
||||
class="button button-primary mr-12"
|
||||
onclick="{refreshRoomName()}"
|
||||
>
|
||||
Refresh
|
||||
</button>
|
||||
<button
|
||||
class="button button-primary pulse"
|
||||
onclick="{window.location.href = '/join/' + document.getElementById('input-01').value}"
|
||||
|
|
Loading…
Reference in New Issue