working folder creation

This commit is contained in:
pika 2025-03-23 01:31:21 +01:00
parent ea3e92b8b7
commit b9a82af12f
11 changed files with 2791 additions and 1552 deletions

View file

@ -1,5 +1,5 @@
{% if folders or files %}
<div class="files-grid grid-view">
<div class="files-grid">
{% if folders %}
{% for folder in folders %}
<a href="{{ url_for('files.browser', folder_id=folder.id) }}" class="folder-item" data-id="{{ folder.id }}">
@ -9,8 +9,8 @@
<div class="item-info">
<div class="item-name">{{ folder.name }}</div>
<div class="item-details">
<span class="item-count">{{ folder.files.count() }} items</span>
<span class="item-date">{{ folder.created_at.strftime('%Y-%m-%d') }}</span>
<span class="item-count">{{ folder.children.count() }} items</span>
<span class="item-date">{{ folder.updated_at.strftime('%Y-%m-%d') }}</span>
</div>
</div>
</a>
@ -27,7 +27,7 @@
<div class="item-name">{{ file.name }}</div>
<div class="item-details">
<span class="item-size">{{ format_size(file.size) }}</span>
<span class="item-date">{{ file.created_at.strftime('%Y-%m-%d') }}</span>
<span class="item-date">{{ file.updated_at.strftime('%Y-%m-%d') }}</span>
</div>
</div>
</a>
@ -43,5 +43,14 @@
<h3>This folder is empty</h3>
<p>Upload files or create a folder to get started</p>
</div>
<div class="empty-actions">
<a href="{{ url_for('files.upload', folder_id=current_folder.id if current_folder else None) }}"
class="btn primary">
<i class="fas fa-upload"></i> Upload
</a>
<button class="btn" id="empty-new-folder-btn">
<i class="fas fa-folder-plus"></i> New Folder
</button>
</div>
</div>
{% endif %}