dogok banned for cause merge conflict

This commit is contained in:
Elijah R 2024-04-05 17:32:16 -04:00
commit c8b7b3e00a
11 changed files with 167 additions and 153 deletions

15
.editorconfig Normal file
View File

@ -0,0 +1,15 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
indent_style = tab
indent_size = 4
# why
[*.{html,css}]
indent_style = space
# WHY
[*.css]
indent_size = 2

View File

@ -133,128 +133,128 @@ tr.user-waiting > td {
/* Start OSK */ /* Start OSK */
.osk-container { .osk-container {
display: flex; display: flex;
justify-content: center; justify-content: center;
width: 1024px; width: 1024px;
margin: 0 auto; margin: 0 auto;
margin-bottom: 10px; margin-bottom: 10px;
border-radius: 5px; border-radius: 5px;
} }
.simple-keyboard.hg-theme-default { .simple-keyboard.hg-theme-default {
display: inline-block; display: inline-block;
} }
.osk-main.simple-keyboard { .osk-main.simple-keyboard {
width: 640px; width: 640px;
min-width: 640px; min-width: 640px;
background: none; background: none;
} }
.osk-main.simple-keyboard .hg-row:first-child { .osk-main.simple-keyboard .hg-row:first-child {
margin-bottom: 8.51px; margin-bottom: 8.51px; /* wtf? */
} }
.osk-arrows.simple-keyboard { .osk-arrows.simple-keyboard {
align-self: flex-end; align-self: flex-end;
background: none; background: none;
} }
.simple-keyboard .hg-button.selectedButton { .simple-keyboard .hg-button.selectedButton {
background: rgba(5, 25, 70, 0.53); background: rgba(5, 25, 70, 0.53);
color: white; color: white;
} }
.simple-keyboard .hg-button.emptySpace { .simple-keyboard .hg-button.emptySpace {
pointer-events: none; pointer-events: none;
background: none; background: none;
border: none; border: none;
box-shadow: none; box-shadow: none;
} }
.osk-arrows .hg-row { .osk-arrows .hg-row {
justify-content: center; justify-content: center;
} }
.osk-arrows .hg-button { .osk-arrows .hg-button {
width: 50px; width: 50px;
flex-grow: 0 !important; flex-grow: 0 !important;
justify-content: center !important; justify-content: center !important;
display: flex !important; display: flex !important;
align-items: center !important; align-items: center !important;
} }
.controlArrows { .controlArrows {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
flex-flow: column; flex-flow: column;
} }
.osk-control.simple-keyboard { .osk-control.simple-keyboard {
background: none; background: none;
} }
.osk-control.simple-keyboard .hg-row:first-child { .osk-control.simple-keyboard .hg-row:first-child {
margin-bottom: 8.51px; margin-bottom: 8.51px;
} }
.osk-control .hg-button { .osk-control .hg-button {
width: 50px; width: 50px;
flex-grow: 0 !important; flex-grow: 0 !important;
justify-content: center !important; justify-content: center !important;
display: flex !important; display: flex !important;
align-items: center !important; align-items: center !important;
} }
.numPad { .numPad {
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
} }
.osk-numpad.simple-keyboard { .osk-numpad.simple-keyboard {
background: none; background: none;
} }
.osk-numpad.simple-keyboard { .osk-numpad.simple-keyboard {
width: 160px; width: 160px;
} }
.osk-numpad.simple-keyboard .hg-button { .osk-numpad.simple-keyboard .hg-button {
width: 50px; width: 50px;
justify-content: center; justify-content: center;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.osk-numpadEnd.simple-keyboard { .osk-numpadEnd.simple-keyboard {
width: 50px; width: 50px;
background: none; background: none;
margin: 0; margin: 0;
padding: 5px 5px 5px 0; padding: 5px 5px 5px 0;
} }
.osk-numpadEnd.simple-keyboard .hg-button { .osk-numpadEnd.simple-keyboard .hg-button {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
display: flex; display: flex;
} }
.osk-numpadEnd .hg-button.hg-standardBtn.hg-button-plus { .osk-numpadEnd .hg-button.hg-standardBtn.hg-button-plus {
height: 85px; height: 85px;
} }
.osk-numpadEnd.simple-keyboard .hg-button.hg-button-enter { .osk-numpadEnd.simple-keyboard .hg-button.hg-button-enter {
height: 85px; height: 85px;
} }
.simple-keyboard.hg-theme-default .hg-button.hg-selectedButton { .simple-keyboard.hg-theme-default .hg-button.hg-selectedButton {
background: rgba(5, 25, 70, 0.53); background: rgba(5, 25, 70, 0.53);
color: white; color: white;
} }
.hg-button.hg-functionBtn.hg-button-space { .hg-button.hg-functionBtn.hg-button-space {
width: 350px; width: 350px;
} }
/* /*
@ -262,28 +262,28 @@ Theme: cvmDark
*/ */
.simple-keyboard.cvmDark .hg-button { .simple-keyboard.cvmDark .hg-button {
border-bottom: none; border-bottom: none;
background: rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.5);
color: white; color: white;
} }
.simple-keyboard.cvmDark .hg-button:active { .simple-keyboard.cvmDark .hg-button:active {
background: #1c4995; background: #1c4995;
color: white; color: white;
} }
#root .simple-keyboard.cvmDark + .simple-keyboard-preview { #root .simple-keyboard.cvmDark + .simple-keyboard-preview {
background: #1c4995; background: #1c4995;
} }
/* /*
Theme: cvmDisabled Theme: cvmDisabled
*/ */
.simple-keyboard.cvmDisabled .hg-button { .simple-keyboard.cvmDisabled .hg-button {
border-bottom: none; border-bottom: none;
pointer-events: none; pointer-events: none;
background: gray; background: gray;
color: white; color: white;
} }
/* End OSK */ /* End OSK */

