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
1 change: 0 additions & 1 deletion app/(protected)/profile/teams/page.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { redirect } from 'next/navigation';
import { routes } from 'shared/config';

export default function ProfilePage() {
redirect(routes.profile.me());
redirect(routes.user.profile());
}
20 changes: 20 additions & 0 deletions app/(protected)/user/teams/@invitations/error.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
'use client';

import { ErrorState } from 'widgets/error-state';

export default function Error({
unstable_retry,
}: {
error: Error & { digest?: string };
unstable_retry: () => void;
}) {
return (
<ErrorState
title="Не удалось загрузить приглашения"
description="Попробуйте обновить блок приглашений. Если ошибка повторится, обновите страницу."
actionLabel="Попробовать снова"
onRetry={() => unstable_retry()}
className="border"
/>
);
}
1 change: 1 addition & 0 deletions app/(protected)/user/teams/@invitations/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { InvitationsPage as default } from 'pages/invitations';
20 changes: 20 additions & 0 deletions app/(protected)/user/teams/error.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
'use client';

import { ErrorState } from 'widgets/error-state';

export default function Error({
unstable_retry,
}: {
error: Error & { digest?: string };
unstable_retry: () => void;
}) {
return (
<ErrorState
title="Не удалось загрузить команды"
description="Попробуйте обновить блок команд. Если ошибка повторится, обновите страницу."
actionLabel="Попробовать снова"
onRetry={() => unstable_retry()}
className="border"
/>
);
}
14 changes: 14 additions & 0 deletions app/(protected)/user/teams/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export default function Layout({
children,
invitations,
}: {
children: React.ReactNode;
invitations: React.ReactNode;
}) {
return (
<>
{children}
{invitations}
</>
);
}
1 change: 1 addition & 0 deletions app/(protected)/user/teams/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { TeamsPage as default } from 'pages/teams';
26 changes: 25 additions & 1 deletion infra/dev/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,28 @@ S3_ACCESS_KEY=''
S3_SECRET_KEY=''

IMAGOR_URL=http://localhost
IMAGOR_SECRET=super-secret
IMAGOR_SECRET=super-secret

GOOGLE_CLIENT_ID=super-secret
GOOGLE_CLIENT_SECRET=super-secret

GITHUB_CLIENT_ID=super-secret
GITHUB_CLIENT_SECRET=super-secret

YANDEX_CLIENT_ID=super-secret
YANDEX_CLIENT_SECRET=super-secret

VKONTAKTE_CLIENT_ID=super-secret
VKONTAKTE_CLIENT_SECRET=super-secret

GOOGLE_CLIENT_ID=super-secret
GOOGLE_CLIENT_SECRET=super-secret

GITHUB_CLIENT_ID=super-secret
GITHUB_CLIENT_SECRET=super-secret

YANDEX_CLIENT_ID=super-secret
YANDEX_CLIENT_SECRET=super-secret

VKONTAKTE_CLIENT_ID=super-secret
VKONTAKTE_CLIENT_SECRET=super-secret
4 changes: 2 additions & 2 deletions proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { trace } from '@opentelemetry/api';

const REFRESH_COOKIE = 'refresh';

const PROTECTED_PREFIXES = [routes.profile.root(), routes.team.root()];
const PROTECTED_PREFIXES = [routes.user.root(), routes.team.root()];
const PUBLIC_ONLY_ROUTES = [routes.auth.signin(), routes.auth.signup()];

