Skip to content

Commit

Permalink
Merge pull request #1003 from vrc-get/fix-table-width
Browse files Browse the repository at this point in the history
chore: improve projects page with narrow window
  • Loading branch information
anatawa12 committed May 19, 2024
2 parents a1e995b + f7cba77 commit 7051558
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-gui.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The format is based on [Keep a Changelog].
- Ask installing unity for a project if not installed `#988`
- Removed Visual Scripting from dependencies of template projects `#991`
- Support more legacy browsers `#994`
- Improved UI with narrow windows `#1003`

### Deprecated

Expand Down
23 changes: 14 additions & 9 deletions vrc-get-gui/app/projects/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ function ProjectRow(
const removed = !project.is_exists;

const MayTooltip = removed ? Tooltip : Fragment;
const MayTooltipRev = !removed ? Tooltip : Fragment;

const RowButton = forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button>>(function RowButton(props, ref) {
if (removed) {
Expand Down Expand Up @@ -529,27 +530,31 @@ function ProjectRow(

return (
<tr className={`even:bg-blue-gray-50/50 ${(removed || loading) ? 'opacity-50' : ''}`}>
<td className={cellClass}>
<td className={`${cellClass} w-3`}>
<Checkbox ripple={false} containerProps={{className: "p-0 rounded-none"}}
checked={project.favorite}
onChange={onToggleFavorite}
disabled={removed || loading}
icon={<StarIcon className={"size-3"}/>}
className="hover:before:content-none before:transition-none border-none"/>
</td>
<td className={cellClass}>
<td className={`${cellClass} max-w-64 overflow-hidden`}>
<MayTooltip content={tc("projects:tooltip:no directory")}>
<div className="flex flex-col">
<Typography className="font-normal whitespace-pre">
{project.name}
</Typography>
<Typography className="font-normal opacity-50 text-sm whitespace-pre">
{project.path}
</Typography>
<MayTooltipRev content={project.name}>
<Typography className="font-normal whitespace-pre">
{project.name}
</Typography>
</MayTooltipRev>
<MayTooltipRev content={project.path}>
<Typography className="font-normal opacity-50 text-sm whitespace-pre">
{project.path}
</Typography>
</MayTooltipRev>
</div>
</MayTooltip>
</td>
<td className={`${cellClass} w-[8em]`}>
<td className={`${cellClass} w-[8em] min-w-[8em]`}>
<div className="flex flex-row gap-2">
<div className="flex items-center">
{projectTypeKind === "avatars" ? <UserCircleIcon className={typeIconClass}/> :
Expand Down
2 changes: 1 addition & 1 deletion vrc-get-gui/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pub struct WindowSize {
impl Default for WindowSize {
fn default() -> Self {
WindowSize {
width: 1000,
width: 1300,
height: 800,
}
}
Expand Down

0 comments on commit 7051558

Please sign in to comment.