1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

fix up next dialog not showing on second video

This commit is contained in:
Luke Pulverenti 2017-08-26 03:02:11 -04:00
parent 5cd2ee583d
commit aff0398cef
9 changed files with 10 additions and 10 deletions

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
define(["events","appStorage"],function(events,appStorage){"use strict";function ensure(instance,data){if(!instance._credentials){var json=appStorage.getItem(instance.key)||"{}";console.log("credentials initialized with: "+json),instance._credentials=JSON.parse(json),instance._credentials.Servers=instance._credentials.Servers||[]}}function set(instance,data){data?(instance._credentials=data,appStorage.setItem(instance.key,JSON.stringify(data))):instance.clear(),events.trigger(instance,"credentialsupdated")}function Credentials(key){this.key=key||"servercredentials3"}return Credentials.prototype.clear=function(){this._credentials=null,appStorage.removeItem(this.key)},Credentials.prototype.credentials=function(data){return data&&set(this,data),ensure(this),this._credentials},Credentials.prototype.addOrUpdateServer=function(list,server){if(!server.Id)throw new Error("Server.Id cannot be null or empty");var existing=list.filter(function(s){return s.Id===server.Id})[0];return existing?(existing.DateLastAccessed=Math.max(existing.DateLastAccessed||0,server.DateLastAccessed||0),existing.UserLinkType=server.UserLinkType,server.AccessToken&&(existing.AccessToken=server.AccessToken,existing.UserId=server.UserId),server.ExchangeToken&&(existing.ExchangeToken=server.ExchangeToken),server.RemoteAddress&&(existing.RemoteAddress=server.RemoteAddress),server.ManualAddress&&(existing.ManualAddress=server.ManualAddress),server.LocalAddress&&(existing.LocalAddress=server.LocalAddress),server.Name&&(existing.Name=server.Name),server.WakeOnLanInfos&&server.WakeOnLanInfos.length&&(existing.WakeOnLanInfos=server.WakeOnLanInfos),null!=server.LastConnectionMode&&(existing.LastConnectionMode=server.LastConnectionMode),server.ConnectServerId&&(existing.ConnectServerId=server.ConnectServerId),existing):(list.push(server),server)},Credentials.prototype.addOrUpdateUser=function(server,user){server.Users=server.Users||[];var existing=server.Users.filter(function(s){return s.Id===user.Id})[0];existing?existing.IsSignedInOffline=!0:server.Users.push(user)},Credentials});
define(["events","appStorage"],function(events,appStorage){"use strict";function ensure(instance,data){if(!instance._credentials){var json=appStorage.getItem(instance.key)||"{}";console.log("credentials initialized with: "+json),instance._credentials=JSON.parse(json),instance._credentials.Servers=instance._credentials.Servers||[]}}function set(instance,data){data?(instance._credentials=data,appStorage.setItem(instance.key,JSON.stringify(data))):instance.clear(),events.trigger(instance,"credentialsupdated")}function Credentials(key){this.key=key||"servercredentials3"}return Credentials.prototype.clear=function(){this._credentials=null,appStorage.removeItem(this.key)},Credentials.prototype.credentials=function(data){return data&&set(this,data),ensure(this),this._credentials},Credentials.prototype.addOrUpdateServer=function(list,server){if(!server.Id)throw new Error("Server.Id cannot be null or empty");var existing=list.filter(function(s){return s.Id===server.Id})[0];return existing?(existing.DateLastAccessed=Math.max(existing.DateLastAccessed||0,server.DateLastAccessed||0),existing.UserLinkType=server.UserLinkType,server.AccessToken&&(existing.AccessToken=server.AccessToken,existing.UserId=server.UserId),server.ExchangeToken&&(existing.ExchangeToken=server.ExchangeToken),server.RemoteAddress&&(existing.RemoteAddress=server.RemoteAddress),server.ManualAddress&&(existing.ManualAddress=server.ManualAddress),server.LocalAddress&&(existing.LocalAddress=server.LocalAddress),server.Name&&(existing.Name=server.Name),server.WakeOnLanInfos&&server.WakeOnLanInfos.length&&(existing.WakeOnLanInfos=server.WakeOnLanInfos),null!=server.LastConnectionMode&&(existing.LastConnectionMode=server.LastConnectionMode),server.ConnectServerId&&(existing.ConnectServerId=server.ConnectServerId),existing):(list.push(server),server)},Credentials});

