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

View File

@ -1,5 +1,5 @@
<!DOCTYPE HTML>
<html prefix="og: https://ogp.me/ns#">
<html prefix="og: https://ogp.me/ns#" data-bs-theme="dark">
<head>
<title>CollabVM</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
@ -17,77 +17,77 @@
<meta property="og:site_name" content="Computernewb"/>
<meta property="og:image" content="https://computernewb.com/collab-vm/desktop.png"/>
</head>
<body class="bg-dark">
<body>
<div class="modal fade" id="qemuMonitorModal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content bg-dark text-light">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">QEMU Monitor</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<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">
<input type="text" id="qemuMonitorInput" class="form-control bg-dark text-light" placeholder="Command"/>
<button class="btn btn-outline-secondary btn-primary text-light" type="button" id="qemuMonitorSendBtn">Send</button>
<input type="text" id="qemuMonitorInput" class="form-control" placeholder="Command"/>
<button class="btn btn-outline-secondary btn-primary" type="button" id="qemuMonitorSendBtn">Send</button>
</div>
</div>
</div>
</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-dialog modal-lg">
<div class="modal-content bg-dark text-light">
<div class="modal-header">
<h1>Welcome to CollabVM</h1>
</div>
<div class="modal-body">
<p>Before continuing, please familiarize yourself with our rules:</p>
<h3>R1. Don't break the law.</h3>
Do not use CollabVM or CollabVM's network to violate United States federal law, New York state law, or international law. If CollabVM becomes aware a crime has been committed through its service, you will be immediately banned, and your activities may be reported to the authorities if necessary.<br><br>CollabVM is required by law to notify law enforcement agencies if it becomes aware of the presence of child pornography on, or being transmitted through its network.<br><br>COPPA is also enforced, please do not use CollabVM if you are under the age of 13 years old.
<h3>R2. No running DoS/DDoS tools.</h3>
Do not use CollabVM to DoS/DDoS an indivdiual, business, company, or anyone else.
<h3>R3. No spam distribution.</h3>
Do not spam any emails using this service or push spam in general.
<h3>R4. Do not abuse any exploits.</h3>
Do not abuse any exploits, additionally if you see someone abusing exploits or you need to report one, please contact me at: computernewbab@gmail.com
<h3>R5. Don't impersonate other users.</h3>
Do not impersonate other members of CollabVM. If caught, you'll be temporarily disconnected, and banned if necessary.
<h3>R6. One vote per person.</h3>
Do not use any methods or tools to bypass the vote restriction. Only one vote per person is allowed, no matter what. Anybody who is caught doing this will be banned.
<h3>R7. No Remote Administration Tools.</h3>
Do not use any remote administration tools (ex: DarkComet, NanoCore, Anydesk, TeamViewer, Orcus, etc.)
<h3>R8. No bypassing CollabNet.</h3>
Do not attempt to bypass the blocking provided by CollabNet, especially if it is being used to break Rule 1, Rule 2, or Rule 7 (or run stupid over-used things).
<h3>R9. No performing destructive actions constantly.</h3>
Any user may not destroy the VM (rendering it unusable constantly), install/reinstall the operating system (except on VM7 or VM8), or run bots that do such. This includes bots that spam massive amounts of keyboard/mouse input ("kitting").
<h3>R10. No Cryptomining</h3>
Attempting to mine cryptocurrency on the VMs will result in a kick, and then a permanent ban if you keep attempting. Besides, it's not like you're gonna make any money off it.
<h3>NSFW Warning</h3>
Please note that NSFW content is allowed on our anarchy VM (VM0b0t), and is viewed regularly. In addition, while we give a good effort to keep NSFW off the main VMs, people will occasionally slip it through.
</div>
<div class="modal-footer">
<button type="button" id="welcomeModalDismiss" class="btn btn-primary" data-bs-dismiss="modal">Understood</button>
</div>
</div>
</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-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h1>Welcome to CollabVM</h1>
</div>
<div class="modal-body">
<p>Before continuing, please familiarize yourself with our rules:</p>
<h3>R1. Don't break the law.</h3>
Do not use CollabVM or CollabVM's network to violate United States federal law, New York state law, or international law. If CollabVM becomes aware a crime has been committed through its service, you will be immediately banned, and your activities may be reported to the authorities if necessary.<br><br>CollabVM is required by law to notify law enforcement agencies if it becomes aware of the presence of child pornography on, or being transmitted through its network.<br><br>COPPA is also enforced, please do not use CollabVM if you are under the age of 13 years old.
<h3>R2. No running DoS/DDoS tools.</h3>
Do not use CollabVM to DoS/DDoS an indivdiual, business, company, or anyone else.
<h3>R3. No spam distribution.</h3>
Do not spam any emails using this service or push spam in general.
<h3>R4. Do not abuse any exploits.</h3>
Do not abuse any exploits, additionally if you see someone abusing exploits or you need to report one, please contact me at: computernewbab@gmail.com
<h3>R5. Don't impersonate other users.</h3>
Do not impersonate other members of CollabVM. If caught, you'll be temporarily disconnected, and banned if necessary.
<h3>R6. One vote per person.</h3>
Do not use any methods or tools to bypass the vote restriction. Only one vote per person is allowed, no matter what. Anybody who is caught doing this will be banned.
<h3>R7. No Remote Administration Tools.</h3>
Do not use any remote administration tools (ex: DarkComet, NanoCore, Anydesk, TeamViewer, Orcus, etc.)
<h3>R8. No bypassing CollabNet.</h3>
Do not attempt to bypass the blocking provided by CollabNet, especially if it is being used to break Rule 1, Rule 2, or Rule 7 (or run stupid over-used things).
<h3>R9. No performing destructive actions constantly.</h3>
Any user may not destroy the VM (rendering it unusable constantly), install/reinstall the operating system (except on VM7 or VM8), or run bots that do such. This includes bots that spam massive amounts of keyboard/mouse input ("kitting").
<h3>R10. No Cryptomining</h3>
Attempting to mine cryptocurrency on the VMs will result in a kick, and then a permanent ban if you keep attempting. Besides, it's not like you're gonna make any money off it.
<h3>NSFW Warning</h3>
Please note that NSFW content is allowed on our anarchy VM (VM0b0t), and is viewed regularly. In addition, while we give a good effort to keep NSFW off the main VMs, people will occasionally slip it through.
</div>
<div class="modal-footer">
<button type="button" id="welcomeModalDismiss" class="btn btn-primary" data-bs-dismiss="modal">Understood</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="loginModal" tabindex="-1" aria-labelledby="loginModalLabel" aria-hidden="true">
<div class="modal-dialog modal-md">
<div class="modal-content bg-dark text-light">
<div class="modal-header">
<h5 class="modal-title">Login</h5>
<div class="modal-dialog modal-md">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Login</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
</div>
<div class="modal-body">
<div class="alert alert-danger alert-dismissible" id="badPasswordAlert" role="alert">
Incorrect password.
<button type="button" class="btn-close" aria-label="Close" id="incorrectPasswordDismissBtn"></button>
</div>
<div class="input-group">
<input type="hidden" name="username" id="adminInputVMID"/>
<span class="input-group-text bg-dark text-light">Password</span>
<input id="adminPassword" type="password" class="form-control bg-dark text-light" placeholder="Password" name="password"/>
<span class="input-group-text">Password</span>
<input id="adminPassword" type="password" class="form-control" placeholder="Password" name="password"/>
</div>
</div>
@ -167,7 +167,7 @@
</div>
</div>
</div>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<nav class="navbar navbar-expand-lg">
<div class="container-fluid">
<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">
@ -184,16 +184,16 @@
<li class="nav-item">
<a href="https://computernewb.com/collab-vm/rules" class="nav-link"><i class="fa-solid fa-clipboard-check"></i> <span id="rulesBtnText"></span></a>
</li>
<li class="nav-item">
<li class="nav-item">
<a href="https://discord.gg/a4kqb4mGyX" class="nav-link"><i class="fa-brands fa-discord"></i> Discord</a>
</li>
<li class="nav-item">
<li class="nav-item">
<a href="https://reddit.com/r/collabvm" class="nav-link"><i class="fa-brands fa-reddit"></i> Subreddit</a>
</li>
<li class="nav-item">
<a rel="me" class="nav-link" href="https://fedi.computernewb.com/@collabvm"><i class="fa-brands fa-mastodon"></i> Mastodon</a>
</li>
<li class="nav-item">
<li class="nav-item">
<a href="https://computernewb.com/collab-vm/user-vm" class="nav-link"><i class="fa-solid fa-user"></i> UserVM</a>
</li>
</ul>
@ -216,8 +216,8 @@
</div>
<div class="container-fluid" id="vmview">
<div id="vmDisplay"></div>
<p id="turnstatus" class="text-light"></p>
<div id="voteResetPanel" class="bg-dark text-light" style="display:none;">
<p id="turnstatus"></p>
<div id="voteResetPanel" style="display:none;">
<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/>
<span id="voteTimeText"></span>
@ -243,25 +243,25 @@
<button class="btn btn-secondary" id="qemuMonitorBtn" data-bs-toggle="modal" data-bs-target="#qemuMonitorModal"><i class="fa-solid fa-terminal"></i> QEMU Monitor</button>
</div>
</div>
<div class="osk-container d-none" id="osk-container">
<div class="osk-main"></div>
<div class="osk-container d-none" id="osk-container">
<div class="osk-main"></div>
<div class="controlArrows">
<div class="osk-control"></div>
<div class="osk-arrows"></div>
</div>
<div class="controlArrows">
<div class="osk-control"></div>
<div class="osk-arrows"></div>
</div>
<div class="numPad">
<div class="osk-numpad"></div>
<div class="osk-numpadEnd"></div>
</div>
</div>
<div class="numPad">
<div class="osk-numpad"></div>
<div class="osk-numpadEnd"></div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="table-responsive username-table">
<table class="table table-hover table-dark table-borderless">
<table class="table table-hover table-borderless">
<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>
<tbody id="userlist"></tbody>
</table>
@ -269,20 +269,20 @@
</div>
<div class="col-md-8">
<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>
</table>
</div>
<div class="input-group">
<span class="input-group-text bg-dark username-unregistered" id="username">Username</span>
<input type="text" class="form-control bg-dark text-light" id="chat-input"/>
<div class="input-group-text bg-dark text-light" id="xssCheckboxContainer">
<span class="input-group-text username-unregistered" id="username">Username</span>
<input type="text" class="form-control" id="chat-input"/>
<div class="input-group-text" id="xssCheckboxContainer">
<input class="form-check-input" type="checkbox" value="" id="xssCheckbox"/>
<label class="form-check-label" for="xssCheckbox">XSS</label>
</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>

