issue #10 #11 Apply 2nd welcome suppression feature.

This commit is contained in:
paul kim
2024-05-08 15:14:51 +09:00
parent 1b0d48a31f
commit f2046b2cb3
8 changed files with 51 additions and 38 deletions

View File

@@ -28,7 +28,7 @@ var HotelTV = HotelTV || {
'message': {},
'translation': {},
'state': {
'lang': 'kr',
'lang': 'en-US',
'menu': {
'stage': {
'cur':null,
@@ -208,7 +208,6 @@ HotelTV.Init = async function() {
//SETP#02::> Set Debug Options
__fxn_Set_DebugOpt(false, 'osd', false);
//__fxn_Set_DebugOpt(true, 'native', true);
//STEP#03::> Get Device Info
HotelTV.ui_utils.SetBusy(true);
@@ -490,19 +489,32 @@ HotelTV.Init = async function() {
sessionStorage.setItem("translation", JSON.stringify(HotelTV.translation));
//Now Switch Over Welcome page
if (HotelTV.opening != null) {
$(".startup").fadeOut(1000, function() {
window.location.replace('./wellcome.html');
});
} else {
if (HotelTV.state['registration'].license == 'hotel-full') {
setTimeout(function() {
window.location.replace('./app_hoteltv_full.html');
}, 1000);
const __ifxn_getAndrestorBgServiceInfo = async function() {
try {
HotelTV.services = await HotelTV.api.GetServiceInfo();
sessionStorage.setItem("services", JSON.stringify(HotelTV.services));
} catch (_error) {
console.error("Display Error page for get service info");
}
}
if (HotelTV.opening != null ) {
if ( HotelTV.guestinfo.watchTV==true ) {
HotelTV.state.lang = HotelTV.guestinfo.language;
__ifxn_getAndrestorBgServiceInfo();
HotelTV.UnloadWelCome(true, 2000);
} else {
$(".startup").fadeOut(1000, function() {
window.location.replace('./wellcome.html');
});
}
} else {
__ifxn_getAndrestorBgServiceInfo();
HotelTV.state.lang = HotelTV.guestinfo.language;
HotelTV.UnloadWelCome(true, 2000);
}
} else {
let _tmval = 30;
let _tmval = 60;
HotelTV.ui_utils.ShowErrMsg(true,
"system.error.unregistered-device",
"SYSTEM ERROR",
@@ -517,7 +529,8 @@ HotelTV.Init = async function() {
}
},
"cb_eoe": function() {
$('.error #countdown #message').text(`The Device ID is ${HotelTV.devinfo.serial_number}.\r\n\r\nPlease reboot the device by manualy(using remote contoller)`);
$('.error #countdown #message').text(`The Device ID is ${HotelTV.devinfo.serial_number}.\r\n\r\nSystem will be reboot`);
setTimeout(HotelTV.hcap.Reboot, 500);
}
}
);
@@ -535,7 +548,6 @@ HotelTV.LoadWelCome = async function() {
HotelTV.dbginfo = await JSON.parse(sessionStorage.getItem("dbginfo"));
//SETP#02::> Set Debug Options
__fxn_Set_DebugOpt(false, 'native', true);
//__fxn_Set_DebugOpt(true, 'native', true);
HotelTV.devinfo = await JSON.parse(sessionStorage.getItem("devinfo"));
HotelTV.svrinfo = await JSON.parse(sessionStorage.getItem("svrinfo"));
@@ -645,9 +657,12 @@ HotelTV.LoadWelCome = async function() {
}
}
HotelTV.UnloadWelCome = async function() {
HotelTV.UnloadWelCome = async function(_skip_ui_close=false, _main_load_delay=1000) {
sessionStorage.setItem("state", JSON.stringify(HotelTV.state));
HotelTV.ui_welcome.Close();
if ( _skip_ui_close==false ){
HotelTV.ui_welcome.Close();
}
//MQTT Disconnect
if( HotelTV.services.client ){
@@ -655,9 +670,10 @@ HotelTV.UnloadWelCome = async function() {
}
if (HotelTV.state['registration'].license == 'hotel-full') {
setTimeout(function() {
const __ifxn_replace_page = function() {
window.location.replace('./app_hoteltv_full.html');
}, 1000);
}
setTimeout(__ifxn_replace_page, _main_load_delay);
}
}