Skip to content

Commit 6a4e865

Browse files
authored
Merge pull request #22 from ArjinAlbay/claude/github-monitoring-dashboard-01SKTUW6fhsy4NBmdZLedZXH
Claude/GitHub monitoring dashboard
2 parents 3ad9f60 + fe242c1 commit 6a4e865

File tree

8 files changed

+1238
-69
lines changed

8 files changed

+1238
-69
lines changed

src/app/favorites/page.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { Layout } from "@/components/layout/Layout";
44
import { useRequireAuth } from "@/hooks/useAuth";
55
import { FavoritesList } from "@/components/widget/FavoritesList";
6+
import { ActivityFeed } from "@/components/widget/ActivityFeed";
67
import { Button } from "@/components/ui/button";
78
import { Settings, Star } from "lucide-react";
89
import Link from "next/link";
@@ -44,7 +45,14 @@ export default function FavoritesPage() {
4445
</Link>
4546
</div>
4647

47-
<FavoritesList />
48+
<div className="grid grid-cols-1 lg:grid-cols-3 gap-6">
49+
<div className="lg:col-span-2">
50+
<FavoritesList />
51+
</div>
52+
<div className="lg:col-span-1">
53+
<ActivityFeed />
54+
</div>
55+
</div>
4856
</div>
4957
</Layout>
5058
);

src/app/search/page.tsx

