mirror of
https://github.com/morpheus65535/bazarr
synced 2025-02-21 13:37:34 +00:00
WIP
This commit is contained in:
parent
fb6cfe0c55
commit
e2fe834e1e
2 changed files with 42 additions and 23 deletions
|
@ -511,7 +511,8 @@ if args.dev:
|
||||||
else:
|
else:
|
||||||
server = create_server(app,
|
server = create_server(app,
|
||||||
host=str(settings.general.ip),
|
host=str(settings.general.ip),
|
||||||
port=int(args.port) if args.port else int(settings.general.port))
|
port=int(args.port) if args.port else int(settings.general.port),
|
||||||
|
threads=24)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -315,24 +315,15 @@
|
||||||
{% if not request.endpoint == 'login_page' %}
|
{% if not request.endpoint == 'login_page' %}
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
BadgesAjax();
|
BadgesAjax();
|
||||||
$(window).on('load resize', function () {
|
|
||||||
if ($('body').hasClass('mini-sidebar')) {
|
$(window).on( 'ready orientationchange resize', function() {
|
||||||
$('#buttons_bars').width($(window).width());
|
adjustResponsiveUI();
|
||||||
$('.page-wrapper').attr('style', 'padding-top: 60px !important');
|
|
||||||
$('.badge').each(function() {
|
|
||||||
$(this).css('max-width', $(this).closest( "div" ).width());
|
|
||||||
})
|
|
||||||
$('form .row :first-child').each( function() {
|
|
||||||
$(this).removeClass('text-right');
|
|
||||||
})
|
|
||||||
$('.container-fluid .row :first-child').each( function() {
|
|
||||||
$(this).removeClass('text-right');
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
$('#buttons_bars').width($('.page-wrapper').width());
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.table').on( 'init.dt', function () {
|
||||||
|
adjustResponsiveUI();
|
||||||
|
} );
|
||||||
|
|
||||||
$('.table').on('draw.dt', function () {
|
$('.table').on('draw.dt', function () {
|
||||||
$('[data-toggle="tooltip"]').tooltip({html: true});
|
$('[data-toggle="tooltip"]').tooltip({html: true});
|
||||||
});
|
});
|
||||||
|
@ -416,12 +407,7 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if ($('#buttons_bar_left').children().length > 0 || $('#buttons_bar_right').children().length > 0) {
|
$(window).trigger('orientationchange');
|
||||||
$('#buttons_bars').show();
|
|
||||||
} else {
|
|
||||||
$('#buttons_bars').hide();
|
|
||||||
$('.page-wrapper').css('padding-top', '-=60');
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add apikey to all AJAX requests.
|
// Add apikey to all AJAX requests.
|
||||||
|
@ -461,6 +447,38 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function adjustResponsiveUI() {
|
||||||
|
if ($(window).width() <= 750) {
|
||||||
|
$('#buttons_bars').width($('body').width());
|
||||||
|
$('#buttons_bars').css('left', '30px');
|
||||||
|
} else if ($(window).width() <= 1152) {
|
||||||
|
$('#buttons_bars').width($('body').width() - 60);
|
||||||
|
} else {
|
||||||
|
$('#buttons_bars').width($('body').width() - 240);
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.badge').each(function() {
|
||||||
|
$(this).css('max-width', $(this).closest( "div" ).width());
|
||||||
|
})
|
||||||
|
|
||||||
|
if ($(window).width() <= 1170) {
|
||||||
|
$('form .row :first-child').each( function() {
|
||||||
|
$(this).removeClass('text-right');
|
||||||
|
})
|
||||||
|
$('.container-fluid .row :first-child').each( function() {
|
||||||
|
$(this).removeClass('text-right');
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($('#buttons_bar_left').children().length > 0 || $('#buttons_bar_right').children().length > 0) {
|
||||||
|
$('#buttons_bars').show();
|
||||||
|
$('.page-wrapper').attr('style', 'padding-top: 60px !important');
|
||||||
|
} else {
|
||||||
|
$('#buttons_bars').hide();
|
||||||
|
$('.page-wrapper').attr('style', 'padding-top: 0px !important');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$('#shutdown').on('click', function () {
|
$('#shutdown').on('click', function () {
|
||||||
document.open();
|
document.open();
|
||||||
document.write('Bazarr has shutdown.');
|
document.write('Bazarr has shutdown.');
|
||||||
|
|
Loading…
Reference in a new issue