View File

@ -1,5 +1,5 @@
<!DOCTYPE HTML> <!DOCTYPE HTML>
<html prefix="og: https://ogp.me/ns#"> <html prefix="og: https://ogp.me/ns#" data-bs-theme="dark">
<head> <head>
<title>CollabVM</title> <title>CollabVM</title>
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
@ -17,19 +17,19 @@
<meta property="og:site_name" content="Computernewb"/> <meta property="og:site_name" content="Computernewb"/>
<meta property="og:image" content="https://computernewb.com/collab-vm/desktop.png"/> <meta property="og:image" content="https://computernewb.com/collab-vm/desktop.png"/>
</head> </head>
<body class="bg-dark"> <body>
<div class="modal fade" id="qemuMonitorModal" tabindex="-1" aria-hidden="true"> <div class="modal fade" id="qemuMonitorModal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content bg-dark text-light"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title">QEMU Monitor</h5> <h5 class="modal-title">QEMU Monitor</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<textarea id="qemuMonitorOutput" readonly="" class="form-control bg-dark text-light"></textarea> <textarea id="qemuMonitorOutput" readonly="" class="form-control"></textarea>
<div class="input-group"> <div class="input-group">
<input type="text" id="qemuMonitorInput" class="form-control bg-dark text-light" placeholder="Command"/> <input type="text" id="qemuMonitorInput" class="form-control" placeholder="Command"/>
<button class="btn btn-outline-secondary btn-primary text-light" type="button" id="qemuMonitorSendBtn">Send</button> <button class="btn btn-outline-secondary btn-primary" type="button" id="qemuMonitorSendBtn">Send</button>
</div> </div>
</div> </div>
</div> </div>
@ -37,7 +37,7 @@
</div> </div>
<div class="modal fade" id="welcomeModal" tabindex="-1" data-bs-backdrop="static" data-bs-keyboard="false" aria-labelledby="welcomeModalLabel" aria-hidden="true"> <div class="modal fade" id="welcomeModal" tabindex="-1" data-bs-backdrop="static" data-bs-keyboard="false" aria-labelledby="welcomeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg"> <div class="modal-dialog modal-lg">
<div class="modal-content bg-dark text-light"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h1>Welcome to CollabVM</h1> <h1>Welcome to CollabVM</h1>
</div> </div>
@ -74,7 +74,7 @@
</div> </div>
<div class="modal fade" id="loginModal" tabindex="-1" aria-labelledby="loginModalLabel" aria-hidden="true"> <div class="modal fade" id="loginModal" tabindex="-1" aria-labelledby="loginModalLabel" aria-hidden="true">
<div class="modal-dialog modal-md"> <div class="modal-dialog modal-md">
<div class="modal-content bg-dark text-light"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title">Login</h5> <h5 class="modal-title">Login</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
@ -86,8 +86,8 @@
</div> </div>
<div class="input-group"> <div class="input-group">
<input type="hidden" name="username" id="adminInputVMID"/> <input type="hidden" name="username" id="adminInputVMID"/>
<span class="input-group-text bg-dark text-light">Password</span> <span class="input-group-text">Password</span>
<input id="adminPassword" type="password" class="form-control bg-dark text-light" placeholder="Password" name="password"/> <input id="adminPassword" type="password" class="form-control" placeholder="Password" name="password"/>
</div> </div>
</div> </div>
@ -167,7 +167,7 @@
</div> </div>
</div> </div>
</div> </div>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark"> <nav class="navbar navbar-expand-lg">
<div class="container-fluid"> <div class="container-fluid">
<a class="navbar-brand" href="#"><span id="siteNameText"></span></a> <a class="navbar-brand" href="#"><span id="siteNameText"></span></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
@ -216,8 +216,8 @@
</div> </div>
<div class="container-fluid" id="vmview"> <div class="container-fluid" id="vmview">
<div id="vmDisplay"></div> <div id="vmDisplay"></div>
<p id="turnstatus" class="text-light"></p> <p id="turnstatus"></p>
<div id="voteResetPanel" class="bg-dark text-light" style="display:none;"> <div id="voteResetPanel" style="display:none;">
<span id="voteResetHeaderText"></span><br/> <span id="voteResetHeaderText"></span><br/>
<button class="btn btn-success" id="voteYesBtn"><i class="fa-solid fa-check"></i> <span id="voteYesBtnText"></span><span class="badge bg-secondary" id="voteYesLabel"></span></button> <button class="btn btn-danger" id="voteNoBtn"><i class="fa-solid fa-ban"></i> <span id="voteNoBtnText"></span><span class="badge bg-secondary" id="voteNoLabel"></span></button><br/> <button class="btn btn-success" id="voteYesBtn"><i class="fa-solid fa-check"></i> <span id="voteYesBtnText"></span><span class="badge bg-secondary" id="voteYesLabel"></span></button> <button class="btn btn-danger" id="voteNoBtn"><i class="fa-solid fa-ban"></i> <span id="voteNoBtnText"></span><span class="badge bg-secondary" id="voteNoLabel"></span></button><br/>
<span id="voteTimeText"></span> <span id="voteTimeText"></span>
@ -259,9 +259,9 @@
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
<div class="table-responsive username-table"> <div class="table-responsive username-table">
<table class="table table-hover table-dark table-borderless"> <table class="table table-hover table-borderless">
<thead> <thead>
<th><i class="fa-solid fa-user"></i> <span id="usersOnlineText"></span> (<span id="onlineusercount"></span>)</th> <th class="bg-body-tertiary"><i class="fa-solid fa-user"></i> <span id="usersOnlineText"></span> (<span id="onlineusercount"></span>)</th>
</thead> </thead>
<tbody id="userlist"></tbody> <tbody id="userlist"></tbody>
</table> </table>
@ -269,20 +269,20 @@
</div> </div>
<div class="col-md-8"> <div class="col-md-8">
<div class="table-responsive chat-table" id="chatListDiv"> <div class="table-responsive chat-table" id="chatListDiv">
<table class="table table-hover table-dark table-borderless"> <table class="table table-hover table-borderless">
<tbody id="chatList"> <tbody id="chatList">
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="input-group"> <div class="input-group">
<span class="input-group-text bg-dark username-unregistered" id="username">Username</span> <span class="input-group-text username-unregistered" id="username">Username</span>
<input type="text" class="form-control bg-dark text-light" id="chat-input"/> <input type="text" class="form-control" id="chat-input"/>
<div class="input-group-text bg-dark text-light" id="xssCheckboxContainer"> <div class="input-group-text" id="xssCheckboxContainer">
<input class="form-check-input" type="checkbox" value="" id="xssCheckbox"/> <input class="form-check-input" type="checkbox" value="" id="xssCheckbox"/>
<label class="form-check-label" for="xssCheckbox">XSS</label> <label class="form-check-label" for="xssCheckbox">XSS</label>
</div> </div>
<button class="btn btn-primary text-light" type="button" id="sendChatBtn"><i class="fa-solid fa-paper-plane"></i></button> <button class="btn btn-primary" type="button" id="sendChatBtn"><i class="fa-solid fa-paper-plane"></i></button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,4 +1,3 @@
// TODO: `Object` has a toString(), but we should probably gate that off // TODO: `Object` has a toString(), but we should probably gate that off
/// Interface for things that can be turned into strings /// Interface for things that can be turned into strings
export interface ToStringable { export interface ToStringable {

View File

@ -80,7 +80,7 @@ type LanguagesJson = {
// The default language (set if a invalid language not in the languages array is set, or no language is set) // The default language (set if a invalid language not in the languages array is set, or no language is set)
defaultLanguage: string; defaultLanguage: string;
} };
// ID for fallback language // ID for fallback language
const fallbackId = '!!fallback'; const fallbackId = '!!fallback';
@ -89,7 +89,7 @@ const fallbackId = '!!fallback';
const fallbackLanguage: Language = { const fallbackLanguage: Language = {
languageName: 'Fallback', languageName: 'Fallback',
translatedLanguageName: 'Fallback', translatedLanguageName: 'Fallback',
flag: "no", flag: 'no',
author: 'Computernewb', author: 'Computernewb',
stringKeys: { stringKeys: {

View File

@ -422,7 +422,7 @@ async function openVM(vm: VM): Promise<void> {
throw new Error('Failed to connect to node'); throw new Error('Failed to connect to node');
} }
// Set the title // Set the title
document.title = Format("{0} - {1}", vm.id, TheI18n.GetString(I18nStringKey.kGeneric_CollabVM)); document.title = Format('{0} - {1}', vm.id, TheI18n.GetString(I18nStringKey.kGeneric_CollabVM));
// Append canvas // Append canvas
elements.vmDisplay.appendChild(VM!.canvas); elements.vmDisplay.appendChild(VM!.canvas);
// Switch to the VM view // Switch to the VM view

View File

@ -457,7 +457,7 @@ export default class CollabVMClient {
this.connectedToVM = false; this.connectedToVM = false;
// call all unsubscribe callbacks explicitly // call all unsubscribe callbacks explicitly
for(let cb of this.unsubscribeCallbacks) { for (let cb of this.unsubscribeCallbacks) {
cb(); cb();
} }
this.unsubscribeCallbacks = []; this.unsubscribeCallbacks = [];

View File

@ -1,7 +1,7 @@
import { Format } from '../format'; import { Format } from '../format';
test('a string without any format specifiers in it is unaltered', () => { test('a string without any format specifiers in it is unaltered', () => {
expect(Format("Hello World")).toBe("Hello World"); expect(Format('Hello World')).toBe('Hello World');
}); });
test('formatting a string works', () => { test('formatting a string works', () => {