Skip to content

Commit

Permalink
chore: add beta notice
Browse files Browse the repository at this point in the history
  • Loading branch information
insertish committed Mar 15, 2024
1 parent 04a2ddd commit 94a1665
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 22 deletions.
3 changes: 2 additions & 1 deletion components/common/lib/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ export default {
DEFAULT_API_URL:
(import.meta.env.DEV ? import.meta.env.VITE_DEV_API_URL : undefined) ??
(import.meta.env.VITE_API_URL as string) ??
"https://revolt.chat/api",
"http://local.revolt.chat:8000",
// "https://revolt.chat/api",
/**
* hCaptcha site key to use if enabled
*/
Expand Down
64 changes: 43 additions & 21 deletions packages/client/src/Interface.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,34 +54,56 @@ const Interface: Component = () => {
<Navigate href="/login" />
</Match>
<Match when={clientController.isReady()}>
<Layout
onDragOver={(e) => {
if (e.dataTransfer) e.dataTransfer.dropEffect = "none";
<div
style={{
display: "flex",
"flex-direction": "column",
height: "100%",
}}
onDrop={(e) => e.preventDefault()}
>
<Sidebar
menuGenerator={(target) => ({
contextMenu: () => {
return (
<>
{target instanceof Server ? (
<ServerContextMenu server={target} />
) : (
<ChannelContextMenu channel={target} />
)}
</>
);
},
})}
/>
<Content />
</Layout>
<Notice>⚠️ This is beta software, things will break!</Notice>
<Layout
style={{ "flex-grow": 1, "min-height": 0 }}
onDragOver={(e) => {
if (e.dataTransfer) e.dataTransfer.dropEffect = "none";
}}
onDrop={(e) => e.preventDefault()}
>
<Sidebar
menuGenerator={(target) => ({
contextMenu: () => {
return (
<>
{target instanceof Server ? (
<ServerContextMenu server={target} />
) : (
<ChannelContextMenu channel={target} />
)}
</>
);
},
})}
/>
<Content />
</Layout>
</div>
</Match>
</Switch>
);
};

const Notice = styled.div`
text-align: center;
font-size: 0.8em;
margin: ${(props) => props.theme!.gap.md} ${(props) => props.theme!.gap.md} 0
${(props) => props.theme!.gap.md};
padding: ${(props) => props.theme!.gap.md};
background: ${(props) =>
props.theme!.colours["messaging-message-box-background"]};
color: ${(props) => props.theme!.colours["messaging-message-box-foreground"]};
border-radius: ${(props) => props.theme!.borderRadius.md};
`;

/**
* Parent container
*/
Expand Down

0 comments on commit 94a1665

Please sign in to comment.