Lines changed: 98 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
SidebarToggle,
2222
} from "@/components/layout/SidebarSearch";
2323
import { useSearchStore, useSidebarState } from "@/stores";
24+
import { usePreferencesStore } from "@/stores/preferences";
2425
import { SearchModal } from "@/components/search/SearchModal";
2526
import { githubAPIClient } from "@/lib/api/github-api-client";
2627
import {
@@ -86,6 +87,8 @@ function SearchContent() {
8687
const repoParam = searchParams?.get("repo");
8788
const { setCurrentQuery, setCurrentSearchType, setSearchModalOpen } =
8889
useSearchStore();
90+
const { pinnedRepos, favoriteUsers, togglePinnedRepo, toggleFavoriteUser } =
91+
usePreferencesStore();
8992

9093
const [searchResults, setSearchResults] = useState<{
9194
repos: TrendingRepo[];
@@ -378,16 +381,40 @@ function SearchContent() {
378381
</p>
379382
)}
380383
</div>
381-
<Button asChild>
382-
<a
383-
href={userAnalytics.profile.html_url}
384-
target="_blank"
385-
rel="noopener noreferrer"
384+
<div className="flex gap-2">
385+
<Button
386+
variant={
387+
favoriteUsers.includes(userAnalytics.profile!.login)
388+
? "default"
389+
: "outline"
390+
}
391+
size="sm"
392+
onClick={() =>
393+
toggleFavoriteUser(userAnalytics.profile!.login)
394+
}
386395
>
387-
<ExternalLink className="w-4 h-4 mr-2" />
388-
View Profile
389-
</a>
390-
</Button>
396+
<Star
397+
className={`w-4 h-4 mr-2 ${
398+
favoriteUsers.includes(userAnalytics.profile!.login)
399+
? "fill-current"
400+
: ""
401+
}`}
402+
/>
403+
{favoriteUsers.includes(userAnalytics.profile!.login)
404+
? "Favorited"
405+
: "Add Favorite"}
406+
</Button>
407+
<Button asChild>
408+
<a
409+
href={userAnalytics.profile.html_url}
410+
target="_blank"
411+
rel="noopener noreferrer"
412+
>
413+
<ExternalLink className="w-4 h-4 mr-2" />
414+
View Profile
415+
</a>
416+
</Button>
417+
</div>
391418
</div>
392419
</CardContent>
393420
</Card>
@@ -424,16 +451,38 @@ function SearchContent() {
424451
<span>Followers: {user.followers_count}</span>
425452
</div>
426453
</div>
427-
<Button asChild>
428-
<a
429-
href={user.html_url}
430-
target="_blank"
431-
rel="noopener noreferrer"
454+
<div className="flex gap-2">
455+
<Button
456+
variant={
457+
favoriteUsers.includes(user.login)
458+
? "default"
459+
: "outline"
460+
}
461+
size="sm"
462+
onClick={() => toggleFavoriteUser(user.login)}
432463
>
433-
<ExternalLink className="w-4 h-4 mr-2" />
434-
View Profile
435-
</a>
436-
</Button>
464+
<Star
465+
className={`w-4 h-4 mr-2 ${
466+
favoriteUsers.includes(user.login)
467+
? "fill-current"
468+
: ""
469+
}`}
470+
/>
471+
{favoriteUsers.includes(user.login)
472+
? "Favorited"
473+
: "Add Favorite"}
474+
</Button>
475+
<Button asChild>
476+
<a
477+
href={user.html_url}
478+
target="_blank"
479+
rel="noopener noreferrer"
480+
>
481+
<ExternalLink className="w-4 h-4 mr-2" />
482+
View Profile
483+
</a>
484+
</Button>
485+
</div>
437486
</div>
438487
</CardContent>
439488
</Card>
@@ -927,16 +976,38 @@ function SearchContent() {
927976
</span>
928977
</div>
929978
</div>
930-
<Button asChild>
931-
<a
932-
href={repo.html_url}
933-
target="_blank"
934-
rel="noopener noreferrer"
979+
<div className="flex gap-2">
980+
<Button
981+
variant={
982+
pinnedRepos.includes(repo.full_name)
983+
? "default"
984+
: "outline"
985+
}
986+
size="sm"
987+
onClick={() => togglePinnedRepo(repo.full_name)}
935988
>
936-
<ExternalLink className="w-4 h-4 mr-2" />
937-
View Repo
938-
</a>
939-
</Button>
989+
<Star
990+
className={`w-4 h-4 mr-2 ${
991+
pinnedRepos.includes(repo.full_name)
992+
? "fill-current"
993+
: ""
994+
}`}
995+
/>
996+
{pinnedRepos.includes(repo.full_name)
997+
? "Pinned"
998+
: "Pin Repo"}
999+
</Button>
1000+
<Button asChild>
1001+
<a
1002+
href={repo.html_url}
1003+
target="_blank"
1004+
rel="noopener noreferrer"
1005+
>
1006+
<ExternalLink className="w-4 h-4 mr-2" />
1007+
View Repo
1008+
</a>
1009+
</Button>
1010+
</div>
9401011
</div>
9411012
</CardContent>
9421013
</Card>

src/app/settings/page.tsx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
88
import { useRequireAuth } from "@/hooks/useAuth";
99
import { ThemeSelector } from "@/components/theme/ThemeToggle";
1010
import { GitHubSettingsForm } from "@/components/settings/GitHubSettingsForm";
11-
import { Settings, Github, Palette } from "lucide-react";
11+
import { FavoritesSettings } from "@/components/settings/FavoritesSettings";
12+
import { Settings, Github, Palette, Star } from "lucide-react";
1213

1314
export default function SettingsPage() {
1415
const { isLoading } = useRequireAuth();
@@ -41,6 +42,11 @@ export default function SettingsPage() {
4142
GitHub
4243
</TabsTrigger>
4344

45+
<TabsTrigger value="favorites" className="flex items-center gap-2">
46+
<Star className="w-4 h-4" />
47+
Favorites
48+
</TabsTrigger>
49+
4450
<TabsTrigger value="appearance" className="flex items-center gap-2">
4551
<Palette className="w-4 h-4" />
4652
Appearance
@@ -53,6 +59,20 @@ export default function SettingsPage() {
5359
</CardContent>
5460
</TabsContent>
5561

62+
<TabsContent value="favorites" className="space-y-6">
63+
<Card>
64+
<CardHeader>
65+
<CardTitle className="flex items-center gap-2">
66+
<Star className="w-5 h-5" />
67+
Manage Favorites
68+
</CardTitle>
69+
</CardHeader>
70+
<CardContent>
71+
<FavoritesSettings />
72+
</CardContent>
73+
</Card>
74+
</TabsContent>
75+
5676
<TabsContent value="appearance" className="space-y-6">
5777
<Card>
5878
<CardHeader>

0 commit comments

Comments
 (0)