Fix indentation (consistent formatting CHALLENGE)
You people have a prettierrc yet never run prettier tabs or spaces. WHICH IS IT 2 width or 4 width WHICH IS IT (i'd make index.html 4 width tab but there's more that uses space there)
This commit is contained in:
parent
999bdd0809
commit
72d0cbb37b
26
Config.ts
26
Config.ts
|
|
@ -1,14 +1,14 @@
|
||||||
export const Config = {
|
export const Config = {
|
||||||
ChatSound: "//computernewb.com/collab-vm/notify.ogg",
|
ChatSound: '//computernewb.com/collab-vm/notify.ogg',
|
||||||
ServerAddresses: [
|
ServerAddresses: [
|
||||||
"wss://computernewb.com/collab-vm/vm0",
|
'wss://computernewb.com/collab-vm/vm0',
|
||||||
"wss://computernewb.com/collab-vm/vm1",
|
'wss://computernewb.com/collab-vm/vm1',
|
||||||
"wss://computernewb.com/collab-vm/vm2",
|
'wss://computernewb.com/collab-vm/vm2',
|
||||||
"wss://computernewb.com/collab-vm/vm3",
|
'wss://computernewb.com/collab-vm/vm3',
|
||||||
"wss://computernewb.com/collab-vm/vm4",
|
'wss://computernewb.com/collab-vm/vm4',
|
||||||
"wss://computernewb.com/collab-vm/vm5",
|
'wss://computernewb.com/collab-vm/vm5',
|
||||||
"wss://computernewb.com/collab-vm/vm6",
|
'wss://computernewb.com/collab-vm/vm6',
|
||||||
"wss://computernewb.com/collab-vm/vm7",
|
'wss://computernewb.com/collab-vm/vm7',
|
||||||
"wss://computernewb.com/collab-vm/vm8",
|
'wss://computernewb.com/collab-vm/vm8'
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
|
|
|
||||||
|
|
@ -35,51 +35,51 @@
|
||||||
</div>
|
</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 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 bg-dark text-light">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h1>Welcome to CollabVM</h1>
|
<h1>Welcome to CollabVM</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<p>Before continuing, please familiarize yourself with our rules:</p>
|
<p>Before continuing, please familiarize yourself with our rules:</p>
|
||||||
<h3>R1. Don't break the law.</h3>
|
<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.
|
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>
|
<h3>R2. No running DoS/DDoS tools.</h3>
|
||||||
Do not use CollabVM to DoS/DDoS an indivdiual, business, company, or anyone else.
|
Do not use CollabVM to DoS/DDoS an indivdiual, business, company, or anyone else.
|
||||||
<h3>R3. No spam distribution.</h3>
|
<h3>R3. No spam distribution.</h3>
|
||||||
Do not spam any emails using this service or push spam in general.
|
Do not spam any emails using this service or push spam in general.
|
||||||
<h3>R4. Do not abuse any exploits.</h3>
|
<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
|
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>
|
<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.
|
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>
|
<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.
|
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>
|
<h3>R7. No Remote Administration Tools.</h3>
|
||||||
Do not use any remote administration tools (ex: DarkComet, NanoCore, Anydesk, TeamViewer, Orcus, etc.)
|
Do not use any remote administration tools (ex: DarkComet, NanoCore, Anydesk, TeamViewer, Orcus, etc.)
|
||||||
<h3>R8. No bypassing CollabNet.</h3>
|
<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).
|
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>
|
<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").
|
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>
|
<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.
|
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>
|
<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.
|
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>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" id="welcomeModalDismiss" class="btn btn-primary" data-bs-dismiss="modal">Understood</button>
|
<button type="button" id="welcomeModalDismiss" class="btn btn-primary" data-bs-dismiss="modal">Understood</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</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 bg-dark text-light">
|
||||||
<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>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="alert alert-danger alert-dismissible" id="badPasswordAlert" role="alert">
|
<div class="alert alert-danger alert-dismissible" id="badPasswordAlert" role="alert">
|
||||||
Incorrect password.
|
Incorrect password.
|
||||||
<button type="button" class="btn-close" aria-label="Close" id="incorrectPasswordDismissBtn"></button>
|
<button type="button" class="btn-close" aria-label="Close" id="incorrectPasswordDismissBtn"></button>
|
||||||
|
|
@ -90,13 +90,13 @@
|
||||||
<input id="adminPassword" type="password" class="form-control bg-dark text-light" placeholder="Password" name="password"/>
|
<input id="adminPassword" type="password" class="form-control bg-dark text-light" placeholder="Password" name="password"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" id="loginButton" class="btn btn-primary">Login</button>
|
<button type="button" id="loginButton" class="btn btn-primary">Login</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal fade" id="hcaptchaModal" tabindex="-1" aria-hidden="true">
|
<div class="modal fade" id="hcaptchaModal" 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 bg-dark text-light">
|
||||||
|
|
@ -123,16 +123,16 @@
|
||||||
<li class="nav-item">
|
<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>
|
<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>
|
||||||
<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>
|
<a href="https://discord.gg/a4kqb4mGyX" class="nav-link"><i class="fa-brands fa-discord"></i> Discord</a>
|
||||||
</li>
|
</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>
|
<a href="https://reddit.com/r/collabvm" class="nav-link"><i class="fa-brands fa-reddit"></i> Subreddit</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<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>
|
<a rel="me" class="nav-link" href="https://fedi.computernewb.com/@collabvm"><i class="fa-brands fa-mastodon"></i> Mastodon</a>
|
||||||
</li>
|
</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>
|
<a href="https://computernewb.com/collab-vm/user-vm" class="nav-link"><i class="fa-solid fa-user"></i> UserVM</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
@ -171,19 +171,19 @@
|
||||||
<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>
|
<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>
|
</div>
|
||||||
<div class="osk-container d-none" id="osk-container">
|
<div class="osk-container d-none" id="osk-container">
|
||||||
<div class="osk-main"></div>
|
<div class="osk-main"></div>
|
||||||
|
|
||||||
<div class="controlArrows">
|
<div class="controlArrows">
|
||||||
<div class="osk-control"></div>
|
<div class="osk-control"></div>
|
||||||
<div class="osk-arrows"></div>
|
<div class="osk-arrows"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="numPad">
|
<div class="numPad">
|
||||||
<div class="osk-numpad"></div>
|
<div class="osk-numpad"></div>
|
||||||
<div class="osk-numpadEnd"></div>
|
<div class="osk-numpadEnd"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<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">
|
||||||
|
|
|
||||||
|
|
@ -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 {
|
||||||
|
|
@ -6,4 +5,4 @@ export interface ToStringable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A type for strings, or things that can (in a valid manner) be turned into strings
|
/// A type for strings, or things that can (in a valid manner) be turned into strings
|
||||||
export type StringLike = string | ToStringable;
|
export type StringLike = string | ToStringable;
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ export enum I18nStringKey {
|
||||||
|
|
||||||
kError_UsernameTaken = 'kError_UsernameTaken',
|
kError_UsernameTaken = 'kError_UsernameTaken',
|
||||||
kError_UsernameInvalid = 'kError_UsernameInvalid',
|
kError_UsernameInvalid = 'kError_UsernameInvalid',
|
||||||
kError_UsernameBlacklisted = 'kError_UsernameBlacklisted',
|
kError_UsernameBlacklisted = 'kError_UsernameBlacklisted'
|
||||||
}
|
}
|
||||||
|
|
||||||
// This models the JSON structure.
|
// This models the JSON structure.
|
||||||
|
|
@ -68,7 +68,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';
|
||||||
|
|
@ -77,7 +77,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: {
|
||||||
|
|
|
||||||
|
|
@ -368,7 +368,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
|
||||||
|
|
|
||||||
|
|
@ -438,7 +438,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 = [];
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,10 @@ export class Permissions {
|
||||||
xss: boolean = false;
|
xss: boolean = false;
|
||||||
|
|
||||||
constructor(mask: number) {
|
constructor(mask: number) {
|
||||||
this.set(mask);
|
this.set(mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
set(mask: number) {
|
set(mask: number) {
|
||||||
this.restore = (mask & 1) !== 0;
|
this.restore = (mask & 1) !== 0;
|
||||||
this.reboot = (mask & 2) !== 0;
|
this.reboot = (mask & 2) !== 0;
|
||||||
this.ban = (mask & 4) !== 0;
|
this.ban = (mask & 4) !== 0;
|
||||||
|
|
@ -25,7 +25,7 @@ export class Permissions {
|
||||||
this.rename = (mask & 128) !== 0;
|
this.rename = (mask & 128) !== 0;
|
||||||
this.grabip = (mask & 256) !== 0;
|
this.grabip = (mask & 256) !== 0;
|
||||||
this.xss = (mask & 512) !== 0;
|
this.xss = (mask & 512) !== 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum Rank {
|
export enum Rank {
|
||||||
|
|
|
||||||
|
|
@ -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', () => {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"languages": ["en-us", "pirate"],
|
"languages": ["en-us", "pirate"],
|
||||||
"defaultLanguage": "en-us"
|
"defaultLanguage": "en-us"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user