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