mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 09:25:27 +00:00
2
external/components
vendored
2
external/components
vendored
Submodule external/components updated: ab0fc1af73...e79862b597
@@ -11,6 +11,7 @@ import { observer } from "mobx-react-lite";
|
|||||||
import { Message as MessageObject } from "revolt.js";
|
import { Message as MessageObject } from "revolt.js";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
|
|
||||||
|
import { Text } from "preact-i18n";
|
||||||
import { openContextMenu } from "preact-context-menu";
|
import { openContextMenu } from "preact-context-menu";
|
||||||
import { useEffect, useState } from "preact/hooks";
|
import { useEffect, useState } from "preact/hooks";
|
||||||
|
|
||||||
@@ -109,7 +110,7 @@ export const MessageOverlayBar = observer(
|
|||||||
return (
|
return (
|
||||||
<OverlayBar>
|
<OverlayBar>
|
||||||
{message.channel?.havePermission("SendMessage") && (
|
{message.channel?.havePermission("SendMessage") && (
|
||||||
<Tooltip content="Reply">
|
<Tooltip content={ <Text id="app.popover.message.reply" /> }>
|
||||||
<Entry
|
<Entry
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
internalEmit("ReplyBar", "add", message)
|
internalEmit("ReplyBar", "add", message)
|
||||||
@@ -125,7 +126,7 @@ export const MessageOverlayBar = observer(
|
|||||||
open={reactionsOpen}
|
open={reactionsOpen}
|
||||||
setOpen={setReactionsOpen}
|
setOpen={setReactionsOpen}
|
||||||
message={message}>
|
message={message}>
|
||||||
<Tooltip content="React">
|
<Tooltip content={ <Text id="app.popover.message.react" /> }>
|
||||||
<Entry>
|
<Entry>
|
||||||
<HappyBeaming size={18} />
|
<HappyBeaming size={18} />
|
||||||
</Entry>
|
</Entry>
|
||||||
@@ -134,7 +135,7 @@ export const MessageOverlayBar = observer(
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{isAuthor && (
|
{isAuthor && (
|
||||||
<Tooltip content="Edit">
|
<Tooltip content={ <Text id="app.popover.message.edit" /> }>
|
||||||
<Entry
|
<Entry
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
internalEmit(
|
internalEmit(
|
||||||
@@ -150,7 +151,7 @@ export const MessageOverlayBar = observer(
|
|||||||
{isAuthor ||
|
{isAuthor ||
|
||||||
(message.channel &&
|
(message.channel &&
|
||||||
message.channel.havePermission("ManageMessages")) ? (
|
message.channel.havePermission("ManageMessages")) ? (
|
||||||
<Tooltip content="Delete">
|
<Tooltip content={ <Text id="app.popover.message.delete" /> }>
|
||||||
<Entry
|
<Entry
|
||||||
onClick={(e) =>
|
onClick={(e) =>
|
||||||
e.shiftKey
|
e.shiftKey
|
||||||
@@ -164,7 +165,7 @@ export const MessageOverlayBar = observer(
|
|||||||
</Entry>
|
</Entry>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
) : undefined}
|
) : undefined}
|
||||||
<Tooltip content="More">
|
<Tooltip content={ <Text id="app.popover.message.more" /> }>
|
||||||
<Entry
|
<Entry
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
openContextMenu("Menu", {
|
openContextMenu("Menu", {
|
||||||
@@ -179,7 +180,7 @@ export const MessageOverlayBar = observer(
|
|||||||
{extraActions && (
|
{extraActions && (
|
||||||
<>
|
<>
|
||||||
<Divider />
|
<Divider />
|
||||||
<Tooltip content="Mark as Unread">
|
<Tooltip content={ <Text id="app.popover.message.mark_unread" /> }>
|
||||||
<Entry
|
<Entry
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
// ! FIXME: deduplicate this code with ctx menu
|
// ! FIXME: deduplicate this code with ctx menu
|
||||||
@@ -207,7 +208,7 @@ export const MessageOverlayBar = observer(
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
content={
|
content={
|
||||||
copied === "link" ? "Copied!" : "Copy Link"
|
<Text id={`app.popover.message.${copied === "link" ? 'copied' : 'copy_link'}`} />
|
||||||
}
|
}
|
||||||
hideOnClick={false}>
|
hideOnClick={false}>
|
||||||
<Entry
|
<Entry
|
||||||
@@ -219,7 +220,9 @@ export const MessageOverlayBar = observer(
|
|||||||
</Entry>
|
</Entry>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
content={copied === "id" ? "Copied!" : "Copy ID"}
|
content={
|
||||||
|
<Text id={`app.popover.message.${copied === "id" ? 'copied' : 'copy_id'}`} />
|
||||||
|
}
|
||||||
hideOnClick={false}>
|
hideOnClick={false}>
|
||||||
<Entry
|
<Entry
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -130,14 +130,14 @@ export default function UserBadges({ badges, uid }: Props) {
|
|||||||
<></>
|
<></>
|
||||||
)}
|
)}
|
||||||
{badges & Badges.ReservedRelevantJokeBadge1 ? (
|
{badges & Badges.ReservedRelevantJokeBadge1 ? (
|
||||||
<Tooltip content="sus">
|
<Tooltip content={ <Text id="app.popover.user_profile.badges.sus" /> }>
|
||||||
<img src="/assets/badges/amog.svg" />
|
<img src="/assets/badges/amog.svg" />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
) : (
|
) : (
|
||||||
<></>
|
<></>
|
||||||
)}
|
)}
|
||||||
{badges & Badges.ReservedRelevantJokeBadge2 ? (
|
{badges & Badges.ReservedRelevantJokeBadge2 ? (
|
||||||
<Tooltip content="It's Morbin Time">
|
<Tooltip content={ <Text id="app.popover.user_profile.badges.morbin_time" /> }>
|
||||||
<img src="/assets/badges/amorbus.svg" />
|
<img src="/assets/badges/amorbus.svg" />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import styled from "styled-components";
|
|||||||
|
|
||||||
import { useCallback, useRef } from "preact/hooks";
|
import { useCallback, useRef } from "preact/hooks";
|
||||||
|
|
||||||
|
import { Localizer, Text } from "preact-i18n";
|
||||||
|
|
||||||
import { Tooltip } from "@revoltchat/ui";
|
import { Tooltip } from "@revoltchat/ui";
|
||||||
|
|
||||||
import { modalController } from "../../../controllers/modals/ModalController";
|
import { modalController } from "../../../controllers/modals/ModalController";
|
||||||
@@ -66,7 +68,7 @@ export const RenderCodeblock: React.FC<{ class: string }> = ({
|
|||||||
return (
|
return (
|
||||||
<Base ref={ref}>
|
<Base ref={ref}>
|
||||||
<Lang>
|
<Lang>
|
||||||
<Tooltip content="Copy to Clipboard" placement="top">
|
<Tooltip content={ <Text id="app.popover.misc.copy" /> } placement="top">
|
||||||
{/**
|
{/**
|
||||||
// @ts-expect-error Preact-React */}
|
// @ts-expect-error Preact-React */}
|
||||||
<a onClick={onCopy}>{text}</a>
|
<a onClick={onCopy}>{text}</a>
|
||||||
|
|||||||
@@ -141,20 +141,20 @@ export default observer(({ id }: Props) => {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="actions">
|
<div className="actions">
|
||||||
<Tooltip content={"Leave call"} placement={"top"}>
|
<Tooltip content={ <Text id="app.popover.voice.leave_call" /> } placement={"top"}>
|
||||||
<Button palette="error" onClick={voiceState.disconnect}>
|
<Button palette="error" onClick={voiceState.disconnect}>
|
||||||
<PhoneOff width={20} />
|
<PhoneOff width={20} />
|
||||||
</Button>
|
</Button>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
{voiceState.isProducing("audio") ? (
|
{voiceState.isProducing("audio") ? (
|
||||||
<Tooltip content={"Mute microphone"} placement={"top"}>
|
<Tooltip content={ <Text id="app.popover.voice.mute_self" /> } placement={"top"}>
|
||||||
<Button
|
<Button
|
||||||
onClick={() => voiceState.stopProducing("audio")}>
|
onClick={() => voiceState.stopProducing("audio")}>
|
||||||
<Microphone width={20} />
|
<Microphone width={20} />
|
||||||
</Button>
|
</Button>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
) : (
|
) : (
|
||||||
<Tooltip content={"Unmute microphone"} placement={"top"}>
|
<Tooltip content={ <Text id="app.popover.voice.unmute_self" /> } placement={"top"}>
|
||||||
<Button
|
<Button
|
||||||
onClick={() => voiceState.startProducing("audio")}>
|
onClick={() => voiceState.startProducing("audio")}>
|
||||||
<MicrophoneOff width={20} />
|
<MicrophoneOff width={20} />
|
||||||
@@ -162,13 +162,13 @@ export default observer(({ id }: Props) => {
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
{voiceState.isDeaf() ? (
|
{voiceState.isDeaf() ? (
|
||||||
<Tooltip content={"Undeafen"} placement={"top"}>
|
<Tooltip content={ <Text id="app.popover.voice.undeafen" /> } placement={"top"}>
|
||||||
<Button onClick={() => voiceState.stopDeafen()}>
|
<Button onClick={() => voiceState.stopDeafen()}>
|
||||||
<VolumeMute width={20} />
|
<VolumeMute width={20} />
|
||||||
</Button>
|
</Button>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
) : (
|
) : (
|
||||||
<Tooltip content={"Deafen"} placement={"top"}>
|
<Tooltip content={ <Text id="app.popover.voice.deafen" /> } placement={"top"}>
|
||||||
<Button onClick={() => voiceState.startDeafen()}>
|
<Button onClick={() => voiceState.startDeafen()}>
|
||||||
<VolumeFull width={20} />
|
<VolumeFull width={20} />
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ const Container = styled.div`
|
|||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
${() =>
|
${() =>
|
||||||
isTouchscreenDevice
|
isTouchscreenDevice
|
||||||
? css`
|
? css`
|
||||||
@@ -30,7 +29,6 @@ const Container = styled.div`
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|
||||||
padding-bottom: 50px;
|
padding-bottom: 50px;
|
||||||
background: var(--background);
|
background: var(--background);
|
||||||
`
|
`
|
||||||
@@ -41,7 +39,6 @@ const Container = styled.div`
|
|||||||
|
|
||||||
const Frame = styled.iframe<{ loaded: boolean }>`
|
const Frame = styled.iframe<{ loaded: boolean }>`
|
||||||
border: none;
|
border: none;
|
||||||
|
|
||||||
${() =>
|
${() =>
|
||||||
!isTouchscreenDevice &&
|
!isTouchscreenDevice &&
|
||||||
css`
|
css`
|
||||||
@@ -49,13 +46,11 @@ const Frame = styled.iframe<{ loaded: boolean }>`
|
|||||||
border-start-start-radius: 8px;
|
border-start-start-radius: 8px;
|
||||||
border-end-start-radius: 8px;
|
border-end-start-radius: 8px;
|
||||||
`}
|
`}
|
||||||
|
|
||||||
${() =>
|
${() =>
|
||||||
isTouchscreenDevice &&
|
isTouchscreenDevice &&
|
||||||
css`
|
css`
|
||||||
padding-top: 56px;
|
padding-top: 56px;
|
||||||
`}
|
`}
|
||||||
|
|
||||||
${(props) =>
|
${(props) =>
|
||||||
props.loaded
|
props.loaded
|
||||||
? css`
|
? css`
|
||||||
@@ -68,7 +63,6 @@ const Frame = styled.iframe<{ loaded: boolean }>`
|
|||||||
|
|
||||||
const Loader = styled.div`
|
const Loader = styled.div`
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
|
||||||
${() =>
|
${() =>
|
||||||
!isTouchscreenDevice &&
|
!isTouchscreenDevice &&
|
||||||
css`
|
css`
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ export default observer(() => {
|
|||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<div className={styles.divider} />*/}
|
<div className={styles.divider} />*/}
|
||||||
<Tooltip content={"Create Group"} placement="bottom">
|
<Tooltip content={ <Text id="app.popover.user_profile.friends.new_group" /> } placement="bottom">
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
modalController.push({
|
modalController.push({
|
||||||
@@ -88,7 +88,7 @@ export default observer(() => {
|
|||||||
<MessageAdd size={24} />
|
<MessageAdd size={24} />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip content={"Add Friend"} placement="bottom">
|
<Tooltip content={ <Text id="app.popover.user_profile.friends.add" /> } placement="bottom">
|
||||||
<IconButton
|
<IconButton
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
modalController.push({
|
modalController.push({
|
||||||
|
|||||||
@@ -182,6 +182,7 @@ export default observer(() => {
|
|||||||
</CategoryButton>
|
</CategoryButton>
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
{/* TODO: TRANSLATE */}
|
||||||
{isDecember && (
|
{isDecember && (
|
||||||
<a href="#" onClick={toggleSeasonalTheme}>
|
<a href="#" onClick={toggleSeasonalTheme}>
|
||||||
Turn {seasonalTheme ? "off" : "on"} homescreen
|
Turn {seasonalTheme ? "off" : "on"} homescreen
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { Check } from "@styled-icons/boxicons-regular";
|
|||||||
import { useParams } from "react-router-dom";
|
import { useParams } from "react-router-dom";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
|
|
||||||
|
import { Text } from "preact-i18n";
|
||||||
import { useEffect, useState } from "preact/hooks";
|
import { useEffect, useState } from "preact/hooks";
|
||||||
|
|
||||||
import { Modal, Preloader } from "@revoltchat/ui";
|
import { Modal, Preloader } from "@revoltchat/ui";
|
||||||
@@ -24,20 +25,24 @@ export default function ConfirmDelete() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
title={deleted ? "Confirmed deletion." : "Please wait..."}
|
title={
|
||||||
|
<Text id={`${
|
||||||
|
deleted
|
||||||
|
? 'app.special.modals.account.delete.confirmation'
|
||||||
|
: 'generic.please_wait'
|
||||||
|
}`} />
|
||||||
|
}
|
||||||
description={
|
description={
|
||||||
deleted ? (
|
deleted ? (
|
||||||
<>
|
<>
|
||||||
Your account will be deleted in 7 days.
|
<Text id="app.special.modals.account.delete.long.a" />{" "}
|
||||||
<br />
|
|
||||||
You may contact{" "}
|
|
||||||
<a href="mailto:contact@revolt.chat">
|
<a href="mailto:contact@revolt.chat">
|
||||||
Revolt support
|
<Text id="app.special.modals.account.delete.long.b" />
|
||||||
</a>{" "}
|
</a>{" "}
|
||||||
to cancel the request if you wish.
|
<Text id="app.special.modals.account.delete.long.c" />
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
"Contacting the server."
|
<Text id="generic.contacting_server" />
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
nonDismissable>
|
nonDismissable>
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export const CaptchaBlock = observer((props: CaptchaProps) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.captcha}>
|
<div className={styles.captcha}>
|
||||||
<div className={styles.title}>Are you human?</div>
|
<div className={styles.title}><Text id="login.captcha_title" /></div>
|
||||||
<div className={styles.checkbox}>
|
<div className={styles.checkbox}>
|
||||||
<HCaptcha
|
<HCaptcha
|
||||||
theme="dark"
|
theme="dark"
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ const BotBadge = styled.div`
|
|||||||
user-select: none;
|
user-select: none;
|
||||||
margin-inline-start: 2px;
|
margin-inline-start: 2px;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
|
|
||||||
color: var(--accent-contrast);
|
color: var(--accent-contrast);
|
||||||
background: var(--accent);
|
background: var(--accent);
|
||||||
border-radius: calc(var(--border-radius) / 2);
|
border-radius: calc(var(--border-radius) / 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user