Skip to content

Commit

Permalink
Add support for ?view=grid query param to allow shared links to defau…
Browse files Browse the repository at this point in the history
…lt to grid view
  • Loading branch information
chuckdries committed Feb 13, 2022
1 parent f49e2a9 commit 0d86454
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/js/public/publicpage.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ window.addEventListener('DOMContentLoaded', function () {
$('#remote_address').focus();
});

if (new URLSearchParams(window.location.search).get('view') == 'grid') {
$('#view-toggle').removeClass('icon-toggle-pictures').addClass('icon-toggle-filelist');
$('#filestable').addClass('view-grid');
}

$(document).mouseup(function(e) {
var toggle = $('#body-public').find('.header-right .menutoggle');
Expand Down

0 comments on commit 0d86454

Please sign in to comment.