Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Commit

Permalink
move to swc, fetch commit stuff from github, nicer apps cards, no lam…
Browse files Browse the repository at this point in the history
…e layouts, bump version, remove css classes, add theme
  • Loading branch information
IncognitoTGT committed Mar 28, 2024
1 parent 90a5ead commit 498e78e
Show file tree
Hide file tree
Showing 17 changed files with 434 additions and 288 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ephemeral",
"private": true,
"version": "0.8.0",
"version": "0.9.0",
"type": "module",
"scripts": {
"preinstall": "npx only-allow pnpm",
Expand Down Expand Up @@ -33,7 +33,6 @@
"@titaniumnetwork-dev/ultraviolet": "^3.0.0",
"@types/express": "^4.17.21",
"@types/react-router-dom": "^5.3.3",
"@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.17",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
Expand Down Expand Up @@ -71,6 +70,7 @@
"@types/react-helmet": "^6.1.11",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^6.21.0",
"@vitejs/plugin-react-swc": "^3.6.0",
"eslint": "^8.57.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
Expand Down
207 changes: 134 additions & 73 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 3 additions & 27 deletions src/layout.tsx → src/components/layout-components.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import React from "react";
import Meta from "@/components/Meta";
import { Toaster } from "@/components/ui/toaster";
import { Link, useNavigate, useLocation, Outlet } from "react-router-dom";
import { Link, useNavigate } from "react-router-dom";
import { LucideHome, Settings, LayoutGrid, CircleDashed } from "lucide-react";
import {
NavigationMenu,
Expand Down Expand Up @@ -29,7 +27,7 @@ const links: {
{ href: "/apps", text: "Apps", icon: <LayoutGrid /> },
{ href: "/settings", text: "Settings", icon: <Settings /> },
];
function CommandBox() {
export function CommandBox() {
const [open, setOpen] = React.useState(false);
const navigate = useNavigate();
React.useEffect(() => {
Expand Down Expand Up @@ -69,7 +67,7 @@ function CommandBox() {
</CommandDialog>
);
}
function Navbar() {
export function Navbar() {
return (
<div className="flex justify-between">
<div className={`p-5 text-2xl font-bold text-foreground`}>
Expand Down Expand Up @@ -102,25 +100,3 @@ function Navbar() {
</div>
);
}
export default function Layout() {
const location = useLocation();
const shouldDisplayNavbar =
(!location.pathname.startsWith("/view/") &&
!location.pathname.startsWith("/~/")) ||
location.pathname == "/view/";

return (
<main className="h-full">
{window.location.origin === "https://ephemeral.incognitotgt.me" && (
<Meta />
)}
{window.location.origin === "http://localhost:5173" && <Meta />}
<div className="h-full bg-background text-foreground">
<Toaster />
{shouldDisplayNavbar && <Navbar />}
<CommandBox />
<Outlet />
</div>
</main>
);
}
7 changes: 2 additions & 5 deletions src/components/mode-toggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import {
TooltipTrigger,
} from "@/components/ui/tooltip";

import { useTheme, themes } from "@/components/theme-provider";
import { useTheme } from "@/components/theme-provider";

export function ModeToggle({ text }: { text?: string }) {
const { setTheme } = useTheme();
const { setTheme, themes } = useTheme();
return (
<DropdownMenu>
<TooltipProvider>
Expand All @@ -46,9 +46,6 @@ export function ModeToggle({ text }: { text?: string }) {
{theme.charAt(0).toUpperCase() + theme.slice(1)}
</DropdownMenuItem>
))}
<DropdownMenuItem onClick={() => setTheme("system")}>
System
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
);
Expand Down
Loading

0 comments on commit 498e78e

Please sign in to comment.