add alerts dark theme

This commit is contained in:
HorizonCode 2022-10-16 22:21:02 +02:00
parent 2de6cc11cf
commit c2a75319dc
2 changed files with 8 additions and 4 deletions

View File

@ -7,7 +7,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/png" href="../assets/logo.png" />
<link href="../assets/mdb.min.css" rel="stylesheet" />
<link href="../assets/sweetalert2.dark.css" rel="stylesheet" />
<style>
* {
user-select: none;

View File

@ -22,16 +22,16 @@ window.addEventListener('DOMContentLoaded', () => {
if (success) {
Swal.fire({
title: 'Success!',
text: 'osu! folder set!',
text: 'osu! folder set.',
icon: 'success',
confirmButtonText: 'Cool'
})
} else {
Swal.fire({
title: 'Uh oh!',
text: 'failed to set osu! folder.',
text: 'The selected folder is not a osu! directory.',
icon: 'error',
confirmButtonText: 'Cool'
confirmButtonText: 'Oops.. my bad!'
})
}
});
@ -46,6 +46,11 @@ window.addEventListener('DOMContentLoaded', () => {
$("#launch-btn").attr('disabled', false);
$('#launch-btn').html('Update');
break;
case "missing-folder":
$('#launch-btn').html('Please set your osu folder!');
}
})
// workaround for the dark theme
$('head').append($('<link href="../assets/sweetalert2.dark.css" rel="stylesheet" />'));
})