mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-09 16:53:36 -05:00
Fix message links from search.
This commit is contained in:
parent
8872ed56b1
commit
63d2d1b760
5 changed files with 44 additions and 3 deletions
2
external/lang
vendored
2
external/lang
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 0f98b07eb411ec5a9207536f6adc5aa8055e755e
|
||||
Subproject commit e03c9f3a9ef39b6d93a5890a3ee1a64cfb1ffec4
|
|
@ -298,10 +298,10 @@ function Search({ channel }: { channel: Channel }) {
|
|||
{results.map((message) => {
|
||||
let href = "";
|
||||
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 (
|
||||
<Link to={href}>
|
||||
|
|
18
src/globals.d.ts
vendored
Normal file
18
src/globals.d.ts
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
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 {
|
|||
Sync as SyncIcon,
|
||||
Globe,
|
||||
LogOut,
|
||||
Desktop,
|
||||
} from "@styled-icons/boxicons-regular";
|
||||
import {
|
||||
Bell,
|
||||
|
@ -38,6 +39,7 @@ import { Appearance } from "./panes/Appearance";
|
|||
import { ExperimentsPage } from "./panes/Experiments";
|
||||
import { Feedback } from "./panes/Feedback";
|
||||
import { Languages } from "./panes/Languages";
|
||||
import { Native } from "./panes/Native";
|
||||
import { Notifications } from "./panes/Notifications";
|
||||
import { Profile } from "./panes/Profile";
|
||||
import { Sessions } from "./panes/Sessions";
|
||||
|
@ -100,6 +102,11 @@ export default function Settings() {
|
|||
icon: <SyncIcon size={20} />,
|
||||
title: <Text id="app.settings.pages.sync.title" />,
|
||||
},
|
||||
{
|
||||
id: "native",
|
||||
icon: <Desktop size={20} />,
|
||||
title: <Text id="app.settings.pages.native.title" />,
|
||||
},
|
||||
{
|
||||
divider: true,
|
||||
id: "experiments",
|
||||
|
@ -133,6 +140,11 @@ export default function Settings() {
|
|||
<Route path="/settings/sync">
|
||||
<Sync />
|
||||
</Route>,
|
||||
window.isNative && (
|
||||
<Route path="/settings/native">
|
||||
<Native />
|
||||
</Route>
|
||||
),
|
||||
<Route path="/settings/experiments">
|
||||
<ExperimentsPage />
|
||||
</Route>,
|
||||
|
|
11
src/pages/settings/panes/Native.tsx
Normal file
11
src/pages/settings/panes/Native.tsx
Normal file
|
@ -0,0 +1,11 @@
|
|||
import { SyncOptions } from "../../../redux/reducers/sync";
|
||||
|
||||
import Checkbox from "../../../components/ui/Checkbox";
|
||||
|
||||
interface Props {
|
||||
options?: SyncOptions;
|
||||
}
|
||||
|
||||
export function Native(props: Props) {
|
||||
return <div></div>;
|
||||
}
|
Loading…
Reference in a new issue