mbkbucket 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +16 -15
- package/README.md +613 -561
- package/index.js +36 -33
- package/lib/cli.js +239 -239
- package/lib/public/bucketadmin.css +2042 -2042
- package/lib/public/bucketadmin.js +1844 -1622
- package/lib/public/mbkbucket-helper-demo.html +0 -58
- package/lib/public/mbkbucket-helper.js +1 -9
- package/lib/src/config/validation.js +91 -86
- package/lib/src/controllers/api.controller.js +486 -459
- package/lib/src/controllers/dashboard.controller.js +69 -69
- package/lib/src/controllers/info.controller.js +13 -13
- package/lib/src/controllers/view.controller.js +234 -233
- package/lib/src/core/metrics.js +134 -0
- package/lib/src/core/storage/capabilities.js +58 -0
- package/lib/src/core/storage/errors.js +0 -5
- package/lib/src/core/storage/gdrive-auth.js +0 -36
- package/lib/src/core/storage/gdrive-provider.js +101 -43
- package/lib/src/core/storage/index.js +4 -1
- package/lib/src/core/storage/local-provider.js +507 -0
- package/lib/src/core/storage/models.js +90 -50
- package/lib/src/core/storage/path-strategy.js +14 -1
- package/lib/src/core/storage/s3-provider.js +17 -37
- package/lib/src/core/storage/storage-manager.js +70 -50
- package/lib/src/core/storage/storage-provider.js +49 -120
- package/lib/src/middleware/bucket-resolver.js +37 -37
- package/lib/src/routes/api.routes.js +4 -1
- package/lib/src/routes/index.js +60 -60
- package/lib/src/routes/view.routes.js +28 -28
- package/lib/src/services/s3.service.js +42 -42
- package/lib/src/services/storage.service.js +311 -213
- package/lib/src/utils/cleanup-scheduler.js +91 -0
- package/lib/src/utils/errors.js +56 -56
- package/lib/src/utils/helpers.js +6 -6
- package/package.json +3 -5
- package/views/bucket.hbs +0 -5
- package/views/bucketadmin_move_modal.hbs +35 -35
- package/views/bucketadmin_preview_modal.hbs +108 -108
- package/views/bucketadmincontent.hbs +193 -193
- package/views/mbkbucket_info.hbs +134 -134
|
@@ -1,194 +1,194 @@
|
|
|
1
|
-
<link rel="stylesheet" href="/mbkbucket/bucketadmin.css{{mbkbucket_cachebuster}}">
|
|
2
|
-
<div id="bucketAppData" data-app-name="{{APP_NAME}}" data-provider-type="{{providerType}}" data-public-view-enabled="{{publicViewEnabled}}" hidden></div>
|
|
3
|
-
|
|
4
|
-
<div class="page-wrapper">
|
|
5
|
-
<!-- Page Header -->
|
|
6
|
-
<div class="page-header">
|
|
7
|
-
<div class="page-header-row">
|
|
8
|
-
<div>
|
|
9
|
-
<div class="page-pretitle">Storage & Buckets</div>
|
|
10
|
-
<h1 class="page-title d-flex align-items-center gap-2">
|
|
11
|
-
<span>Files</span>
|
|
12
|
-
<span class="provider-badge provider-{{providerType}}" id="topProviderBadge">
|
|
13
|
-
<span class="provider-icon"></span>
|
|
14
|
-
<span class="provider-label">{{providerType}}</span>
|
|
15
|
-
</span>
|
|
16
|
-
<span class="health-status-badge healthy" id="topHealthBadge" title="Storage Connection Health">
|
|
17
|
-
<span class="health-dot"></span>
|
|
18
|
-
<span class="health-label" id="topHealthText">Connected</span>
|
|
19
|
-
</span>
|
|
20
|
-
</h1>
|
|
21
|
-
</div>
|
|
22
|
-
<div class="page-actions">
|
|
23
|
-
<button type="button" class="btn btn-outline btn-refresh" id="refresh-btn" title="Refresh files" aria-label="Refresh files">
|
|
24
|
-
<svg width="15" height="15" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M1 4v4h4M15 12v-4h-4M13.5 6A6 6 0 003 4.5L1 8M2.5 10a6 6 0 0010.5 1.5L15 8"/></svg>
|
|
25
|
-
<span class="d-none d-sm-inline">Refresh</span>
|
|
26
|
-
</button>
|
|
27
|
-
<button type="button" class="btn btn-outline" id="new-folder-btn" data-action="create-folder">
|
|
28
|
-
<svg width="15" height="15" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 4a1 1 0 011-1h3l2 2h5a1 1 0 011 1v6a1 1 0 01-1 1H3a1 1 0 01-1-1V4z"/><path d="M8 7v4M6 9h4"/></svg>
|
|
29
|
-
New folder
|
|
30
|
-
</button>
|
|
31
|
-
<button type="button" class="btn btn-primary" id="upload-btn" data-action="upload-files">
|
|
32
|
-
<svg width="15" height="15" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M14 11v3H2v-3"/><path d="M11 6L8 3 5 6"/><line x1="8" y1="3" x2="8" y2="11"/></svg>
|
|
33
|
-
Upload
|
|
34
|
-
</button>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
|
|
39
|
-
{{> bucketadmin_alerts }}
|
|
40
|
-
|
|
41
|
-
<!-- Main File Manager Card -->
|
|
42
|
-
<div class="card file-manager">
|
|
43
|
-
<div class="fm-layout">
|
|
44
|
-
<!-- Tree sidebar -->
|
|
45
|
-
<aside class="fm-tree-wrap">
|
|
46
|
-
<div class="fm-tree-header">
|
|
47
|
-
<span class="fm-tree-title">Explorer</span>
|
|
48
|
-
</div>
|
|
49
|
-
<div id="fm-tree" class="fm-tree"></div>
|
|
50
|
-
|
|
51
|
-
<div class="fm-storage">
|
|
52
|
-
<div class="fm-storage-label d-flex justify-content-between align-items-center">
|
|
53
|
-
<span>Storage Connection</span>
|
|
54
|
-
<button type="button" class="health-check-btn" id="checkHealthBtn" title="Check Connection Health" aria-label="Check Connection Health">
|
|
55
|
-
<svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M1 4v4h4M15 12v-4h-4M13.5 6A6 6 0 003 4.5L1 8M2.5 10a6 6 0 0010.5 1.5L15 8"/></svg>
|
|
56
|
-
</button>
|
|
57
|
-
</div>
|
|
58
|
-
<div class="bucket-switcher-wrap mb-2">
|
|
59
|
-
<div class="bucket-switcher-control">
|
|
60
|
-
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" class="bucket-switcher-icon"><path d="M2 4.5C2 3.12 5.13 2 9 2s7 1.12 7 2.5v7c0 1.38-3.13 2.5-7 2.5s-7-1.12-7-2.5v-7z"/><path d="M2 8c0 1.38 3.13 2.5 7 2.5s7-1.12 7-2.5"/></svg>
|
|
61
|
-
<select id="bucketSelector" class="bucket-switcher-select" aria-label="Select connected bucket">
|
|
62
|
-
{{#if bucketOptions.length}}
|
|
63
|
-
{{#each bucketOptions}}
|
|
64
|
-
<option value="{{name}}" data-type="{{type}}" {{#if isSelected}}selected{{/if}}>{{name}} [{{type}}]{{#if isDefault}} (default){{/if}}</option>
|
|
65
|
-
{{/each}}
|
|
66
|
-
{{else}}
|
|
67
|
-
<option value="">No buckets configured</option>
|
|
68
|
-
{{/if}}
|
|
69
|
-
</select>
|
|
70
|
-
</div>
|
|
71
|
-
<small id="bucketSwitchStatus" class="bucket-switcher-status is-hidden">Switching bucket...</small>
|
|
72
|
-
</div>
|
|
73
|
-
<div class="storage-bar"><div id="storageUsageBar" style="width: 100%; background: var(--primary);"></div></div>
|
|
74
|
-
<div class="fm-storage-meta d-flex justify-content-between align-items-center">
|
|
75
|
-
<span id="totalFilesCount">Loading...</span>
|
|
76
|
-
<span id="storageLatency" class="storage-latency-tag"></span>
|
|
77
|
-
</div>
|
|
78
|
-
<div id="filterInfo" class="fm-storage-subinfo"></div>
|
|
79
|
-
</div>
|
|
80
|
-
</aside>
|
|
81
|
-
|
|
82
|
-
<!-- Main area -->
|
|
83
|
-
<section class="fm-main">
|
|
84
|
-
<div class="fm-toolbar">
|
|
85
|
-
<nav class="fm-breadcrumb breadcrumb" id="fm-breadcrumb" aria-label="Path"></nav>
|
|
86
|
-
|
|
87
|
-
<div class="fm-toolbar-actions">
|
|
88
|
-
<!-- Quick filters -->
|
|
89
|
-
<div class="quick-filter-group" role="group" aria-label="Quick filters">
|
|
90
|
-
<button type="button" class="quick-filter-btn active" data-filter="all">All</button>
|
|
91
|
-
<button type="button" class="quick-filter-btn" data-filter="media">Media</button>
|
|
92
|
-
<button type="button" class="quick-filter-btn" data-filter="docs">Docs</button>
|
|
93
|
-
<button type="button" class="quick-filter-btn" data-filter="code">Code</button>
|
|
94
|
-
</div>
|
|
95
|
-
|
|
96
|
-
<!-- Search -->
|
|
97
|
-
<div class="search-box">
|
|
98
|
-
<svg class="s-icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="7" cy="7" r="5"/><path d="M11 11l3.5 3.5"/></svg>
|
|
99
|
-
<input type="text" id="searchInput" placeholder="Search files…" aria-label="Search files">
|
|
100
|
-
<button type="button" class="search-clear-btn" id="searchClearBtn" style="display: none;" aria-label="Clear search">×</button>
|
|
101
|
-
</div>
|
|
102
|
-
|
|
103
|
-
<!-- View toggle -->
|
|
104
|
-
<div class="fm-view-toggle">
|
|
105
|
-
<button type="button" class="view-btn active" id="view-grid" aria-label="Grid view" title="Grid view">
|
|
106
|
-
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="2" y="2" width="5" height="5" rx="1"/><rect x="9" y="2" width="5" height="5" rx="1"/><rect x="2" y="9" width="5" height="5" rx="1"/><rect x="9" y="9" width="5" height="5" rx="1"/></svg>
|
|
107
|
-
</button>
|
|
108
|
-
<button type="button" class="view-btn" id="view-list" aria-label="List view" title="List view">
|
|
109
|
-
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><line x1="2" y1="4" x2="14" y2="4"/><line x1="2" y1="8" x2="14" y2="8"/><line x1="2" y1="12" x2="14" y2="12"/></svg>
|
|
110
|
-
</button>
|
|
111
|
-
<button type="button" class="view-btn" id="view-thumbs" aria-label="Toggle image previews" title="Toggle image previews (Fast Mode saves bandwidth & tokens)">
|
|
112
|
-
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="2" y="2" width="12" height="12" rx="2"/><circle cx="5.5" cy="5.5" r="1.5"/><path d="M14 10l-4-4-6 6"/></svg>
|
|
113
|
-
</button>
|
|
114
|
-
</div>
|
|
115
|
-
</div>
|
|
116
|
-
</div>
|
|
117
|
-
|
|
118
|
-
<!-- File Grid / List Container -->
|
|
119
|
-
<div id="fileListContainer" class="fm-grid-wrap">
|
|
120
|
-
<div id="fm-grid" class="fm-grid view-grid">
|
|
121
|
-
{{> bucketadmin_filelist_skeleton }}
|
|
122
|
-
</div>
|
|
123
|
-
|
|
124
|
-
<!-- Empty state -->
|
|
125
|
-
<div id="fm-empty" class="fm-empty" style="display: none;" hidden>
|
|
126
|
-
<div class="empty-icon-wrap">
|
|
127
|
-
<svg width="54" height="54" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M3 7a2 2 0 012-2h4l2 2h7a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V7z"/></svg>
|
|
128
|
-
</div>
|
|
129
|
-
<div class="empty-title">This folder is empty</div>
|
|
130
|
-
<div class="empty-desc">Drag files directly into the browser or click Upload to get started.</div>
|
|
131
|
-
<div class="empty-actions mt-3">
|
|
132
|
-
<button type="button" class="btn btn-outline btn-sm me-2" data-action="create-folder">
|
|
133
|
-
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 4a1 1 0 011-1h3l2 2h5a1 1 0 011 1v6a1 1 0 01-1 1H3a1 1 0 01-1-1V4z"/><path d="M8 7v4M6 9h4"/></svg>
|
|
134
|
-
New Folder
|
|
135
|
-
</button>
|
|
136
|
-
<button type="button" class="btn btn-primary btn-sm" data-action="upload-files">
|
|
137
|
-
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M14 11v3H2v-3"/><path d="M11 6L8 3 5 6"/><line x1="8" y1="3" x2="8" y2="11"/></svg>
|
|
138
|
-
Upload Files
|
|
139
|
-
</button>
|
|
140
|
-
</div>
|
|
141
|
-
</div>
|
|
142
|
-
</div>
|
|
143
|
-
|
|
144
|
-
<!-- Pagination -->
|
|
145
|
-
<div id="paginationContainer" class="pagination-container" style="display: none;">
|
|
146
|
-
<nav aria-label="File pagination">
|
|
147
|
-
<ul class="pagination" id="paginationList"></ul>
|
|
148
|
-
</nav>
|
|
149
|
-
</div>
|
|
150
|
-
</section>
|
|
151
|
-
</div>
|
|
152
|
-
</div>
|
|
153
|
-
</div>
|
|
154
|
-
|
|
155
|
-
<!-- Floating Batch Action Bar -->
|
|
156
|
-
<div id="batchActionBar" class="batch-action-bar" style="display: none;">
|
|
157
|
-
<div class="batch-bar-inner">
|
|
158
|
-
<div class="batch-selection-info">
|
|
159
|
-
<span class="batch-count-badge" id="batchSelectedCount">0</span>
|
|
160
|
-
<span class="batch-count-text">item(s) selected</span>
|
|
161
|
-
</div>
|
|
162
|
-
<div class="batch-actions">
|
|
163
|
-
<button type="button" class="btn btn-sm btn-outline-light" id="batchDownloadBtn">
|
|
164
|
-
<svg width="13" height="13" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M14 11v3H2v-3"/><path d="M5 8l3 3 3-3"/><line x1="8" y1="2" x2="8" y2="11"/></svg>
|
|
165
|
-
Download
|
|
166
|
-
</button>
|
|
167
|
-
<button type="button" class="btn btn-sm btn-outline-light" id="batchMoveBtn">
|
|
168
|
-
<svg width="13" height="13" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M11 2L14 5L11 8M14 5H5C3.34315 5 2 6.34315 2 8V14"/></svg>
|
|
169
|
-
Move
|
|
170
|
-
</button>
|
|
171
|
-
<button type="button" class="btn btn-sm btn-danger" id="batchDeleteBtn">
|
|
172
|
-
<svg width="13" height="13" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M3 4h10M6 4V2h4v2M5 4l1 9h4l1-9"/></svg>
|
|
173
|
-
Delete
|
|
174
|
-
</button>
|
|
175
|
-
<button type="button" class="btn btn-sm btn-link text-white text-decoration-none" id="batchClearBtn">
|
|
176
|
-
Cancel
|
|
177
|
-
</button>
|
|
178
|
-
</div>
|
|
179
|
-
</div>
|
|
180
|
-
</div>
|
|
181
|
-
|
|
182
|
-
{{> bucketadmin_upload_modal }}
|
|
183
|
-
{{> bucketadmin_newfolder_modal }}
|
|
184
|
-
{{> bucketadmin_move_modal }}
|
|
185
|
-
{{> bucketadmin_delete_modal }}
|
|
186
|
-
{{> bucketadmin_preview_modal }}
|
|
187
|
-
|
|
188
|
-
<!-- Toast Container -->
|
|
189
|
-
<div id="toast-container" class="toast-container"></div>
|
|
190
|
-
|
|
191
|
-
<!-- Context Menu Element -->
|
|
192
|
-
<div id="fm-context-menu" class="fm-context-menu" style="display: none;"></div>
|
|
193
|
-
|
|
1
|
+
<link rel="stylesheet" href="/mbkbucket/bucketadmin.css{{mbkbucket_cachebuster}}">
|
|
2
|
+
<div id="bucketAppData" data-app-name="{{APP_NAME}}" data-provider-type="{{providerType}}" data-public-view-enabled="{{publicViewEnabled}}" hidden></div>
|
|
3
|
+
|
|
4
|
+
<div class="page-wrapper">
|
|
5
|
+
<!-- Page Header -->
|
|
6
|
+
<div class="page-header">
|
|
7
|
+
<div class="page-header-row">
|
|
8
|
+
<div>
|
|
9
|
+
<div class="page-pretitle">Storage & Buckets</div>
|
|
10
|
+
<h1 class="page-title d-flex align-items-center gap-2">
|
|
11
|
+
<span>Files</span>
|
|
12
|
+
<span class="provider-badge provider-{{providerType}}" id="topProviderBadge">
|
|
13
|
+
<span class="provider-icon"></span>
|
|
14
|
+
<span class="provider-label">{{providerType}}</span>
|
|
15
|
+
</span>
|
|
16
|
+
<span class="health-status-badge healthy" id="topHealthBadge" title="Storage Connection Health">
|
|
17
|
+
<span class="health-dot"></span>
|
|
18
|
+
<span class="health-label" id="topHealthText">Connected</span>
|
|
19
|
+
</span>
|
|
20
|
+
</h1>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="page-actions">
|
|
23
|
+
<button type="button" class="btn btn-outline btn-refresh" id="refresh-btn" title="Refresh files" aria-label="Refresh files">
|
|
24
|
+
<svg width="15" height="15" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M1 4v4h4M15 12v-4h-4M13.5 6A6 6 0 003 4.5L1 8M2.5 10a6 6 0 0010.5 1.5L15 8"/></svg>
|
|
25
|
+
<span class="d-none d-sm-inline">Refresh</span>
|
|
26
|
+
</button>
|
|
27
|
+
<button type="button" class="btn btn-outline" id="new-folder-btn" data-action="create-folder">
|
|
28
|
+
<svg width="15" height="15" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 4a1 1 0 011-1h3l2 2h5a1 1 0 011 1v6a1 1 0 01-1 1H3a1 1 0 01-1-1V4z"/><path d="M8 7v4M6 9h4"/></svg>
|
|
29
|
+
New folder
|
|
30
|
+
</button>
|
|
31
|
+
<button type="button" class="btn btn-primary" id="upload-btn" data-action="upload-files">
|
|
32
|
+
<svg width="15" height="15" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M14 11v3H2v-3"/><path d="M11 6L8 3 5 6"/><line x1="8" y1="3" x2="8" y2="11"/></svg>
|
|
33
|
+
Upload
|
|
34
|
+
</button>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
{{> bucketadmin_alerts }}
|
|
40
|
+
|
|
41
|
+
<!-- Main File Manager Card -->
|
|
42
|
+
<div class="card file-manager">
|
|
43
|
+
<div class="fm-layout">
|
|
44
|
+
<!-- Tree sidebar -->
|
|
45
|
+
<aside class="fm-tree-wrap">
|
|
46
|
+
<div class="fm-tree-header">
|
|
47
|
+
<span class="fm-tree-title">Explorer</span>
|
|
48
|
+
</div>
|
|
49
|
+
<div id="fm-tree" class="fm-tree"></div>
|
|
50
|
+
|
|
51
|
+
<div class="fm-storage">
|
|
52
|
+
<div class="fm-storage-label d-flex justify-content-between align-items-center">
|
|
53
|
+
<span>Storage Connection</span>
|
|
54
|
+
<button type="button" class="health-check-btn" id="checkHealthBtn" title="Check Connection Health" aria-label="Check Connection Health">
|
|
55
|
+
<svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M1 4v4h4M15 12v-4h-4M13.5 6A6 6 0 003 4.5L1 8M2.5 10a6 6 0 0010.5 1.5L15 8"/></svg>
|
|
56
|
+
</button>
|
|
57
|
+
</div>
|
|
58
|
+
<div class="bucket-switcher-wrap mb-2">
|
|
59
|
+
<div class="bucket-switcher-control">
|
|
60
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" class="bucket-switcher-icon"><path d="M2 4.5C2 3.12 5.13 2 9 2s7 1.12 7 2.5v7c0 1.38-3.13 2.5-7 2.5s-7-1.12-7-2.5v-7z"/><path d="M2 8c0 1.38 3.13 2.5 7 2.5s7-1.12 7-2.5"/></svg>
|
|
61
|
+
<select id="bucketSelector" class="bucket-switcher-select" aria-label="Select connected bucket">
|
|
62
|
+
{{#if bucketOptions.length}}
|
|
63
|
+
{{#each bucketOptions}}
|
|
64
|
+
<option value="{{name}}" data-type="{{type}}" {{#if isSelected}}selected{{/if}}>{{name}} [{{type}}]{{#if isDefault}} (default){{/if}}</option>
|
|
65
|
+
{{/each}}
|
|
66
|
+
{{else}}
|
|
67
|
+
<option value="">No buckets configured</option>
|
|
68
|
+
{{/if}}
|
|
69
|
+
</select>
|
|
70
|
+
</div>
|
|
71
|
+
<small id="bucketSwitchStatus" class="bucket-switcher-status is-hidden">Switching bucket...</small>
|
|
72
|
+
</div>
|
|
73
|
+
<div class="storage-bar"><div id="storageUsageBar" style="width: 100%; background: var(--primary);"></div></div>
|
|
74
|
+
<div class="fm-storage-meta d-flex justify-content-between align-items-center">
|
|
75
|
+
<span id="totalFilesCount">Loading...</span>
|
|
76
|
+
<span id="storageLatency" class="storage-latency-tag"></span>
|
|
77
|
+
</div>
|
|
78
|
+
<div id="filterInfo" class="fm-storage-subinfo"></div>
|
|
79
|
+
</div>
|
|
80
|
+
</aside>
|
|
81
|
+
|
|
82
|
+
<!-- Main area -->
|
|
83
|
+
<section class="fm-main">
|
|
84
|
+
<div class="fm-toolbar">
|
|
85
|
+
<nav class="fm-breadcrumb breadcrumb" id="fm-breadcrumb" aria-label="Path"></nav>
|
|
86
|
+
|
|
87
|
+
<div class="fm-toolbar-actions">
|
|
88
|
+
<!-- Quick filters -->
|
|
89
|
+
<div class="quick-filter-group" role="group" aria-label="Quick filters">
|
|
90
|
+
<button type="button" class="quick-filter-btn active" data-filter="all">All</button>
|
|
91
|
+
<button type="button" class="quick-filter-btn" data-filter="media">Media</button>
|
|
92
|
+
<button type="button" class="quick-filter-btn" data-filter="docs">Docs</button>
|
|
93
|
+
<button type="button" class="quick-filter-btn" data-filter="code">Code</button>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<!-- Search -->
|
|
97
|
+
<div class="search-box">
|
|
98
|
+
<svg class="s-icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="7" cy="7" r="5"/><path d="M11 11l3.5 3.5"/></svg>
|
|
99
|
+
<input type="text" id="searchInput" placeholder="Search files…" aria-label="Search files">
|
|
100
|
+
<button type="button" class="search-clear-btn" id="searchClearBtn" style="display: none;" aria-label="Clear search">×</button>
|
|
101
|
+
</div>
|
|
102
|
+
|
|
103
|
+
<!-- View toggle -->
|
|
104
|
+
<div class="fm-view-toggle">
|
|
105
|
+
<button type="button" class="view-btn active" id="view-grid" aria-label="Grid view" title="Grid view">
|
|
106
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="2" y="2" width="5" height="5" rx="1"/><rect x="9" y="2" width="5" height="5" rx="1"/><rect x="2" y="9" width="5" height="5" rx="1"/><rect x="9" y="9" width="5" height="5" rx="1"/></svg>
|
|
107
|
+
</button>
|
|
108
|
+
<button type="button" class="view-btn" id="view-list" aria-label="List view" title="List view">
|
|
109
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><line x1="2" y1="4" x2="14" y2="4"/><line x1="2" y1="8" x2="14" y2="8"/><line x1="2" y1="12" x2="14" y2="12"/></svg>
|
|
110
|
+
</button>
|
|
111
|
+
<button type="button" class="view-btn" id="view-thumbs" aria-label="Toggle image previews" title="Toggle image previews (Fast Mode saves bandwidth & tokens)">
|
|
112
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="2" y="2" width="12" height="12" rx="2"/><circle cx="5.5" cy="5.5" r="1.5"/><path d="M14 10l-4-4-6 6"/></svg>
|
|
113
|
+
</button>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
|
|
118
|
+
<!-- File Grid / List Container -->
|
|
119
|
+
<div id="fileListContainer" class="fm-grid-wrap">
|
|
120
|
+
<div id="fm-grid" class="fm-grid view-grid">
|
|
121
|
+
{{> bucketadmin_filelist_skeleton }}
|
|
122
|
+
</div>
|
|
123
|
+
|
|
124
|
+
<!-- Empty state -->
|
|
125
|
+
<div id="fm-empty" class="fm-empty" style="display: none;" hidden>
|
|
126
|
+
<div class="empty-icon-wrap">
|
|
127
|
+
<svg width="54" height="54" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M3 7a2 2 0 012-2h4l2 2h7a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V7z"/></svg>
|
|
128
|
+
</div>
|
|
129
|
+
<div class="empty-title">This folder is empty</div>
|
|
130
|
+
<div class="empty-desc">Drag files directly into the browser or click Upload to get started.</div>
|
|
131
|
+
<div class="empty-actions mt-3">
|
|
132
|
+
<button type="button" class="btn btn-outline btn-sm me-2" data-action="create-folder">
|
|
133
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 4a1 1 0 011-1h3l2 2h5a1 1 0 011 1v6a1 1 0 01-1 1H3a1 1 0 01-1-1V4z"/><path d="M8 7v4M6 9h4"/></svg>
|
|
134
|
+
New Folder
|
|
135
|
+
</button>
|
|
136
|
+
<button type="button" class="btn btn-primary btn-sm" data-action="upload-files">
|
|
137
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M14 11v3H2v-3"/><path d="M11 6L8 3 5 6"/><line x1="8" y1="3" x2="8" y2="11"/></svg>
|
|
138
|
+
Upload Files
|
|
139
|
+
</button>
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
<!-- Pagination -->
|
|
145
|
+
<div id="paginationContainer" class="pagination-container" style="display: none;">
|
|
146
|
+
<nav aria-label="File pagination">
|
|
147
|
+
<ul class="pagination" id="paginationList"></ul>
|
|
148
|
+
</nav>
|
|
149
|
+
</div>
|
|
150
|
+
</section>
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
|
|
155
|
+
<!-- Floating Batch Action Bar -->
|
|
156
|
+
<div id="batchActionBar" class="batch-action-bar" style="display: none;">
|
|
157
|
+
<div class="batch-bar-inner">
|
|
158
|
+
<div class="batch-selection-info">
|
|
159
|
+
<span class="batch-count-badge" id="batchSelectedCount">0</span>
|
|
160
|
+
<span class="batch-count-text">item(s) selected</span>
|
|
161
|
+
</div>
|
|
162
|
+
<div class="batch-actions">
|
|
163
|
+
<button type="button" class="btn btn-sm btn-outline-light" id="batchDownloadBtn">
|
|
164
|
+
<svg width="13" height="13" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M14 11v3H2v-3"/><path d="M5 8l3 3 3-3"/><line x1="8" y1="2" x2="8" y2="11"/></svg>
|
|
165
|
+
Download
|
|
166
|
+
</button>
|
|
167
|
+
<button type="button" class="btn btn-sm btn-outline-light" id="batchMoveBtn">
|
|
168
|
+
<svg width="13" height="13" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M11 2L14 5L11 8M14 5H5C3.34315 5 2 6.34315 2 8V14"/></svg>
|
|
169
|
+
Move
|
|
170
|
+
</button>
|
|
171
|
+
<button type="button" class="btn btn-sm btn-danger" id="batchDeleteBtn">
|
|
172
|
+
<svg width="13" height="13" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M3 4h10M6 4V2h4v2M5 4l1 9h4l1-9"/></svg>
|
|
173
|
+
Delete
|
|
174
|
+
</button>
|
|
175
|
+
<button type="button" class="btn btn-sm btn-link text-white text-decoration-none" id="batchClearBtn">
|
|
176
|
+
Cancel
|
|
177
|
+
</button>
|
|
178
|
+
</div>
|
|
179
|
+
</div>
|
|
180
|
+
</div>
|
|
181
|
+
|
|
182
|
+
{{> bucketadmin_upload_modal }}
|
|
183
|
+
{{> bucketadmin_newfolder_modal }}
|
|
184
|
+
{{> bucketadmin_move_modal }}
|
|
185
|
+
{{> bucketadmin_delete_modal }}
|
|
186
|
+
{{> bucketadmin_preview_modal }}
|
|
187
|
+
|
|
188
|
+
<!-- Toast Container -->
|
|
189
|
+
<div id="toast-container" class="toast-container"></div>
|
|
190
|
+
|
|
191
|
+
<!-- Context Menu Element -->
|
|
192
|
+
<div id="fm-context-menu" class="fm-context-menu" style="display: none;"></div>
|
|
193
|
+
|
|
194
194
|
<script src="/mbkbucket/bucketadmin.js{{mbkbucket_cachebuster}}"></script>
|