Autosave: 20260317-121506
This commit is contained in:
parent
9314fc80c3
commit
d3b659f3bc
@ -12,7 +12,6 @@ import {
|
||||
mdiText,
|
||||
mdiTooltipText,
|
||||
mdiViewCarousel,
|
||||
mdiViewDashboard,
|
||||
mdiVideo,
|
||||
} from '@mdi/js';
|
||||
import axios from 'axios';
|
||||
@ -21,11 +20,7 @@ import { useRouter } from 'next/router';
|
||||
import React, { ReactElement, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import BaseButton from '../components/BaseButton';
|
||||
import BaseIcon from '../components/BaseIcon';
|
||||
import CardBox from '../components/CardBox';
|
||||
import SectionMain from '../components/SectionMain';
|
||||
import SectionTitleLineWithButton from '../components/SectionTitleLineWithButton';
|
||||
import { getPageTitle } from '../config';
|
||||
import LayoutAuthenticated from '../layouts/Authenticated';
|
||||
|
||||
type TourPage = {
|
||||
id: string;
|
||||
@ -448,52 +443,36 @@ const ConstructorPage = () => {
|
||||
<Head>
|
||||
<title>{getPageTitle('Constructor')}</title>
|
||||
</Head>
|
||||
<SectionMain>
|
||||
<SectionTitleLineWithButton icon={mdiViewDashboard} title='Presentation Constructor' main>
|
||||
{''}
|
||||
</SectionTitleLineWithButton>
|
||||
<div className='relative w-screen h-screen bg-white overflow-hidden'>
|
||||
<div className='absolute top-4 left-4 z-30 flex max-w-[80vw] flex-col gap-2'>
|
||||
<p className='text-xs font-semibold text-gray-700'>{projectName || 'Loading project...'}</p>
|
||||
{errorMessage ? <p className='rounded bg-red-50 px-2 py-1 text-xs text-red-600'>{errorMessage}</p> : null}
|
||||
{successMessage ? <p className='rounded bg-green-50 px-2 py-1 text-xs text-green-700'>{successMessage}</p> : null}
|
||||
|
||||
<p className='mb-4 text-sm font-semibold'>{projectName || 'Loading project...'}</p>
|
||||
|
||||
{errorMessage ? (
|
||||
<CardBox className='mb-4'>
|
||||
<p className='text-sm text-red-600'>{errorMessage}</p>
|
||||
</CardBox>
|
||||
) : null}
|
||||
|
||||
{successMessage ? (
|
||||
<CardBox className='mb-4'>
|
||||
<p className='text-sm text-green-700'>{successMessage}</p>
|
||||
</CardBox>
|
||||
) : null}
|
||||
|
||||
<div className='mb-3 flex flex-wrap items-center gap-2'>
|
||||
{pages.length > 0 && (
|
||||
<select
|
||||
className='border border-gray-300 rounded px-3 py-2 bg-white text-sm'
|
||||
value={activePageId}
|
||||
onChange={(event) => setActivePageId(event.target.value)}
|
||||
>
|
||||
{pages.map((page, index) => (
|
||||
<option key={page.id} value={page.id}>
|
||||
{page.name || `Page ${index + 1}`}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
<div className='flex items-center gap-2'>
|
||||
<select
|
||||
className='border border-gray-300 rounded px-3 py-2 bg-white text-sm'
|
||||
value={activePageId}
|
||||
onChange={(event) => setActivePageId(event.target.value)}
|
||||
>
|
||||
{pages.map((page, index) => (
|
||||
<option key={page.id} value={page.id}>
|
||||
{page.name || `Page ${index + 1}`}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
<BaseButton
|
||||
color='lightDark'
|
||||
label='Exit to Assets'
|
||||
icon={mdiExitToApp}
|
||||
href={projectId ? `/projects/${projectId}` : '/projects/projects-list'}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<BaseButton
|
||||
color='lightDark'
|
||||
label='Exit to Assets'
|
||||
icon={mdiExitToApp}
|
||||
href={projectId ? `/projects/${projectId}` : '/projects/projects-list'}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
ref={canvasRef}
|
||||
className='relative min-h-[72vh] border border-gray-200 bg-white rounded-lg overflow-hidden'
|
||||
style={canvasBackgroundStyle}
|
||||
>
|
||||
<div ref={canvasRef} className='absolute inset-0 bg-white overflow-hidden' style={canvasBackgroundStyle}>
|
||||
{backgroundVideoUrl ? (
|
||||
<video className='absolute inset-0 w-full h-full object-cover' src={backgroundVideoUrl} autoPlay loop muted playsInline />
|
||||
) : null}
|
||||
@ -609,7 +588,7 @@ const ConstructorPage = () => {
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</SectionMain>
|
||||
</div>
|
||||
|
||||
<style jsx>{`
|
||||
.menu-action-btn {
|
||||
@ -633,7 +612,7 @@ const ConstructorPage = () => {
|
||||
};
|
||||
|
||||
ConstructorPage.getLayout = function getLayout(page: ReactElement) {
|
||||
return <LayoutAuthenticated permission='READ_ROLES'>{page}</LayoutAuthenticated>;
|
||||
return page;
|
||||
};
|
||||
|
||||
export default ConstructorPage;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user