view settings and images
This commit is contained in:
@@ -617,6 +617,11 @@
|
||||
<span class="mr-2">📝</span>
|
||||
<span>{{.node.Name}}</span>
|
||||
</a>
|
||||
{{else if eq .node.Type "image"}}
|
||||
<a href="/serve_attached_image/{{.node.Path}}" target="_blank" class="sidebar-item" title="View image in new tab">
|
||||
<span class="mr-2">🖼️</span>
|
||||
<span>{{.node.Name}}</span>
|
||||
</a>
|
||||
{{else}}
|
||||
<a href="/view_text/{{.node.Path}}" class="sidebar-item">
|
||||
<span class="mr-2">📄</span>
|
||||
|
||||
@@ -78,7 +78,7 @@ console.log('Hello, World!');
|
||||
</div>
|
||||
|
||||
<!-- Actions -->
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -74,6 +74,11 @@
|
||||
<i class="fas fa-edit"></i>
|
||||
</a>
|
||||
{{end}}
|
||||
{{if eq .Type "image"}}
|
||||
<a href="/serve_attached_image/{{.Path}}" target="_blank" class="text-yellow-400 hover:text-yellow-300 p-2" title="View">
|
||||
<i class="fas fa-eye"></i>
|
||||
</a>
|
||||
{{end}}
|
||||
{{if ne .Type "dir"}}
|
||||
<a href="/download/{{.Path}}" class="text-green-400 hover:text-green-300 p-2" title="Download">
|
||||
<i class="fas fa-download"></i>
|
||||
|
||||
@@ -145,6 +145,32 @@
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Visibility: Left Navigation (Tree) -->
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mt-4">
|
||||
<div>
|
||||
<div class="text-sm font-medium text-gray-300 mb-2">Left navigation (tree) visibility</div>
|
||||
<label class="flex items-center space-x-2">
|
||||
<input type="checkbox" id="show_images_in_tree" name="show_images_in_tree" class="h-4 w-4 text-blue-600 rounded border-gray-600 bg-gray-700">
|
||||
<span class="text-sm text-gray-300">Show images in left navigation</span>
|
||||
</label>
|
||||
<label class="flex items-center space-x-2 mt-2">
|
||||
<input type="checkbox" id="show_files_in_tree" name="show_files_in_tree" class="h-4 w-4 text-blue-600 rounded border-gray-600 bg-gray-700">
|
||||
<span class="text-sm text-gray-300">Show other allowed files in left navigation</span>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<div class="text-sm font-medium text-gray-300 mb-2">Folder view visibility</div>
|
||||
<label class="flex items-center space-x-2">
|
||||
<input type="checkbox" id="show_images_in_folder" name="show_images_in_folder" class="h-4 w-4 text-blue-600 rounded border-gray-600 bg-gray-700">
|
||||
<span class="text-sm text-gray-300">Show images in folder view</span>
|
||||
</label>
|
||||
<label class="flex items-center space-x-2 mt-2">
|
||||
<input type="checkbox" id="show_files_in_folder" name="show_files_in_folder" class="h-4 w-4 text-blue-600 rounded border-gray-600 bg-gray-700">
|
||||
<span class="text-sm text-gray-300">Show other allowed files in folder view</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end">
|
||||
<button type="submit" class="btn-primary">
|
||||
<i class="fas fa-save mr-2"></i>Save Extension Settings
|
||||
@@ -186,6 +212,11 @@
|
||||
document.getElementById('allowed_image_extensions').value = data.allowed_image_extensions || '';
|
||||
document.getElementById('allowed_file_extensions').value = data.allowed_file_extensions || '';
|
||||
document.getElementById('images_hide').checked = data.images_hide || false;
|
||||
// New visibility flags
|
||||
document.getElementById('show_images_in_tree').checked = !!data.show_images_in_tree;
|
||||
document.getElementById('show_files_in_tree').checked = !!data.show_files_in_tree;
|
||||
document.getElementById('show_images_in_folder').checked = !!data.show_images_in_folder;
|
||||
document.getElementById('show_files_in_folder').checked = !!data.show_files_in_folder;
|
||||
})
|
||||
.catch(error => console.error('Error loading file extensions settings:', error));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user