Implemented darkmode in POE module
This commit is contained in:
parent
0d0a44cad1
commit
992e4eeed9
@ -303,22 +303,4 @@ async function addPLUToReceipt(item) {
|
|||||||
data: {'cost': item.cost, 'expires': false}
|
data: {'cost': item.cost, 'expires': false}
|
||||||
}, type: 'PLU SKU'})
|
}, type: 'PLU SKU'})
|
||||||
await replenishScannedReceiptTable(scannedReceiptItems)
|
await replenishScannedReceiptTable(scannedReceiptItems)
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var mode = false
|
|
||||||
async function toggleDarkMode() {
|
|
||||||
let darkMode = document.getElementById("dark-mode");
|
|
||||||
darkMode.disabled = !darkMode.disabled;
|
|
||||||
mode = !mode;
|
|
||||||
if(mode){
|
|
||||||
document.getElementById('modeToggle').innerHTML = "light_mode"
|
|
||||||
document.getElementById('main_html').classList.add('uk-light')
|
|
||||||
} else {
|
|
||||||
document.getElementById('modeToggle').innerHTML = "dark_mode"
|
|
||||||
document.getElementById('main_html').classList.remove('uk-light')
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -153,20 +153,4 @@ async function replenishScanTable() {
|
|||||||
tableRow.append(statusCell, barcodeCell, nameCell, typeCell, locationCell)
|
tableRow.append(statusCell, barcodeCell, nameCell, typeCell, locationCell)
|
||||||
scanTableBody.append(tableRow)
|
scanTableBody.append(tableRow)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
var mode = false
|
|
||||||
async function toggleDarkMode() {
|
|
||||||
let darkMode = document.getElementById("dark-mode");
|
|
||||||
darkMode.disabled = !darkMode.disabled;
|
|
||||||
mode = !mode;
|
|
||||||
if(mode){
|
|
||||||
document.getElementById('modeToggle').innerHTML = "light_mode"
|
|
||||||
document.getElementById('main_html').classList.add('uk-light')
|
|
||||||
} else {
|
|
||||||
document.getElementById('modeToggle').innerHTML = "dark_mode"
|
|
||||||
document.getElementById('main_html').classList.remove('uk-light')
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -12,8 +12,9 @@
|
|||||||
<!-- Material Symbols - Sharp Set -->
|
<!-- Material Symbols - Sharp Set -->
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/uikit.min.css') }}"/>
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/uikit.min.css') }}"/>
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/pantry.css') }}"/>
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/pantry.css') }}"/>
|
||||||
|
{% if session['user']['flags']['darkmode'] %}
|
||||||
<link id="dark-mode" rel="stylesheet" href="{{ url_for('static', filename='css/dark-mode.css') }}" disabled/>
|
<link id="dark-mode" rel="stylesheet" href="{{ url_for('static', filename='css/dark-mode.css') }}"/>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -24,7 +25,11 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
{% if session['user']['flags']['darkmode'] %}
|
||||||
|
<body class="uk-light">
|
||||||
|
{% else %}
|
||||||
<body>
|
<body>
|
||||||
|
{% endif %}
|
||||||
<nav class="uk-navbar-container">
|
<nav class="uk-navbar-container">
|
||||||
<div class="uk-container uk-container-expand">
|
<div class="uk-container uk-container-expand">
|
||||||
<div class="uk-navbar uk-navbar-primary">
|
<div class="uk-navbar uk-navbar-primary">
|
||||||
|
|||||||
@ -12,8 +12,9 @@
|
|||||||
<!-- Material Symbols - Sharp Set -->
|
<!-- Material Symbols - Sharp Set -->
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/uikit.min.css') }}"/>
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/uikit.min.css') }}"/>
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/pantry.css') }}"/>
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/pantry.css') }}"/>
|
||||||
|
{% if session['user']['flags']['darkmode'] %}
|
||||||
<link id="dark-mode" rel="stylesheet" href="{{ url_for('static', filename='css/dark-mode.css') }}" disabled/>
|
<link id="dark-mode" rel="stylesheet" href="{{ url_for('static', filename='css/dark-mode.css') }}"/>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -24,7 +25,11 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
{% if session['user']['flags']['darkmode'] %}
|
||||||
|
<body class="uk-light">
|
||||||
|
{% else %}
|
||||||
<body>
|
<body>
|
||||||
|
{% endif %}
|
||||||
<nav class="uk-navbar-container">
|
<nav class="uk-navbar-container">
|
||||||
<div class="uk-container uk-container-expand">
|
<div class="uk-container uk-container-expand">
|
||||||
<div class="uk-navbar uk-navbar-primary">
|
<div class="uk-navbar uk-navbar-primary">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user