mirror of
https://github.com/vrc-get/vrc-get.git
synced 2026-06-21 09:58:08 +00:00
fix: formats
This commit is contained in:
parent
4db0e64e81
commit
8b0956c6df
14 changed files with 136 additions and 180 deletions
|
|
@ -13,10 +13,7 @@ import { HNavBar, VStack } from "@/components/layout";
|
|||
import { ScrollableCardTable } from "@/components/ScrollableCardTable";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Checkbox } from "@/components/ui/checkbox";
|
||||
import {
|
||||
DialogFooter,
|
||||
DialogTitle,
|
||||
} from "@/components/ui/dialog";
|
||||
import { DialogFooter, DialogTitle } from "@/components/ui/dialog";
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
|
|
|
|||
|
|
@ -25,10 +25,7 @@ import {
|
|||
Autocomplete,
|
||||
} from "@/components/ui/autocomplete";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
DialogFooter,
|
||||
DialogTitle,
|
||||
} from "@/components/ui/dialog";
|
||||
import { DialogFooter, DialogTitle } from "@/components/ui/dialog";
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
|
|
@ -804,59 +801,57 @@ function TemplateEditor({
|
|||
<h3 className={"font-bold w-full text-center content-center"}>
|
||||
{tc("templates:dialog:general information")}
|
||||
</h3>
|
||||
<table
|
||||
className={"grid grid-cols-[min-content_1fr] gap-x-4 gap-y-1"}
|
||||
>
|
||||
<table className={"grid grid-cols-[min-content_1fr] gap-x-4 gap-y-1"}>
|
||||
<tbody className={"contents"}>
|
||||
<tr className={"contents"}>
|
||||
<th className={"content-center text-start whitespace-nowrap"}>
|
||||
{tc("general:name")}:
|
||||
</th>
|
||||
<td className={"flex"}>
|
||||
<Input
|
||||
className={cn(
|
||||
"grow",
|
||||
name.length === 0 &&
|
||||
"border-destructive ring-destructive text-destructive",
|
||||
)}
|
||||
value={name}
|
||||
onChange={(e) => setName(e.target.value)}
|
||||
placeholder={"Your New Template"}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr className={"contents"}>
|
||||
<th className={"content-center text-start whitespace-nowrap"}>
|
||||
{tc("templates:dialog:base template")}:
|
||||
</th>
|
||||
<td className={"flex"}>
|
||||
<TemplateSelect
|
||||
value={baseTemplate}
|
||||
onValueChange={setBaseTemplate}
|
||||
templates={templates}
|
||||
favoriteTemplates={favoriteTemplates}
|
||||
className={"grow"}
|
||||
excludeNoIdTemplates
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr className={"contents"}>
|
||||
<th className={"content-center text-start whitespace-nowrap"}>
|
||||
{tc("templates:dialog:unity version")}:
|
||||
</th>
|
||||
<td className={"flex"}>
|
||||
<Autocomplete
|
||||
className={cn(
|
||||
"grow",
|
||||
unityRange.match(unityRangeRegex) ||
|
||||
"border-destructive ring-destructive text-destructive",
|
||||
)}
|
||||
value={unityRange}
|
||||
onChange={(value) => setUnityRange(value)}
|
||||
options={unityCandidates}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr className={"contents"}>
|
||||
<th className={"content-center text-start whitespace-nowrap"}>
|
||||
{tc("general:name")}:
|
||||
</th>
|
||||
<td className={"flex"}>
|
||||
<Input
|
||||
className={cn(
|
||||
"grow",
|
||||
name.length === 0 &&
|
||||
"border-destructive ring-destructive text-destructive",
|
||||
)}
|
||||
value={name}
|
||||
onChange={(e) => setName(e.target.value)}
|
||||
placeholder={"Your New Template"}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr className={"contents"}>
|
||||
<th className={"content-center text-start whitespace-nowrap"}>
|
||||
{tc("templates:dialog:base template")}:
|
||||
</th>
|
||||
<td className={"flex"}>
|
||||
<TemplateSelect
|
||||
value={baseTemplate}
|
||||
onValueChange={setBaseTemplate}
|
||||
templates={templates}
|
||||
favoriteTemplates={favoriteTemplates}
|
||||
className={"grow"}
|
||||
excludeNoIdTemplates
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr className={"contents"}>
|
||||
<th className={"content-center text-start whitespace-nowrap"}>
|
||||
{tc("templates:dialog:unity version")}:
|
||||
</th>
|
||||
<td className={"flex"}>
|
||||
<Autocomplete
|
||||
className={cn(
|
||||
"grow",
|
||||
unityRange.match(unityRangeRegex) ||
|
||||
"border-destructive ring-destructive text-destructive",
|
||||
)}
|
||||
value={unityRange}
|
||||
onChange={(value) => setUnityRange(value)}
|
||||
options={unityCandidates}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
|
|
@ -867,60 +862,60 @@ function TemplateEditor({
|
|||
<div className={"w-full max-h-[30vh] overflow-y-auto shrink"}>
|
||||
<table className={"w-full"}>
|
||||
<thead>
|
||||
<tr>
|
||||
<th className={"sticky top-0 z-10 bg-background"}>
|
||||
{tc("general:name")}
|
||||
</th>
|
||||
<th className={"sticky top-0 z-10 bg-background"}>
|
||||
{tc("general:version")}
|
||||
</th>
|
||||
<th className={"sticky top-0 z-10 bg-background"} />
|
||||
</tr>
|
||||
<tr>
|
||||
<th className={"sticky top-0 z-10 bg-background"}>
|
||||
{tc("general:name")}
|
||||
</th>
|
||||
<th className={"sticky top-0 z-10 bg-background"}>
|
||||
{tc("general:version")}
|
||||
</th>
|
||||
<th className={"sticky top-0 z-10 bg-background"} />
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<ReorderableList
|
||||
context={packagesListContext}
|
||||
renderItem={(value, id) => (
|
||||
<>
|
||||
<td>
|
||||
<div className={"flex"}>
|
||||
<Autocomplete
|
||||
value={value.name}
|
||||
className={"grow"}
|
||||
options={packageCandidates}
|
||||
onChange={(value) =>
|
||||
packagesListContext.update(id, (old) => ({
|
||||
...old,
|
||||
name: value,
|
||||
}))
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div className={"flex"}>
|
||||
<Autocomplete
|
||||
value={value.range}
|
||||
className={cn(
|
||||
"grow",
|
||||
validVersion(value) ||
|
||||
"border-destructive ring-destructive text-destructive",
|
||||
)}
|
||||
options={
|
||||
versionCandidatePerPackage.get(value.name) ?? []
|
||||
}
|
||||
onChange={(value) =>
|
||||
packagesListContext.update(id, (old) => ({
|
||||
...old,
|
||||
range: value,
|
||||
}))
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</td>
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
<ReorderableList
|
||||
context={packagesListContext}
|
||||
renderItem={(value, id) => (
|
||||
<>
|
||||
<td>
|
||||
<div className={"flex"}>
|
||||
<Autocomplete
|
||||
value={value.name}
|
||||
className={"grow"}
|
||||
options={packageCandidates}
|
||||
onChange={(value) =>
|
||||
packagesListContext.update(id, (old) => ({
|
||||
...old,
|
||||
name: value,
|
||||
}))
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div className={"flex"}>
|
||||
<Autocomplete
|
||||
value={value.range}
|
||||
className={cn(
|
||||
"grow",
|
||||
validVersion(value) ||
|
||||
"border-destructive ring-destructive text-destructive",
|
||||
)}
|
||||
options={
|
||||
versionCandidatePerPackage.get(value.name) ?? []
|
||||
}
|
||||
onChange={(value) =>
|
||||
packagesListContext.update(id, (old) => ({
|
||||
...old,
|
||||
range: value,
|
||||
}))
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
</td>
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -939,26 +934,26 @@ function TemplateEditor({
|
|||
<div className={"w-full max-h-[30vh] overflow-y-auto shrink"}>
|
||||
<table className={"w-full"}>
|
||||
<tbody>
|
||||
<ReorderableList
|
||||
context={unityPackagesListContext}
|
||||
ifEmpty={() => (
|
||||
<td className={"text-center"}>
|
||||
{tc("templates:dialog:no unitypackages")}
|
||||
</td>
|
||||
)}
|
||||
renderItem={(value) => (
|
||||
<td>
|
||||
<div className={"flex"}>
|
||||
<Input
|
||||
type={"text"}
|
||||
value={value}
|
||||
className={"grow"}
|
||||
disabled
|
||||
/>
|
||||
</div>
|
||||
</td>
|
||||
)}
|
||||
/>
|
||||
<ReorderableList
|
||||
context={unityPackagesListContext}
|
||||
ifEmpty={() => (
|
||||
<td className={"text-center"}>
|
||||
{tc("templates:dialog:no unitypackages")}
|
||||
</td>
|
||||
)}
|
||||
renderItem={(value) => (
|
||||
<td>
|
||||
<div className={"flex"}>
|
||||
<Input
|
||||
type={"text"}
|
||||
value={value}
|
||||
className={"grow"}
|
||||
disabled
|
||||
/>
|
||||
</div>
|
||||
</td>
|
||||
)}
|
||||
/>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,10 +5,7 @@ import { useEffect, useId, useMemo, useState } from "react";
|
|||
import { VStack } from "@/components/layout";
|
||||
import { TemplateSelect } from "@/components/TemplateSelect";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
DialogFooter,
|
||||
DialogTitle,
|
||||
} from "@/components/ui/dialog";
|
||||
import { DialogFooter, DialogTitle } from "@/components/ui/dialog";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import {
|
||||
Select,
|
||||
|
|
|
|||
|
|
@ -13,10 +13,7 @@ import { FavoriteStarToggleButton } from "@/components/FavoriteStarButton";
|
|||
import { OpenUnityButton } from "@/components/OpenUnityButton";
|
||||
import { RemoveProjectDialog } from "@/components/RemoveProjectDialog";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
DialogFooter,
|
||||
DialogTitle,
|
||||
} from "@/components/ui/dialog";
|
||||
import { DialogFooter, DialogTitle } from "@/components/ui/dialog";
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ import type { NavigateFn } from "@tanstack/react-router";
|
|||
import { useEffect, useState } from "react";
|
||||
import { VStack } from "@/components/layout";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
DialogFooter,
|
||||
DialogTitle,
|
||||
} from "@/components/ui/dialog";
|
||||
import { DialogFooter, DialogTitle } from "@/components/ui/dialog";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Progress } from "@/components/ui/progress";
|
||||
import { assertNever } from "@/lib/assert-never";
|
||||
|
|
|
|||
|
|
@ -2,10 +2,7 @@ import type { NavigateFn } from "@tanstack/react-router";
|
|||
import React, { Fragment, useEffect, useState } from "react";
|
||||
import { BackupProjectDialog } from "@/components/BackupProjectDialog";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
DialogFooter,
|
||||
DialogTitle,
|
||||
} from "@/components/ui/dialog";
|
||||
import { DialogFooter, DialogTitle } from "@/components/ui/dialog";
|
||||
import { Progress } from "@/components/ui/progress";
|
||||
import { UnitySelectorDialog } from "@/components/unity-selector-dialog";
|
||||
import { assertNever } from "@/lib/assert-never";
|
||||
|
|
|
|||
|
|
@ -24,10 +24,7 @@ import { OpenUnityButton } from "@/components/OpenUnityButton";
|
|||
import { RemoveProjectDialog } from "@/components/RemoveProjectDialog";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Card } from "@/components/ui/card";
|
||||
import {
|
||||
DialogFooter,
|
||||
DialogTitle,
|
||||
} from "@/components/ui/dialog";
|
||||
import { DialogFooter, DialogTitle } from "@/components/ui/dialog";
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
|
|
|
|||
|
|
@ -27,10 +27,7 @@ import { ScrollPageContainer } from "@/components/ScrollPageContainer";
|
|||
import { Button } from "@/components/ui/button";
|
||||
import { Card } from "@/components/ui/card";
|
||||
import { Checkbox } from "@/components/ui/checkbox";
|
||||
import {
|
||||
DialogFooter,
|
||||
DialogTitle,
|
||||
} from "@/components/ui/dialog";
|
||||
import { DialogFooter, DialogTitle } from "@/components/ui/dialog";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import {
|
||||
Tooltip,
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
import type React from "react";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
DialogFooter,
|
||||
DialogTitle,
|
||||
} from "@/components/ui/dialog";
|
||||
import { DialogFooter, DialogTitle } from "@/components/ui/dialog";
|
||||
import { Progress } from "@/components/ui/progress";
|
||||
import type { TauriCreateBackupProgress } from "@/lib/bindings";
|
||||
import { commands } from "@/lib/bindings";
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
import React, { useState } from "react";
|
||||
import { ExternalLink } from "@/components/ExternalLink";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
DialogFooter,
|
||||
DialogTitle,
|
||||
} from "@/components/ui/dialog";
|
||||
import { DialogFooter, DialogTitle } from "@/components/ui/dialog";
|
||||
import { Progress } from "@/components/ui/progress";
|
||||
import { assertNever } from "@/lib/assert-never";
|
||||
import type { CheckForUpdateResponse } from "@/lib/bindings";
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
||||
import { useLocation, useRouter } from "@tanstack/react-router";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
DialogFooter,
|
||||
DialogTitle,
|
||||
} from "@/components/ui/dialog";
|
||||
import { DialogFooter, DialogTitle } from "@/components/ui/dialog";
|
||||
import { commands } from "@/lib/bindings";
|
||||
import type { DialogContext } from "@/lib/dialog";
|
||||
import { tc, tt } from "@/lib/i18n";
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
import { useId, useState } from "react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Checkbox } from "@/components/ui/checkbox";
|
||||
import {
|
||||
DialogFooter,
|
||||
DialogTitle,
|
||||
} from "@/components/ui/dialog";
|
||||
import { DialogFooter, DialogTitle } from "@/components/ui/dialog";
|
||||
import { Label } from "@/components/ui/label";
|
||||
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";
|
||||
import type { DialogContext } from "@/lib/dialog";
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
import { useState } from "react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Checkbox } from "@/components/ui/checkbox";
|
||||
import {
|
||||
DialogFooter,
|
||||
DialogTitle,
|
||||
} from "@/components/ui/dialog";
|
||||
import { DialogFooter, DialogTitle } from "@/components/ui/dialog";
|
||||
import {
|
||||
commands,
|
||||
type TauriImportDuplicated,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
DialogFooter,
|
||||
DialogTitle,
|
||||
} from "@/components/ui/dialog";
|
||||
import { DialogFooter, DialogTitle } from "@/components/ui/dialog";
|
||||
import { UnitySelectorDialog } from "@/components/unity-selector-dialog";
|
||||
import { commands, type TauriUnityVersions } from "@/lib/bindings";
|
||||
import { type DialogContext, openSingleDialog } from "@/lib/dialog";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue