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