View file

@ -1 +1 @@
define(["globalize","loading","connectionManager","registrationServices"],function(globalize,loading,connectionManager,registrationServices){"use strict";function changeRecordingToSeries(apiClient,timerId,programId,confirmTimerCancellation){return loading.show(),apiClient.getItem(apiClient.getCurrentUserId(),programId).then(function(item){return item.IsSeries?apiClient.getNewLiveTvTimerDefaults({programId:programId}).then(function(timerDefaults){return apiClient.createLiveTvSeriesTimer(timerDefaults).then(function(){loading.hide(),sendToast(globalize.translate("sharedcomponents#SeriesRecordingScheduled"))})}):confirmTimerCancellation?cancelTimerWithConfirmation(timerId,apiClient.serverId()):cancelTimer(apiClient.serverId(),timerId,!0)})}function cancelTimerWithConfirmation(timerId,serverId){return new Promise(function(resolve,reject){require(["confirm"],function(confirm){confirm({text:globalize.translate("sharedcomponents#MessageConfirmRecordingCancellation"),primary:"cancel",confirmText:globalize.translate("sharedcomponents#HeaderCancelRecording"),cancelText:globalize.translate("sharedcomponents#HeaderKeepRecording")}).then(function(){loading.show();var apiClient=connectionManager.getApiClient(serverId);cancelTimer(apiClient,timerId,!0).then(resolve,reject)},reject)})})}function cancelSeriesTimerWithConfirmation(timerId,serverId){return new Promise(function(resolve,reject){require(["confirm"],function(confirm){confirm({text:globalize.translate("sharedcomponents#MessageConfirmRecordingCancellation"),primary:"cancel",confirmText:globalize.translate("sharedcomponents#HeaderCancelSeries"),cancelText:globalize.translate("sharedcomponents#HeaderKeepSeries")}).then(function(){loading.show();var apiClient=connectionManager.getApiClient(serverId);apiClient.cancelLiveTvSeriesTimer(timerId).then(function(){require(["toast"],function(toast){toast(globalize.translate("sharedcomponents#SeriesCancelled"))}),loading.hide(),resolve()},reject)},reject)})})}function cancelTimer(apiClient,timerId,hideLoading){return loading.show(),apiClient.cancelLiveTvTimer(timerId).then(function(){hideLoading&&(loading.hide(),sendToast(globalize.translate("sharedcomponents#RecordingCancelled")))})}function createRecording(apiClient,programId,isSeries){return loading.show(),apiClient.getNewLiveTvTimerDefaults({programId:programId}).then(function(item){var promise=isSeries?apiClient.createLiveTvSeriesTimer(item):apiClient.createLiveTvTimer(item);return promise.then(function(){loading.hide(),sendToast(globalize.translate("sharedcomponents#RecordingScheduled"))})})}function sendToast(msg){require(["toast"],function(toast){toast(msg)})}function showMultiCancellationPrompt(serverId,programId,timerId,timerStatus,seriesTimerId){return new Promise(function(resolve,reject){require(["dialog"],function(dialog){var items=[];items.push({name:globalize.translate("sharedcomponents#HeaderKeepRecording"),id:"cancel",type:"submit"}),items.push({name:globalize.translate("sharedcomponents#HeaderCancelRecording"),id:"canceltimer",type:"cancel"}),items.push({name:globalize.translate("sharedcomponents#HeaderCancelSeries"),id:"cancelseriestimer",type:"cancel"}),dialog({text:globalize.translate("sharedcomponents#MessageConfirmRecordingCancellation"),buttons:items}).then(function(result){var apiClient=connectionManager.getApiClient(serverId);"canceltimer"===result?(loading.show(),cancelTimer(apiClient,timerId,!0).then(resolve,reject)):"cancelseriestimer"===result?(loading.show(),apiClient.cancelLiveTvSeriesTimer(seriesTimerId).then(function(){require(["toast"],function(toast){toast(globalize.translate("sharedcomponents#SeriesCancelled"))}),loading.hide(),resolve()},reject)):resolve()},reject)})})}function toggleRecording(serverId,programId,timerId,timerStatus,seriesTimerId){return registrationServices.validateFeature("dvr").then(function(){var apiClient=connectionManager.getApiClient(serverId),hasTimer=timerId&&"Cancelled"!==timerStatus;return seriesTimerId&&hasTimer?showMultiCancellationPrompt(serverId,programId,timerId,timerStatus,seriesTimerId):hasTimer&&programId?changeRecordingToSeries(apiClient,timerId,programId,!0):programId?createRecording(apiClient,programId):Promise.reject()})}return{cancelTimer:cancelTimer,createRecording:createRecording,changeRecordingToSeries:changeRecordingToSeries,toggleRecording:toggleRecording,cancelTimerWithConfirmation:cancelTimerWithConfirmation,cancelSeriesTimerWithConfirmation:cancelSeriesTimerWithConfirmation}});
define(["globalize","loading","connectionManager","registrationServices"],function(globalize,loading,connectionManager,registrationServices){"use strict";function changeRecordingToSeries(apiClient,timerId,programId,confirmTimerCancellation){return loading.show(),apiClient.getItem(apiClient.getCurrentUserId(),programId).then(function(item){return item.IsSeries?apiClient.getNewLiveTvTimerDefaults({programId:programId}).then(function(timerDefaults){return apiClient.createLiveTvSeriesTimer(timerDefaults).then(function(){loading.hide(),sendToast(globalize.translate("sharedcomponents#SeriesRecordingScheduled"))})}):confirmTimerCancellation?cancelTimerWithConfirmation(timerId,apiClient.serverId()):cancelTimer(apiClient.serverId(),timerId,!0)})}function cancelTimerWithConfirmation(timerId,serverId){return new Promise(function(resolve,reject){require(["confirm"],function(confirm){confirm({text:globalize.translate("sharedcomponents#MessageConfirmRecordingCancellation"),primary:"cancel",confirmText:globalize.translate("sharedcomponents#HeaderCancelRecording"),cancelText:globalize.translate("sharedcomponents#HeaderKeepRecording")}).then(function(){loading.show();var apiClient=connectionManager.getApiClient(serverId);cancelTimer(apiClient,timerId,!0).then(resolve,reject)},reject)})})}function cancelSeriesTimerWithConfirmation(timerId,serverId){return new Promise(function(resolve,reject){require(["confirm"],function(confirm){confirm({text:globalize.translate("sharedcomponents#MessageConfirmRecordingCancellation"),primary:"cancel",confirmText:globalize.translate("sharedcomponents#HeaderCancelSeries"),cancelText:globalize.translate("sharedcomponents#HeaderKeepSeries")}).then(function(){loading.show();var apiClient=connectionManager.getApiClient(serverId);apiClient.cancelLiveTvSeriesTimer(timerId).then(function(){require(["toast"],function(toast){toast(globalize.translate("sharedcomponents#SeriesCancelled"))}),loading.hide(),resolve()},reject)},reject)})})}function cancelTimer(apiClient,timerId,hideLoading){return loading.show(),apiClient.cancelLiveTvTimer(timerId).then(function(){hideLoading!==!1&&(loading.hide(),sendToast(globalize.translate("sharedcomponents#RecordingCancelled")))})}function createRecording(apiClient,programId,isSeries){return loading.show(),apiClient.getNewLiveTvTimerDefaults({programId:programId}).then(function(item){var promise=isSeries?apiClient.createLiveTvSeriesTimer(item):apiClient.createLiveTvTimer(item);return promise.then(function(){loading.hide(),sendToast(globalize.translate("sharedcomponents#RecordingScheduled"))})})}function sendToast(msg){require(["toast"],function(toast){toast(msg)})}function showMultiCancellationPrompt(serverId,programId,timerId,timerStatus,seriesTimerId){return new Promise(function(resolve,reject){require(["dialog"],function(dialog){var items=[];items.push({name:globalize.translate("sharedcomponents#HeaderKeepRecording"),id:"cancel",type:"submit"}),items.push({name:globalize.translate("sharedcomponents#HeaderCancelRecording"),id:"canceltimer",type:"cancel"}),items.push({name:globalize.translate("sharedcomponents#HeaderCancelSeries"),id:"cancelseriestimer",type:"cancel"}),dialog({text:globalize.translate("sharedcomponents#MessageConfirmRecordingCancellation"),buttons:items}).then(function(result){var apiClient=connectionManager.getApiClient(serverId);"canceltimer"===result?(loading.show(),cancelTimer(apiClient,timerId,!0).then(resolve,reject)):"cancelseriestimer"===result?(loading.show(),apiClient.cancelLiveTvSeriesTimer(seriesTimerId).then(function(){require(["toast"],function(toast){toast(globalize.translate("sharedcomponents#SeriesCancelled"))}),loading.hide(),resolve()},reject)):resolve()},reject)})})}function toggleRecording(serverId,programId,timerId,timerStatus,seriesTimerId){return registrationServices.validateFeature("dvr").then(function(){var apiClient=connectionManager.getApiClient(serverId),hasTimer=timerId&&"Cancelled"!==timerStatus;return seriesTimerId&&hasTimer?showMultiCancellationPrompt(serverId,programId,timerId,timerStatus,seriesTimerId):hasTimer&&programId?changeRecordingToSeries(apiClient,timerId,programId,!0):programId?createRecording(apiClient,programId):Promise.reject()})}return{cancelTimer:cancelTimer,createRecording:createRecording,changeRecordingToSeries:changeRecordingToSeries,toggleRecording:toggleRecording,cancelTimerWithConfirmation:cancelTimerWithConfirmation,cancelSeriesTimerWithConfirmation:cancelSeriesTimerWithConfirmation}});

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
.upNextDialog{position:fixed;left:0;bottom:0;right:0;padding:1%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;will-change:transform;-webkit-transition:opacity .3s ease-out;-o-transition:opacity .3s ease-out;transition:opacity .3s ease-out;background-color:rgba(0,0,0,.7);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.9)));background:-webkit-linear-gradient(rgba(0,0,0,.5),rgba(0,0,0,.9));background:-o-linear-gradient(rgba(0,0,0,.5),rgba(0,0,0,.9));background:linear-gradient(rgba(0,0,0,.5),rgba(0,0,0,.9));color:#fff}.upNextDialog-hidden{opacity:0}.upNextDialog-countdownText{font-weight:500}.upNextDialog-poster{max-width:40%;max-height:15%;position:relative;margin-right:1em;-webkit-flex-shrink:0;flex-shrink:0;margin-bottom:.5em}@media all and (orientation:landscape){.upNextDialog{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row}.upNextDialog-poster{max-width:initial;max-height:initial;width:10%;margin-bottom:0}}@media all and (max-width:50em){.upNextDialog-overview{display:none!important}}.upNextDialog-poster-img{position:absolute;bottom:0;left:0;right:0;height:auto;width:100%;-webkit-box-shadow:0 0 1.9vh #000;box-shadow:0 0 1.9vh #000;border:1px solid #222;user-drag:none;user-select:none;-moz-user-select:none;-webkit-user-drag:none;-webkit-user-select:none;-ms-user-select:none}
.upNextDialog{position:fixed;left:0;bottom:0;right:0;padding:1%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;will-change:transform;-webkit-transition:opacity .3s ease-out;-o-transition:opacity .3s ease-out;transition:opacity .3s ease-out;background-color:rgba(0,0,0,.7);background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.9)));background:-webkit-linear-gradient(rgba(0,0,0,.5),rgba(0,0,0,.9));background:-o-linear-gradient(rgba(0,0,0,.5),rgba(0,0,0,.9));background:linear-gradient(rgba(0,0,0,.5),rgba(0,0,0,.9));color:#fff}.upNextDialog-hidden{opacity:0}.upNextDialog-countdownText{font-weight:500}.upNextDialog-poster{max-width:40%;max-height:15%;position:relative;margin-right:1em;-webkit-flex-shrink:0;flex-shrink:0;margin-bottom:.5em}.upNextDialog-button{background:#404040!important;color:#fff!important}@media all and (orientation:landscape){.upNextDialog{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row}.upNextDialog-poster{max-width:initial;max-height:initial;width:10%;margin-bottom:0}}@media all and (max-width:50em){.upNextDialog-overview{display:none!important}}.upNextDialog-poster-img{position:absolute;bottom:0;left:0;right:0;height:auto;width:100%;-webkit-box-shadow:0 0 1.9vh #000;box-shadow:0 0 1.9vh #000;border:1px solid #222;user-drag:none;user-select:none;-moz-user-select:none;-webkit-user-drag:none;-webkit-user-select:none;-ms-user-select:none}

File diff suppressed because one or more lines are too long