Skip to content

Commit

Permalink
Merge pull request #319 from h8570rg/develop
Browse files Browse the repository at this point in the history
0.1.7
  • Loading branch information
h8570rg authored Jan 24, 2025
2 parents 69402f2 + d0dfed3 commit be4bbc7
Show file tree
Hide file tree
Showing 42 changed files with 4,758 additions and 3,212 deletions.
58 changes: 0 additions & 58 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
GOOGLE_SECRET: "dummy"
OPENAI_API_KEY: "dummy"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- uses: supabase/setup-cli@v1

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
OPENAI_API_KEY: "dummy"

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- uses: supabase/setup-cli@v1

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
OPENAI_API_KEY: "dummy"

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- uses: supabase/setup-cli@v1

Expand Down
3 changes: 3 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
const path = require("path");

// TODO: エラーで使えないのでpackage.jsonのpre-commitを変更している。
// see https://github.com/eslint/eslint/issues/19322

const buildEslintCommand = (filenames) =>
`next lint --fix --file ${filenames
.map((f) => path.relative(process.cwd(), f))
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"inbucket",
"jankiroku",
"nextjs",
"nextui",
"heroui",
"oidc",
"OPENAI",
"orioledb",
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ Supabase Studio URL: http://localhost:54323

## 用語一覧

| コード | 意味 |
| ---- | ---- |
| user | ログインしているユーザー |
| match | 成績表 |
| game | 半荘 |
| score | ポイント |
| points | 点数 |
| result | 収支 |
| コード | 意味 |
| ------ | ------------------------ |
| user | ログインしているユーザー |
| match | 成績表 |
| game | 半荘 |
| score | ポイント |
| points | 点数 |
| result | 収支 |
7 changes: 1 addition & 6 deletions app/(lp)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import {
Navbar,
NavbarBrand,
NavbarContent,
NavbarItem,
} from "@nextui-org/react";
import { Navbar, NavbarBrand, NavbarContent, NavbarItem } from "@heroui/react";
import Image from "next/image";
import Link from "next/link";
import { Button } from "@/components/Button";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export async function MatchTable({

const rowStyle: CSSProperties = {
display: "grid",
gridTemplateColumns: `46px repeat(${columns.length}, minmax(80px, 1fr))`,
gridTemplateColumns: `46px repeat(${columns.length}, minmax(56px, 1fr))`,
width: "100%",
};

Expand All @@ -79,7 +79,7 @@ export async function MatchTable({
{/* ヘッダー */}
<PlayersModalTrigger
style={rowStyle}
className="rounded-lg bg-default-100 text-foreground-500"
className="mb-1 rounded-lg bg-default-100 text-foreground-500"
>
<div />
{columns.map((column) => (
Expand All @@ -104,14 +104,14 @@ export async function MatchTable({
gameId={item.gameId}
style={rowStyle}
>
<div className="flex h-full items-center justify-center truncate px-1 py-2 text-tiny text-default-500">
<div className="flex h-full items-center justify-center break-all px-1 py-2 text-tiny text-default-500">
{index + 1}
</div>
{columns.map((column) => (
<div
key={column.id}
className={classNames(
"truncate px-1 py-2 text-center text-small",
"flex h-full items-center justify-center break-all px-1 py-2 text-center text-small",
{
"text-danger": item.players[column.id] < 0,
},
Expand All @@ -123,6 +123,7 @@ export async function MatchTable({
</GameRow>
))}
<GameModalTrigger
className="mt-1"
fullWidth
size="lg"
startContent={<Icon className="size-5" name="edit" />}
Expand Down Expand Up @@ -178,7 +179,7 @@ export async function MatchTable({
key={column.id}
>
{column.result}
<span className="text-[10px]"></span>
<span className="contents text-[10px]"></span>
</div>
))}
</div>
Expand Down
10 changes: 3 additions & 7 deletions app/(maintenance)/(routes)/maintenance/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
"use client";

import {
Navbar as NextUINavbar,
NavbarBrand,
NavbarContent,
} from "@nextui-org/react";
import { Navbar, NavbarBrand, NavbarContent } from "@heroui/react";
import Link from "next/link";
import { useRouter } from "next/navigation";
import { useState } from "react";
Expand All @@ -18,15 +14,15 @@ export default function MaintenancePage() {
const [isRefreshing, setIsRefreshing] = useState(false);
return (
<main className="relative flex min-h-screen flex-col">
<NextUINavbar position="static" className="absolute inset-x-0 top-0">
<Navbar position="static" className="absolute inset-x-0 top-0">
<NavbarContent>
<NavbarBrand>
<Link color="foreground" href="/">
<Logo className="text-large" />
</Link>
</NavbarBrand>
</NavbarContent>
</NextUINavbar>
</Navbar>
<div className="flex grow items-center justify-center px-4">
<div className="flex flex-col items-center gap-4">
<h1 className="text-center text-large">メンテナンス中</h1>
Expand Down
6 changes: 3 additions & 3 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { IconDefs } from "@/components/Icon";
import { SERVICE_NAME } from "@/lib/config";
import { fontClassNames } from "./fonts";
import "./globals.css";
import { NextUIProvider } from "./nextUiProvider";
import { Providers } from "./providers";

export const metadata: Metadata = {
title: {
Expand Down Expand Up @@ -35,9 +35,9 @@ export default function RootLayout({
</head>
<body className="h-full font-rocknroll">
<IconDefs />
<NextUIProvider>
<Providers>
<div className="h-full bg-background text-foreground">{children}</div>
</NextUIProvider>
</Providers>
</body>
</html>
);
Expand Down
17 changes: 0 additions & 17 deletions app/nextUiProvider.tsx

This file was deleted.

17 changes: 17 additions & 0 deletions app/providers.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"use client";

import { HeroUIProvider } from "@heroui/react";
import { ThemeProvider as NextThemesProvider } from "next-themes";

/**
* @see https://heroui.org/docs/frameworks/nextjs#tailwind-css-setup
*/
export function Providers({ children }: { children: React.ReactNode }) {
return (
<HeroUIProvider className="h-full">
<NextThemesProvider attribute="class" defaultTheme="system">
{children}
</NextThemesProvider>
</HeroUIProvider>
);
}
2 changes: 1 addition & 1 deletion components/Accordion/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use client";

export { Accordion, AccordionItem } from "@nextui-org/react";
export { Accordion, AccordionItem } from "@heroui/react";
2 changes: 1 addition & 1 deletion components/Alert/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use client";

export { Alert } from "@nextui-org/react";
export { Alert } from "@heroui/react";
2 changes: 1 addition & 1 deletion components/Avatar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use client";

export { Avatar, AvatarGroup } from "@nextui-org/react";
export { Avatar, AvatarGroup } from "@heroui/react";
2 changes: 1 addition & 1 deletion components/Button/index.tsx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { Button, ButtonGroup, type ButtonProps } from "@nextui-org/react";
export { Button, ButtonGroup, type ButtonProps } from "@heroui/react";
2 changes: 1 addition & 1 deletion components/Card/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use client";

export { Card, CardHeader, CardBody, CardFooter } from "@nextui-org/react";
export { Card, CardHeader, CardBody, CardFooter } from "@heroui/react";
2 changes: 1 addition & 1 deletion components/Chip/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use client";

export { Chip } from "@nextui-org/react";
export { Chip } from "@heroui/react";
2 changes: 1 addition & 1 deletion components/Divider/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use client";

export { Divider } from "@nextui-org/react";
export { Divider } from "@heroui/react";
2 changes: 1 addition & 1 deletion components/Dropdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export {
DropdownMenu,
DropdownSection,
DropdownItem,
} from "@nextui-org/react";
} from "@heroui/react";
4 changes: 2 additions & 2 deletions components/Input/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { Input as NextUiInput, InputProps } from "@nextui-org/react";
import { Input as HeroUiInput, InputProps } from "@heroui/react";
import classNames from "classnames";
import { forwardRef } from "react";

Expand All @@ -9,7 +9,7 @@ export const Input = forwardRef<
Omit<InputProps, "isInvalid">
>(function Input({ classNames: propsClassNames, ...props }, ref) {
return (
<NextUiInput
<HeroUiInput
classNames={{
...propsClassNames,
input: classNames("text-medium", propsClassNames?.input), // ios safariで拡大されるのを防ぐ
Expand Down
10 changes: 5 additions & 5 deletions components/Link/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
"use client";

import {
Link as NextUILink,
LinkProps as NextUILinkProps,
} from "@nextui-org/react";
Link as HeroUiLink,
LinkProps as HeroUiLinkProps,
} from "@heroui/react";
import NextLink, { LinkProps as NextLinkProps } from "next/link";
import { forwardRef } from "react";

export const Link = forwardRef<
HTMLAnchorElement,
NextLinkProps & NextUILinkProps
NextLinkProps & HeroUiLinkProps
>(function Link(props, ref) {
return <NextUILink as={NextLink} ref={ref} {...props} />;
return <HeroUiLink as={NextLink} ref={ref} {...props} />;
});
2 changes: 1 addition & 1 deletion components/Listbox/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use client";

export { Listbox, ListboxItem, ListboxSection } from "@nextui-org/react";
export { Listbox, ListboxItem, ListboxSection } from "@heroui/react";
6 changes: 3 additions & 3 deletions components/Modal/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
"use client";

import { useDisclosure } from "@nextui-org/react";
import { useDisclosure } from "@heroui/react";

export type { ModalProps } from "@nextui-org/react";
export type { ModalProps } from "@heroui/react";
export {
Modal,
ModalContent,
ModalHeader,
ModalBody,
ModalFooter,
} from "@nextui-org/react";
} from "@heroui/react";

export type UseModalReturn = {
isOpen: boolean;
Expand Down
2 changes: 1 addition & 1 deletion components/Navbar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use client";

export { Navbar, NavbarBrand, NavbarContent } from "@nextui-org/react";
export { Navbar, NavbarBrand, NavbarContent } from "@heroui/react";
2 changes: 1 addition & 1 deletion components/Popover/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use client";

export { Popover, PopoverTrigger, PopoverContent } from "@nextui-org/react";
export { Popover, PopoverTrigger, PopoverContent } from "@heroui/react";
2 changes: 1 addition & 1 deletion components/Progress/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use client";

export { Progress } from "@nextui-org/react";
export { Progress } from "@heroui/react";
2 changes: 1 addition & 1 deletion components/ScrollShadow/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use client";

export { ScrollShadow } from "@nextui-org/react";
export { ScrollShadow } from "@heroui/react";
2 changes: 1 addition & 1 deletion components/Select/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"use client";

export { Select, SelectItem } from "@nextui-org/react";
export { Select, SelectItem } from "@heroui/react";
Loading

0 comments on commit be4bbc7

Please sign in to comment.