function startsWithOneOf(pathname: string, prefixes: string[]) {
Expand All @@ -26,7 +26,7 @@ export function proxy(req: NextRequest) {
}

if (isPublicOnly && hasRefreshCookie) {
return NextResponse.redirect(new URL(routes.profile.root(), req.url));
return NextResponse.redirect(new URL(routes.user.root(), req.url));
}

const response = NextResponse.next();
Expand Down
101 changes: 101 additions & 0 deletions public/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/app/layouts/ErrorLayout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { ErrorState } from 'widgets/error-state';
2 changes: 2 additions & 0 deletions src/app/layouts/SidebarLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { AppSidebar } from 'widgets/app-sidebar';
import { NavUser } from 'widgets/nav-user';
import { Notifications } from 'widgets/notifications';
import { QuickCreate } from 'widgets/quick-create';
import { SidebarHeaderTitle } from 'widgets/sidebar-header-title';

export function SidebarLayout({ children, ...props }: ComponentProps<typeof SidebarProvider>) {
return (
Expand All @@ -19,6 +20,7 @@ export function SidebarLayout({ children, ...props }: ComponentProps<typeof Side
orientation="vertical"
className="self-center! data-[orientation=vertical]:h-6"
/>
<SidebarHeaderTitle className="px-3" />
</div>
<div className="flex items-center gap-4">
<QuickCreate />
Expand Down
4 changes: 2 additions & 2 deletions src/app/styles/animations.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@
overflow: hidden;
}
.collapsible-content[data-state='open'] {
animation: slideDown 300ms ease-out;
animation: slideDown 200ms ease-out;
}
.collapsible-content[data-state='closed'] {
animation: slideUp 300ms ease-out;
animation: slideUp 200ms ease-out;
}

@keyframes slideDown {
Expand Down
117 changes: 57 additions & 60 deletions src/app/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,80 +48,77 @@

:root {
--background: oklch(1 0 0);
--foreground: oklch(0.3211 0 0);
--foreground: oklch(0.2077 0.0398 265.7549);
--card: oklch(1 0 0);
--card-foreground: oklch(0.3211 0 0);
--card-foreground: oklch(0.2077 0.0398 265.7549);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.3211 0 0);
--primary: oklch(0.6231 0.188 259.8145);
--popover-foreground: oklch(0.2077 0.0398 265.7549);
--primary: oklch(0.4026 0.1374 261.393);
--primary-foreground: oklch(1 0 0);
--secondary: oklch(0.967 0.0029 264.5419);
--secondary-foreground: oklch(0.4461 0.0263 256.8018);
--muted: oklch(0.9846 0.0017 247.8389);
--muted-foreground: oklch(0.551 0.0234 264.3637);
--accent: oklch(0.9514 0.025 236.8242);
--accent-foreground: oklch(0.3791 0.1378 265.5222);
--secondary: oklch(0.9231 0.028 263.4295);
--secondary-foreground: oklch(0.4026 0.1374 261.393);
--muted: oklch(0.9683 0.0069 247.8956);
--muted-foreground: oklch(0.5544 0.0407 257.4166);
--accent: oklch(0.9683 0.0069 247.8956);
--accent-foreground: oklch(0.4026 0.1374 261.393);
--destructive: oklch(0.6368 0.2078 25.3313);
--destructive-foreground: oklch(1 0 0);
--border: oklch(0.9276 0.0058 264.5313);
--input: oklch(0.9276 0.0058 264.5313);
--ring: oklch(0.6231 0.188 259.8145);
--chart-1: oklch(0.6231 0.188 259.8145);
--chart-2: oklch(0.5461 0.2152 262.8809);
--chart-3: oklch(0.4882 0.2172 264.3763);
--chart-4: oklch(0.4244 0.1809 265.6377);
--chart-5: oklch(0.3791 0.1378 265.5222);
--sidebar: oklch(0.9846 0.0017 247.8389);
--sidebar-foreground: oklch(0.3211 0 0);
--sidebar-primary: oklch(0.6231 0.188 259.8145);
--border: oklch(0.9288 0.0126 255.5078);
--input: oklch(0.9288 0.0126 255.5078);
--ring: oklch(0.4026 0.1374 261.393);
--chart-1: oklch(0.4026 0.1374 261.393);
--chart-2: oklch(0.5598 0.1882 266.3996);
--chart-3: oklch(0.7212 0.1276 264.1059);
--chart-4: oklch(0.8122 0.0844 262.9727);
--chart-5: oklch(0.9231 0.028 263.4295);
--sidebar: oklch(0.9842 0.0034 247.8575);
--sidebar-foreground: oklch(0.2795 0.0368 260.031);
--sidebar-primary: oklch(0.4026 0.1374 261.393);
--sidebar-primary-foreground: oklch(1 0 0);
--sidebar-accent: oklch(0.9514 0.025 236.8242);
--sidebar-accent-foreground: oklch(0.3791 0.1378 265.5222);
--sidebar-border: oklch(0.9276 0.0058 264.5313);
--sidebar-ring: oklch(0.6231 0.188 259.8145);
--font-sans: Inter, sans-serif;
--font-serif: Source Serif 4, serif;
--font-mono: JetBrains Mono, monospace;
--radius: 0.375rem;
--sidebar-accent: oklch(0.9231 0.028 263.4295);
--sidebar-accent-foreground: oklch(0.4026 0.1374 261.393);
--sidebar-border: oklch(0.9288 0.0126 255.5078);
--sidebar-ring: oklch(0.4026 0.1374 261.393);
--radius: 0.5rem;
--link: oklch(1 0 89.876 / 0);
--link-foreground: oklch(54.65% 0.246 262.87);
--link-foreground: oklch(0.4026 0.1374 261.393);
}

.dark {
--background: oklch(0.2046 0 0);
--foreground: oklch(0.9219 0 0);
--card: oklch(0.2686 0 0);
--card-foreground: oklch(0.9219 0 0);
--popover: oklch(0.2686 0 0);
--popover-foreground: oklch(0.9219 0 0);
--primary: oklch(0.6231 0.188 259.8145);
--background: oklch(0.2077 0.0398 265.7549);
--foreground: oklch(0.9842 0.0034 247.8575);
--card: oklch(0.2795 0.0368 260.031);
--card-foreground: oklch(0.9842 0.0034 247.8575);
--popover: oklch(0.2077 0.0398 265.7549);
--popover-foreground: oklch(0.9842 0.0034 247.8575);
--primary: oklch(0.4026 0.1374 261.393);
--primary-foreground: oklch(1 0 0);
--secondary: oklch(0.2686 0 0);
--secondary-foreground: oklch(0.9219 0 0);
--muted: oklch(0.2393 0 0);
--muted-foreground: oklch(0.7155 0 0);
--accent: oklch(0.3791 0.1378 265.5222);
--accent-foreground: oklch(0.8823 0.0571 254.1284);
--destructive: oklch(0.6368 0.2078 25.3313);
--destructive-foreground: oklch(1 0 0);
--border: oklch(0.3715 0 0);
--input: oklch(0.3715 0 0);
--ring: oklch(0.6231 0.188 259.8145);
--chart-1: oklch(0.7137 0.1434 254.624);
--secondary: oklch(0.2795 0.0368 260.031);
--secondary-foreground: oklch(0.9231 0.028 263.4295);
--muted: oklch(0.2795 0.0368 260.031);
--muted-foreground: oklch(0.7107 0.0351 256.7878);
--accent: oklch(0.2795 0.0368 260.031);
--accent-foreground: oklch(0.9231 0.028 263.4295);
--destructive: oklch(0.3958 0.1331 25.723);
--destructive-foreground: oklch(0.9842 0.0034 247.8575);
--border: oklch(0.3717 0.0392 257.287);
--input: oklch(0.3717 0.0392 257.287);
--ring: oklch(0.4026 0.1374 261.393);
--chart-1: oklch(0.4026 0.1374 261.393);
--chart-2: oklch(0.6231 0.188 259.8145);
--chart-3: oklch(0.5461 0.2152 262.8809);
--chart-4: oklch(0.4882 0.2172 264.3763);
--chart-5: oklch(0.4244 0.1809 265.6377);
--sidebar: oklch(0.2046 0 0);
--sidebar-foreground: oklch(0.9219 0 0);
--sidebar-primary: oklch(0.6231 0.188 259.8145);
--chart-3: oklch(0.7137 0.1434 254.624);
--chart-4: oklch(0.8091 0.0956 251.8128);
--chart-5: oklch(0.8823 0.0571 254.1284);
--sidebar: oklch(0.2795 0.0368 260.031);
--sidebar-foreground: oklch(0.9842 0.0034 247.8575);
--sidebar-primary: oklch(0.4026 0.1374 261.393);
--sidebar-primary-foreground: oklch(1 0 0);
--sidebar-accent: oklch(0.3791 0.1378 265.5222);
--sidebar-accent-foreground: oklch(0.8823 0.0571 254.1284);
--sidebar-border: oklch(0.3715 0 0);
--sidebar-ring: oklch(0.6231 0.188 259.8145);
--sidebar-accent: oklch(0.3717 0.0392 257.287);
--sidebar-accent-foreground: oklch(0.9231 0.028 263.4295);
--sidebar-border: oklch(0.3717 0.0392 257.287);
--sidebar-ring: oklch(0.4026 0.1374 261.393);
--link: oklch(1 0 89.876 / 0);
--link-foreground: oklch(54.65% 0.246 262.87);
--link-foreground: oklch(0.4026 0.1374 261.393);
}

@layer base {
Expand Down
Loading
Loading