miss change

This commit is contained in:
Layne 2021-07-25 01:50:29 -04:00
parent 9594843e2e
commit ba63351b8a
7 changed files with 636 additions and 167 deletions

View File

@ -89,8 +89,20 @@
],
"hotelview": {
"widgets": {
"types": "news,",
"slot1": "news"
"slot.1.widget": "promoarticle",
"slot.1.conf": "",
"slot.2.widget": "",
"slot.2.conf": "",
"slot.3.widget": "",
"slot.3.conf": "",
"slot.4.widget": "",
"slot.4.conf": "",
"slot.5.widget": "",
"slot.5.conf": "",
"slot.6.widget": "achievementcompetition_hall_of_fame",
"slot.6.conf": "",
"slot.7.widget": "",
"slot.7.conf": ""
},
"images": {
"background": "${asset.url}/images/reception/stretch_blue.png",
@ -460,262 +472,682 @@
],
"camera.available.effects": [
{
"name":"dark_sepia",
"colorMatrix": [0.4, 0.4, 0.1, 0, 110, 0.3, 0.4, 0.1, 0, 30, 0.3, 0.2, 0.1, 0, 0, 0, 0, 0, 1, 0],
"name": "dark_sepia",
"colorMatrix": [
0.4,
0.4,
0.1,
0,
110,
0.3,
0.4,
0.1,
0,
30,
0.3,
0.2,
0.1,
0,
0,
0,
0,
0,
1,
0
],
"minLevel": 0,
"enabled": true
},
{
"name":"increase_saturation",
"colorMatrix": [2, -0.5, -0.5, 0, 0, -0.5, 2, -0.5, 0, 0, -0.5, -0.5, 2, 0, 0, 0, 0, 0, 1, 0],
"name": "increase_saturation",
"colorMatrix": [
2,
-0.5,
-0.5,
0,
0,
-0.5,
2,
-0.5,
0,
0,
-0.5,
-0.5,
2,
0,
0,
0,
0,
0,
1,
0
],
"minLevel": 0,
"enabled": true
},
{
"name":"increase_contrast",
"colorMatrix": [1.5, 0, 0, 0, -50, 0, 1.5, 0, 0, -50, 0, 0, 1.5, 0, -50, 0, 0, 0, 1.5, 0],
"name": "increase_contrast",
"colorMatrix": [
1.5,
0,
0,
0,
-50,
0,
1.5,
0,
0,
-50,
0,
0,
1.5,
0,
-50,
0,
0,
0,
1.5,
0
],
"minLevel": 0,
"enabled": true
},
{
"name":"shadow_multiply_02",
"name": "shadow_multiply_02",
"colorMatrix": [],
"minLevel": 0,
"blendMode": 2,
"enabled": true
},
{
"name":"color_1",
"colorMatrix": [0.393, 0.769, 0.189, 0, 0, 0.349, 0.686, 0.168, 0, 0, 0.272, 0.534, 0.131, 0, 0, 0, 0, 0, 1, 0],
"name": "color_1",
"colorMatrix": [
0.393,
0.769,
0.189,
0,
0,
0.349,
0.686,
0.168,
0,
0,
0.272,
0.534,
0.131,
0,
0,
0,
0,
0,
1,
0
],
"minLevel": 1,
"enabled": true
},
{
"name":"hue_bright_sat",
"colorMatrix": [1, 0.6, 0.2, 0, -50, 0.2, 1, 0.6, 0, -50, 0.6, 0.2, 1, 0, -50, 0, 0, 0, 1, 0],
"name": "hue_bright_sat",
"colorMatrix": [
1,
0.6,
0.2,
0,
-50,
0.2,
1,
0.6,
0,
-50,
0.6,
0.2,
1,
0,
-50,
0,
0,
0,
1,
0
],
"minLevel": 1,
"enabled": true
},
{
"name":"hearts_hardlight_02",
"name": "hearts_hardlight_02",
"colorMatrix": [],
"minLevel": 1,
"blendMode": 9,
"enabled": true
},
{
"name":"texture_overlay",
"name": "texture_overlay",
"colorMatrix": [],
"minLevel": 1,
"blendMode": 4,
"enabled": true
},
{
"name":"pinky_nrm",
"name": "pinky_nrm",
"colorMatrix": [],
"minLevel": 1,
"blendMode": 0,
"enabled": true
},
{
"name":"color_2",
"colorMatrix": [0.333, 0.333, 0.333, 0, 0, 0.333, 0.333, 0.333, 0, 0, 0.333, 0.333, 0.333, 0, 0, 0, 0, 0, 1, 0],
"name": "color_2",
"colorMatrix": [
0.333,
0.333,
0.333,
0,
0,
0.333,
0.333,
0.333,
0,
0,
0.333,
0.333,
0.333,
0,
0,
0,
0,
0,
1,
0
],
"minLevel": 2,
"enabled": true
},
{
"name":"night_vision",
"colorMatrix": [0, 0, 0, 0, 0, 0, 1.1, 0, 0, -50, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
"name": "night_vision",
"colorMatrix": [
0,
0,
0,
0,
0,
0,
1.1,
0,
0,
-50,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
],
"minLevel": 2,
"enabled": true
},
{
"name":"stars_hardlight_02",
"name": "stars_hardlight_02",
"colorMatrix": [],
"minLevel": 2,
"blendMode": 9,
"enabled": true
},
{
"name":"coffee_mpl",
"name": "coffee_mpl",
"colorMatrix": [],
"minLevel": 2,
"blendMode": 2,
"enabled": true
},
{
"name":"security_hardlight",
"name": "security_hardlight",
"colorMatrix": [],
"minLevel": 3,
"blendMode": 9,
"enabled": true
},
{
"name":"bluemood_mpl",
"name": "bluemood_mpl",
"colorMatrix": [],
"minLevel": 3,
"blendMode": 2,
"enabled": true
},
{
"name":"rusty_mpl",
"name": "rusty_mpl",
"colorMatrix": [],
"minLevel": 3,
"blendMode": 2,
"enabled": true
},
{
"name":"decr_conrast",
"colorMatrix": [0.5, 0, 0, 0, 50, 0, 0.5, 0, 0, 50, 0, 0, 0.5, 0, 50, 0, 0, 0, 1, 0],
"name": "decr_conrast",
"colorMatrix": [
0.5,
0,
0,
0,
50,
0,
0.5,
0,
0,
50,
0,
0,
0.5,
0,
50,
0,
0,
0,
1,
0
],
"minLevel": 4,
"enabled": true
},
{
"name":"green_2",
"colorMatrix": [0.5, 0.5, 0.5, 0, 0, 0.5, 0.5, 0.5, 0, 90, 0.5, 0.5, 0.5, 0, 0, 0, 0, 0, 1, 0],
"name": "green_2",
"colorMatrix": [
0.5,
0.5,
0.5,
0,
0,
0.5,
0.5,
0.5,
0,
90,
0.5,
0.5,
0.5,
0,
0,
0,
0,
0,
1,
0
],
"minLevel": 4,
"enabled": true
},
{
"name":"alien_hrd",
"name": "alien_hrd",
"colorMatrix": [],
"minLevel": 4,
"blendMode": 9,
"enabled": true
},
{
"name":"color_3",
"colorMatrix": [0.609, 0.609, 0.082, 0, 0, 0.309, 0.609, 0.082, 0, 0, 0.309, 0.609, 0.082, 0, 0, 0, 0, 0, 1, 0],
"name": "color_3",
"colorMatrix": [
0.609,
0.609,
0.082,
0,
0,
0.309,
0.609,
0.082,
0,
0,
0.309,
0.609,
0.082,
0,
0,
0,
0,
0,
1,
0
],
"minLevel": 5,
"enabled": true
},
{
"name":"color_4",
"colorMatrix": [0.8, -0.8, 1, 0, 70, 0.8, -0.8, 1, 0, 70, 0.8, -0.8, 1, 0, 70, 0, 0, 0, 1, 0],
"name": "color_4",
"colorMatrix": [
0.8,
-0.8,
1,
0,
70,
0.8,
-0.8,
1,
0,
70,
0.8,
-0.8,
1,
0,
70,
0,
0,
0,
1,
0
],
"minLevel": 5,
"enabled": true
},
{
"name":"toxic_hrd",
"name": "toxic_hrd",
"colorMatrix": [],
"minLevel": 5,
"blendMode": 9,
"enabled": true
},
{
"name":"hypersaturated",
"colorMatrix": [2, -1, 0, 0, 0, -1, 2, 0, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 1, 0],
"name": "hypersaturated",
"colorMatrix": [
2,
-1,
0,
0,
0,
-1,
2,
0,
0,
0,
0,
-1,
2,
0,
0,
0,
0,
0,
1,
0
],
"minLevel": 6,
"enabled": true
},
{
"name":"Yellow",
"colorMatrix": [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
"name": "Yellow",
"colorMatrix": [
1,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0
],
"minLevel": 6,
"enabled": true
},
{
"name":"misty_hrd",
"name": "misty_hrd",
"colorMatrix": [],
"minLevel": 6,
"blendMode": 9,
"enabled": true
},
{
"name":"x_ray",
"colorMatrix": [0, 1.2, 0, 0, -100, 0, 2, 0, 0, -120, 0, 2, 0, 0, -120, 0, 0, 0, 1, 0],
"name": "x_ray",
"colorMatrix": [
0,
1.2,
0,
0,
-100,
0,
2,
0,
0,
-120,
0,
2,
0,
0,
-120,
0,
0,
0,
1,
0
],
"minLevel": 7,
"enabled": true
},
{
"name":"decrease_saturation",
"colorMatrix": [0.7, 0.2, 0.2, 0, 0, 0.2, 0.7, 0.2, 0, 0, 0.2, 0.2, 0.7, 0, 0, 0, 0, 0, 1, 0],
"name": "decrease_saturation",
"colorMatrix": [
0.7,
0.2,
0.2,
0,
0,
0.2,
0.7,
0.2,
0,
0,
0.2,
0.2,
0.7,
0,
0,
0,
0,
0,
1,
0
],
"minLevel": 7,
"enabled": true
},
{
"name":"drops_mpl",
"name": "drops_mpl",
"colorMatrix": [],
"minLevel": 8,
"blendMode": 2,
"enabled": true
},
{
"name":"shiny_hrd",
"name": "shiny_hrd",
"colorMatrix": [],
"minLevel": 9,
"blendMode": 9,
"enabled": true
},
{
"name":"glitter_hrd",
"name": "glitter_hrd",
"colorMatrix": [],
"minLevel": 10,
"blendMode": 9,
"enabled": true
},
{
"name":"frame_gold",
"name": "frame_gold",
"colorMatrix": [],
"minLevel": 10,
"blendMode": 0,
"enabled": true
},
{
"name":"frame_gray_4",
"name": "frame_gray_4",
"colorMatrix": [],
"minLevel": 10,
"blendMode": 0,
"enabled": true
},
{
"name":"frame_black_2",
"name": "frame_black_2",
"colorMatrix": [],
"minLevel": 10,
"blendMode": 0,
"enabled": true
},
{
"name":"frame_wood_2",
"name": "frame_wood_2",
"colorMatrix": [],
"minLevel": 10,
"blendMode": 0,
"enabled": true
},
{
"name":"finger_nrm",
"name": "finger_nrm",
"colorMatrix": [],
"minLevel": 10,
"blendMode": 0,
"enabled": true
},
{
"name":"color_5",
"colorMatrix": [3.309, 0.609, 1.082, 0.2, 0, 0.309, 0.609, 0.082, 0, 0, 1.309, 0.609, 0.082, 0, 0, 0, 0, 0, 1, 0],
"name": "color_5",
"colorMatrix": [
3.309,
0.609,
1.082,
0.2,
0,
0.309,
0.609,
0.082,
0,
0,
1.309,
0.609,
0.082,
0,
0,
0,
0,
0,
1,
0
],
"minLevel": 10,
"enabled": true
},
{
"name":"black_white_negative",
"colorMatrix": [-0.5, -0.5, -0.5, 0, 0, -0.5, -0.5, -0.5, 0, 0, -0.5, -0.5, -0.5, 0, 0, 0, 0, 0, 1, 0],
"name": "black_white_negative",
"colorMatrix": [
-0.5,
-0.5,
-0.5,
0,
0,
-0.5,
-0.5,
-0.5,
0,
0,
-0.5,
-0.5,
-0.5,
0,
0,
0,
0,
0,
1,
0
],
"minLevel": 10,
"enabled": true
},
{
"name":"blue",
"colorMatrix": [0.5, 0.5, 0.5, 0, -255, 0.5, 0.5, 0.5, 0, -170, 0.5, 0.5, 0.5, 0, 0, 0, 0, 0, 1, 0],
"name": "blue",
"colorMatrix": [
0.5,
0.5,
0.5,
0,
-255,
0.5,
0.5,
0.5,
0,
-170,
0.5,
0.5,
0.5,
0,
0,
0,
0,
0,
1,
0
],
"minLevel": 10,
"enabled": true
},
{
"name":"red",
"colorMatrix": [0.5, 0.5, 0.5, 0, 0, 0.5, 0.5, 0.5, 0, -170, 0.5, 0.5, 0.5, 0, -170, 0, 0, 0, 1, 0],
"name": "red",
"colorMatrix": [
0.5,
0.5,
0.5,
0,
0,
0.5,
0.5,
0.5,
0,
-170,
0.5,
0.5,
0.5,
0,
-170,
0,
0,
0,
1,
0
],
"minLevel": 10,
"enabled": true
},
{
"name":"green",
"colorMatrix": [0.5, 0.5, 0.5, 0, -170, 0.5, 0.5, 0.5, 0, 0, 0.5, 0.5, 0.5, 0, -170, 0, 0, 0, 1, 0],
"name": "green",
"colorMatrix": [
0.5,
0.5,
0.5,
0,
-170,
0.5,
0.5,
0.5,
0,
0,
0.5,
0.5,
0.5,
0,
-170,
0,
0,
0,
1,
0
],
"minLevel": 10,
"enabled": true
}

View File

@ -4,6 +4,7 @@
width: 100%;
height: calc(100% - 55px);
background: rgba($black, 1);
color:#000;
.avatar-image {
bottom: 12px;
@ -13,6 +14,7 @@
}
.background {
top:0;
height: 100%;
width: 100%;
background-position: left;
@ -74,58 +76,20 @@
background-position: right top;
}
.landing-widgets {
z-index: 9;
position: relative;
}
.widget-slot {
position:absolute;
z-index: 4;
overflow: hidden;
z-index: 9;
}
.slot-1 {
top: 5px;
left: 10px;
width: 100%;
height: 100px;
}
.slot-2 {
top: 100px;
left: 100px;
width: 200px;
height:100px;
}
.slot-3 {
top: 300px;
left: 100px;
width: 200px;
height: 100px;
}
.slot-4 {
top: 100px;
left: 600px;
width: 200px;
height: 100px;
}
.slot-5 {
top: 300px;
left: 600px;
width: 200px;
height: 100px;
}
.slot-6 {
left: 10px;
bottom: 5px;
width: 100%;
height: 100px;
}
.slot-7 {
width: 100px;
height: 100%;
right: 5px;
hr {
background: $black;
box-shadow: 0 1px rgba($white,.5);
opacity: 0.5
}
}

View File

@ -38,13 +38,56 @@ export const HotelView: FC<HotelViewProps> = props =>
return (
<div className="nitro-hotel-view" style={(backgroundColor && backgroundColor) ? { background: backgroundColor } : {}}>
{Array.from(Array(widgetSlotCount)).map((x, index) =>
<WidgetSlotView
slot={index + 1}
widgetType={GetConfiguration('hotelview')['widgets']['slot.' + (index + 1) + '.widget']}
widgetConf={GetConfiguration('hotelview')['widgets']['slot.' + (index + 1) +'.conf']}
key={index.toString()}
/>)}
<div className="container h-100 py-3 overflow-hidden landing-widgets">
<div className="row h-100">
<div className="col-9 h-100 d-flex flex-column">
<WidgetSlotView
widgetSlot={ 1 }
widgetType={GetConfiguration('hotelview')['widgets']['slot.' + 1 + '.widget']}
widgetConf={GetConfiguration('hotelview')['widgets']['slot.' + 1 +'.conf']}
/>
<div className="row mx-0">
<WidgetSlotView
widgetSlot={ 2 }
widgetType={GetConfiguration('hotelview')['widgets']['slot.' + 2 + '.widget']}
widgetConf={GetConfiguration('hotelview')['widgets']['slot.' + 2 + '.conf']}
className="col-6"
/>
<WidgetSlotView
widgetSlot={ 3 }
widgetType={GetConfiguration('hotelview')['widgets']['slot.' + 3 + '.widget']}
widgetConf={GetConfiguration('hotelview')['widgets']['slot.' + 3 + '.conf']}
className="col-6"
/>
<WidgetSlotView
widgetSlot={ 4 }
widgetType={GetConfiguration('hotelview')['widgets']['slot.' + 4 + '.widget']}
widgetConf={GetConfiguration('hotelview')['widgets']['slot.' + 4 + '.conf']}
className="col-6"
/>
<WidgetSlotView
widgetSlot={ 5 }
widgetType={GetConfiguration('hotelview')['widgets']['slot.' + 5 + '.widget']}
widgetConf={GetConfiguration('hotelview')['widgets']['slot.' + 5 + '.conf']}
className="col-6"
/>
</div>
<WidgetSlotView
widgetSlot={ 6 }
widgetType={GetConfiguration('hotelview')['widgets']['slot.' + 6 + '.widget']}
widgetConf={GetConfiguration('hotelview')['widgets']['slot.' + 6 + '.conf']}
className="mt-auto"
/>
</div>
<div className="col-3 h-100">
<WidgetSlotView
widgetSlot={ 7 }
widgetType={GetConfiguration('hotelview')['widgets']['slot.' + 7 + '.widget']}
widgetConf={GetConfiguration('hotelview')['widgets']['slot.' + 7 +'.conf']}
/>
</div>
</div>
</div>
<div className="background position-absolute" style={(background && background.length) ? { backgroundImage: `url(${background})` } : {}} />
<div className="sun position-absolute" style={(sun && sun.length) ? { backgroundImage: `url(${sun})` } : {}} />
<div className="drape position-absolute" style={(drape && drape.length) ? { backgroundImage: `url(${drape})` } : {}} />

View File

@ -4,9 +4,11 @@ import { WidgetSlotViewProps } from './WidgetSlotView.types';
export const WidgetSlotView: FC<WidgetSlotViewProps> = props =>
{
return (
<div className={"widget-slot slot-" + props.slot}>
<GetWidgetLayout widgetType={props.widgetType} slot={props.slot} widgetConf={props.widgetConf} />
</div>
);
const { widgetType = null, widgetSlot = 0, widgetConf = null, className= '', ...rest } = props;
return (
<div className={`widget-slot slot-${widgetSlot} ${(className || '')}`} { ...rest }>
<GetWidgetLayout widgetType={widgetType} slot={widgetSlot} widgetConf={widgetConf} />
</div>
);
}

View File

@ -1,6 +1,8 @@
export interface WidgetSlotViewProps
import { DetailsHTMLAttributes } from 'react';
export interface WidgetSlotViewProps extends DetailsHTMLAttributes<HTMLDivElement>
{
widgetType: string;
slot: number;
widgetConf: string;
widgetType: string;
widgetSlot: number;
widgetConf: string;
}

View File

@ -1,4 +1,27 @@
.promo-article {
width: 100%;
height: 100%;
.promo-articles {
width: 100%;
height: 100%;
.promo-articles-bullet {
border-radius: 50%;
background-color: $white;
border: 1px solid $white;
height: 13px;
width: 13px;
margin-right: 3px;
&.promo-articles-bullet-active {
background: $black;
}
}
.promo-article {
.promo-article-image {
width: 150px;
height: 150px;
margin-right: 10px;
background-repeat: no-repeat;
background-position: top center;
}
}
}

View File

@ -1,51 +1,54 @@
import { GetPromoArticlesComposer, PromoArticleData, PromoArticlesMessageEvent } from 'nitro-renderer';
import { FC, useCallback, useEffect, useState } from 'react';
import { Carousel } from 'react-bootstrap';
import { CreateMessageHook, SendMessageHook } from '../../../../../hooks';
import { LocalizeText } from '../../../../../utils/LocalizeText';
import { PromoArticleWidgetViewProps } from './PromoArticleWidgetView.types';
export const PromoArticleWidgetView: FC<PromoArticleWidgetViewProps> = props =>
{
const [articles, setArticles] = useState<PromoArticleData[]>(null);
const [index, setIndex] = useState(0);
const [articles, setArticles] = useState<PromoArticleData[]>(null);
const [index, setIndex] = useState(0);
const handleSelect = (selectedIndex, e) =>
{
setIndex(selectedIndex);
};
const handleSelect = (selectedIndex) =>
{
setIndex(selectedIndex);
};
useEffect(() =>
{
SendMessageHook(new GetPromoArticlesComposer());
}, []);
useEffect(() =>
{
SendMessageHook(new GetPromoArticlesComposer());
}, []);
const onPromoArticlesMessageEvent = useCallback((event: PromoArticlesMessageEvent) =>
{
const parser = event.getParser();
setArticles(parser.articles);
}, []);
const onPromoArticlesMessageEvent = useCallback((event: PromoArticlesMessageEvent) =>
{
const parser = event.getParser();
setArticles(parser.articles);
}, []);
CreateMessageHook(PromoArticlesMessageEvent, onPromoArticlesMessageEvent);
CreateMessageHook(PromoArticlesMessageEvent, onPromoArticlesMessageEvent);
if (!articles) return null;
if (!articles) return null;
return (
<div className="promo-article widget">
<Carousel activeIndex={index} onSelect={handleSelect}>
{articles && (articles.length > 0) && articles.map(article =>
<Carousel.Item key={article.id.toString()}>
<img
className="d-block"
src={article.imageUrl}
alt={article.title}
/>
<Carousel.Caption>
<h3>{article.title}</h3>
<p>{article.bodyText}</p>
</Carousel.Caption>
</Carousel.Item>
)}
</Carousel>
</div>
);
return (
<div className="promo-articles widget">
<div className="d-flex flex-row align-items-center w-100 mb-1">
<small className="flex-shrink-0 pe-1">{ LocalizeText('landing.view.promo.article.header') }</small>
<hr className="w-100 my-0"/>
</div>
<div className="d-flex flex-row mb-1">
{articles && (articles.length > 0) && articles.map((article, ind) =>
<div className={`promo-articles-bullet ` + (article === articles[index] ? 'promo-articles-bullet-active' : '')} key={article.id} onClick={event => handleSelect(ind)} />
)}
</div>
{articles && articles[index] &&
<div className="promo-article d-flex flex-row row mx-0">
<div className="promo-article-image" style={ {backgroundImage: `url(${articles[index].imageUrl})`} }/>
<div className="col-3">
<h3 className="my-0">{articles[index].title}</h3>
<b>{ articles[index].bodyText }</b>
</div>
</div>
}
</div>
);
}