@pitcher/canvas-ui 2026.1.20-115623-beta → 2026.1.20-125834-beta
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/canvas-ui.js +10 -6
- package/canvas-ui.js.map +1 -1
- package/package.json +1 -1
package/canvas-ui.js
CHANGED
|
@@ -110498,12 +110498,13 @@ function init({
|
|
|
110498
110498
|
setSelectedFolder: false
|
|
110499
110499
|
});
|
|
110500
110500
|
if (parentFolder) {
|
|
110501
|
+
const isAdmin2 = useAppStore$4().appName.value === "admin";
|
|
110501
110502
|
state$2.folderCache[parentId] = {
|
|
110502
110503
|
files_count: parentFolder.files.length,
|
|
110503
110504
|
folders_count: parentFolder.folders.length,
|
|
110504
110505
|
available_files_count: parentFolder.files.filter((f) => {
|
|
110505
110506
|
const isExpired = f.expires_at && new Date(f.expires_at) < /* @__PURE__ */ new Date();
|
|
110506
|
-
return !f.deleted_at && !isExpired;
|
|
110507
|
+
return !f.deleted_at && (isAdmin2 || !isExpired) && f.status === "viewable";
|
|
110507
110508
|
}).length,
|
|
110508
110509
|
available_folders_count: parentFolder.folders.filter((sf) => {
|
|
110509
110510
|
return (sf.files_count > 0 || sf.folders_count > 0) && (sf.available_files_count !== 0 || sf.available_folders_count !== 0);
|
|
@@ -110529,11 +110530,14 @@ function init({
|
|
|
110529
110530
|
filteredFolders = foldersFromSearch.map((folder) => {
|
|
110530
110531
|
const cached = state$2.folderCache[folder.id];
|
|
110531
110532
|
const parentCached = folder.parent_folder_id ? state$2.folderCache[folder.parent_folder_id] : null;
|
|
110532
|
-
|
|
110533
|
-
|
|
110534
|
-
|
|
110535
|
-
|
|
110536
|
-
|
|
110533
|
+
const isAdmin2 = useAppStore$4().appName.value === "admin";
|
|
110534
|
+
if (!isAdmin2) {
|
|
110535
|
+
if (cached && cached.available_files_count !== void 0 && cached.available_folders_count !== void 0 && cached.available_files_count === 0 && cached.available_folders_count === 0) {
|
|
110536
|
+
return null;
|
|
110537
|
+
}
|
|
110538
|
+
if (parentCached && parentCached.available_folders_count !== void 0 && parentCached.available_folders_count === 0) {
|
|
110539
|
+
return null;
|
|
110540
|
+
}
|
|
110537
110541
|
}
|
|
110538
110542
|
if (cached) {
|
|
110539
110543
|
const result = {
|