-
-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into bookmark-embeddings
- Loading branch information
Showing
136 changed files
with
9,107 additions
and
1,272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ README.md | |
**/*.db | ||
**/.env* | ||
.git | ||
./data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Publish CLI Package to npm | ||
on: | ||
push: | ||
tags: | ||
# This is a glob pattern not a regex | ||
- 'sdk/v[0-9]+.[0-9]+.[0-9]+' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup | ||
uses: ./tooling/github/setup | ||
|
||
- name: Build SDK | ||
run: pnpm build | ||
working-directory: packages/sdk | ||
|
||
- run: pnpm publish --access public --no-git-checks | ||
working-directory: packages/sdk | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import AdminActions from "@/components/admin/AdminActions"; | ||
|
||
export default function AdminActionsPage() { | ||
return <AdminActions />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { redirect } from "next/navigation"; | ||
import { AdminCard } from "@/components/admin/AdminCard"; | ||
import { AdminNotices } from "@/components/admin/AdminNotices"; | ||
import MobileSidebar from "@/components/shared/sidebar/MobileSidebar"; | ||
import Sidebar from "@/components/shared/sidebar/Sidebar"; | ||
import SidebarLayout from "@/components/shared/sidebar/SidebarLayout"; | ||
import { getServerAuthSession } from "@/server/auth"; | ||
import { TFunction } from "i18next"; | ||
import { Activity, ArrowLeft, Settings, Users } from "lucide-react"; | ||
|
||
const adminSidebarItems = ( | ||
t: TFunction, | ||
): { | ||
name: string; | ||
icon: JSX.Element; | ||
path: string; | ||
}[] => [ | ||
{ | ||
name: t("settings.back_to_app"), | ||
icon: <ArrowLeft size={18} />, | ||
path: "/dashboard/bookmarks", | ||
}, | ||
{ | ||
name: t("admin.server_stats.server_stats"), | ||
icon: <Activity size={18} />, | ||
path: "/admin/overview", | ||
}, | ||
{ | ||
name: t("admin.users_list.users_list"), | ||
icon: <Users size={18} />, | ||
path: "/admin/users", | ||
}, | ||
{ | ||
name: t("common.actions"), | ||
icon: <Settings size={18} />, | ||
path: "/admin/actions", | ||
}, | ||
]; | ||
|
||
export default async function AdminLayout({ | ||
children, | ||
}: Readonly<{ | ||
children: React.ReactNode; | ||
}>) { | ||
const session = await getServerAuthSession(); | ||
if (!session || session.user.role !== "admin") { | ||
redirect("/"); | ||
} | ||
|
||
return ( | ||
<SidebarLayout | ||
sidebar={<Sidebar items={adminSidebarItems} />} | ||
mobileSidebar={<MobileSidebar items={adminSidebarItems} />} | ||
> | ||
<div className="flex flex-col gap-1"> | ||
<AdminNotices /> | ||
<AdminCard>{children}</AdminCard> | ||
</div> | ||
</SidebarLayout> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import ServerStats from "@/components/admin/ServerStats"; | ||
|
||
export default function AdminOverviewPage() { | ||
return <ServerStats />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { redirect } from "next/navigation"; | ||
|
||
export default function AdminHomepage() { | ||
redirect("/admin/overview"); | ||
return null; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import UserList from "@/components/admin/UserList"; | ||
|
||
export default function AdminUsersPage() { | ||
return <UserList />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.