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
4 changes: 2 additions & 2 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Routes, Route } from 'react-router-dom';
import AppLayout from './components/Layout/AppLayout';
import ProtectedRoute from './components/Auth/ProtectedRoute';
import Dashboard from './pages/Dashboard';
import Feed from './pages/Feed';
import CategoryPage from './pages/CategoryPage';
import BookmarksPage from './pages/BookmarksPage';
import ArticlePage from './pages/ArticlePage';
Expand All @@ -20,7 +20,7 @@ function App() {
<Route path="/verify-email" element={<VerifyEmailPage />} />
<Route element={<ProtectedRoute />}>
<Route element={<AppLayout />}>
<Route path="/" element={<Dashboard />} />
<Route path="/" element={<Feed />} />
<Route path="/articles/:id" element={<ArticlePage />} />
<Route path="/feeds" element={<FeedManagementPage />} />
<Route path="/categories/:id" element={<CategoryPage />} />
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Layout/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default function Sidebar({
};

const navItems = [
{ label: t('nav.dashboard'), icon: <HomeIcon />, path: '/' },
{ label: t('nav.feed'), icon: <HomeIcon />, path: '/' },
{ label: t('nav.feeds'), icon: <RssFeedIcon />, path: '/feeds' },
{ label: t('nav.bookmarks'), icon: <BookmarkIcon />, path: '/bookmarks' },
];
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"never": "Never"
},
"nav": {
"dashboard": "Dashboard",
"feed": "Inbox",
"feeds": "Feeds",
"bookmarks": "Bookmarks",
"categories": "Categories",
Expand Down Expand Up @@ -48,8 +48,8 @@
"resendButton": "Resend verification email",
"backToSignIn": "Back to sign in"
},
"dashboard": {
"title": "Dashboard",
"feed": {
"title": "Inbox",
"unread": "{{count}} unread",
"addCategory": "Category",
"addFeed": "Add Feed",
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"never": "Jamais"
},
"nav": {
"dashboard": "Tableau de bord",
"feed": "Inbox",
"feeds": "Flux",
"bookmarks": "Favoris",
"categories": "Catégories",
Expand Down Expand Up @@ -48,8 +48,8 @@
"resendButton": "Renvoyer l'e-mail de vérification",
"backToSignIn": "Retour à la connexion"
},
"dashboard": {
"title": "Tableau de bord",
"feed": {
"title": "Inbox",
"unread": "{{count}} non lu",
"addCategory": "Catégorie",
"addFeed": "Ajouter un flux",
Expand Down
16 changes: 8 additions & 8 deletions frontend/src/pages/Dashboard.tsx → frontend/src/pages/Feed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { useFeeds, useAddFeed } from '../hooks/useFeeds';
import { useBookmarks, useCreateBookmark, useDeleteBookmark } from '../hooks/useBookmarks';
import type { CreateCategoryInput, AddFeedInput } from '../types';

export default function Dashboard() {
export default function Feed() {
const { t } = useTranslation();
const [addFeedOpen, setAddFeedOpen] = useState(false);
const [addCategoryOpen, setAddCategoryOpen] = useState(false);
Expand Down Expand Up @@ -89,11 +89,11 @@ export default function Dashboard() {
>
<Box>
<Typography variant="h4" fontWeight="bold">
{t('dashboard.title')}
{t('feed.title')}
</Typography>
<Box display="flex" gap={1} mt={0.5}>
<Chip
label={t('dashboard.unread', { count: unreadCount })}
label={t('feed.unread', { count: unreadCount })}
size="small"
color={unreadOnly ? 'primary' : unreadCount > 0 ? 'primary' : 'default'}
variant={unreadOnly ? 'filled' : 'outlined'}
Expand All @@ -108,33 +108,33 @@ export default function Dashboard() {
startIcon={<AddIcon />}
onClick={() => setAddCategoryOpen(true)}
>
{t('dashboard.addCategory')}
{t('feed.addCategory')}
</Button>
<Button
variant="contained"
startIcon={<RssFeedIcon />}
onClick={() => setAddFeedOpen(true)}
disabled={categories.length === 0}
>
{t('dashboard.addFeed')}
{t('feed.addFeed')}
</Button>
</Box>
</Box>

{categories.length === 0 && feeds.length === 0 ? (
<Box textAlign="center" py={8}>
<Typography variant="h6" color="text.secondary" gutterBottom>
{t('dashboard.welcome')}
{t('feed.welcome')}
</Typography>
<Typography variant="body2" color="text.secondary" mb={3}>
{t('dashboard.welcomeMessage')}
{t('feed.welcomeMessage')}
</Typography>
<Button
variant="contained"
startIcon={<AddIcon />}
onClick={() => setAddCategoryOpen(true)}
>
{t('dashboard.createFirstCategory')}
{t('feed.createFirstCategory')}
</Button>
</Box>
) : (
Expand Down
Loading