Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions apps/web/public/changelog-embed.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Changelog</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: transparent;
min-height: 100vh;
}
</style>
<link rel="stylesheet" href="https://autochangelog.com/fonts/fontawesome.css">
<link rel="stylesheet" href="https://autochangelog.com/stylesheets/prism.css">
<link rel="stylesheet" href="https://autochangelog.com/stylesheets/prism-custom.css">
</head>
<body>
<script src="https://autochangelog.com/javascripts/prism-bundle.min.js"></script>
<script src="https://autochangelog.com/embed/opentech1/openchat.js"></script>
<style>
@media (max-width: 480px) {
#autochangelog-widget {
padding: 0 !important;
}
#autochangelog-widget > div {
padding: 1rem !important;
}
}
</style>
</body>
</html>
41 changes: 41 additions & 0 deletions apps/web/src/components/changelog-button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { useState } from "react";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { MegaphoneIcon, ExternalLinkIcon } from "lucide-react";

export function ChangelogButton() {
const [isOpen, setIsOpen] = useState(false);

return (
<DropdownMenu open={isOpen} onOpenChange={setIsOpen}>
<DropdownMenuTrigger className="relative inline-flex items-center justify-center size-9 rounded-md text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors">
<MegaphoneIcon className="size-4" />
</DropdownMenuTrigger>
<DropdownMenuContent
align="end"
className="w-[calc(100vw-2rem)] max-w-[420px] p-0 overflow-hidden"
>
<div className="flex items-center justify-between px-4 py-2 border-b bg-muted/30 shrink-0">
<span className="text-sm font-medium">What's New</span>
<a
href="https://updates.osschat.dev"
target="_blank"
rel="noopener noreferrer"
className="inline-flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground"
>
View all
<ExternalLinkIcon className="size-3" />
</a>
</div>
<iframe
src="/changelog-embed.html"
className="w-full h-[60vh] min-h-[400px] max-h-[70vh] border-0 block"
title="Changelog"
/>
</DropdownMenuContent>
</DropdownMenu>
);
}
6 changes: 5 additions & 1 deletion apps/web/src/routes/__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { AppSidebar } from "../components/app-sidebar";
import { useAuth } from "../lib/auth-client";
import { usePostHogPageView } from "../providers/posthog";
import { convexClient } from "../lib/convex";
import { ChangelogButton } from "../components/changelog-button";

import appCss from "../styles.css?url";

Expand Down Expand Up @@ -100,7 +101,10 @@ function AppShell() {
<SidebarProvider>
<div className="flex h-screen w-full bg-sidebar">
<AppSidebar />
<SidebarInset>
<SidebarInset className="relative">
<div className="absolute top-3 right-3 z-10">
<ChangelogButton />
</div>
<Outlet />
</SidebarInset>
</div>
Expand Down
6 changes: 5 additions & 1 deletion apps/web/src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { createFileRoute, Link } from "@tanstack/react-router";
import { useAuth } from "../lib/auth-client";
import { Button } from "../components/ui/button";
import { ChatInterface } from "../components/chat-interface";
import { ChangelogButton } from "../components/changelog-button";
import { convexClient } from "../lib/convex";

export const Route = createFileRoute("/")({
Expand All @@ -17,7 +18,10 @@ function HomePage() {

if (!isAuthenticated) {
return (
<div className="flex h-full flex-col items-center justify-center gap-6 p-8">
<div className="relative flex h-full flex-col items-center justify-center gap-6 p-8">
<div className="absolute top-4 right-4">
<ChangelogButton />
</div>
<h1 className="text-4xl font-bold tracking-tight">osschat</h1>
<p className="text-muted-foreground">Open source AI chat powered by OpenRouter</p>
<Link to="/auth/sign-in">
Expand Down
Loading