Skip to content
Snippets Groups Projects
Commit 63d2d1b7 authored by insert's avatar insert
Browse files

Fix message links from search.

parent 8872ed56
No related merge requests found
Subproject commit 0f98b07eb411ec5a9207536f6adc5aa8055e755e Subproject commit e03c9f3a9ef39b6d93a5890a3ee1a64cfb1ffec4
...@@ -298,10 +298,10 @@ function Search({ channel }: { channel: Channel }) { ...@@ -298,10 +298,10 @@ function Search({ channel }: { channel: Channel }) {
{results.map((message) => { {results.map((message) => {
let href = ""; let href = "";
if (channel?.channel_type === "TextChannel") { if (channel?.channel_type === "TextChannel") {
href += `/server/${channel.server}`; href += `/server/${channel.server_id}`;
} }
href += `/channel/${message.channel}/${message._id}`; href += `/channel/${message.channel_id}/${message._id}`;
return ( return (
<Link to={href}> <Link to={href}>
......
type Build = "stable" | "nightly" | "dev";
type NativeConfig = {
frame: boolean;
build: Build;
};
declare interface Window {
isNative?: boolean;
native: {
close();
reload();
getConfig(): NativeConfig;
setFrame(frame: boolean);
setBuild(build: Build);
};
}
...@@ -3,6 +3,7 @@ import { ...@@ -3,6 +3,7 @@ import {
Sync as SyncIcon, Sync as SyncIcon,
Globe, Globe,
LogOut, LogOut,
Desktop,
} from "@styled-icons/boxicons-regular"; } from "@styled-icons/boxicons-regular";
import { import {
Bell, Bell,
...@@ -38,6 +39,7 @@ import { Appearance } from "./panes/Appearance"; ...@@ -38,6 +39,7 @@ import { Appearance } from "./panes/Appearance";
import { ExperimentsPage } from "./panes/Experiments"; import { ExperimentsPage } from "./panes/Experiments";
import { Feedback } from "./panes/Feedback"; import { Feedback } from "./panes/Feedback";
import { Languages } from "./panes/Languages"; import { Languages } from "./panes/Languages";
import { Native } from "./panes/Native";
import { Notifications } from "./panes/Notifications"; import { Notifications } from "./panes/Notifications";
import { Profile } from "./panes/Profile"; import { Profile } from "./panes/Profile";
import { Sessions } from "./panes/Sessions"; import { Sessions } from "./panes/Sessions";
...@@ -100,6 +102,11 @@ export default function Settings() { ...@@ -100,6 +102,11 @@ export default function Settings() {
icon: <SyncIcon size={20} />, icon: <SyncIcon size={20} />,
title: <Text id="app.settings.pages.sync.title" />, title: <Text id="app.settings.pages.sync.title" />,
}, },
{
id: "native",
icon: <Desktop size={20} />,
title: <Text id="app.settings.pages.native.title" />,
},
{ {
divider: true, divider: true,
id: "experiments", id: "experiments",
...@@ -133,6 +140,11 @@ export default function Settings() { ...@@ -133,6 +140,11 @@ export default function Settings() {
<Route path="/settings/sync"> <Route path="/settings/sync">
<Sync /> <Sync />
</Route>, </Route>,
window.isNative && (
<Route path="/settings/native">
<Native />
</Route>
),
<Route path="/settings/experiments"> <Route path="/settings/experiments">
<ExperimentsPage /> <ExperimentsPage />
</Route>, </Route>,
......
import { SyncOptions } from "../../../redux/reducers/sync";
import Checkbox from "../../../components/ui/Checkbox";
interface Props {
options?: SyncOptions;
}
export function Native(props: Props) {
return <div></div>;
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment