mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-23 07:30:57 -05:00
Compare commits
5 commits
b2985ae155
...
35ca83c38f
Author | SHA1 | Date | |
---|---|---|---|
|
35ca83c38f | ||
|
cb6296a96e | ||
|
48a9d7d370 | ||
|
cd4d8eb96d | ||
|
ffee147aed |
15 changed files with 54 additions and 55 deletions
2
external/lang
vendored
2
external/lang
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 3195d642cd766cb62d34eb2a57ce3a09e775e91f
|
||||
Subproject commit 07f4343342c3d06a2b540db3bb14f598d745c09a
|
|
@ -119,7 +119,7 @@ export default function UserBadges({ badges, uid }: Props) {
|
|||
}}
|
||||
onClick={() => {
|
||||
window.open(
|
||||
"https://insrt.uk/donate",
|
||||
"https://wiki.revolt.chat/notes/project/financial-support/",
|
||||
"_blank",
|
||||
);
|
||||
}}
|
||||
|
|
|
@ -106,9 +106,9 @@ export default observer(() => {
|
|||
"scrollbar-thumb",
|
||||
"scrollbar-track",
|
||||
"status-online",
|
||||
"status-away",
|
||||
"status-idle",
|
||||
"status-focus",
|
||||
"status-busy",
|
||||
"status-streaming",
|
||||
"status-invisible",
|
||||
"success",
|
||||
"warning",
|
||||
|
|
|
@ -68,12 +68,11 @@ export function PermissionSelect({
|
|||
|
||||
return "Neutral";
|
||||
}
|
||||
if (Long.fromNumber(value).and(permission).eq(permission)) {
|
||||
return "Allow";
|
||||
}
|
||||
|
||||
return "Neutral";
|
||||
if (Long.fromNumber(value).and(permission).eq(permission)) {
|
||||
return "Allow";
|
||||
}
|
||||
|
||||
return "Neutral";
|
||||
}, [value]);
|
||||
|
||||
function onSwitch(state: State) {
|
||||
|
|
|
@ -30,10 +30,9 @@ export type Variables =
|
|||
| "tertiary-foreground"
|
||||
| "tooltip"
|
||||
| "status-online"
|
||||
| "status-away"
|
||||
| "status-idle"
|
||||
| "status-focus"
|
||||
| "status-busy"
|
||||
| "status-streaming"
|
||||
| "status-invisible";
|
||||
|
||||
// While this isn't used, it'd be good to keep this up to date as a reference or for future use
|
||||
|
@ -283,10 +282,9 @@ export const PRESETS: Record<string, Theme> = {
|
|||
"tertiary-background": "#4D4D4D",
|
||||
"tertiary-foreground": "#3a3a3a",
|
||||
"status-online": "#3ABF7E",
|
||||
"status-away": "#F39F00",
|
||||
"status-idle": "#F39F00",
|
||||
"status-focus": "#4799F0",
|
||||
"status-busy": "#F84848",
|
||||
"status-streaming": "#977EFF",
|
||||
"status-invisible": "#A5A5A5",
|
||||
},
|
||||
dark: {
|
||||
|
@ -311,10 +309,9 @@ export const PRESETS: Record<string, Theme> = {
|
|||
"tertiary-background": "#4D4D4D",
|
||||
"tertiary-foreground": "#848484",
|
||||
"status-online": "#3ABF7E",
|
||||
"status-away": "#F39F00",
|
||||
"status-idle": "#F39F00",
|
||||
"status-focus": "#4799F0",
|
||||
"status-busy": "#F84848",
|
||||
"status-streaming": "#977EFF",
|
||||
"status-invisible": "#A5A5A5",
|
||||
},
|
||||
};
|
||||
|
|
|
@ -10,7 +10,7 @@ export function takeError(error: any): string {
|
|||
case 429:
|
||||
return "TooManyRequests";
|
||||
case 401:
|
||||
return "Unauthorized"
|
||||
return "Unauthorized";
|
||||
case 403:
|
||||
return "Forbidden";
|
||||
default:
|
||||
|
|
|
@ -7,10 +7,10 @@ import { ModalForm } from "@revoltchat/ui";
|
|||
|
||||
import { noopAsync } from "../../../lib/js";
|
||||
|
||||
import { IS_REVOLT } from "../../../version";
|
||||
import { takeError } from "../../client/jsx/error";
|
||||
import { modalController } from "../ModalController";
|
||||
import { ModalProps } from "../types";
|
||||
import { IS_REVOLT } from "../../../version";
|
||||
|
||||
/**
|
||||
* Code block which displays invite
|
||||
|
@ -79,7 +79,9 @@ export default function CreateInvite({
|
|||
children: <Text id="app.context_menu.copy_link" />,
|
||||
onClick: () =>
|
||||
modalController.writeText(
|
||||
IS_REVOLT ? `https://rvlt.gg/${code}` : `${window.location.host}/invite/${code}`
|
||||
IS_REVOLT
|
||||
? `https://rvlt.gg/${code}`
|
||||
: `${window.location.host}/invite/${code}`,
|
||||
),
|
||||
},
|
||||
]}
|
||||
|
|
|
@ -2,29 +2,32 @@ import { ChevronRight, Trash } from "@styled-icons/boxicons-regular";
|
|||
import { Cog, UserVoice } from "@styled-icons/boxicons-solid";
|
||||
import { isFirefox } from "react-device-detect";
|
||||
import { useHistory } from "react-router-dom";
|
||||
import { Channel, Message, Server, User, API, Permission, UserPermission, Member } from "revolt.js";
|
||||
import {
|
||||
Channel,
|
||||
Message,
|
||||
Server,
|
||||
User,
|
||||
API,
|
||||
Permission,
|
||||
UserPermission,
|
||||
Member,
|
||||
} from "revolt.js";
|
||||
|
||||
|
||||
|
||||
import { ContextMenuWithData, MenuItem, openContextMenu } from "preact-context-menu";
|
||||
import {
|
||||
ContextMenuWithData,
|
||||
MenuItem,
|
||||
openContextMenu,
|
||||
} from "preact-context-menu";
|
||||
import { Text } from "preact-i18n";
|
||||
|
||||
|
||||
|
||||
import { Column, IconButton, LineDivider } from "@revoltchat/ui";
|
||||
|
||||
|
||||
|
||||
import { useApplicationState } from "../mobx/State";
|
||||
import { QueuedMessage } from "../mobx/stores/MessageQueue";
|
||||
import { NotificationState } from "../mobx/stores/NotificationOptions";
|
||||
|
||||
|
||||
|
||||
import CMNotifications from "./contextmenu/CMNotifications";
|
||||
|
||||
|
||||
|
||||
import Tooltip from "../components/common/Tooltip";
|
||||
import UserStatus from "../components/common/user/UserStatus";
|
||||
import { useSession } from "../controllers/client/ClientController";
|
||||
|
@ -33,7 +36,6 @@ import { modalController } from "../controllers/modals/ModalController";
|
|||
import { internalEmit } from "./eventEmitter";
|
||||
import { getRenderer } from "./renderer/Singleton";
|
||||
|
||||
|
||||
interface ContextMenuData {
|
||||
user?: string;
|
||||
server?: string;
|
||||
|
|
|
@ -83,10 +83,9 @@ export default class SAudio {
|
|||
if (this.cache.has(path)) {
|
||||
return this.cache.get(path)!;
|
||||
}
|
||||
const el = new Audio(path);
|
||||
this.cache.set(path, el);
|
||||
return el;
|
||||
|
||||
const el = new Audio(path);
|
||||
this.cache.set(path, el);
|
||||
return el;
|
||||
}
|
||||
|
||||
loadCache() {
|
||||
|
@ -100,7 +99,7 @@ export default class SAudio {
|
|||
try {
|
||||
audio.play();
|
||||
} catch (err) {
|
||||
console.error("Hit error while playing", `${sound }:`, err);
|
||||
console.error("Hit error while playing", `${sound}:`, err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -110,7 +110,7 @@ export default class STheme {
|
|||
for (const key of Object.keys(variables)) {
|
||||
const value = variables[key];
|
||||
if (typeof value === "string") {
|
||||
variables[`${key }-contrast`] = getContrastingColour(value);
|
||||
variables[`${key}-contrast`] = getContrastingColour(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ export default observer(() => {
|
|||
state.settings.set("appearance:seasonal", !seasonalTheme);
|
||||
|
||||
const isDecember = !isTouchscreenDevice && new Date().getMonth() === 11;
|
||||
const isOctober = !isTouchscreenDevice && new Date().getMonth() === 9
|
||||
const isOctober = !isTouchscreenDevice && new Date().getMonth() === 9;
|
||||
const snowflakes = useMemo(() => {
|
||||
const flakes: string[] = [];
|
||||
|
||||
|
@ -175,7 +175,7 @@ export default observer(() => {
|
|||
</CategoryButton>
|
||||
</Link>
|
||||
<a
|
||||
href="https://insrt.uk/donate"
|
||||
href="https://wiki.revolt.chat/notes/project/financial-support/"
|
||||
target="_blank"
|
||||
rel="noreferrer">
|
||||
<CategoryButton
|
||||
|
|
|
@ -281,7 +281,7 @@ export default observer(() => {
|
|||
</ButtonItem>
|
||||
</a>
|
||||
<a
|
||||
href="https://insrt.uk/donate"
|
||||
href="https://wiki.revolt.chat/notes/project/financial-support/"
|
||||
target="_blank"
|
||||
rel="noreferrer">
|
||||
<ButtonItem className={styles.donate} compact>
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
}
|
||||
|
||||
&.idle {
|
||||
background: var(--status-away);
|
||||
background: var(--status-idle);
|
||||
}
|
||||
|
||||
&.focus {
|
||||
|
|
|
@ -29,7 +29,7 @@ precacheAndRoute(
|
|||
}
|
||||
|
||||
for (const key of locale_keys) {
|
||||
if (fn.startsWith(`${key }.`)) {
|
||||
if (fn.startsWith(`${key}.`)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue