Skip to content

Commit

Permalink
Feat/UI improvements (#4064)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinlu1248 authored Jun 20, 2024
2 parents b763cbf + 0da77a4 commit 4e09b3f
Show file tree
Hide file tree
Showing 58 changed files with 3,165 additions and 2,370 deletions.
10 changes: 5 additions & 5 deletions sweep_chat/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
semi: false,
singleQuote: false,
tabWidth: 2,
printWidth: 80,
};
semi: false,
singleQuote: false,
tabWidth: 2,
printWidth: 80,
}
6 changes: 3 additions & 3 deletions sweep_chat/app/api/auth/[...nextauth]/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import authOptions from "@/lib/authOptions";
import NextAuth from "next-auth"
import authOptions from '@/lib/authOptions'
import NextAuth from 'next-auth'

const handler = NextAuth(authOptions)

export { handler as GET, handler as POST };
export { handler as GET, handler as POST }
23 changes: 10 additions & 13 deletions sweep_chat/app/c/[messageId]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import App from '@/components/App';
import authOptions from '@/lib/authOptions';
import { getServerSession } from 'next-auth';
import App from '@/components/App'
import authOptions from '@/lib/authOptions'
import { getServerSession } from 'next-auth'

export default async function Home(
{ params }: { params: { messageId: string } }
) {
const session = await getServerSession(
authOptions
);
return (
<App session={session} defaultMessageId={params.messageId} />
);
export default async function Home({
params,
}: {
params: { messageId: string }
}) {
const session = await getServerSession(authOptions)
return <App session={session} defaultMessageId={params.messageId} />
}

14 changes: 7 additions & 7 deletions sweep_chat/app/global-error.jsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
"use client";
'use client'

import * as Sentry from "@sentry/nextjs";
import Error from "next/error";
import { useEffect } from "react";
import * as Sentry from '@sentry/nextjs'
import Error from 'next/error'
import { useEffect } from 'react'

export default function GlobalError({ error }) {
useEffect(() => {
Sentry.captureException(error);
}, [error]);
Sentry.captureException(error)
}, [error])

return (
<html>
<body>
<Error />
</body>
</html>
);
)
}
227 changes: 114 additions & 113 deletions sweep_chat/app/globals.css
Original file line number Diff line number Diff line change
@@ -1,160 +1,161 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@tailwind components;
@tailwind utilities;

@layer base {
:root {
--background: 0 0% 100%;
--foreground: 240 10% 3.9%;
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 240 10% 3.9%;

--card: 0 0% 100%;
--card-foreground: 240 10% 3.9%;
--card: 0 0% 100%;
--card-foreground: 240 10% 3.9%;

--popover: 0 0% 100%;
--popover-foreground: 240 10% 3.9%;
--popover: 0 0% 100%;
--popover-foreground: 240 10% 3.9%;

--primary: 240 5.9% 10%;
--primary-foreground: 0 0% 98%;
--primary: 240 5.9% 10%;
--primary-foreground: 0 0% 98%;

--secondary: 240 4.8% 95.9%;
--secondary-foreground: 240 5.9% 10%;
--secondary: 240 4.8% 95.9%;
--secondary-foreground: 240 5.9% 10%;

--muted: 240 4.8% 95.9%;
--muted-foreground: 240 3.8% 46.1%;
--muted: 240 4.8% 95.9%;
--muted-foreground: 240 3.8% 46.1%;

--accent: 240 4.8% 95.9%;
--accent-foreground: 240 5.9% 10%;
--accent: 240 4.8% 95.9%;
--accent-foreground: 240 5.9% 10%;

--destructive: 0 84.2% 60.2%;
--destructive-foreground: 0 0% 98%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 0 0% 98%;

--border: 240 5.9% 90%;
--input: 240 5.9% 90%;
--ring: 240 10% 3.9%;
--border: 240 5.9% 90%;
--input: 240 5.9% 90%;
--ring: 240 10% 3.9%;

--radius: 0.5rem;
}
--radius: 0.5rem;
}

.dark {
--background: 240 10% 3.9%;
--foreground: 0 0% 98%;
.dark {
--background: 240 10% 3.9%;
--foreground: 0 0% 98%;

--card: 240 10% 3.9%;
--card-foreground: 0 0% 98%;
--card: 240 10% 3.9%;
--card-foreground: 0 0% 98%;

--popover: 240 10% 3.9%;
--popover-foreground: 0 0% 98%;
--popover: 240 10% 3.9%;
--popover-foreground: 0 0% 98%;

--primary: 0 0% 98%;
--primary-foreground: 240 5.9% 10%;
--primary: 0 0% 98%;
--primary-foreground: 240 5.9% 10%;

--secondary: 240 3.7% 15.9%;
--secondary-foreground: 0 0% 98%;
--secondary: 240 3.7% 15.9%;
--secondary-foreground: 0 0% 98%;

--muted: 240 3.7% 15.9%;
--muted-foreground: 240 5% 64.9%;
--muted: 240 3.7% 15.9%;
--muted-foreground: 240 5% 64.9%;

--accent: 240 3.7% 15.9%;
--accent-foreground: 0 0% 98%;
--accent: 240 3.7% 15.9%;
--accent-foreground: 0 0% 98%;

--destructive: 0 62.8% 30.6%;
--destructive-foreground: 0 0% 98%;
--destructive: 0 62.8% 30.6%;
--destructive-foreground: 0 0% 98%;

--border: 240 3.7% 15.9%;
--input: 240 3.7% 15.9%;
--ring: 240 4.9% 83.9%;
}
--border: 240 3.7% 15.9%;
--input: 240 3.7% 15.9%;
--ring: 240 4.9% 83.9%;
}
}

@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
}
@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
}
}

.reactMarkdown {
pre {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
/* margin-top: 0.5rem; */
/* margin-bottom: 0.5rem; */
color: salmon;
> code {
padding: 1rem
}
.reactMarkdown {
pre {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
/* margin-top: 0.5rem; */
/* margin-bottom: 0.5rem; */
color: salmon;
> code {
padding: 1rem;
}
}

h2 {
font-size: 1.5rem;
margin-top: 1rem;
/* margin-bottom: 1.5rem; */
}
h2 {
font-size: 1.5rem;
margin-top: 1rem;
/* margin-bottom: 1.5rem; */
}

h3 {
font-size: 1.25rem;
margin-top: 1rem;
/* margin-bottom: 0.75rem; */
}
h3 {
font-size: 1.25rem;
margin-top: 1rem;
/* margin-bottom: 0.75rem; */
}

code {
color: #50FA7B;
font-weight: bold;
font-size: 1em;
font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
}
code {
color: #50fa7b;
font-weight: bold;
font-size: 1em;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
}

ol {
list-style-type: decimal;
}
ol {
list-style-type: decimal;
}

ul {
list-style-type: disc;
}
ul {
list-style-type: disc;
}

ol,ul {
margin-top: 1rem;
/* margin-bottom: 1rem; */
margin-left: 1.5rem;

ol,ul {
margin-top: 0.5rem;
/* margin-bottom: 0.5rem; */
}

li {
margin-top: 0.25rem;
}
}
ol,
ul {
margin-top: 1rem;
/* margin-bottom: 1rem; */
margin-left: 1.5rem;

a {
color: lightblue;
text-decoration: underline;
ol,
ul {
margin-top: 0.5rem;
/* margin-bottom: 0.5rem; */
}

p:not(:first-child) {
margin-top: 0.75rem;
li {
margin-top: 0.25rem;
}

/* p:not(:last-child) {
margin-bottom: 0.75rem;
} */
}

.hljs-addition {
color: #1ae073;
a {
color: lightblue;
text-decoration: underline;
}

.hljs-deletion {
color: #ff3333;
p:not(:first-child) {
margin-top: 0.75rem;
}

/* p:not(:last-child) {
margin-bottom: 0.75rem;
} */
}

.hljs-addition {
color: #1ae073;
}

.hljs-deletion {
color: #ff3333;
}

.vertical-text {
display: inline-block;
transform: rotate(90deg);
transform-origin: left top 0;
white-space: nowrap;
}

20 changes: 10 additions & 10 deletions sweep_chat/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import { ThemeProvider } from "@/components/theme-provider";
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import './globals.css'
import { ThemeProvider } from '@/components/theme-provider'

const inter = Inter({ subsets: ["latin"] });
const inter = Inter({ subsets: ['latin'] })

export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
};
title: 'Create Next App',
description: 'Generated by create next app',
}

export default async function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
children: React.ReactNode
}>) {
return (
<html lang="en">
Expand All @@ -28,5 +28,5 @@ export default async function RootLayout({
</ThemeProvider>
</body>
</html>
);
)
}
Loading

0 comments on commit 4e09b3f

Please sign in to comment.