View File

@ -1,4 +1,3 @@
// TODO: `Object` has a toString(), but we should probably gate that off
/// Interface for things that can be turned into strings
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)
defaultLanguage: string;
}
};
// ID for fallback language
const fallbackId = '!!fallback';
@ -89,7 +89,7 @@ const fallbackId = '!!fallback';
const fallbackLanguage: Language = {
languageName: 'Fallback',
translatedLanguageName: 'Fallback',
flag: "no",
flag: 'no',
author: 'Computernewb',
stringKeys: {

View File

@ -422,7 +422,7 @@ async function openVM(vm: VM): Promise<void> {
throw new Error('Failed to connect to node');
}
// 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
elements.vmDisplay.appendChild(VM!.canvas);
// Switch to the VM view

View File

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

View File

@ -11,10 +11,10 @@ export class Permissions {
xss: boolean = false;
constructor(mask: number) {
this.set(mask);
this.set(mask);
}
set(mask: number) {
set(mask: number) {
this.restore = (mask & 1) !== 0;
this.reboot = (mask & 2) !== 0;
this.ban = (mask & 4) !== 0;
@ -25,7 +25,7 @@ export class Permissions {
this.rename = (mask & 128) !== 0;
this.grabip = (mask & 256) !== 0;
this.xss = (mask & 512) !== 0;
}
}
}
export enum Rank {

View File

@ -1,7 +1,7 @@
import { Format } from '../format';
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', () => {

View File

@ -1,4 +1,4 @@
{
"languages": ["en-us", "pirate"],
"defaultLanguage": "en-us"
"defaultLanguage": "en-us"
}