mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
UI Formatting Cleanup
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import moment from 'moment';
|
||||
|
||||
function isTomrrow(date) {
|
||||
function isTomorrow(date) {
|
||||
if (!date) {
|
||||
return false;
|
||||
}
|
||||
@@ -8,4 +8,4 @@ function isTomrrow(date) {
|
||||
return moment(date).isSame(moment().add(1, 'day'), 'day');
|
||||
}
|
||||
|
||||
export default isTomrrow;
|
||||
export default isTomorrow;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var $ = require('jquery');
|
||||
import $ from 'jquery';
|
||||
|
||||
module.exports = {
|
||||
resolutions: {
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
import _ from 'lodash';
|
||||
import qs from 'qs';
|
||||
|
||||
// See: https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils
|
||||
const anchor = document.createElement('a');
|
||||
|
||||
export default function parseUrl(url) {
|
||||
anchor.href = url;
|
||||
|
||||
// The `origin`, `password`, and `username` properties are unavailable in
|
||||
// Opera Presto. We synthesize `origin` if it's not present. While `password`
|
||||
// and `username` are ignored intentionally.
|
||||
const properties = _.pick(
|
||||
anchor,
|
||||
'hash',
|
||||
'host',
|
||||
'hostname',
|
||||
'href',
|
||||
'origin',
|
||||
'pathname',
|
||||
'port',
|
||||
'protocol',
|
||||
'search'
|
||||
);
|
||||
|
||||
properties.isAbsolute = (/^[\w:]*\/\//).test(url);
|
||||
|
||||
if (properties.search) {
|
||||
// Remove leading ? from querystring before parsing.
|
||||
properties.params = qs.parse(properties.search.substring(1));
|
||||
}
|
||||
|
||||
return properties;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
export default function aareAllSelected(selectedState) {
|
||||
export default function areAllSelected(selectedState) {
|
||||
let allSelected = true;
|
||||
let allUnselected = true;
|
||||
|
||||
|
||||
@@ -20,8 +20,7 @@ export default function createAjaxRequest() {
|
||||
xhr.aborted = aborted;
|
||||
|
||||
return $.Deferred().reject(xhr, textStatus, errorThrown).promise();
|
||||
})
|
||||
.always(() => {
|
||||
}).always(() => {
|
||||
complete = true;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user