mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update datetime
This commit is contained in:
parent
965f9741ba
commit
bbb9e89063
12 changed files with 57 additions and 113 deletions
|
@ -14,12 +14,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.4.248",
|
"version": "1.4.250",
|
||||||
"_release": "1.4.248",
|
"_release": "1.4.250",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.4.248",
|
"tag": "1.4.250",
|
||||||
"commit": "099ebb1e4d7df48d6dbf182985a565b83b17cea7"
|
"commit": "64a7a8d4d23fff00807f047f1019e27886b2a928"
|
||||||
},
|
},
|
||||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "^1.2.1",
|
"_target": "^1.2.1",
|
||||||
|
|
|
@ -199,7 +199,7 @@ define(['browser'], function (browser) {
|
||||||
function getMaxBitrate() {
|
function getMaxBitrate() {
|
||||||
|
|
||||||
if (browser.edgeUwp) {
|
if (browser.edgeUwp) {
|
||||||
return 20000000;
|
return 22000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 10mbps
|
// 10mbps
|
||||||
|
|
|
@ -233,7 +233,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
||||||
if (item.PremiereDate) {
|
if (item.PremiereDate) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
newIndexValue = getDisplayDateText(datetime.parseISO8601Date(item.PremiereDate));
|
newIndexValue = datetime.toLocaleDateString(datetime.parseISO8601Date(item.PremiereDate), { weekday: 'long', month: 'long', day: 'numeric' });
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
}
|
}
|
||||||
|
@ -408,27 +408,6 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDisplayDateText(date) {
|
|
||||||
|
|
||||||
var weekday = [];
|
|
||||||
weekday[0] = globalize.translate('sharedcomponents#Sunday');
|
|
||||||
weekday[1] = globalize.translate('sharedcomponents#Monday');
|
|
||||||
weekday[2] = globalize.translate('sharedcomponents#Tuesday');
|
|
||||||
weekday[3] = globalize.translate('sharedcomponents#Wednesday');
|
|
||||||
weekday[4] = globalize.translate('sharedcomponents#Thursday');
|
|
||||||
weekday[5] = globalize.translate('sharedcomponents#Friday');
|
|
||||||
weekday[6] = globalize.translate('sharedcomponents#Saturday');
|
|
||||||
|
|
||||||
var day = weekday[date.getDay()];
|
|
||||||
date = date.toLocaleDateString();
|
|
||||||
|
|
||||||
if (date.toLowerCase().indexOf(day.toLowerCase()) == -1) {
|
|
||||||
return day + " " + date;
|
|
||||||
}
|
|
||||||
|
|
||||||
return date;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getDesiredAspect(shape) {
|
function getDesiredAspect(shape) {
|
||||||
|
|
||||||
if (shape) {
|
if (shape) {
|
||||||
|
@ -818,9 +797,9 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
||||||
try {
|
try {
|
||||||
var date = datetime.parseISO8601Date(item.StartDate);
|
var date = datetime.parseISO8601Date(item.StartDate);
|
||||||
|
|
||||||
airTimeText = date.toLocaleDateString();
|
airTimeText = datetime.toLocaleDateString(date, { weekday: 'short', month: 'short', day: 'numeric' });
|
||||||
|
|
||||||
airTimeText += ', ' + datetime.getDisplayTime(date);
|
airTimeText += ' ' + datetime.getDisplayTime(date);
|
||||||
|
|
||||||
if (item.EndDate) {
|
if (item.EndDate) {
|
||||||
date = datetime.parseISO8601Date(item.EndDate);
|
date = datetime.parseISO8601Date(item.EndDate);
|
||||||
|
@ -861,7 +840,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
||||||
var text;
|
var text;
|
||||||
if (item.StartDate) {
|
if (item.StartDate) {
|
||||||
var startDate = datetime.parseISO8601Date(item.StartDate, true);
|
var startDate = datetime.parseISO8601Date(item.StartDate, true);
|
||||||
text = datetime.toLocaleDateString(startDate) + ', ' + datetime.getDisplayTime(startDate);
|
text = datetime.toLocaleDateString(startDate, { weekday: 'short', month: 'short', day: 'numeric' }) + ' ' + datetime.getDisplayTime(startDate);
|
||||||
} else {
|
} else {
|
||||||
text = '';
|
text = '';
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,59 +109,29 @@
|
||||||
return locale;
|
return locale;
|
||||||
}
|
}
|
||||||
|
|
||||||
function toLocaleString(date) {
|
function toLocaleString(date, options) {
|
||||||
var currentLocale = getCurrentLocale();
|
var currentLocale = getCurrentLocale();
|
||||||
|
|
||||||
return currentLocale && toLocaleTimeStringSupportsLocales ?
|
return currentLocale && toLocaleTimeStringSupportsLocales ?
|
||||||
date.toLocaleString(currentLocale) :
|
date.toLocaleString(currentLocale, options || {}) :
|
||||||
date.toLocaleString();
|
date.toLocaleString();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getLocaleDateStringParts(date) {
|
function toLocaleDateString(date, options) {
|
||||||
|
|
||||||
var day = getDayName(date);
|
|
||||||
date = toLocaleDateString(date);
|
|
||||||
|
|
||||||
var parts = [];
|
|
||||||
|
|
||||||
if (date.toLowerCase().indexOf(day.toLowerCase()) == -1) {
|
|
||||||
parts.push(day);
|
|
||||||
}
|
|
||||||
|
|
||||||
parts.push(date);
|
|
||||||
|
|
||||||
return parts;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getDayName(date) {
|
|
||||||
|
|
||||||
var weekday = [];
|
|
||||||
weekday[0] = globalize.translate('sharedcomponents#Sunday');
|
|
||||||
weekday[1] = globalize.translate('sharedcomponents#Monday');
|
|
||||||
weekday[2] = globalize.translate('sharedcomponents#Tuesday');
|
|
||||||
weekday[3] = globalize.translate('sharedcomponents#Wednesday');
|
|
||||||
weekday[4] = globalize.translate('sharedcomponents#Thursday');
|
|
||||||
weekday[5] = globalize.translate('sharedcomponents#Friday');
|
|
||||||
weekday[6] = globalize.translate('sharedcomponents#Saturday');
|
|
||||||
|
|
||||||
return weekday[date.getDay()];
|
|
||||||
}
|
|
||||||
|
|
||||||
function toLocaleDateString(date) {
|
|
||||||
|
|
||||||
var currentLocale = getCurrentLocale();
|
var currentLocale = getCurrentLocale();
|
||||||
|
|
||||||
return currentLocale && toLocaleTimeStringSupportsLocales ?
|
return currentLocale && toLocaleTimeStringSupportsLocales ?
|
||||||
date.toLocaleDateString(currentLocale) :
|
date.toLocaleDateString(currentLocale, options || {}) :
|
||||||
date.toLocaleDateString();
|
date.toLocaleDateString();
|
||||||
}
|
}
|
||||||
|
|
||||||
function toLocaleTimeString(date) {
|
function toLocaleTimeString(date, options) {
|
||||||
|
|
||||||
var currentLocale = getCurrentLocale();
|
var currentLocale = getCurrentLocale();
|
||||||
|
|
||||||
return currentLocale && toLocaleTimeStringSupportsLocales ?
|
return currentLocale && toLocaleTimeStringSupportsLocales ?
|
||||||
date.toLocaleTimeString(currentLocale) :
|
date.toLocaleTimeString(currentLocale, options || {}) :
|
||||||
date.toLocaleTimeString();
|
date.toLocaleTimeString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,7 +164,13 @@
|
||||||
if (minutes < 10) {
|
if (minutes < 10) {
|
||||||
minutes = '0' + minutes;
|
minutes = '0' + minutes;
|
||||||
}
|
}
|
||||||
time = hour + ':' + minutes + suffix;
|
|
||||||
|
if (minutes == '00') {
|
||||||
|
minutes = '';
|
||||||
|
} else {
|
||||||
|
minutes = ':' + minutes;
|
||||||
|
}
|
||||||
|
time = hour + minutes + suffix;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
var timeParts = time.split(':');
|
var timeParts = time.split(':');
|
||||||
|
@ -224,7 +200,6 @@
|
||||||
toLocaleDateString: toLocaleDateString,
|
toLocaleDateString: toLocaleDateString,
|
||||||
toLocaleString: toLocaleString,
|
toLocaleString: toLocaleString,
|
||||||
getDisplayTime: getDisplayTime,
|
getDisplayTime: getDisplayTime,
|
||||||
isRelativeDay: isRelativeDay,
|
isRelativeDay: isRelativeDay
|
||||||
getLocaleDateStringParts: getLocaleDateStringParts
|
|
||||||
};
|
};
|
||||||
});
|
});
|
|
@ -2,7 +2,7 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
display: inline-flex;
|
display: inline-block;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
@ -18,7 +18,18 @@
|
||||||
|
|
||||||
.checkboxContainer {
|
.checkboxContainer {
|
||||||
margin-bottom: 1.8em;
|
margin-bottom: 1.8em;
|
||||||
display: flex;
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
@supports (display: flex) {
|
||||||
|
|
||||||
|
.mdl-checkbox {
|
||||||
|
display: inline-flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkboxContainer {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.checkboxContainer-withDescription {
|
.checkboxContainer-withDescription {
|
||||||
|
@ -113,7 +124,7 @@
|
||||||
cursor: auto;
|
cursor: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.checkboxList .mdl-checkbox {
|
.checkboxList > .mdl-checkbox {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin: .5em 0;
|
margin: .5em 0;
|
||||||
}
|
}
|
||||||
|
@ -124,4 +135,4 @@
|
||||||
|
|
||||||
.checkboxListLabel {
|
.checkboxListLabel {
|
||||||
opacity: .7;
|
opacity: .7;
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 1.25em;
|
padding: 1.25em 1em;
|
||||||
/* Without this emby-checkbox is able to appear on top */
|
/* Without this emby-checkbox is able to appear on top */
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
|
@ -639,13 +639,8 @@
|
||||||
|
|
||||||
reloadGuide(page, newStartDate);
|
reloadGuide(page, newStartDate);
|
||||||
|
|
||||||
var dateText = datetime.getLocaleDateStringParts(date);
|
var dateText = datetime.toLocaleDateString(date, { weekday: 'short', month: 'short', day: 'numeric' });
|
||||||
|
|
||||||
if (dateText.length == 1) {
|
|
||||||
dateText = dateText[0];
|
|
||||||
} else {
|
|
||||||
dateText = '<div>' + dateText[0] + '</div><div class="guideDateTextDate">' + dateText[1] + '</div>';
|
|
||||||
}
|
|
||||||
page.querySelector('.guideDateText').innerHTML = dateText;
|
page.querySelector('.guideDateText').innerHTML = dateText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -673,7 +668,7 @@
|
||||||
while (start <= end) {
|
while (start <= end) {
|
||||||
|
|
||||||
dateOptions.push({
|
dateOptions.push({
|
||||||
name: datetime.getLocaleDateStringParts(start).join(' '),
|
name: datetime.toLocaleDateString(start, { weekday: 'long', month: 'long', day: 'numeric' }),
|
||||||
id: start.getTime()
|
id: start.getTime()
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ define(['datetime', 'globalize', 'embyRouter', 'itemHelper', 'material-icons', '
|
||||||
try {
|
try {
|
||||||
date = datetime.parseISO8601Date(item.StartDate);
|
date = datetime.parseISO8601Date(item.StartDate);
|
||||||
|
|
||||||
text = datetime.toLocaleDateString(date);
|
text = datetime.toLocaleDateString(date, { weekday: 'short', month: 'short', day: 'numeric' });
|
||||||
|
|
||||||
text += ' ' + datetime.getDisplayTime(date);
|
text += ' ' + datetime.getDisplayTime(date);
|
||||||
|
|
||||||
|
|
|
@ -27,13 +27,6 @@
|
||||||
|
|
||||||
var apiClient = connectionManager.getApiClient(currentServerId);
|
var apiClient = connectionManager.getApiClient(currentServerId);
|
||||||
|
|
||||||
apiClient.getNamedConfiguration("livetv").then(function (config) {
|
|
||||||
|
|
||||||
config.EnableRecordingEncoding = form.querySelector('#chkConvertRecordings').checked;
|
|
||||||
|
|
||||||
apiClient.updateNamedConfiguration("livetv", config);
|
|
||||||
});
|
|
||||||
|
|
||||||
apiClient.getNewLiveTvTimerDefaults({ programId: currentProgramId }).then(function (item) {
|
apiClient.getNewLiveTvTimerDefaults({ programId: currentProgramId }).then(function (item) {
|
||||||
|
|
||||||
item.RecordNewOnly = form.querySelector('#chkNewOnly').checked;
|
item.RecordNewOnly = form.querySelector('#chkNewOnly').checked;
|
||||||
|
@ -218,11 +211,6 @@
|
||||||
supporterButtons[i].classList.add('hide');
|
supporterButtons[i].classList.add('hide');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
apiClient.getNamedConfiguration("livetv").then(function (config) {
|
|
||||||
|
|
||||||
context.querySelector('#chkConvertRecordings').checked = config.EnableRecordingEncoding;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getImageUrl(item, apiClient, imageHeight) {
|
function getImageUrl(item, apiClient, imageHeight) {
|
||||||
|
@ -293,7 +281,6 @@
|
||||||
context.querySelector('#eligibleForSeriesFields').classList.add('hide');
|
context.querySelector('#eligibleForSeriesFields').classList.add('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
context.querySelector('.convertRecordingsContainer').classList.remove('hide');
|
|
||||||
showConvertRecordingsUnlockMessage(context, apiClient);
|
showConvertRecordingsUnlockMessage(context, apiClient);
|
||||||
|
|
||||||
loading.hide();
|
loading.hide();
|
||||||
|
@ -304,14 +291,14 @@
|
||||||
apiClient.getPluginSecurityInfo().then(function (regInfo) {
|
apiClient.getPluginSecurityInfo().then(function (regInfo) {
|
||||||
|
|
||||||
if (regInfo.IsMBSupporter) {
|
if (regInfo.IsMBSupporter) {
|
||||||
context.querySelector('.btnSupporterForConverting').classList.add('hide');
|
context.querySelector('.convertRecordingsContainer').classList.add('hide');
|
||||||
} else {
|
} else {
|
||||||
context.querySelector('.btnSupporterForConverting').classList.remove('hide');
|
context.querySelector('.convertRecordingsContainer').classList.remove('hide');
|
||||||
}
|
}
|
||||||
|
|
||||||
}, function () {
|
}, function () {
|
||||||
|
|
||||||
context.querySelector('.btnSupporterForConverting').classList.remove('hide');
|
context.querySelector('.convertRecordingsContainer').classList.remove('hide');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,15 +43,13 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div class="convertRecordingsContainer hide checkboxContainer checkboxContainer-withDescription">
|
<div class="convertRecordingsContainer hide" style="text-align: center; padding: 1.25em 1.5em; background: #242424; border-radius: 3px; margin: 1em 0 2em;">
|
||||||
<label>
|
<h1 style="margin: .25em 0 .5em;">${HeaderConvertYourRecordings}</h1>
|
||||||
<input type="checkbox" is="emby-checkbox" id="chkConvertRecordings" />
|
<div class="fieldDescription">${PromoConvertRecordingsToStreamingFormat}</div>
|
||||||
<span>${OptionConvertRecordingsToStreamingFormat}</span>
|
<br/>
|
||||||
</label>
|
<button is="emby-button" type="button" class="raised btnSupporterForConverting button-submit">
|
||||||
<div class="fieldDescription checkboxFieldDescription">${OptionConvertRecordingsToStreamingFormatHelp}</div>
|
<span>${HeaderLearnMore}</span>
|
||||||
<div class="fieldDescription checkboxFieldDescription btnSupporterForConverting hide">
|
</button>
|
||||||
<a href="#" class="accent lnkPremiere">${FeatureRequiresEmbyPremiere}</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div class="formDialogFooter">
|
<div class="formDialogFooter">
|
||||||
|
|
|
@ -46,9 +46,9 @@
|
||||||
"RecordOnlyNewEpisodes": "Record only new episodes",
|
"RecordOnlyNewEpisodes": "Record only new episodes",
|
||||||
"HeaderBecomeProjectSupporter": "Get Emby Premiere",
|
"HeaderBecomeProjectSupporter": "Get Emby Premiere",
|
||||||
"MessageActiveSubscriptionRequiredSeriesRecordings": "An active Emby Premiere subscription is required in order to create automated series recordings.",
|
"MessageActiveSubscriptionRequiredSeriesRecordings": "An active Emby Premiere subscription is required in order to create automated series recordings.",
|
||||||
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
|
"PromoConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format with Emby Premiere. Recordings will be converted on the fly to MP4 or MKV, based on Emby server settings.",
|
||||||
"OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 or MKV, based on Emby server settings.",
|
|
||||||
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
|
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
|
||||||
|
"HeaderConvertYourRecordings": "Convert Your Recordings",
|
||||||
"Record": "Record",
|
"Record": "Record",
|
||||||
"Save": "Save",
|
"Save": "Save",
|
||||||
"Edit": "Edit",
|
"Edit": "Edit",
|
||||||
|
@ -284,5 +284,6 @@
|
||||||
"Premieres": "Premieres",
|
"Premieres": "Premieres",
|
||||||
"RepeatEpisodes": "Repeat episodes",
|
"RepeatEpisodes": "Repeat episodes",
|
||||||
"DvrSubscriptionRequired": "Emby DVR requires an active Emby Premiere subscription.",
|
"DvrSubscriptionRequired": "Emby DVR requires an active Emby Premiere subscription.",
|
||||||
"HeaderCancelRecording": "Cancel Recording"
|
"HeaderCancelRecording": "Cancel Recording",
|
||||||
|
"HeaderLearnMore": "Learn More"
|
||||||
}
|
}
|
|
@ -15,9 +15,7 @@
|
||||||
<div class="selectContainer" style="flex-grow: 1; margin-bottom: 0;">
|
<div class="selectContainer" style="flex-grow: 1; margin-bottom: 0;">
|
||||||
<select is="emby-select" id="selectLanguage" required="required" label="${LabelLanguage}"></select>
|
<select is="emby-select" id="selectLanguage" required="required" label="${LabelLanguage}"></select>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" is="paper-icon-button-light" title="${Search}" class="btnSearchSubtitles" style="flex-shrink: 0;">
|
<button type="submit" is="paper-icon-button-light" title="${Search}" class="btnSearchSubtitles" style="flex-shrink: 0;"><i class="md-icon">search</i></button>
|
||||||
<i class="md-icon">search</i>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
<button is="emby-button" type="submit" class="raised btnSubmit block button-submit">${Search}</button>
|
<button is="emby-button" type="submit" class="raised btnSubmit block button-submit">${Search}</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue