move files

Seto Elkahfi committed Aug 4, 2024 at 18:03 UTC 94287bbd29124584a454a401d20aed72a476bc50
29 files changed +20 -76
frontend/splitfire-desktop/app/components/index.tsx
+2 -2
@@ -7,9 +7,9 @@ import { invoke } from "@tauri-apps/api";
7 import { useState, useEffect } from "react";
8 import {
9 SkeletonCard
10 -} from "../../_ui/skeleton-card";
10 +} from "../../components/ui/skeleton-card";
11 import { useLogger } from "@/lib/logger";
12 -import { SongProviderCard, SongProviderPath } from "../../_ui/song-provider-card";
12 +import { SongProviderCard, SongProviderPath } from "../../components/ui/song-provider-card";
13
14 export default function Index() {
15
frontend/splitfire-desktop/app/debug/page.tsx
+2 -2
@@ -6,11 +6,11 @@ import {
6 TAURI_GET_ENVIRONMENT,
7 TAURI_SET_ENVIRONMENT,
8 } from "@/lib/tauri-handler";
9 -import { Button } from "@/_ui/components/button";
9 import { useEffect, useState } from "react";
10 import { TauriResponse } from "@/models/shared";
11 import { useLogger } from "@/lib/logger";
13 -import { LoadingView } from "@/_ui/LoadingView";
12 +import { LoadingView } from "@/components/ui/LoadingView";
13 +import { Button } from "@/components/button";
14
15 enum State {
16 LOADING,
frontend/splitfire-desktop/app/layout.tsx
+2 -2
@@ -1,7 +1,7 @@
1 "use client";
2
3 -import { AddressBar } from "../_ui/address-bar";
4 -import { GlobalNav } from "../_ui/global-nav";
3 +import { AddressBar } from "../components/ui/address-bar";
4 +import { GlobalNav } from "../components/ui/global-nav";
5 import "./globals.css";
6 import { Suspense, useEffect, useState } from "react";
7 import { CurrentUser, CurrentUserType, db } from "../lib/db";
frontend/splitfire-desktop/app/login/page.tsx
+2 -2
@@ -3,7 +3,6 @@
3 import * as Form from "@radix-ui/react-form";
4 import { invoke } from "@tauri-apps/api/tauri";
5 import { TAURI_ACCOUNT_LOGIN } from "@/lib/tauri-handler";
6 -import { Button } from "@/_ui/components/button";
6 import { useState } from "react";
7 import { UserContext } from "@/lib/current-user-context";
8 import { CurrentUser, CurrentUserType, db } from "@/lib/db";
@@ -11,8 +10,9 @@ import { AccountLoginResponse } from "@/models/account";
10 import { useRouter } from "next/navigation";
11 import { TauriResponse } from "@/models/shared";
12 import { Mode } from "@/models/mode";
14 -import { LoadingView } from "@/_ui/LoadingView";
13 +import { LoadingView } from "@/components/ui/LoadingView";
14 import { useLogger } from "@/lib/logger";
15 +import { Button } from "@/components/button";
16
17 enum State {
18 LOADING,
frontend/splitfire-desktop/app/logout/page.tsx
+1 -1
@@ -7,7 +7,7 @@ import { CurrentUser, db } from "../../lib/db";
7 import { invoke } from "@tauri-apps/api/tauri";
8 import { TAURI_ACCOUNT_LOGOUT } from "../../lib/tauri-handler";
9 import { useRouter } from "next/navigation";
10 -import { Button } from "../../_ui/components/button";
10 +import { Button } from "../../components/button";
11
12 enum State {
13 LOADING,
frontend/splitfire-desktop/app/play/page.tsx
+1 -1
@@ -5,7 +5,7 @@ import { useContext, useEffect, useState } from "react";
5 import { TAURI_PLAYER_PREPARE } from "../../lib/tauri-handler";
6 import { useRouter, useSearchParams } from "next/navigation";
7 import { useLogger } from "../../lib/logger";
8 -import { IconSpinner } from "../../_ui/components/icons";
8 +import { IconSpinner } from "../../components/icons";
9 import { PlayerPrepareResponse } from "@/models/content";
10 import { TauriResponse } from "@/models/shared";
11 import Player from "./_components/player";
frontend/splitfire-desktop/app/profile/components/index.tsx
+1 -1
@@ -12,7 +12,7 @@ import { TauriResponse } from "@/models/shared";
12 import { LocationMarkerIcon } from "@heroicons/react/solid";
13 import { GearIcon } from "@radix-ui/react-icons";
14 import Link from "next/link";
15 -import { PARAMS_USER_ID } from "@/_lib/params";
15 +import { PARAMS_USER_ID } from "@/lib/params";
16 import { UserContext } from "@/lib/current-user-context";
17
18 enum State {
frontend/splitfire-desktop/app/ready-to-play/page.tsx
+2 -2
@@ -4,9 +4,9 @@ import { ContentCarouselResponse } from "@/models/content";
4 import { invoke } from "@tauri-apps/api";
5 import { useEffect, useState } from "react";
6 import { TAURI_CONTENT_READY_TO_PLAY } from "@/lib/tauri-handler";
7 -import { SkeletonCard } from "@/_ui/skeleton-card";
7 +import { SkeletonCard } from "@/components/ui/skeleton-card";
8 import { SongProvider } from "@/models/song-response";
9 -import { SongProviderCard, SongProviderPath } from "@/_ui/song-provider-card";
9 +import { SongProviderCard, SongProviderPath } from "@/components/ui/song-provider-card";
10
11 export default function Page() {
12 const [songProviders, setSongProviders] = useState<SongProvider[]>([]);
frontend/splitfire-desktop/app/register/components/signup-form.tsx
+1 -1
@@ -7,7 +7,7 @@ import { TauriResponse } from "@/models/shared";
7 import { invoke } from "@tauri-apps/api";
8 import { useState } from "react";
9 import * as Form from "@radix-ui/react-form";
10 -import { Button } from "@/_ui/components/button";
10 +import { Button } from "@/components/button";
11
12 type SignupFormPayload = {
13 name: string,
frontend/splitfire-desktop/app/split/_components/voters-view.tsx
+1 -1
@@ -1,6 +1,6 @@
1 "use client";
2
3 -import { PARAMS_USER_ID } from '@/_lib/params';
3 +import { PARAMS_USER_ID } from '@/lib/params';
4 import Image from "next/image";
5 import Link from "next/link";
6 import { VoteType } from "./votes-view-main";
frontend/splitfire-desktop/app/top-voted/components/index.tsx
+1 -1
@@ -1,6 +1,6 @@
1 "use client";
2
3 -import { SkeletonCard } from "@/_ui/skeleton-card";
3 +import { SkeletonCard } from "@/components/ui/skeleton-card";
4 import { useLogger } from "@/lib/logger";
5 import { TAURI_CONTENT_TOP_VOTED } from "@/lib/tauri-handler";
6 import { ContentCarouselResponse } from "@/models/content";
frontend/splitfire-desktop/components/button.tsx renamed
frontend/splitfire-desktop/components/external-link.tsx renamed
frontend/splitfire-desktop/components/icons.tsx renamed
frontend/splitfire-desktop/components/tooltip.tsx renamed
frontend/splitfire-desktop/components/ui/LoadingView.tsx renamed
frontend/splitfire-desktop/components/ui/address-bar.tsx renamed
+1 -1
@@ -3,7 +3,7 @@
3 import React from 'react';
4 import { usePathname } from 'next/navigation';
5 import { HomeIcon } from '@heroicons/react/solid';
6 -import { useLogger } from '../lib/logger';
6 +import { useLogger } from '../../lib/logger';
7
8 export function AddressBar() {
9 const log = useLogger('AddressBar');
frontend/splitfire-desktop/components/ui/boundary.tsx renamed
frontend/splitfire-desktop/components/ui/button.tsx deleted
-56
@@ -1,56 +0,0 @@
1 -import * as React from "react"
2 -import { Slot } from "@radix-ui/react-slot"
3 -import { cva, type VariantProps } from "class-variance-authority"
4 -import { cn } from "@/lib/utils"
5 -
6 -const buttonVariants = cva(
7 - "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-slate-950 disabled:pointer-events-none disabled:opacity-50 dark:focus-visible:ring-slate-300",
8 - {
9 - variants: {
10 - variant: {
11 - default:
12 - "bg-slate-900 text-slate-50 shadow hover:bg-slate-900/90 dark:bg-slate-50 dark:text-slate-900 dark:hover:bg-slate-50/90",
13 - destructive:
14 - "bg-red-500 text-slate-50 shadow-sm hover:bg-red-500/90 dark:bg-red-900 dark:text-slate-50 dark:hover:bg-red-900/90",
15 - outline:
16 - "border border-slate-200 bg-white shadow-sm hover:bg-slate-100 hover:text-slate-900 dark:border-slate-800 dark:bg-slate-950 dark:hover:bg-slate-800 dark:hover:text-slate-50",
17 - secondary:
18 - "bg-slate-100 text-slate-900 shadow-sm hover:bg-slate-100/80 dark:bg-slate-800 dark:text-slate-50 dark:hover:bg-slate-800/80",
19 - ghost: "hover:bg-slate-100 hover:text-slate-900 dark:hover:bg-slate-800 dark:hover:text-slate-50",
20 - link: "text-slate-900 underline-offset-4 hover:underline dark:text-slate-50",
21 - },
22 - size: {
23 - default: "h-9 px-4 py-2",
24 - sm: "h-8 rounded-md px-3 text-xs",
25 - lg: "h-10 rounded-md px-8",
26 - icon: "h-9 w-9",
27 - },
28 - },
29 - defaultVariants: {
30 - variant: "default",
31 - size: "default",
32 - },
33 - }
34 -)
35 -
36 -export interface ButtonProps
37 - extends React.ButtonHTMLAttributes<HTMLButtonElement>,
38 - VariantProps<typeof buttonVariants> {
39 - asChild?: boolean
40 -}
41 -
42 -const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
43 - ({ className, variant, size, asChild = false, ...props }, ref) => {
44 - const Comp = asChild ? Slot : "button"
45 - return (
46 - <Comp
47 - className={cn(buttonVariants({ variant, size, className }))}
48 - ref={ref}
49 - {...props}
50 - />
51 - )
52 - }
53 -)
54 -Button.displayName = "Button"
55 -
56 -export { Button, buttonVariants }
frontend/splitfire-desktop/components/ui/click-counter.tsx renamed
frontend/splitfire-desktop/components/ui/external-link.tsx renamed
frontend/splitfire-desktop/components/ui/global-nav.tsx renamed
+2 -2
@@ -7,9 +7,9 @@ import { MenuAlt2Icon, XIcon } from '@heroicons/react/solid';
7 import clsx from 'clsx';
8 import { useContext, useState } from 'react';
9 import Image from 'next/image';
10 -import { UserContext } from '../lib/current-user-context';
10 +import { UserContext } from '../../lib/current-user-context';
11 import { useLogger } from '@/lib/logger';
12 -import { PARAMS_USER_ID } from '@/_lib/params';
12 +import { PARAMS_USER_ID } from '@/lib/params';
13
14 export function GlobalNav() {
15
frontend/splitfire-desktop/components/ui/menus.ts renamed
frontend/splitfire-desktop/components/ui/skeleton-card.tsx renamed
frontend/splitfire-desktop/components/ui/song-provider-card.tsx renamed
frontend/splitfire-desktop/components/ui/tab-group.tsx renamed
frontend/splitfire-desktop/components/ui/tab-nav-item.tsx renamed
frontend/splitfire-desktop/components/ui/tab.tsx renamed
+1 -1
@@ -1,6 +1,6 @@
1 'use client';
2
3 -import type { Item } from '@/_ui/tab-group';
3 +import type { Item } from '@/components/ui/tab-group';
4 import clsx from 'clsx';
5 import Link from 'next/link';
6 import { useSelectedLayoutSegment } from 'next/navigation';
frontend/splitfire-desktop/lib/params.ts renamed