diff --git a/.vscode/settings.json b/.vscode/settings.json index 13292350cef..ee40c449843 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { "editor.codeActionsOnSave": { - "source.fixAll": true + "source.fixAll": "explicit" }, "typescript.tsdk": "node_modules/typescript/lib", "typescript.preferences.importModuleSpecifier": "non-relative", diff --git a/apps/web/next.config.js b/apps/web/next.config.js index 557dcbf446f..7393ba932b4 100644 --- a/apps/web/next.config.js +++ b/apps/web/next.config.js @@ -52,13 +52,12 @@ const nextConfig = { }, ]; }, - sentry: { - hideSourceMaps: false, - }, }; const sentryWebpackPluginOptions = { - // Additional config options for the Sentry Webpack plugin. Keep in mind that + org: "stack-snap", + project: "rallly", + // Additional config ocptions for the Sentry Webpack plugin. Keep in mind that // the following options are set automatically, and overriding them is not // recommended: // release, url, org, project, authToken, configFile, stripPrefix, @@ -70,8 +69,9 @@ const sentryWebpackPluginOptions = { // https://github.com/getsentry/sentry-webpack-plugin#options. }; +const withBundleAnalyzerConfig = withBundleAnalyzer(nextConfig); // Make sure adding Sentry options is the last code to run before exporting, to // ensure that your source maps include changes from all other Webpack plugins -module.exports = withSentryConfig( - withBundleAnalyzer(nextConfig, sentryWebpackPluginOptions), -); +module.exports = process.env.SENTRY_AUTH_TOKEN + ? withSentryConfig(withBundleAnalyzerConfig, sentryWebpackPluginOptions) + : withBundleAnalyzerConfig; diff --git a/apps/web/package.json b/apps/web/package.json index cde55bf8343..16179216e4d 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -53,6 +53,7 @@ "iron-session": "^6.3.1", "js-cookie": "^3.0.1", "lodash": "^4.17.21", + "lucide-react": "^0.294.0", "micro": "^10.0.1", "nanoid": "^4.0.0", "next-auth": "^4.24.5", diff --git a/apps/web/public/locales/en/app.json b/apps/web/public/locales/en/app.json index c0a93c15fb2..9636e9617ff 100644 --- a/apps/web/public/locales/en/app.json +++ b/apps/web/public/locales/en/app.json @@ -112,9 +112,6 @@ "dates": "Dates", "menu": "Menu", "useLocaleDefaults": "Use locale defaults", - "inviteParticipantsDescription": "Copy and share this invite link to start gathering responses from your participants.", - "inviteLink": "Invite Link", - "inviteParticipantLinkInfo": "Anyone with this link will be able to vote on your poll.", "support": "Support", "billing": "Billing", "guestPollAlertDescription": "<0>Create an account or <1>login to claim this poll.", @@ -135,7 +132,6 @@ "permissionDenied": "Unauthorized", "permissionDeniedDescription": "If you are the poll creator, please login to access your poll", "loginDifferent": "Switch user", - "share": "Share", "timeShownIn": "Times shown in {timeZone}", "editDetailsDescription": "Change the details of your event.", "finalizeDescription": "Select a final date for your event.", @@ -210,14 +206,7 @@ "earlyAccess": "Get early access to new features", "earlyAdopterDescription": "As an early adopter, you'll lock in your subscription rate and won't be affected by future price increases.", "upgradeNowSaveLater": "Upgrade now, save later", - "savePercent": "Save {percent}%", - "priceIncreaseSoon": "Price increase soon.", - "lockPrice": "Upgrade today to keep this price forever.", - "features": "Get access to all current and future Pro features!", - "noAds": "No ads", - "supportProject": "Support this project", "pricing": "Pricing", - "pleaseUpgrade": "Please upgrade to Pro to use this feature", "pollSettingsDescription": "Customize the behaviour of your poll", "requireParticipantEmailLabel": "Make email address required for participants", "hideParticipantsLabel": "Hide participant list from other participants", @@ -226,8 +215,28 @@ "authErrorDescription": "There was an error logging you in. Please try again.", "authErrorCta": "Go to login page", "continueAs": "Continue as", - "finalizeFeature": "Finalize", - "duplicateFeature": "Duplicate", "pageMovedDescription": "Redirecting to {newUrl}", - "notRegistered": "Don't have an account? Register" + "notRegistered": "Don't have an account? Register", + "comingSoon": "Coming Soon", + "integrations": "Integrations", + "contacts": "Contacts", + "unlockFeatures": "Unlock all Pro features.", + "back": "Back", + "pollStatusAll": "All", + "pollStatusLive": "Live", + "pollStatusFinalized": "Finalized", + "pending": "Pending", + "xMore": "{count} more", + "share": "Share", + "pageXOfY": "Page {currentPage} of {pageCount}", + "noParticipants": "No participants", + "userId": "User ID", + "aboutGuest": "Guest User", + "aboutGuestDescription": "Profile settings are not available for guest users. <0>Sign in to your existing account or <1>create a new account to customize your profile.", + "logoutDescription": "Sign out of your existing session", + "events": "Events", + "registrations": "Registrations", + "inviteParticipantsDescription": "Copy and share the invite link to start gathering responses from your participants.", + "inviteLink": "Invite Link", + "inviteParticipantLinkInfo": "Anyone with this link will be able to vote on your poll." } diff --git a/apps/web/src/app/[locale]/(admin)/layout.tsx b/apps/web/src/app/[locale]/(admin)/layout.tsx index 5f7fa20fbc6..e1138eddcc4 100644 --- a/apps/web/src/app/[locale]/(admin)/layout.tsx +++ b/apps/web/src/app/[locale]/(admin)/layout.tsx @@ -1,8 +1,13 @@ -"use client"; +import { cn } from "@rallly/ui"; +import { Button } from "@rallly/ui/button"; +import { MenuIcon } from "lucide-react"; +import Link from "next/link"; import { signIn, useSession } from "next-auth/react"; import React from "react"; -import { StandardLayout } from "@/components/layouts/standard-layout"; +import { Sidebar } from "@/app/[locale]/(admin)/sidebar"; +import { LogoLink } from "@/app/components/logo-link"; +import { CurrentUserAvatar } from "@/components/user"; import { isSelfHosted } from "@/utils/constants"; const Auth = ({ children }: { children: React.ReactNode }) => { @@ -22,13 +27,57 @@ const Auth = ({ children }: { children: React.ReactNode }) => { return null; }; -export default function Layout({ children }: { children: React.ReactNode }) { +function MobileNavigation() { + return ( +
+ +
+ + + + +
+
+ ); +} + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + function SidebarLayout() { + return ( +
+ +
+
+ +
+ +
+
{children}
+
+ ); + } + if (isSelfHosted) { return ( - {children} + ); } - return {children}; + return ; } diff --git a/apps/web/src/app/[locale]/(admin)/menu-item.tsx b/apps/web/src/app/[locale]/(admin)/menu-item.tsx new file mode 100644 index 00000000000..9235b17ad90 --- /dev/null +++ b/apps/web/src/app/[locale]/(admin)/menu-item.tsx @@ -0,0 +1,42 @@ +"use client"; + +import { cn } from "@rallly/ui"; +import { Link } from "lucide-react"; +import { usePathname } from "next/navigation"; + +import { IconComponent } from "@/types"; + +export function MenuItem({ + href, + children, + icon: Icon, +}: { + href: string; + icon: IconComponent; + children: React.ReactNode; +}) { + const pathname = usePathname(); + const isCurrent = pathname === href; + return ( + +