Skip to content

Commit

Permalink
stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbintb committed Nov 6, 2024
1 parent 6b36292 commit be815e3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion dirtSettings.page
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ $cfg['share'] = $cfg['share'] ?? implode(',', array_diff(array_column($shares, '
?>

<script>
function scan() {
fetch(`<?php echo "http://" . $_SERVER["SERVER_ADDR"] . ":3000"; ?>/scan`)
.then(response => response.json())
.then(data => {
console.log(data);
})
.catch(error => {
console.error('Error:', error);
});
}

function prepareShare(form) {
var share = '';
for (var i=0,item; item=form.share.options[i]; i++) {
Expand Down Expand Up @@ -49,5 +60,5 @@ _(Datetime format)_:
:end

<input type="submit" name="#default" value="_(Default)_" onclick="$('input[class^=disk]').prop('checked',false)">
: <input type="submit" name="#apply" value="_(Apply)_"><input type="button" value="_(Done)_" onclick="done()">
: <input type="submit" name="#apply" value="_(Apply)_"><input type="button" value="_(Scan)_" onclick="scan()"><input type="button" value="_(Done)_" onclick="done()">
</form>

0 comments on commit be815e3

Please sign in to comment.