@gallop.software/studio 2.3.79 → 2.3.81
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/dist/client/index.html +1 -1
- package/dist/server/index.js +64 -26
- package/dist/server/index.js.map +1 -1
- package/package.json +1 -1
package/dist/client/index.html
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
12
12
|
}
|
|
13
13
|
</style>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-C8KCzOcY.js"></script>
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
17
17
|
<div id="root"></div>
|
package/dist/server/index.js
CHANGED
|
@@ -776,23 +776,42 @@ async function handleList(request) {
|
|
|
776
776
|
let fileSize;
|
|
777
777
|
const entryIsProcessed = isProcessed(entry);
|
|
778
778
|
if (isImage && entryIsProcessed) {
|
|
779
|
-
const
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
779
|
+
const hasSm = !!entry.sm;
|
|
780
|
+
const hasMd = !!entry.md;
|
|
781
|
+
const hasLg = !!entry.lg;
|
|
782
|
+
const hasFull = !!entry.f;
|
|
783
|
+
let thumbSize = null;
|
|
784
|
+
if (hasSm) thumbSize = "sm";
|
|
785
|
+
else if (hasMd) thumbSize = "md";
|
|
786
|
+
else if (hasLg) thumbSize = "lg";
|
|
787
|
+
else if (hasFull) thumbSize = "full";
|
|
788
|
+
if (thumbSize) {
|
|
789
|
+
const thumbPath = getThumbnailPath(key, thumbSize);
|
|
790
|
+
if (isPushedToCloud && entry.c !== void 0) {
|
|
791
|
+
const cdnUrl = cdnUrls[entry.c];
|
|
792
|
+
if (cdnUrl) {
|
|
793
|
+
thumbnail = `${cdnUrl}${thumbPath}`;
|
|
794
|
+
hasThumbnail = true;
|
|
795
|
+
}
|
|
796
|
+
} else {
|
|
797
|
+
const localThumbPath = getPublicPath(thumbPath);
|
|
798
|
+
try {
|
|
799
|
+
await fs4.access(localThumbPath);
|
|
800
|
+
thumbnail = thumbPath;
|
|
801
|
+
hasThumbnail = true;
|
|
802
|
+
} catch {
|
|
803
|
+
thumbnail = key;
|
|
804
|
+
hasThumbnail = false;
|
|
805
|
+
}
|
|
785
806
|
}
|
|
786
807
|
} else {
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
hasThumbnail = true;
|
|
792
|
-
} catch {
|
|
808
|
+
if (isPushedToCloud && entry.c !== void 0) {
|
|
809
|
+
const cdnUrl = cdnUrls[entry.c];
|
|
810
|
+
thumbnail = cdnUrl ? `${cdnUrl}${key}` : key;
|
|
811
|
+
} else {
|
|
793
812
|
thumbnail = key;
|
|
794
|
-
hasThumbnail = false;
|
|
795
813
|
}
|
|
814
|
+
hasThumbnail = false;
|
|
796
815
|
}
|
|
797
816
|
} else if (isImage) {
|
|
798
817
|
if (isPushedToCloud && entry.c !== void 0) {
|
|
@@ -868,23 +887,42 @@ async function handleSearch(request) {
|
|
|
868
887
|
let hasThumbnail = false;
|
|
869
888
|
const entryIsProcessed = isProcessed(entry);
|
|
870
889
|
if (isImage && entryIsProcessed) {
|
|
871
|
-
const
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
890
|
+
const hasSm = !!entry.sm;
|
|
891
|
+
const hasMd = !!entry.md;
|
|
892
|
+
const hasLg = !!entry.lg;
|
|
893
|
+
const hasFull = !!entry.f;
|
|
894
|
+
let thumbSize = null;
|
|
895
|
+
if (hasSm) thumbSize = "sm";
|
|
896
|
+
else if (hasMd) thumbSize = "md";
|
|
897
|
+
else if (hasLg) thumbSize = "lg";
|
|
898
|
+
else if (hasFull) thumbSize = "full";
|
|
899
|
+
if (thumbSize) {
|
|
900
|
+
const thumbPath = getThumbnailPath(key, thumbSize);
|
|
901
|
+
if (isPushedToCloud && entry.c !== void 0) {
|
|
902
|
+
const cdnUrl = cdnUrls[entry.c];
|
|
903
|
+
if (cdnUrl) {
|
|
904
|
+
thumbnail = `${cdnUrl}${thumbPath}`;
|
|
905
|
+
hasThumbnail = true;
|
|
906
|
+
}
|
|
907
|
+
} else {
|
|
908
|
+
const localThumbPath = getPublicPath(thumbPath);
|
|
909
|
+
try {
|
|
910
|
+
await fs4.access(localThumbPath);
|
|
911
|
+
thumbnail = thumbPath;
|
|
912
|
+
hasThumbnail = true;
|
|
913
|
+
} catch {
|
|
914
|
+
thumbnail = key;
|
|
915
|
+
hasThumbnail = false;
|
|
916
|
+
}
|
|
877
917
|
}
|
|
878
918
|
} else {
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
hasThumbnail = true;
|
|
884
|
-
} catch {
|
|
919
|
+
if (isPushedToCloud && entry.c !== void 0) {
|
|
920
|
+
const cdnUrl = cdnUrls[entry.c];
|
|
921
|
+
thumbnail = cdnUrl ? `${cdnUrl}${key}` : key;
|
|
922
|
+
} else {
|
|
885
923
|
thumbnail = key;
|
|
886
|
-
hasThumbnail = false;
|
|
887
924
|
}
|
|
925
|
+
hasThumbnail = false;
|
|
888
926
|
}
|
|
889
927
|
} else if (isImage) {
|
|
890
928
|
if (isPushedToCloud && entry.c !== void 0) {
|