hub
This commit is contained in:
@@ -10,7 +10,6 @@ import { useAuth } from '@/features/community/lib/auth/hooks'
|
|||||||
import { ZoneSystem } from '../systems/zone/zone-system'
|
import { ZoneSystem } from '../systems/zone/zone-system'
|
||||||
import { ToolManager } from '../tools/tool-manager'
|
import { ToolManager } from '../tools/tool-manager'
|
||||||
import { ActionMenu } from '../ui/action-menu'
|
import { ActionMenu } from '../ui/action-menu'
|
||||||
import { CloudSaveButton } from '@/features/community/components/cloud-save-button'
|
|
||||||
import { PascalRadio } from '../pascal-radio'
|
import { PascalRadio } from '../pascal-radio'
|
||||||
import { PanelManager } from '../ui/panels/panel-manager'
|
import { PanelManager } from '../ui/panels/panel-manager'
|
||||||
import { HelperManager } from '../ui/helpers/helper-manager'
|
import { HelperManager } from '../ui/helpers/helper-manager'
|
||||||
@@ -60,9 +59,6 @@ export default function Editor({ propertyId }: EditorProps) {
|
|||||||
<div className="pointer-events-auto">
|
<div className="pointer-events-auto">
|
||||||
<PascalRadio />
|
<PascalRadio />
|
||||||
</div>
|
</div>
|
||||||
<div className="pointer-events-auto">
|
|
||||||
<CloudSaveButton propertyId={propertyId} />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<SidebarProvider className="fixed z-20">
|
<SidebarProvider className="fixed z-20">
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ export function PascalRadio() {
|
|||||||
soundRef.current?.unload()
|
soundRef.current?.unload()
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [handleNext, currentTrack.file])
|
}, [handleNext, currentTrack.file, muted, isPlaying, effectiveVolume])
|
||||||
|
|
||||||
// Update volume when settings change
|
// Update volume when settings change
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -163,7 +163,7 @@ export function PascalRadio() {
|
|||||||
return (
|
return (
|
||||||
<div className="flex items-center gap-2 rounded-lg border border-border bg-background/95 px-3 py-2 text-sm font-medium shadow-lg backdrop-blur-md">
|
<div className="flex items-center gap-2 rounded-lg border border-border bg-background/95 px-3 py-2 text-sm font-medium shadow-lg backdrop-blur-md">
|
||||||
<Disc3 className={cn('h-4 w-4', isPlaying && 'animate-spin')} />
|
<Disc3 className={cn('h-4 w-4', isPlaying && 'animate-spin')} />
|
||||||
<span className="hidden sm:inline">Pascal Radio</span>
|
<span className="hidden sm:inline">Radio Pascal</span>
|
||||||
<div
|
<div
|
||||||
onClick={handlePlayPause}
|
onClick={handlePlayPause}
|
||||||
className="rounded-sm p-1 transition-all cursor-pointer bg-accent/30 hover:bg-accent hover:text-accent-foreground hover:shadow-sm"
|
className="rounded-sm p-1 transition-all cursor-pointer bg-accent/30 hover:bg-accent hover:text-accent-foreground hover:shadow-sm"
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { Building2, Layers, Settings } from "lucide-react";
|
import { Building2, Layers, Settings } from "lucide-react";
|
||||||
|
import Link from "next/link";
|
||||||
|
import Image from "next/image";
|
||||||
import {
|
import {
|
||||||
Tooltip,
|
Tooltip,
|
||||||
TooltipContent,
|
TooltipContent,
|
||||||
@@ -34,6 +36,28 @@ export function IconRail({
|
|||||||
className,
|
className,
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
{/* Pascal Logo - Link to Hub */}
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger asChild>
|
||||||
|
<Link
|
||||||
|
href="/"
|
||||||
|
className="flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground transition-all hover:bg-primary/90 mb-1"
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
src="/pascal-logo-shape.svg"
|
||||||
|
alt="Pascal"
|
||||||
|
width={16}
|
||||||
|
height={16}
|
||||||
|
className="h-4 w-4"
|
||||||
|
/>
|
||||||
|
</Link>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right">Back to Hub</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
|
||||||
|
{/* Divider */}
|
||||||
|
<div className="w-8 h-px bg-border/50 mb-1" />
|
||||||
|
|
||||||
{panels.map((panel) => {
|
{panels.map((panel) => {
|
||||||
const Icon = panel.icon;
|
const Icon = panel.icon;
|
||||||
const isActive = activePanel === panel.id;
|
const isActive = activePanel === panel.id;
|
||||||
|
|||||||
@@ -1,17 +1,18 @@
|
|||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
|
import Image from 'next/image'
|
||||||
|
import { useRouter } from 'next/navigation'
|
||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import { useAuth } from '../lib/auth/hooks'
|
import { useAuth } from '../lib/auth/hooks'
|
||||||
import { useRouter } from 'next/navigation'
|
|
||||||
import { SignInDialog } from './sign-in-dialog'
|
|
||||||
import { PropertyGrid } from './property-grid'
|
|
||||||
import { CreatePropertyButton } from './create-property-button'
|
|
||||||
import { ProfileDropdown } from './profile-dropdown'
|
|
||||||
import { NewPropertyDialog } from './new-property-dialog'
|
|
||||||
import { getPublicProperties, getUserProperties } from '../lib/properties/actions'
|
|
||||||
import { getLocalProperties, createLocalProperty } from '../lib/local-storage/property-store'
|
|
||||||
import type { Property } from '../lib/properties/types'
|
|
||||||
import type { LocalProperty } from '../lib/local-storage/property-store'
|
import type { LocalProperty } from '../lib/local-storage/property-store'
|
||||||
|
import { createLocalProperty, getLocalProperties } from '../lib/local-storage/property-store'
|
||||||
|
import { getPublicProperties, getUserProperties } from '../lib/properties/actions'
|
||||||
|
import type { Property } from '../lib/properties/types'
|
||||||
|
import { CreatePropertyButton } from './create-property-button'
|
||||||
|
import { NewPropertyDialog } from './new-property-dialog'
|
||||||
|
import { ProfileDropdown } from './profile-dropdown'
|
||||||
|
import { PropertyGrid } from './property-grid'
|
||||||
|
import { SignInDialog } from './sign-in-dialog'
|
||||||
|
|
||||||
export default function CommunityHub() {
|
export default function CommunityHub() {
|
||||||
const { isAuthenticated, isLoading: authLoading, user } = useAuth()
|
const { isAuthenticated, isLoading: authLoading, user } = useAuth()
|
||||||
@@ -94,7 +95,6 @@ export default function CommunityHub() {
|
|||||||
router.push(`/viewer/${propertyId}`)
|
router.push(`/viewer/${propertyId}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (authLoading || loading) {
|
if (authLoading || loading) {
|
||||||
return (
|
return (
|
||||||
<div className="flex h-screen w-full items-center justify-center">
|
<div className="flex h-screen w-full items-center justify-center">
|
||||||
@@ -109,7 +109,16 @@ export default function CommunityHub() {
|
|||||||
<header className="border-b border-border bg-background/95 backdrop-blur sticky top-0 z-10">
|
<header className="border-b border-border bg-background/95 backdrop-blur sticky top-0 z-10">
|
||||||
<div className="container mx-auto px-6 py-4">
|
<div className="container mx-auto px-6 py-4">
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<h1 className="text-2xl font-bold">Hub</h1>
|
<div className="flex items-center gap-2">
|
||||||
|
<Image
|
||||||
|
src="/pascal-logo-shape.svg"
|
||||||
|
alt="Pascal"
|
||||||
|
width={64}
|
||||||
|
height={64}
|
||||||
|
className="h-5 w-5"
|
||||||
|
/>
|
||||||
|
<h1 className="text-2xl font-bold">Hub</h1>
|
||||||
|
</div>
|
||||||
{!isAuthenticated ? (
|
{!isAuthenticated ? (
|
||||||
<button
|
<button
|
||||||
onClick={() => setIsSignInDialogOpen(true)}
|
onClick={() => setIsSignInDialogOpen(true)}
|
||||||
@@ -190,9 +199,7 @@ export default function CommunityHub() {
|
|||||||
showOwner
|
showOwner
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<div className="text-center py-12 text-muted-foreground">
|
<div className="text-center py-12 text-muted-foreground">No public properties yet</div>
|
||||||
No public properties yet
|
|
||||||
</div>
|
|
||||||
)}
|
)}
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<svg width="498" height="100" viewBox="0 0 498 100" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M498 8V99.648H486.084V8H498Z" fill="black"/>
|
||||||
|
<path d="M435.895 99.56C429.074 99.56 423.591 97.768 419.446 94.184C415.302 90.6 413.229 86.0347 413.229 80.488C413.229 68.5413 421.691 61.928 438.615 60.648L457.525 59.24V57.192C457.525 52.84 456.1 49.4267 453.251 46.952C450.402 44.392 446.689 43.112 442.112 43.112H441.594C437.795 43.112 434.514 44.008 431.751 45.8C429.074 47.5067 427.39 49.8533 426.699 52.84H414.654C415.518 47.0373 418.41 42.3013 423.332 38.632C428.34 34.8773 434.6 33 442.112 33C451.006 33 457.827 35.304 462.576 39.912C467.325 44.52 469.7 50.4507 469.7 57.704V84.2C469.7 90.6 469.916 95.2933 470.348 98.28H458.95C458.691 97 458.475 95.4213 458.302 93.544C458.216 91.5813 458.173 89.96 458.173 88.68C456.273 91.6667 453.337 94.2267 449.365 96.36C445.393 98.4933 440.903 99.56 435.895 99.56ZM438.356 89.448C441.465 89.448 444.487 88.7653 447.423 87.4C450.358 86.0347 452.776 83.9867 454.676 81.256C456.575 78.5253 457.525 75.24 457.525 71.4V68.584L440.169 69.736C435.248 70.0773 431.535 71.144 429.031 72.936C426.527 74.6427 425.275 76.9893 425.275 79.976C425.275 82.7067 426.397 84.968 428.642 86.76C430.974 88.552 434.039 89.448 437.838 89.448H438.356Z" fill="black"/>
|
||||||
|
<path d="M376.049 99.816C366.637 99.816 358.823 96.6587 352.606 90.344C346.475 83.8587 343.41 75.88 343.41 66.408C343.41 56.7653 346.475 48.7867 352.606 42.472C358.823 36.1573 366.637 33 376.049 33C382.525 33 388.181 34.6213 393.016 37.864C397.852 41.0213 401.478 45.416 403.896 51.048L393.016 55.528C389.649 47.6773 383.734 43.752 375.272 43.752C369.832 43.752 365.126 45.928 361.154 50.28C357.269 54.632 355.326 60.008 355.326 66.408C355.326 72.808 357.269 78.184 361.154 82.536C365.126 86.888 369.832 89.064 375.272 89.064C383.993 89.064 390.124 85.1387 393.664 77.288L404.284 81.768C401.953 87.4 398.283 91.8373 393.275 95.08C388.353 98.2373 382.611 99.816 376.049 99.816Z" fill="black"/>
|
||||||
|
<path d="M334.4 80.36C334.4 85.8213 331.983 90.4293 327.147 94.184C322.312 97.9387 316.224 99.816 308.885 99.816C302.495 99.816 296.883 98.1947 292.047 94.952C287.212 91.624 283.758 87.272 281.686 81.896L292.307 77.416C293.861 81.1707 296.106 84.1147 299.042 86.248C302.064 88.296 305.345 89.32 308.885 89.32C312.684 89.32 315.836 88.5093 318.34 86.888C320.93 85.2667 322.226 83.3467 322.226 81.128C322.226 77.1173 319.117 74.1733 312.9 72.296L302.021 69.608C289.673 66.536 283.499 60.648 283.499 51.944C283.499 46.2267 285.831 41.6613 290.493 38.248C295.242 34.7493 301.287 33 308.626 33C314.239 33 319.29 34.3227 323.78 36.968C328.356 39.6133 331.551 43.1547 333.364 47.592L322.744 51.944C321.535 49.2987 319.549 47.2507 316.786 45.8C314.109 44.264 311.087 43.496 307.719 43.496C304.611 43.496 301.805 44.264 299.301 45.8C296.883 47.336 295.674 49.2133 295.674 51.432C295.674 55.016 299.085 57.576 305.906 59.112L315.491 61.544C328.097 64.616 334.4 70.888 334.4 80.36Z" fill="black"/>
|
||||||
|
<path d="M237.568 99.56C230.747 99.56 225.264 97.768 221.119 94.184C216.975 90.6 214.902 86.0347 214.902 80.488C214.902 68.5413 223.364 61.928 240.288 60.648L259.198 59.24V57.192C259.198 52.84 257.773 49.4267 254.924 46.952C252.075 44.392 248.362 43.112 243.785 43.112H243.267C239.468 43.112 236.187 44.008 233.424 45.8C230.747 47.5067 229.063 49.8533 228.372 52.84H216.327C217.191 47.0373 220.083 42.3013 225.005 38.632C230.013 34.8773 236.273 33 243.785 33C252.679 33 259.5 35.304 264.249 39.912C268.998 44.52 271.373 50.4507 271.373 57.704V84.2C271.373 90.6 271.589 95.2933 272.021 98.28H260.623C260.364 97 260.148 95.4213 259.975 93.544C259.889 91.5813 259.846 89.96 259.846 88.68C257.946 91.6667 255.01 94.2267 251.038 96.36C247.066 98.4933 242.576 99.56 237.568 99.56ZM240.029 89.448C243.138 89.448 246.16 88.7653 249.096 87.4C252.031 86.0347 254.449 83.9867 256.349 81.256C258.248 78.5253 259.198 75.24 259.198 71.4V68.584L241.842 69.736C236.921 70.0773 233.208 71.144 230.704 72.936C228.2 74.6427 226.948 76.9893 226.948 79.976C226.948 82.7067 228.07 84.968 230.315 86.76C232.647 88.552 235.712 89.448 239.511 89.448H240.029Z" fill="black"/>
|
||||||
|
<path d="M138 0H181.473C187.869 0 193.566 1.19048 198.562 3.57143C203.659 5.85715 207.657 9.28572 210.555 13.8571C213.453 18.3333 214.902 23.7143 214.902 30C214.902 36.2857 213.453 41.7143 210.555 46.2857C207.657 50.7619 203.659 54.1905 198.562 56.5714C193.566 58.8571 187.869 60 181.473 60H151.492V100H138V0ZM179.224 48.2857C186.22 48.2857 191.667 46.7619 195.564 43.7143C199.462 40.5714 201.411 36 201.411 30C201.411 24 199.462 19.4762 195.564 16.4286C191.667 13.2857 186.22 11.7143 179.224 11.7143H151.492V48.2857H179.224Z" fill="black"/>
|
||||||
|
<rect y="60" width="20" height="40" fill="black"/>
|
||||||
|
<rect x="40" y="30" width="20" height="40" fill="black"/>
|
||||||
|
<rect x="80" width="20" height="40" fill="black"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 4.7 KiB |
@@ -0,0 +1,5 @@
|
|||||||
|
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect y="60" width="20" height="40" fill="black"/>
|
||||||
|
<rect x="40" y="30" width="20" height="40" fill="black"/>
|
||||||
|
<rect x="80" width="20" height="40" fill="black"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 267 B |
@@ -0,0 +1,8 @@
|
|||||||
|
<svg width="360" height="100" viewBox="0 0 360 100" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M360 8V99.648H348.084V8H360Z" fill="black"/>
|
||||||
|
<path d="M297.895 99.56C291.074 99.56 285.591 97.768 281.446 94.184C277.302 90.6 275.229 86.0347 275.229 80.488C275.229 68.5413 283.691 61.928 300.615 60.648L319.525 59.24V57.192C319.525 52.84 318.1 49.4267 315.251 46.952C312.402 44.392 308.689 43.112 304.112 43.112H303.594C299.795 43.112 296.514 44.008 293.751 45.8C291.074 47.5067 289.39 49.8533 288.699 52.84H276.654C277.518 47.0373 280.41 42.3013 285.332 38.632C290.34 34.8773 296.6 33 304.112 33C313.006 33 319.827 35.304 324.576 39.912C329.325 44.52 331.7 50.4507 331.7 57.704V84.2C331.7 90.6 331.916 95.2933 332.348 98.28H320.95C320.691 97 320.475 95.4213 320.302 93.544C320.216 91.5813 320.173 89.96 320.173 88.68C318.273 91.6667 315.337 94.2267 311.365 96.36C307.393 98.4933 302.903 99.56 297.895 99.56ZM300.356 89.448C303.465 89.448 306.487 88.7653 309.423 87.4C312.358 86.0347 314.776 83.9867 316.676 81.256C318.575 78.5253 319.525 75.24 319.525 71.4V68.584L302.169 69.736C297.248 70.0773 293.535 71.144 291.031 72.936C288.527 74.6427 287.275 76.9893 287.275 79.976C287.275 82.7067 288.397 84.968 290.642 86.76C292.974 88.552 296.039 89.448 299.838 89.448H300.356Z" fill="black"/>
|
||||||
|
<path d="M238.049 99.816C228.637 99.816 220.823 96.6587 214.606 90.344C208.475 83.8587 205.41 75.88 205.41 66.408C205.41 56.7653 208.475 48.7867 214.606 42.472C220.823 36.1573 228.637 33 238.049 33C244.525 33 250.181 34.6213 255.016 37.864C259.852 41.0213 263.478 45.416 265.896 51.048L255.016 55.528C251.649 47.6773 245.734 43.752 237.272 43.752C231.832 43.752 227.126 45.928 223.154 50.28C219.269 54.632 217.326 60.008 217.326 66.408C217.326 72.808 219.269 78.184 223.154 82.536C227.126 86.888 231.832 89.064 237.272 89.064C245.993 89.064 252.124 85.1387 255.664 77.288L266.284 81.768C263.953 87.4 260.283 91.8373 255.275 95.08C250.353 98.2373 244.611 99.816 238.049 99.816Z" fill="black"/>
|
||||||
|
<path d="M196.4 80.36C196.4 85.8213 193.983 90.4293 189.147 94.184C184.312 97.9387 178.224 99.816 170.885 99.816C164.495 99.816 158.883 98.1947 154.047 94.952C149.212 91.624 145.758 87.272 143.686 81.896L154.307 77.416C155.861 81.1707 158.106 84.1147 161.042 86.248C164.064 88.296 167.345 89.32 170.885 89.32C174.684 89.32 177.836 88.5093 180.34 86.888C182.93 85.2667 184.226 83.3467 184.226 81.128C184.226 77.1173 181.117 74.1733 174.9 72.296L164.021 69.608C151.673 66.536 145.499 60.648 145.499 51.944C145.499 46.2267 147.831 41.6613 152.493 38.248C157.242 34.7493 163.287 33 170.626 33C176.239 33 181.29 34.3227 185.78 36.968C190.356 39.6133 193.551 43.1547 195.364 47.592L184.744 51.944C183.535 49.2987 181.549 47.2507 178.786 45.8C176.109 44.264 173.087 43.496 169.719 43.496C166.611 43.496 163.805 44.264 161.301 45.8C158.883 47.336 157.674 49.2133 157.674 51.432C157.674 55.016 161.085 57.576 167.906 59.112L177.491 61.544C190.097 64.616 196.4 70.888 196.4 80.36Z" fill="black"/>
|
||||||
|
<path d="M99.5683 99.56C92.7469 99.56 87.2639 97.768 83.1193 94.184C78.9747 90.6 76.9023 86.0347 76.9023 80.488C76.9023 68.5413 85.3643 61.928 102.288 60.648L121.198 59.24V57.192C121.198 52.84 119.773 49.4267 116.924 46.952C114.075 44.392 110.362 43.112 105.785 43.112H105.267C101.468 43.112 98.1867 44.008 95.4237 45.8C92.7469 47.5067 91.0632 49.8533 90.3724 52.84H78.3271C79.1905 47.0373 82.0831 42.3013 87.0049 38.632C92.013 34.8773 98.2731 33 105.785 33C114.679 33 121.5 35.304 126.249 39.912C130.998 44.52 133.373 50.4507 133.373 57.704V84.2C133.373 90.6 133.589 95.2933 134.021 98.28H122.623C122.364 97 122.148 95.4213 121.975 93.544C121.889 91.5813 121.846 89.96 121.846 88.68C119.946 91.6667 117.01 94.2267 113.038 96.36C109.066 98.4933 104.576 99.56 99.5683 99.56ZM102.029 89.448C105.138 89.448 108.16 88.7653 111.096 87.4C114.031 86.0347 116.449 83.9867 118.349 81.256C120.248 78.5253 121.198 75.24 121.198 71.4V68.584L103.842 69.736C98.9207 70.0773 95.2078 71.144 92.7037 72.936C90.1997 74.6427 88.9477 76.9893 88.9477 79.976C88.9477 82.7067 90.0702 84.968 92.3152 86.76C94.6465 88.552 97.7118 89.448 101.511 89.448H102.029Z" fill="black"/>
|
||||||
|
<path d="M0 0H43.4731C49.8691 0 55.5655 1.19048 60.5625 3.57143C65.6593 5.85715 69.6568 9.28572 72.555 13.8571C75.4532 18.3333 76.9023 23.7143 76.9023 30C76.9023 36.2857 75.4532 41.7143 72.555 46.2857C69.6568 50.7619 65.6593 54.1905 60.5625 56.5714C55.5655 58.8571 49.8691 60 43.4731 60H13.4916V100H0V0ZM41.2244 48.2857C48.2201 48.2857 53.6667 46.7619 57.5643 43.7143C61.4619 40.5714 63.4107 36 63.4107 30C63.4107 24 61.4619 19.4762 57.5643 16.4286C53.6667 13.2857 48.2201 11.7143 41.2244 11.7143H13.4916V48.2857H41.2244Z" fill="black"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 4.6 KiB |
Reference in New Issue
Block a user