@antelopejs/dms-media 0.1.2 → 0.1.4
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/pages/media.js +1 -1
- package/dist/pages/media.js.map +1 -1
- package/dist/test/antelope.test.js +1 -1
- package/frontend-vue/app/components/Library.vue +6 -28
- package/frontend-vue/package.json +3 -0
- package/package.json +7 -7
- package/src/pages/media.ts +1 -1
- package/src/test/antelope.test.ts +1 -1
package/dist/pages/media.js
CHANGED
|
@@ -22,7 +22,7 @@ let SettingsAssetsPage = class SettingsAssetsPage extends (0, page_1.PageControl
|
|
|
22
22
|
icon: "i-ph-images",
|
|
23
23
|
category: exports.mediaSettingsCategory,
|
|
24
24
|
description: "Browse and manage the media library",
|
|
25
|
-
}, (0, base_1.DefaultLayout)({ fullWidth: true })) {
|
|
25
|
+
}, (0, base_1.DefaultLayout)({ fullWidth: true, fillHeight: true })) {
|
|
26
26
|
static content = (0, custom_1.CustomComponent)(MEDIA_LIBRARY_COMPONENT);
|
|
27
27
|
};
|
|
28
28
|
exports.SettingsAssetsPage = SettingsAssetsPage;
|
package/dist/pages/media.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media.js","sourceRoot":"","sources":["../../src/pages/media.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAMwC;AACxC,yDAA+D;AAC/D,kEAAwE;AAExE,MAAM,uBAAuB,GAAG,mBAAmB,CAAC;AAKvC,QAAA,qBAAqB,GAAG,IAAA,eAAQ,EAAC,OAAO,EAAE;IACrD,QAAQ,EAAE,uBAAgB;IAC1B,WAAW,EAAE,OAAO;IACpB,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,CAAC;CACT,CAAC,CAAC;AAII,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,IAAA,qBAAc,EACpD,QAAQ,EACR;IACE,WAAW,EAAE,QAAQ;IACrB,IAAI,EAAE,aAAa;IACnB,QAAQ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|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { useElementBounding, useResizeObserver } from "@vueuse/core";
|
|
3
|
-
|
|
4
2
|
const { t } = useI18n();
|
|
5
|
-
|
|
6
|
-
// The files card fills the rest of the viewport, so the page itself does not
|
|
7
|
-
// scroll. The DMS layout drops page components into plain block containers,
|
|
8
|
-
// so there is no flex parent to fill: the height comes from the viewport,
|
|
9
|
-
// minus where the card actually starts (dashboard header, page header and the
|
|
10
|
-
// storage card above it all vary). Before the first measurement (SSR,
|
|
11
|
-
// pre-mount) no height is applied and the min-h floor takes over.
|
|
12
|
-
const filesCard = ref<HTMLElement | null>(null);
|
|
13
|
-
const { top: filesCardTop, update: measureFilesCard } =
|
|
14
|
-
useElementBounding(filesCard);
|
|
15
|
-
// The storage card grows once its stats load and pushes the files card down;
|
|
16
|
-
// the bounding above only reacts to the files card's own size, so re-measure
|
|
17
|
-
// when the library (which grows with the storage card) resizes.
|
|
18
|
-
const libraryRoot = ref<HTMLElement | null>(null);
|
|
19
|
-
useResizeObserver(libraryRoot, () => measureFilesCard());
|
|
20
|
-
// Room left below the card, matching the layout panel's bottom padding.
|
|
21
|
-
const FILES_CARD_BOTTOM_GAP_PX = 24;
|
|
22
|
-
const filesCardHeight = computed(() =>
|
|
23
|
-
filesCardTop.value > 0
|
|
24
|
-
? `calc(100dvh - ${Math.round(filesCardTop.value)}px - ${FILES_CARD_BOTTOM_GAP_PX}px)`
|
|
25
|
-
: undefined,
|
|
26
|
-
);
|
|
27
3
|
</script>
|
|
28
4
|
|
|
29
5
|
<template>
|
|
30
|
-
|
|
6
|
+
<!-- The page fills the panel (`fillHeight` in src/pages/media.ts): the files
|
|
7
|
+
card takes the height the storage card leaves, and the explorer scrolls
|
|
8
|
+
inside it. The card keeps a usable height of its own: on a short screen
|
|
9
|
+
the panel scrolls rather than squeeze the explorer. -->
|
|
10
|
+
<div class="flex min-h-0 flex-1 flex-col gap-4">
|
|
31
11
|
<DmsCard>
|
|
32
12
|
<DmsMediaStorageOverview />
|
|
33
13
|
</DmsCard>
|
|
34
14
|
<DmsCard
|
|
35
|
-
ref="filesCard"
|
|
36
15
|
:padded="false"
|
|
37
|
-
class="flex min-h-96 flex-col overflow-hidden"
|
|
38
|
-
:style="{ height: filesCardHeight }"
|
|
16
|
+
class="flex min-h-96 flex-1 flex-col overflow-hidden"
|
|
39
17
|
>
|
|
40
18
|
<DmsMediaPickerExplorer
|
|
41
19
|
browse
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dms.frontend.ts",
|
|
7
7
|
"packageManager": "pnpm@10.6.5",
|
|
8
|
+
"engines": {
|
|
9
|
+
"@antelopejs/dms-frontend": ">=0.2.8 <0.4.0"
|
|
10
|
+
},
|
|
8
11
|
"scripts": {
|
|
9
12
|
"dev": "pnpm --dir ../playground frontend:dev",
|
|
10
13
|
"build": "pnpm --dir ../playground exec ajs dms build",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/dms-media",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"frontend:dev": "cd playground && pnpm frontend:dev",
|
|
34
34
|
"dev": "ajs project run -w -p playground",
|
|
35
35
|
"lint:fix": "oxlint --fix --max-warnings=1000000 && oxfmt . && pnpm --dir frontend-vue lint:fix",
|
|
36
|
-
"lint": "oxlint && oxfmt --check . && pnpm --dir frontend-vue lint",
|
|
36
|
+
"lint": "oxlint && oxfmt --check . && pnpm --dir frontend-vue lint && antelopejs-check-interface-ranges",
|
|
37
37
|
"typecheck": "tsc --noEmit",
|
|
38
38
|
"format": "oxfmt . && pnpm --dir frontend-vue format",
|
|
39
39
|
"test": "pnpm run build && ajs module test .",
|
|
@@ -48,17 +48,17 @@
|
|
|
48
48
|
"@antelopejs/interface-api": ">=0.0.13 <1.0.0",
|
|
49
49
|
"@antelopejs/interface-api-util": ">=0.1.2 <1.0.0",
|
|
50
50
|
"@antelopejs/interface-core": ">=0.1.1 <1.0.0",
|
|
51
|
-
"@antelopejs/interface-database": ">=0.1.
|
|
52
|
-
"@antelopejs/interface-database-decorators": ">=0.1.
|
|
53
|
-
"@antelopejs/interface-dms": ">=0.2.
|
|
51
|
+
"@antelopejs/interface-database": ">=0.1.8 <1.0.0",
|
|
52
|
+
"@antelopejs/interface-database-decorators": ">=0.1.7 <1.0.0",
|
|
53
|
+
"@antelopejs/interface-dms": ">=0.2.8 <1.0.0",
|
|
54
54
|
"@antelopejs/interface-file-storage": ">=0.1.3 <1.0.0",
|
|
55
55
|
"node-cron": "^4.2.1",
|
|
56
56
|
"sharp": "^0.34.4",
|
|
57
57
|
"zod": "~3.24.2"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@antelopejs/core": ">=1.
|
|
61
|
-
"@antelopejs/tooling-configs": ">=0.0.
|
|
60
|
+
"@antelopejs/core": ">=1.10.1 <2",
|
|
61
|
+
"@antelopejs/tooling-configs": ">=0.0.7 <1.0.0",
|
|
62
62
|
"@types/chai": "^4.3.20",
|
|
63
63
|
"@types/mocha": "^10",
|
|
64
64
|
"@types/node": "^24.0.0",
|
package/src/pages/media.ts
CHANGED
|
@@ -30,7 +30,7 @@ export class SettingsAssetsPage extends PageController(
|
|
|
30
30
|
category: mediaSettingsCategory,
|
|
31
31
|
description: "Browse and manage the media library",
|
|
32
32
|
},
|
|
33
|
-
DefaultLayout({ fullWidth: true }),
|
|
33
|
+
DefaultLayout({ fullWidth: true, fillHeight: true }),
|
|
34
34
|
) {
|
|
35
35
|
static content = CustomComponent(MEDIA_LIBRARY_COMPONENT);
|
|
36
36
|
}
|