1
0
mirror of https://github.com/spacebarchat/client.git synced 2024-11-22 02:12:38 +01:00
This commit is contained in:
Puyodead1 2024-02-27 22:40:34 -05:00
parent a63e154431
commit 19fe08b602
No known key found for this signature in database
GPG Key ID: A4FA4FEC0DD353FC
25 changed files with 24223 additions and 18779 deletions

View File

@ -3,3 +3,4 @@ dist
node_modules node_modules
.github .github
.vscode .vscode
src-tauri/target

View File

@ -1,4 +1,4 @@
<!DOCTYPE html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<!-- Primary Meta Tags --> <!-- Primary Meta Tags -->

File diff suppressed because it is too large Load Diff

View File

@ -1 +1,27 @@
{"base":{"identifier":"base","description":"base","local":true,"windows":["main","splashscreen"],"permissions":["path:default","event:default","window:default","app:default","resources:default","menu:default","tray:default","updater:default","notification:default","os:allow-platform","os:allow-arch","os:allow-family","os:allow-locale","os:allow-os-type","os:allow-version","webview:allow-internal-toggle-devtools"],"platforms":["linux","macOS","windows","android","iOS"]}} {
"base": {
"identifier": "base",
"description": "base",
"local": true,
"windows": ["main", "splashscreen"],
"permissions": [
"path:default",
"event:default",
"window:default",
"app:default",
"resources:default",
"menu:default",
"tray:default",
"updater:default",
"notification:default",
"os:allow-platform",
"os:allow-arch",
"os:allow-family",
"os:allow-locale",
"os:allow-os-type",
"os:allow-version",
"webview:allow-internal-toggle-devtools"
],
"platforms": ["linux", "macOS", "windows", "android", "iOS"]
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -30,7 +30,9 @@ const Wrapper = styled(Container)<{ active?: boolean; hasImage?: boolean }>`
border-radius: ${(props) => (props.active ? "30%" : "50%")}; border-radius: ${(props) => (props.active ? "30%" : "50%")};
background-color: ${(props) => background-color: ${(props) =>
props.hasImage ? "transparent" : props.active ? "var(--primary)" : "var(--background-secondary)"}; props.hasImage ? "transparent" : props.active ? "var(--primary)" : "var(--background-secondary)"};
transition: border-radius 0.2s ease, background-color 0.2s ease; transition:
border-radius 0.2s ease,
background-color 0.2s ease;
&:hover { &:hover {
border-radius: 30%; border-radius: 30%;

View File

@ -22,7 +22,9 @@ const Container = styled.div`
width: 340px; width: 340px;
max-height: 600px; max-height: 600px;
overflow: hidden; overflow: hidden;
box-shadow: 0 0 0 1px rgb(0 0 0 / 15%), 0 4px 8px rgb(0 0 0 / 15%); box-shadow:
0 0 0 1px rgb(0 0 0 / 15%),
0 4px 8px rgb(0 0 0 / 15%);
color: var(--text); color: var(--text);
`; `;

View File

@ -8,7 +8,10 @@
code[class*="language-"], code[class*="language-"],
pre[class*="language-"] { pre[class*="language-"] {
color: #f92aad; color: #f92aad;
text-shadow: 0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3; text-shadow:
0 0 2px #100c0f,
0 0 5px #dc078e33,
0 0 10px #fff3;
background: none; background: none;
font-family: var(--font-family-code); font-family: var(--font-family-code);
font-size: 1em; font-size: 1em;
@ -74,7 +77,10 @@ pre[class*="language-"] {
.token.property, .token.property,
.token.selector { .token.selector {
color: #72f1b8; color: #72f1b8;
text-shadow: 0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475; text-shadow:
0 0 2px #100c0f,
0 0 10px #257c5575,
0 0 35px #21272475;
} }
.token.function-name { .token.function-name {
@ -85,18 +91,29 @@ pre[class*="language-"] {
.token.selector .token.id, .token.selector .token.id,
.token.function { .token.function {
color: #fdfdfd; color: #fdfdfd;
text-shadow: 0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975; text-shadow:
0 0 2px #001716,
0 0 3px #03edf975,
0 0 5px #03edf975,
0 0 8px #03edf975;
} }
.token.class-name { .token.class-name {
color: #fff5f6; color: #fff5f6;
text-shadow: 0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75; text-shadow:
0 0 2px #000,
0 0 10px #fc1f2c75,
0 0 5px #fc1f2c75,
0 0 25px #fc1f2c75;
} }
.token.constant, .token.constant,
.token.symbol { .token.symbol {
color: #f92aad; color: #f92aad;
text-shadow: 0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3; text-shadow:
0 0 2px #100c0f,
0 0 5px #dc078e33,
0 0 10px #fff3;
} }
.token.important, .token.important,
@ -105,7 +122,10 @@ pre[class*="language-"] {
.token.selector .token.class, .token.selector .token.class,
.token.builtin { .token.builtin {
color: #f4eee4; color: #f4eee4;
text-shadow: 0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575; text-shadow:
0 0 2px #393a33,
0 0 8px #f39f0575,
0 0 2px #f39f0575;
} }
.token.string, .token.string,

View File

@ -374,11 +374,14 @@ export default class GatewayConnectionStore {
} }
}; };
this.initialHeartbeatTimeout = setTimeout(() => { this.initialHeartbeatTimeout = setTimeout(
() => {
this.initialHeartbeatTimeout = null; this.initialHeartbeatTimeout = null;
this.heartbeater = setInterval(heartbeaterFn, this.heartbeatInterval!); this.heartbeater = setInterval(heartbeaterFn, this.heartbeatInterval!);
heartbeaterFn(); heartbeaterFn();
}, Math.floor(Math.random() * this.heartbeatInterval!)); },
Math.floor(Math.random() * this.heartbeatInterval!),
);
}; };
/** /**

View File

@ -27,7 +27,10 @@ export default class MessageBase {
type: MessageType; type: MessageType;
author: User; author: User;
constructor(public readonly app: AppStore, data: MessageLikeData) { constructor(
public readonly app: AppStore,
data: MessageLikeData,
) {
this.id = data.id; this.id = data.id;
this.content = data.content; this.content = data.content;
this.timestamp = new Date(data.timestamp); this.timestamp = new Date(data.timestamp);

View File

@ -100,7 +100,8 @@ export class Permissions extends BitField {
static channelPermission(overwrites: APIOverwrite[], init?: bigint) { static channelPermission(overwrites: APIOverwrite[], init?: bigint) {
// TODO: do not deny any permissions if admin // TODO: do not deny any permissions if admin
return overwrites.reduce((permission, overwrite) => { return overwrites.reduce(
(permission, overwrite) => {
// apply disallowed permission // apply disallowed permission
// * permission: current calculated permission (e.g. 010) // * permission: current calculated permission (e.g. 010)
// * deny contains all denied permissions (e.g. 011) // * deny contains all denied permissions (e.g. 011)
@ -109,7 +110,9 @@ export class Permissions extends BitField {
// ~ operator inverts deny (e.g. 011 -> 100) // ~ operator inverts deny (e.g. 011 -> 100)
// & operator only allows 1 for both ~deny and permission (e.g. 010 & 100 -> 000) // & operator only allows 1 for both ~deny and permission (e.g. 010 & 100 -> 000)
// | operators adds both together (e.g. 000 + 100 -> 100) // | operators adds both together (e.g. 000 + 100 -> 100)
}, init || BigInt(0)); },
init || BigInt(0),
);
} }
static rolePermission(roles: Role[]) { static rolePermission(roles: Role[]) {