;
+ isMobile: boolean;
// define all stores
auth = new Auth(this);
@@ -99,6 +101,7 @@ export class State {
this.store = store as never;
this.setStore = setStore;
this.writeQueue = {};
+ this.isMobile = isMobileBrowser();
}
/**
diff --git a/packages/client/components/ui/components/features/messaging/composition/MessageBox.tsx b/packages/client/components/ui/components/features/messaging/composition/MessageBox.tsx
index 4a4c1df55..61f6e61b0 100644
--- a/packages/client/components/ui/components/features/messaging/composition/MessageBox.tsx
+++ b/packages/client/components/ui/components/features/messaging/composition/MessageBox.tsx
@@ -104,16 +104,6 @@ const Base = styled("div", {
display: "flex",
background: "var(--md-sys-color-surface-container-high)",
color: "var(--md-sys-color-on-surface)",
-
- "& .cm-content": {
- minWidth: 0
- },
- "& .cm-placeholder": {
- overflow: "hidden",
- textOverflow: "ellipsis",
- whiteSpace: "nowrap",
- width: "100%"
- }
},
variants: {
hasActionsAppend: {
diff --git a/packages/client/components/ui/components/features/messaging/elements/Container.tsx b/packages/client/components/ui/components/features/messaging/elements/Container.tsx
index 74e68851a..efa29157a 100644
--- a/packages/client/components/ui/components/features/messaging/elements/Container.tsx
+++ b/packages/client/components/ui/components/features/messaging/elements/Container.tsx
@@ -13,6 +13,7 @@ import {
Time,
} from "@revolt/ui/components/utils";
+import { useState } from "@revolt/state";
import { MessageToolbar } from "./MessageToolbar";
interface CommonProps {
@@ -307,6 +308,7 @@ const CompactInfo = styled(Row, {
*/
export function MessageContainer(props: Props) {
const { t } = useLingui();
+ const { isMobile } = useState();
return (
diff --git a/packages/client/components/ui/components/features/texteditor/TextEditor2.tsx b/packages/client/components/ui/components/features/texteditor/TextEditor2.tsx
index 045bb3b65..09679d212 100644
--- a/packages/client/components/ui/components/features/texteditor/TextEditor2.tsx
+++ b/packages/client/components/ui/components/features/texteditor/TextEditor2.tsx
@@ -8,6 +8,7 @@ import { css } from "styled-system/css";
import { AutoCompleteSearchSpace } from "../../utils/autoComplete";
+import { useState } from "@revolt/state";
import { codeMirrorAutoComplete } from "./codeMirrorAutoComplete";
import { isInFencedCodeBlock } from "./codeMirrorCommon";
import { smartLineWrapping } from "./codeMirrorLineWrap";
@@ -70,11 +71,12 @@ const placeholderCompartment = new Compartment();
* Text editor powered by CodeMirror
*/
export function TextEditor2(props: Props) {
+ const { isMobile } = useState();
const codeMirror = document.createElement("div");
codeMirror.className = editor;
//Custom CSS
- codeMirror.style.minWidth = '0';
+ codeMirror.style.minWidth = "0";
/**
* Handle 'Enter' key presses
@@ -82,7 +84,8 @@ export function TextEditor2(props: Props) {
*/
const enterKeymap = keymap.of([
{
- key: "Enter",
+ key: isMobile ? "Ctrl-Enter" : "Enter",
+ //TODO: This is not working right, mobile seems to not trigger the function
run: (view) => {
if (!props.onComplete) return false;
diff --git a/packages/client/components/ui/components/features/texteditor/codeMirrorLineWrap.ts b/packages/client/components/ui/components/features/texteditor/codeMirrorLineWrap.ts
index 428e376fc..d8e9fdae4 100644
--- a/packages/client/components/ui/components/features/texteditor/codeMirrorLineWrap.ts
+++ b/packages/client/components/ui/components/features/texteditor/codeMirrorLineWrap.ts
@@ -155,18 +155,27 @@ const lineWrapStyles = EditorView.theme({
".cm-line.linewrap-indent": {
// The tiny offset appears to make the indent more reliable,
// for unknown reasons.
- "text-indent": "calc(-1 * var(--indented) - 0.1px)",
- "padding-left": "calc(var(--indented) + var(--cm-left-padding, 4px))",
+ textIndent: "calc(-1 * var(--indented) - 0.1px)",
+ paddingLeft: "calc(var(--indented) + var(--cm-left-padding, 4px))",
},
".linewrap-whitespace": {
- "font-family": "monospace, monospace",
+ fontFamily: "monospace, monospace",
// Prevent slightly-oversided monospace fonts from changing line heights
// when indented, but also changes the height of lines with only whitespace...
- // "font-size": "0.9em",
+ // fontSize: ".9em",
},
".cm-line > *": {
- "text-indent": "0",
+ textIndent: 0,
},
+ ".cm-content": {
+ minWidth: 0
+ },
+ ".cm-placeholder": {
+ overflow: "hidden",
+ textOverflow: "ellipsis",
+ whiteSpace: "nowrap",
+ width: "100%"
+ }
});
export const smartLineWrapping = [
diff --git a/packages/client/src/interface/navigation/channels/HomeSidebar.tsx b/packages/client/src/interface/navigation/channels/HomeSidebar.tsx
index de8579e53..fbfb8dbb0 100644
--- a/packages/client/src/interface/navigation/channels/HomeSidebar.tsx
+++ b/packages/client/src/interface/navigation/channels/HomeSidebar.tsx
@@ -25,6 +25,7 @@ import { Symbol } from "@revolt/ui/components/utils/Symbol";
import MdClose from "@material-design-icons/svg/outlined/close.svg?component-solid";
+import { useState } from "@revolt/state";
import { SidebarBase } from "./common";
interface Props {
@@ -55,6 +56,7 @@ export const HomeSidebar = (props: Props) => {
const navigate = useNavigate();
const location = useLocation();
const { openModal } = useModals();
+ const { isMobile } = useState();
const savedNotesChannelId = createMemo(() => props.openSavedNotes());
@@ -186,6 +188,7 @@ export const HomeSidebar = (props: Props) => {
style={item.style}
channel={item.item}
active={item.item.id === props.channelId}
+ isMobile={isMobile}
/>
)}
@@ -261,12 +264,12 @@ const NameStatusStack = styled("div", {
* Single conversation entry
*/
function Entry(
- props: { channel: Channel; active: boolean } /*& Omit<
+ props: { channel: Channel; active: boolean; isMobile: boolean } /*& Omit<
ComponentProps,
"href"
>*/,
) {
- const [local, remote] = splitProps(props, ["channel", "active"]);
+ const [local, remote] = splitProps(props, ["channel", "active", "isMobile"]);
const { t } = useLingui();
const { openModal } = useModals();
@@ -331,17 +334,19 @@ function Entry(
}
actions={
- {
- e.preventDefault();
- openModal({
- type: "delete_channel",
- channel: local.channel,
- });
- }}
- >
-
-
+
+ {
+ e.preventDefault();
+ openModal({
+ type: "delete_channel",
+ channel: local.channel,
+ });
+ }}
+ >
+
+
+
}
use:floating={{
contextMenu: () =>
diff --git a/packages/client/src/interface/navigation/channels/ServerSidebar.tsx b/packages/client/src/interface/navigation/channels/ServerSidebar.tsx
index 2b0b857ee..507cc8ecc 100644
--- a/packages/client/src/interface/navigation/channels/ServerSidebar.tsx
+++ b/packages/client/src/interface/navigation/channels/ServerSidebar.tsx
@@ -112,9 +112,7 @@ export const ServerSidebar = (props: Props) => {
// TODO: we want it to feel smooth when navigating through channels, so we'll want to select channels immediately but not actually navigate until we're done moving through them
/** Navigates to the channel offset from the current one, wrapping around if needed */
const _navigateChannel = (byOffset: number) => {
- if (props.channelId == null) {
- return;
- }
+ if (props.channelId == null) return;
const channels = visibleChannels();
@@ -510,7 +508,7 @@ function Entry(
>
}
actions={
- <>
+
-
- >
+
}
>
From 54ea8eb7cd4d34239d0b5c711ff61642b6c85754 Mon Sep 17 00:00:00 2001
From: Pecacheu <3608878+Pecacheu@users.noreply.github.com>
Date: Sat, 14 Feb 2026 23:22:17 -0500
Subject: [PATCH 04/24] fix: Add back button to Channel & Server settings
Signed-off-by: Pecacheu <3608878+Pecacheu@users.noreply.github.com>
---
.../components/app/interface/settings/ChannelSettings.tsx | 4 +++-
.../components/app/interface/settings/ServerSettings.tsx | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/packages/client/components/app/interface/settings/ChannelSettings.tsx b/packages/client/components/app/interface/settings/ChannelSettings.tsx
index d00fa6937..9b39b37e7 100644
--- a/packages/client/components/app/interface/settings/ChannelSettings.tsx
+++ b/packages/client/components/app/interface/settings/ChannelSettings.tsx
@@ -19,6 +19,7 @@ import { ChannelPermissionsEditor } from "./channel/permissions/ChannelPermissio
import { ChannelPermissionsOverview } from "./channel/permissions/ChannelPermissionsOverview";
import { ViewWebhook } from "./channel/webhooks/ViewWebhook";
import { WebhooksList } from "./channel/webhooks/WebhooksList";
+import { BackCard } from "./user/_AccountCard";
const Config: SettingsConfiguration = {
/**
@@ -98,11 +99,12 @@ const Config: SettingsConfiguration = {
* Generate list of categories / entries for channel settings
* @returns List
*/
- list(channel) {
+ list(channel, onClose) {
const { openModal } = useModals();
return {
context: channel,
+ prepend: ,
entries: [
{
title: ,
diff --git a/packages/client/components/app/interface/settings/ServerSettings.tsx b/packages/client/components/app/interface/settings/ServerSettings.tsx
index c7b48002e..28d880332 100644
--- a/packages/client/components/app/interface/settings/ServerSettings.tsx
+++ b/packages/client/components/app/interface/settings/ServerSettings.tsx
@@ -24,6 +24,7 @@ import { EmojiList } from "./server/emojis/EmojiList";
import { ListServerInvites } from "./server/invites/ListServerInvites";
import { ServerRoleEditor } from "./server/roles/ServerRoleEditor";
import { ServerRoleOverview } from "./server/roles/ServerRoleOverview";
+import { BackCard } from "./user/_AccountCard";
const Config: SettingsConfiguration = {
/**
@@ -89,12 +90,13 @@ const Config: SettingsConfiguration = {
* Generate list of categories / entries for server settings
* @returns List
*/
- list(server) {
+ list(server, onClose) {
const user = useUser();
const { openModal } = useModals();
return {
context: server,
+ prepend: ,
entries: [
{
title: ,
From 7c009fc50ba409286724d48d34f1f3497a1973de Mon Sep 17 00:00:00 2001
From: Pecacheu <3608878+Pecacheu@users.noreply.github.com>
Date: Sun, 15 Feb 2026 14:59:32 -0500
Subject: [PATCH 05/24] fix: Simplified CSS - Found a better spot to put the
@media query so that it's all in one place for easier maintence - Hide
breadcrums at top in "My Account" panel to fix visual bug where there's still
a gap there despite no title - Center ESC button text properly
Signed-off-by: Pecacheu <3608878+Pecacheu@users.noreply.github.com>
---
.../interface/settings/_layout/Content.tsx | 34 ++++++++-----------
.../interface/settings/_layout/Sidebar.tsx | 6 +---
.../settings/_layout/SidebarButton.tsx | 7 ----
.../interface/settings/user/_AccountCard.tsx | 8 ++---
.../components/modal/modals/Settings.tsx | 31 ++++++++++++-----
5 files changed, 40 insertions(+), 46 deletions(-)
diff --git a/packages/client/components/app/interface/settings/_layout/Content.tsx b/packages/client/components/app/interface/settings/_layout/Content.tsx
index adf17a331..efe91ef8c 100644
--- a/packages/client/components/app/interface/settings/_layout/Content.tsx
+++ b/packages/client/components/app/interface/settings/_layout/Content.tsx
@@ -29,24 +29,26 @@ export function SettingsContent(props: {
}}
>
-
+
-
-
- props.title(props.list() as SettingsList, key)
- }
- navigate={(keys) => navigate(keys.join("/"))}
- />
-
+
+
+
+ props.title(props.list() as SettingsList, key)
+ }
+ navigate={(keys) => navigate(keys.join("/"))}
+ />
+
+
{props.children}
-
+
@@ -88,10 +90,6 @@ const InnerContent = styled("div", {
padding: "80px 32px",
justifyContent: "stretch",
zIndex: 1,
-
- "@media (max-width: 800px)": {
- padding: "12px"
- }
},
});
@@ -125,14 +123,10 @@ const CloseAction = styled("div", {
marginTop: "4px",
display: "flex",
justifyContent: "center",
- width: "36px",
+ width: "40px",
fontWeight: 600,
color: "var(--md-sys-color-on-surface)",
fontSize: "0.75rem",
},
-
- "@media (max-width: 800px)": {
- display: "none"
- }
},
});
diff --git a/packages/client/components/app/interface/settings/_layout/Sidebar.tsx b/packages/client/components/app/interface/settings/_layout/Sidebar.tsx
index 3aa3f0879..c366dbf08 100644
--- a/packages/client/components/app/interface/settings/_layout/Sidebar.tsx
+++ b/packages/client/components/app/interface/settings/_layout/Sidebar.tsx
@@ -38,7 +38,7 @@ export function SettingsSidebar(props: {
return (
-
+
);
}
+
+const Base = styled(Motion.div, {
+ base: {
+ height: "100%",
+ pointerEvents: "all",
+ display: "flex",
+ color: "var(--md-sys-color-on-surface)",
+ background: "var(--md-sys-color-surface-container-highest)",
+
+ //Tablet view
+ "& .setMobileBack": { display: "none" },
+ "@media (max-width: 800px)": {
+ "& .setCont": { padding: "12px" },
+ "& .setSidebar": { padding: "12px 0" },
+ "& .setClose": { display: "none" },
+ "& .setMobileBack": { display: "flex" },
+ },
+ },
+});
From eef94606d83a5f482dbe180ed08f0d280815a18e Mon Sep 17 00:00:00 2001
From: Pecacheu <3608878+Pecacheu@users.noreply.github.com>
Date: Mon, 16 Feb 2026 01:15:22 -0500
Subject: [PATCH 06/24] fix: Move the CSS again & misc - I swear this is the
last time lol. Now using classes for everything instead of just some of it,
will also help with changes for phone view - Change threshold for tablet view
to 900px - Fix modal button touch event prorogation bug causing touches to
glitch through as it closes
Signed-off-by: Pecacheu <3608878+Pecacheu@users.noreply.github.com>
---
.../interface/settings/_layout/Content.tsx | 6 +---
.../interface/settings/_layout/Sidebar.tsx | 3 +-
.../components/modal/modals/Settings.tsx | 25 ++------------
.../ui/components/design/Button.tsx | 8 +++++
.../ui/components/design/IconButton.tsx | 8 +++++
packages/client/components/ui/styles.css | 33 +++++++++++++++++--
packages/client/src/Interface.tsx | 12 ++-----
packages/client/src/interface/Sidebar.tsx | 2 +-
.../navigation/channels/HomeSidebar.tsx | 2 +-
.../navigation/channels/ServerSidebar.tsx | 5 ++-
10 files changed, 61 insertions(+), 43 deletions(-)
diff --git a/packages/client/components/app/interface/settings/_layout/Content.tsx b/packages/client/components/app/interface/settings/_layout/Content.tsx
index efe91ef8c..d1bbce27a 100644
--- a/packages/client/components/app/interface/settings/_layout/Content.tsx
+++ b/packages/client/components/app/interface/settings/_layout/Content.tsx
@@ -23,11 +23,7 @@ export function SettingsContent(props: {
const { navigate } = useSettingsNavigation();
return (
-
+
diff --git a/packages/client/components/app/interface/settings/_layout/Sidebar.tsx b/packages/client/components/app/interface/settings/_layout/Sidebar.tsx
index c366dbf08..1635b0a73 100644
--- a/packages/client/components/app/interface/settings/_layout/Sidebar.tsx
+++ b/packages/client/components/app/interface/settings/_layout/Sidebar.tsx
@@ -36,7 +36,7 @@ export function SettingsSidebar(props: {
});
return (
-
+
);
}
-
-const Base = styled(Motion.div, {
- base: {
- height: "100%",
- pointerEvents: "all",
- display: "flex",
- color: "var(--md-sys-color-on-surface)",
- background: "var(--md-sys-color-surface-container-highest)",
-
- //Tablet view
- "& .setMobileBack": { display: "none" },
- "@media (max-width: 800px)": {
- "& .setCont": { padding: "12px" },
- "& .setSidebar": { padding: "12px 0" },
- "& .setClose": { display: "none" },
- "& .setMobileBack": { display: "flex" },
- },
- },
-});
diff --git a/packages/client/components/ui/components/design/Button.tsx b/packages/client/components/ui/components/design/Button.tsx
index c142304a0..e75dac45e 100644
--- a/packages/client/components/ui/components/design/Button.tsx
+++ b/packages/client/components/ui/components/design/Button.tsx
@@ -119,10 +119,18 @@ export function Button(props: Props) {
);
const { buttonProps } = createButton(rest, () => ref);
+
+ function stopProp(e: TouchEvent) {
+ e.preventDefault();
+ e.stopPropagation();
+ }
+
return (