@templatical/editor 0.12.1 → 0.14.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/dist/{AiChatSidebar-CXH7l1Ar.js → AiChatSidebar-J8iO_sX7.js} +16 -16
- package/dist/{AiFeatureMenu-BKbUUc1D.js → AiFeatureMenu-F2diEDgV.js} +10 -10
- package/dist/{BlockIssueBadge-C-EPqWsh.js → BlockIssueBadge-a-qlByxF.js} +5 -5
- package/dist/{CloudEditor-CB16QzKM.js → CloudEditor-CDjtwb4i.js} +284 -250
- package/dist/{CollaboratorBar-ACUA7lBJ.js → CollaboratorBar-B_EnJLtW.js} +4 -4
- package/dist/{CommentsSidebar-CpRLN40c.js → CommentsSidebar-DaP9BA_r.js} +18 -18
- package/dist/{CountdownBlock-C-6o19qS.js → CountdownBlock-DtAokAVw.js} +3 -3
- package/dist/{CountdownToolbar-Dol7Q0Pv.js → CountdownToolbar-Dtqgwy0g.js} +3 -3
- package/dist/{DesignReferenceSidebar-0dTsBW08.js → DesignReferenceSidebar-BHRlTqlT.js} +21 -33
- package/dist/{IssuesPanel-I0z6k6-H.js → IssuesPanel-u7ee3Wrl.js} +11 -11
- package/dist/{LoadingTrack-C7mGWPHS.js → LoadingTrack-CV3ID80N.js} +1 -1
- package/dist/ModuleBrowserModal-DOsdaS6s.js +201 -0
- package/dist/{ModulePreviewCanvas-CpaumPMS.js → ModulePreviewCanvas-Cx4MOJ0X.js} +21 -21
- package/dist/{NumberWithSuffix-Bp40ik4l.js → NumberWithSuffix-D2mW_DhT.js} +4 -4
- package/dist/{ParagraphEditor-BqRFV_Y-.js → ParagraphEditor-DMzkVnST.js} +156 -136
- package/dist/{RichTextEditorContent-Q5altsx1.js → RichTextEditorContent-CRCxCwKf.js} +7 -7
- package/dist/{SaveModuleDialog-DmfvH5D0.js → SaveModuleDialog-DuEKgumL.js} +8 -8
- package/dist/{SnapshotHistory-C052o-8U.js → SnapshotHistory-CVgiNJtE.js} +12 -12
- package/dist/{TemplateScoringPanel-CUs8XmIi.js → TemplateScoringPanel-lm0_9nYi.js} +26 -26
- package/dist/{TestEmailModal-BIIxRWUt.js → TestEmailModal-WBMdiW5S.js} +5 -5
- package/dist/{TitleEditor-FMh54Cx5.js → TitleEditor-eyT0h-Sa.js} +71 -55
- package/dist/{TplModal-utMtXzSO.js → TplModal-tjQ7OB0g.js} +4 -4
- package/dist/{blockTypeIcons-C6UGDmrC.js → blockTypeIcons-DdB3uTKD.js} +5 -5
- package/dist/bundle-stats.json +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-4NhCFeTh.js → AiFeatureMenu-D7rB2SBs.js} +9 -9
- package/dist/cdn/chunks/{AiFeatureMenu-4NhCFeTh.js.map → AiFeatureMenu-D7rB2SBs.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-BYKThwhE.js → BlockIssueBadge-DHOe0pgx.js} +6 -6
- package/dist/cdn/chunks/{BlockIssueBadge-BYKThwhE.js.map → BlockIssueBadge-DHOe0pgx.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-DSeihOan.js → CloudEditor-DNed_Ym0.js} +273 -239
- package/dist/cdn/chunks/CloudEditor-DNed_Ym0.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-Dn5gXNDt.js → CollaboratorBar-sj_9Lee3.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-Dn5gXNDt.js.map → CollaboratorBar-sj_9Lee3.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-hYoJdVOt.js → CountdownBlock-C1Ikjpn4.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-hYoJdVOt.js.map → CountdownBlock-C1Ikjpn4.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-BQn0Kj0X.js → CountdownToolbar-j1G_X8rB.js} +4 -4
- package/dist/cdn/chunks/CountdownToolbar-j1G_X8rB.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-_5fEnivU.js → IssuesPanel-CTOf3PsH.js} +11 -11
- package/dist/cdn/chunks/{IssuesPanel-_5fEnivU.js.map → IssuesPanel-CTOf3PsH.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-DtCksAeW.js → ModuleBrowserModal-DCh88-rr.js} +13 -10
- package/dist/cdn/chunks/{ModuleBrowserModal-DtCksAeW.js.map → ModuleBrowserModal-DCh88-rr.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-CCOvabZd.js → ModulePreviewCanvas-DJqvTKmg.js} +19 -19
- package/dist/cdn/chunks/{ModulePreviewCanvas-CCOvabZd.js.map → ModulePreviewCanvas-DJqvTKmg.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-cdWjAK6y.js → NumberWithSuffix-Bu45XWSl.js} +5 -5
- package/dist/cdn/chunks/{NumberWithSuffix-cdWjAK6y.js.map → NumberWithSuffix-Bu45XWSl.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-BnhnFOW1.js → ParagraphEditor-DwZqLJp2.js} +131 -111
- package/dist/cdn/chunks/ParagraphEditor-DwZqLJp2.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-DV2yknp8.js → RichTextEditorContent-CIuZ-2DV.js} +5 -5
- package/dist/cdn/chunks/{RichTextEditorContent-DV2yknp8.js.map → RichTextEditorContent-CIuZ-2DV.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-CCX5U7VA.js → SaveModuleDialog-Bep0X2s_.js} +6 -6
- package/dist/cdn/chunks/{SaveModuleDialog-CCX5U7VA.js.map → SaveModuleDialog-Bep0X2s_.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CQqklX0D.js → TitleEditor-DO1-h3RY.js} +62 -46
- package/dist/cdn/chunks/TitleEditor-DO1-h3RY.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-8o24HVJu.js +22 -0
- package/dist/cdn/chunks/{blockTypeIcons-CpGPHppB.js.map → blockTypeIcons-8o24HVJu.js.map} +1 -1
- package/dist/cdn/chunks/{de-BpseTWOA.js → de-LsV0u1tP.js} +20 -2
- package/dist/cdn/chunks/de-LsV0u1tP.js.map +1 -0
- package/dist/cdn/chunks/{draggable-Bci-fq8y.js → draggable-kPCz_3zM.js} +14 -5
- package/dist/cdn/chunks/{draggable-Bci-fq8y.js.map → draggable-kPCz_3zM.js.map} +1 -1
- package/dist/cdn/chunks/{en-VGIQ0WNq.js → en-Bb8X1bOs.js} +20 -2
- package/dist/cdn/chunks/en-Bb8X1bOs.js.map +1 -0
- package/dist/cdn/chunks/{extensions-Ds9GnMcd.js → extensions-iwBXnEwq.js} +21 -21
- package/dist/cdn/chunks/{extensions-Ds9GnMcd.js.map → extensions-iwBXnEwq.js.map} +1 -1
- package/dist/cdn/chunks/{features-DxWz_Enw.js → features-CkTMVylx.js} +996 -817
- package/dist/cdn/chunks/features-CkTMVylx.js.map +1 -0
- package/dist/cdn/chunks/{icons-BflGUmFY.js → icons-9zjCuoJx.js} +158 -152
- package/dist/cdn/chunks/icons-9zjCuoJx.js.map +1 -0
- package/dist/cdn/chunks/liquid.browser-DKKBzRQu.js.map +1 -1
- package/dist/cdn/chunks/{media-library-C479-QcE.js → media-library-DMRIPx4g.js} +373 -371
- package/dist/cdn/chunks/media-library-DMRIPx4g.js.map +1 -0
- package/dist/cdn/chunks/{pt-BR-zAqpLQbW.js → pt-BR-BwJY_cvb.js} +20 -2
- package/dist/cdn/chunks/pt-BR-BwJY_cvb.js.map +1 -0
- package/dist/cdn/chunks/{pusher-BICWUP2j.js → pusher-CdEqyLwF.js} +6 -3
- package/dist/cdn/chunks/{pusher-BICWUP2j.js.map → pusher-CdEqyLwF.js.map} +1 -1
- package/dist/cdn/chunks/quality-CyeUgs_c.js +2176 -0
- package/dist/cdn/chunks/{quality-BL_pEvFP.js.map → quality-CyeUgs_c.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-C0vdAODQ.js → renderer-BIKUEKDD.js} +38 -29
- package/dist/cdn/chunks/{renderer-C0vdAODQ.js.map → renderer-BIKUEKDD.js.map} +1 -1
- package/dist/cdn/chunks/{src-DzvOWQ9S.js → src-pDy_imWG.js} +56 -56
- package/dist/cdn/chunks/{src-DzvOWQ9S.js.map → src-pDy_imWG.js.map} +1 -1
- package/dist/cdn/chunks/{styles-LfeoSNRA.js → styles-D4Bd3SCx.js} +1356 -905
- package/dist/cdn/chunks/styles-D4Bd3SCx.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-CwScfbsM.js → tiptap-BlLFFU3M.js} +2233 -2213
- package/dist/cdn/chunks/tiptap-BlLFFU3M.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +101 -97
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-BRzXxFHr.js → check-CYJwFmjy.js} +1 -1
- package/dist/{chevron-down-DmEgzmYT.js → chevron-down-C5l-DzAA.js} +1 -1
- package/dist/{circle-alert-BStvZr3O.js → circle-alert-wf5HUFZY.js} +1 -1
- package/dist/{clock-Blwp_1R6.js → clock-Bj0bQw-K.js} +1 -1
- package/dist/{cloud-_olro76D.js → cloud-CoFDm9YA.js} +1 -1
- package/dist/{createLucideIcon-CmPAC-gt.js → createLucideIcon-Bad2kKE0.js} +4 -4
- package/dist/{de-BpseTWOA.js → de-LsV0u1tP.js} +19 -1
- package/dist/{dist-BwgjpLfr.js → dist-34OcyoK1.js} +1 -1
- package/dist/{dist-Cz79qrLL.js → dist-B7w6xTU6.js} +1 -1
- package/dist/{dist-DULfKmTh.js → dist-BX3gGwL8.js} +5 -5
- package/dist/{dist-412xXefB.js → dist-Bn703mnA.js} +1 -1
- package/dist/{dist-u0iIJH3V.js → dist-CADDCv0o.js} +1 -1
- package/dist/{dist-BNEdeWub.js → dist-CGvz7vkq.js} +1 -1
- package/dist/{dist-BlG7k25W.js → dist-CLpPNKy9.js} +1 -1
- package/dist/{dist-BCQZZUE9.js → dist-ChMninLH.js} +1 -1
- package/dist/{dist-b7Ak-CuM.js → dist-CrQZ_af9.js} +1 -1
- package/dist/{dist-DhKTdU52.js → dist-CyjyYg52.js} +1426 -1406
- package/dist/{dist-D6x1cQeh.js → dist-Dd3ibRZm.js} +2 -2
- package/dist/{dist-DJ9aD8yA.js → dist-DuCzdgDA.js} +54 -5
- package/dist/{dist-o73iaGqy.js → dist-U5vfDdYI.js} +1 -1
- package/dist/{en-VGIQ0WNq.js → en-Bb8X1bOs.js} +19 -1
- package/dist/{extensions-XPlNAKIL.js → extensions-J439b7y7.js} +5 -5
- package/dist/{image-up-BFPbw_Zq.js → image-up-x8-WXfsx.js} +1 -1
- package/dist/index.d.ts +17 -0
- package/dist/{info-B_qLEBN2.js → info-RS_fGcGi.js} +1 -1
- package/dist/keys-DgYXDafq.js +10 -0
- package/dist/{list-checks-CGg7JxPm.js → list-checks-Bf7XdDyv.js} +1 -1
- package/dist/{loader-circle-CDF8eR_Q.js → loader-circle-CLZ0_FvW.js} +1 -1
- package/dist/{message-circle-C3cHsCJl.js → message-circle-B-1bN9ab.js} +1 -1
- package/dist/{pt-BR-zAqpLQbW.js → pt-BR-BwJY_cvb.js} +19 -1
- package/dist/{refresh-cw-Butml7Q4.js → refresh-cw-CWKWqJYG.js} +1 -1
- package/dist/scan-line-BtK5dEai.js +31 -0
- package/dist/{send-k7npFJNO.js → send-Cn1IUdzh.js} +1 -1
- package/dist/{shield-check-CV6GbmCu.js → shield-check-CrvMk4Ea.js} +1 -1
- package/dist/{sparkles-C965Xop4.js → sparkles-CgfjwvnG.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-DSm9Ijxt.js → styles-BUwDOWd3.js} +1335 -882
- package/dist/templatical-editor.js +143 -139
- package/dist/{text-align-start-Bxnps8fH.js → text-align-start-C3r_Rnvy.js} +1 -1
- package/dist/{trash-2-DpGb7fIt.js → trash-2-CjERg4x9.js} +1 -1
- package/dist/{triangle-alert-BKYElAwz.js → triangle-alert-Chkny574.js} +1 -1
- package/dist/upload-e5kDRkPb.js +17 -0
- package/dist/{useAliveFlag-BinvbqQR.js → useAliveFlag-cUQj9rmB.js} +1 -1
- package/dist/{useCloudI18n-L3H2XvdW.js → useCloudI18n-CYJKqXtI.js} +2 -2
- package/dist/{useEditorCore-D7dQFRkw.js → useEditorCore-8JxXDOA4.js} +1075 -894
- package/dist/{useI18n-CTs_bP9d.js → useI18n-BWqM8i78.js} +2 -2
- package/dist/{useMergeTag-e3RSY-s3.js → useMergeTag-NHC4ylza.js} +3 -3
- package/dist/usePopoverRoot-B1sdY4es.js +8 -0
- package/dist/{vue.runtime.esm-bundler-B2k01iQh.js → vue.runtime.esm-bundler-BPa483TZ.js} +13 -4
- package/dist/{x-CGjkjdKK.js → x-DiPIbccg.js} +1 -1
- package/package.json +12 -12
- package/dist/ModuleBrowserModal-Bz9hSjMS.js +0 -198
- package/dist/cdn/chunks/CloudEditor-DSeihOan.js.map +0 -1
- package/dist/cdn/chunks/CountdownToolbar-BQn0Kj0X.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-BnhnFOW1.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-CQqklX0D.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-CpGPHppB.js +0 -22
- package/dist/cdn/chunks/de-BpseTWOA.js.map +0 -1
- package/dist/cdn/chunks/en-VGIQ0WNq.js.map +0 -1
- package/dist/cdn/chunks/features-DxWz_Enw.js.map +0 -1
- package/dist/cdn/chunks/icons-BflGUmFY.js.map +0 -1
- package/dist/cdn/chunks/media-library-C479-QcE.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-zAqpLQbW.js.map +0 -1
- package/dist/cdn/chunks/quality-BL_pEvFP.js +0 -2176
- package/dist/cdn/chunks/styles-LfeoSNRA.js.map +0 -1
- package/dist/cdn/chunks/tiptap-CwScfbsM.js.map +0 -1
- package/dist/keys-mFiJ5N0_.js +0 -10
- package/dist/scan-line-XYEqim_E.js +0 -25
- package/dist/usePopoverRoot-DVh7NY1q.js +0 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { D as e, F as t, H as n, I as r, K as i, L as a, M as o, N as s, P as c, T as l, V as u, Z as d, c as f, ct as p, d as m, f as h, g, h as _, it as v, l as y, m as b, n as x, o as S, ot as C, p as w, s as T, st as E, tt as
|
|
2
|
-
import {
|
|
3
|
-
import { B as pe,
|
|
1
|
+
import { D as e, F as t, H as n, I as r, K as i, L as a, M as o, N as s, P as c, T as l, V as u, Z as d, c as f, ct as p, d as m, f as h, g, h as _, it as v, l as y, m as b, n as x, o as S, ot as C, p as w, s as T, st as E, tt as D, u as O, v as k, x as A, y as j, z as ee } from "./draggable-kPCz_3zM.js";
|
|
2
|
+
import { At as te, Et as ne, Mt as M, T as N, _t as re, at as ie, bt as P, ct as F, dn as I, fn as ae, gn as L, gt as oe, ln as se, mn as ce, pn as le, st as ue, un as de, ut as fe, w as R } from "./features-CkTMVylx.js";
|
|
3
|
+
import { B as pe, K as me, L as he, T as ge, W as _e, k as ve, p as ye, q as be, y as xe } from "./icons-9zjCuoJx.js";
|
|
4
4
|
//#region ../media-library/src/api-client.ts
|
|
5
5
|
var Se = class {
|
|
6
6
|
authManager;
|
|
@@ -37,7 +37,7 @@ var Se = class {
|
|
|
37
37
|
async browseMedia(e) {
|
|
38
38
|
let t = new URLSearchParams();
|
|
39
39
|
e.folder_id && t.set("folder_id", e.folder_id), e.search && t.set("search", e.search), e.category && t.set("category", e.category), e.sort && t.set("sort", e.sort), e.cursor && t.set("cursor", e.cursor);
|
|
40
|
-
let n = t.toString(), r = `${
|
|
40
|
+
let n = t.toString(), r = `${N(R["media.browse"], this.baseParams)}${n ? `?${n}` : ""}`, i = await this.authManager.authenticatedFetch(r, { headers: { Accept: "application/json" } });
|
|
41
41
|
if (!i.ok) {
|
|
42
42
|
let e = await i.json().catch(() => ({ message: `HTTP error ${i.status}` }));
|
|
43
43
|
throw Error(e.message, { cause: e });
|
|
@@ -47,7 +47,7 @@ var Se = class {
|
|
|
47
47
|
async uploadMedia(e, t) {
|
|
48
48
|
let n = new FormData();
|
|
49
49
|
n.append("file", e), t && n.append("folder_id", t);
|
|
50
|
-
let r =
|
|
50
|
+
let r = N(R["media.upload"], this.baseParams), i = await this.authManager.authenticatedFetch(r, {
|
|
51
51
|
method: "POST",
|
|
52
52
|
headers: { Accept: "application/json" },
|
|
53
53
|
body: n
|
|
@@ -59,7 +59,7 @@ var Se = class {
|
|
|
59
59
|
return (await i.json()).data;
|
|
60
60
|
}
|
|
61
61
|
async updateMedia(e, t, n) {
|
|
62
|
-
return this.request(
|
|
62
|
+
return this.request(N(R["media.update"], {
|
|
63
63
|
...this.baseParams,
|
|
64
64
|
media: e
|
|
65
65
|
}), {
|
|
@@ -71,13 +71,13 @@ var Se = class {
|
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
async deleteMedia(e) {
|
|
74
|
-
return this.request(
|
|
74
|
+
return this.request(N(R["media.delete"], this.baseParams), {
|
|
75
75
|
method: "POST",
|
|
76
76
|
body: JSON.stringify({ ids: e })
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
async moveMedia(e, t) {
|
|
80
|
-
return this.request(
|
|
80
|
+
return this.request(N(R["media.move"], this.baseParams), {
|
|
81
81
|
method: "POST",
|
|
82
82
|
body: JSON.stringify({
|
|
83
83
|
ids: e,
|
|
@@ -86,10 +86,10 @@ var Se = class {
|
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
88
|
async getMediaFolders() {
|
|
89
|
-
return this.request(
|
|
89
|
+
return this.request(N(R["folders.index"], this.baseParams));
|
|
90
90
|
}
|
|
91
91
|
async createMediaFolder(e, t) {
|
|
92
|
-
return this.request(
|
|
92
|
+
return this.request(N(R["folders.store"], this.baseParams), {
|
|
93
93
|
method: "POST",
|
|
94
94
|
body: JSON.stringify({
|
|
95
95
|
name: e,
|
|
@@ -98,7 +98,7 @@ var Se = class {
|
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
async renameMediaFolder(e, t) {
|
|
101
|
-
return this.request(
|
|
101
|
+
return this.request(N(R["folders.update"], {
|
|
102
102
|
...this.baseParams,
|
|
103
103
|
mediaFolder: e
|
|
104
104
|
}), {
|
|
@@ -107,13 +107,13 @@ var Se = class {
|
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
109
|
async deleteMediaFolder(e) {
|
|
110
|
-
return this.request(
|
|
110
|
+
return this.request(N(R["folders.destroy"], {
|
|
111
111
|
...this.baseParams,
|
|
112
112
|
mediaFolder: e
|
|
113
113
|
}), { method: "DELETE" });
|
|
114
114
|
}
|
|
115
115
|
async checkMediaUsage(e) {
|
|
116
|
-
let t = await this.authManager.authenticatedFetch(
|
|
116
|
+
let t = await this.authManager.authenticatedFetch(N(R["media.checkUsage"], this.baseParams), {
|
|
117
117
|
method: "POST",
|
|
118
118
|
headers: {
|
|
119
119
|
"Content-Type": "application/json",
|
|
@@ -128,10 +128,10 @@ var Se = class {
|
|
|
128
128
|
return t.json();
|
|
129
129
|
}
|
|
130
130
|
async getFrequentlyUsed() {
|
|
131
|
-
return this.request(
|
|
131
|
+
return this.request(N(R["media.frequentlyUsed"], this.baseParams));
|
|
132
132
|
}
|
|
133
133
|
async importFromUrl(e, t) {
|
|
134
|
-
return this.request(
|
|
134
|
+
return this.request(N(R["media.importFromUrl"], this.baseParams), {
|
|
135
135
|
method: "POST",
|
|
136
136
|
body: JSON.stringify({
|
|
137
137
|
url: e,
|
|
@@ -142,7 +142,7 @@ var Se = class {
|
|
|
142
142
|
async replaceMedia(e, t) {
|
|
143
143
|
let n = new FormData();
|
|
144
144
|
n.append("file", t);
|
|
145
|
-
let r =
|
|
145
|
+
let r = N(R["media.replace"], {
|
|
146
146
|
...this.baseParams,
|
|
147
147
|
media: e
|
|
148
148
|
}), i = await this.authManager.authenticatedFetch(r, {
|
|
@@ -161,9 +161,9 @@ var Se = class {
|
|
|
161
161
|
//#region ../media-library/src/composable.ts
|
|
162
162
|
function Ce(e) {
|
|
163
163
|
if (!e.projectId) throw Error("projectId is required for useMediaLibrary");
|
|
164
|
-
let t = new Se(e.authManager), n = d([]), r = d([]), i = d(null), a = d("files"), o = d(""), s = d(null), c = d("newest"), l = d(!1), u = d(!1), f = d(!1), p = d(null), m = d(null), h = d(/* @__PURE__ */ new Set()), g = d(null), _ = d([]), v = d({}), y = d(!1), b = d([]), x = d(!1), S = d(null), C = d(!1), w = d(null), T = d(!1), E = d(null),
|
|
165
|
-
async function
|
|
166
|
-
let r = ++
|
|
164
|
+
let t = new Se(e.authManager), n = d([]), r = d([]), i = d(null), a = d("files"), o = d(""), s = d(null), c = d("newest"), l = d(!1), u = d(!1), f = d(!1), p = d(null), m = d(null), h = d(/* @__PURE__ */ new Set()), g = d(null), _ = d([]), v = d({}), y = d(!1), b = d([]), x = d(!1), S = d(null), C = d(!1), w = d(null), T = d(!1), E = d(null), D = d(null), O = 0;
|
|
165
|
+
async function k() {
|
|
166
|
+
let r = ++O;
|
|
167
167
|
l.value = !0;
|
|
168
168
|
try {
|
|
169
169
|
let e = await t.browseMedia({
|
|
@@ -172,18 +172,18 @@ function Ce(e) {
|
|
|
172
172
|
category: s.value || void 0,
|
|
173
173
|
sort: c.value === "newest" ? void 0 : c.value
|
|
174
174
|
});
|
|
175
|
-
if (r !==
|
|
175
|
+
if (r !== O) return;
|
|
176
176
|
n.value = e.data, p.value = e.meta.next_cursor, f.value = !!e.meta.next_cursor;
|
|
177
177
|
} catch (t) {
|
|
178
|
-
if (r !==
|
|
178
|
+
if (r !== O) return;
|
|
179
179
|
e.onError?.(t);
|
|
180
180
|
} finally {
|
|
181
|
-
r ===
|
|
181
|
+
r === O && (l.value = !1);
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
async function
|
|
184
|
+
async function A() {
|
|
185
185
|
if (!f.value || !p.value || l.value) return;
|
|
186
|
-
let r = ++
|
|
186
|
+
let r = ++O;
|
|
187
187
|
l.value = !0;
|
|
188
188
|
try {
|
|
189
189
|
let e = await t.browseMedia({
|
|
@@ -193,31 +193,31 @@ function Ce(e) {
|
|
|
193
193
|
sort: c.value === "newest" ? void 0 : c.value,
|
|
194
194
|
cursor: p.value
|
|
195
195
|
});
|
|
196
|
-
if (r !==
|
|
196
|
+
if (r !== O) return;
|
|
197
197
|
n.value = [...n.value, ...e.data], p.value = e.meta.next_cursor, f.value = !!e.meta.next_cursor;
|
|
198
198
|
} catch (t) {
|
|
199
|
-
if (r !==
|
|
199
|
+
if (r !== O) return;
|
|
200
200
|
e.onError?.(t);
|
|
201
201
|
} finally {
|
|
202
|
-
r ===
|
|
202
|
+
r === O && (l.value = !1);
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
async function
|
|
206
|
-
o.value = e, await
|
|
205
|
+
async function j(e) {
|
|
206
|
+
o.value = e, await k();
|
|
207
207
|
}
|
|
208
|
-
async function
|
|
209
|
-
s.value = e, await
|
|
208
|
+
async function ee(e) {
|
|
209
|
+
s.value = e, await k();
|
|
210
210
|
}
|
|
211
|
-
async function
|
|
212
|
-
c.value = e, await
|
|
211
|
+
async function te(e) {
|
|
212
|
+
c.value = e, await k();
|
|
213
213
|
}
|
|
214
|
-
async function
|
|
215
|
-
a.value = "files", i.value = e, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await
|
|
214
|
+
async function ne(e) {
|
|
215
|
+
a.value = "files", i.value = e, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await k();
|
|
216
216
|
}
|
|
217
|
-
async function
|
|
217
|
+
async function M() {
|
|
218
218
|
a.value = "frequently-used", i.value = null, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await I();
|
|
219
219
|
}
|
|
220
|
-
async function
|
|
220
|
+
async function N(r) {
|
|
221
221
|
u.value = !0;
|
|
222
222
|
try {
|
|
223
223
|
let e = await t.uploadMedia(r, i.value);
|
|
@@ -228,7 +228,7 @@ function Ce(e) {
|
|
|
228
228
|
u.value = !1;
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
-
async function
|
|
231
|
+
async function re(r) {
|
|
232
232
|
u.value = !0, m.value = {
|
|
233
233
|
current: 0,
|
|
234
234
|
total: r.length
|
|
@@ -240,7 +240,8 @@ function Ce(e) {
|
|
|
240
240
|
total: r.length
|
|
241
241
|
};
|
|
242
242
|
try {
|
|
243
|
-
|
|
243
|
+
let e = await t.uploadMedia(r[a], i.value);
|
|
244
|
+
n.value = [e, ...n.value];
|
|
244
245
|
} catch (t) {
|
|
245
246
|
e.onError?.(t);
|
|
246
247
|
}
|
|
@@ -249,7 +250,7 @@ function Ce(e) {
|
|
|
249
250
|
u.value = !1, m.value = null;
|
|
250
251
|
}
|
|
251
252
|
}
|
|
252
|
-
async function
|
|
253
|
+
async function ie(r) {
|
|
253
254
|
if (h.value.size !== 0) try {
|
|
254
255
|
let e = await t.moveMedia([...h.value], r);
|
|
255
256
|
if (i.value === null) {
|
|
@@ -261,7 +262,7 @@ function Ce(e) {
|
|
|
261
262
|
e.onError?.(t);
|
|
262
263
|
}
|
|
263
264
|
}
|
|
264
|
-
async function
|
|
265
|
+
async function P(r, i, a) {
|
|
265
266
|
try {
|
|
266
267
|
let e = await t.updateMedia(r, i, a);
|
|
267
268
|
n.value = n.value.map((t) => t.id === r ? e : t), g.value?.id === r && (g.value = e);
|
|
@@ -269,7 +270,7 @@ function Ce(e) {
|
|
|
269
270
|
e.onError?.(t);
|
|
270
271
|
}
|
|
271
272
|
}
|
|
272
|
-
async function
|
|
273
|
+
async function F() {
|
|
273
274
|
if (h.value.size !== 0) try {
|
|
274
275
|
await t.deleteMedia([...h.value]), n.value = n.value.filter((e) => !h.value.has(e.id)), _.value = _.value.filter((e) => !h.value.has(e.id)), h.value = /* @__PURE__ */ new Set(), g.value = null;
|
|
275
276
|
} catch (t) {
|
|
@@ -283,7 +284,7 @@ function Ce(e) {
|
|
|
283
284
|
e.onError?.(t);
|
|
284
285
|
}
|
|
285
286
|
}
|
|
286
|
-
async function
|
|
287
|
+
async function ae() {
|
|
287
288
|
if (h.value.size === 0) return !1;
|
|
288
289
|
b.value = [...h.value];
|
|
289
290
|
try {
|
|
@@ -295,7 +296,7 @@ function Ce(e) {
|
|
|
295
296
|
return e.onError?.(t), !1;
|
|
296
297
|
}
|
|
297
298
|
}
|
|
298
|
-
async function
|
|
299
|
+
async function L() {
|
|
299
300
|
if (y.value = !1, b.value.length !== 0) try {
|
|
300
301
|
await t.deleteMedia(b.value), n.value = n.value.filter((e) => !b.value.includes(e.id)), _.value = _.value.filter((e) => !b.value.includes(e.id)), h.value = /* @__PURE__ */ new Set(), g.value = null, b.value = [], v.value = {};
|
|
301
302
|
} catch (t) {
|
|
@@ -326,26 +327,26 @@ function Ce(e) {
|
|
|
326
327
|
function ue(e) {
|
|
327
328
|
g.value = e, h.value = /* @__PURE__ */ new Set([e.id]);
|
|
328
329
|
}
|
|
329
|
-
async function
|
|
330
|
+
async function de() {
|
|
330
331
|
try {
|
|
331
332
|
r.value = await t.getMediaFolders();
|
|
332
333
|
} catch (t) {
|
|
333
334
|
e.onError?.(t);
|
|
334
335
|
}
|
|
335
336
|
}
|
|
336
|
-
async function
|
|
337
|
+
async function fe(n, r) {
|
|
337
338
|
try {
|
|
338
339
|
let e = await t.createMediaFolder(n, r);
|
|
339
|
-
return await
|
|
340
|
+
return await de(), e;
|
|
340
341
|
} catch (t) {
|
|
341
342
|
return e.onError?.(t), null;
|
|
342
343
|
}
|
|
343
344
|
}
|
|
344
|
-
function
|
|
345
|
+
function R(e, t) {
|
|
345
346
|
for (let n of e) {
|
|
346
347
|
if (n.id === t) return n;
|
|
347
348
|
if (n.children) {
|
|
348
|
-
let e =
|
|
349
|
+
let e = R(n.children, t);
|
|
349
350
|
if (e) return e;
|
|
350
351
|
}
|
|
351
352
|
}
|
|
@@ -353,15 +354,15 @@ function Ce(e) {
|
|
|
353
354
|
}
|
|
354
355
|
async function pe(n, r) {
|
|
355
356
|
try {
|
|
356
|
-
await t.renameMediaFolder(n, r), await
|
|
357
|
+
await t.renameMediaFolder(n, r), await de();
|
|
357
358
|
} catch (t) {
|
|
358
359
|
e.onError?.(t);
|
|
359
360
|
}
|
|
360
361
|
}
|
|
361
362
|
async function me(n) {
|
|
362
363
|
try {
|
|
363
|
-
let e =
|
|
364
|
-
await t.deleteMediaFolder(n), i.value === n && (i.value = e), await
|
|
364
|
+
let e = R(r.value, n)?.parent_id ?? null;
|
|
365
|
+
await t.deleteMediaFolder(n), i.value === n && (i.value = e), await de(), await k();
|
|
365
366
|
} catch (t) {
|
|
366
367
|
e.onError?.(t);
|
|
367
368
|
}
|
|
@@ -369,20 +370,21 @@ function Ce(e) {
|
|
|
369
370
|
async function he(n) {
|
|
370
371
|
E.value = n, w.value = null;
|
|
371
372
|
try {
|
|
372
|
-
|
|
373
|
+
let e = await t.checkMediaUsage([n.id]);
|
|
374
|
+
D.value = e.data[n.id] ?? null, T.value = !0;
|
|
373
375
|
} catch (t) {
|
|
374
376
|
e.onError?.(t);
|
|
375
377
|
}
|
|
376
378
|
}
|
|
377
379
|
function ge() {
|
|
378
|
-
T.value = !1, E.value = null,
|
|
380
|
+
T.value = !1, E.value = null, D.value = null, w.value = null;
|
|
379
381
|
}
|
|
380
382
|
async function _e(r) {
|
|
381
383
|
if (!E.value) return null;
|
|
382
384
|
C.value = !0, w.value = null;
|
|
383
385
|
try {
|
|
384
386
|
let e = await t.replaceMedia(E.value.id, r);
|
|
385
|
-
return n.value = n.value.map((t) => t.id === e.id ? e : t), _.value = _.value.map((t) => t.id === e.id ? e : t), g.value?.id === e.id && (g.value = e), T.value = !1, E.value = null,
|
|
387
|
+
return n.value = n.value.map((t) => t.id === e.id ? e : t), _.value = _.value.map((t) => t.id === e.id ? e : t), g.value?.id === e.id && (g.value = e), T.value = !1, E.value = null, D.value = null, e;
|
|
386
388
|
} catch (t) {
|
|
387
389
|
return w.value = t instanceof Error ? t.message : "Replace failed", e.onError?.(t), null;
|
|
388
390
|
} finally {
|
|
@@ -414,38 +416,38 @@ function Ce(e) {
|
|
|
414
416
|
frequentlyUsedItems: _,
|
|
415
417
|
deleteUsageInfo: v,
|
|
416
418
|
showDeleteWarning: y,
|
|
417
|
-
loadItems:
|
|
418
|
-
loadMore:
|
|
419
|
-
search:
|
|
420
|
-
filterByCategory:
|
|
421
|
-
sortBy:
|
|
422
|
-
navigateToFolder:
|
|
423
|
-
showFrequentlyUsed:
|
|
424
|
-
uploadFile:
|
|
425
|
-
uploadFiles:
|
|
426
|
-
moveSelected:
|
|
427
|
-
updateFile:
|
|
428
|
-
deleteSelected:
|
|
419
|
+
loadItems: k,
|
|
420
|
+
loadMore: A,
|
|
421
|
+
search: j,
|
|
422
|
+
filterByCategory: ee,
|
|
423
|
+
sortBy: te,
|
|
424
|
+
navigateToFolder: ne,
|
|
425
|
+
showFrequentlyUsed: M,
|
|
426
|
+
uploadFile: N,
|
|
427
|
+
uploadFiles: re,
|
|
428
|
+
moveSelected: ie,
|
|
429
|
+
updateFile: P,
|
|
430
|
+
deleteSelected: F,
|
|
429
431
|
isImportingFromUrl: x,
|
|
430
432
|
importFromUrlError: S,
|
|
431
433
|
importFromUrl: se,
|
|
432
434
|
toggleSelection: ce,
|
|
433
435
|
clearSelection: le,
|
|
434
436
|
selectItem: ue,
|
|
435
|
-
loadFolders:
|
|
436
|
-
createFolder:
|
|
437
|
+
loadFolders: de,
|
|
438
|
+
createFolder: fe,
|
|
437
439
|
renameFolder: pe,
|
|
438
440
|
deleteFolder: me,
|
|
439
|
-
findFolderInTree:
|
|
441
|
+
findFolderInTree: R,
|
|
440
442
|
loadFrequentlyUsed: I,
|
|
441
|
-
checkUsageBeforeDelete:
|
|
442
|
-
confirmDelete:
|
|
443
|
+
checkUsageBeforeDelete: ae,
|
|
444
|
+
confirmDelete: L,
|
|
443
445
|
cancelDelete: oe,
|
|
444
446
|
isReplacing: C,
|
|
445
447
|
replaceError: w,
|
|
446
448
|
showReplaceWarning: T,
|
|
447
449
|
pendingReplaceItem: E,
|
|
448
|
-
replaceUsageInfo:
|
|
450
|
+
replaceUsageInfo: D,
|
|
449
451
|
checkUsageBeforeReplace: he,
|
|
450
452
|
cancelReplace: ge,
|
|
451
453
|
replaceFile: _e,
|
|
@@ -473,7 +475,7 @@ var we = {
|
|
|
473
475
|
}, Te = ["onClick"], Ee = {
|
|
474
476
|
key: 1,
|
|
475
477
|
style: { color: "var(--tpl-text)" }
|
|
476
|
-
}, De = /* @__PURE__ */
|
|
478
|
+
}, De = /* @__PURE__ */ A({
|
|
477
479
|
__name: "MediaBreadcrumb",
|
|
478
480
|
props: {
|
|
479
481
|
folders: {},
|
|
@@ -497,7 +499,7 @@ var we = {
|
|
|
497
499
|
class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
|
|
498
500
|
style: { color: "var(--tpl-primary)" },
|
|
499
501
|
onClick: t[0] ||= (e) => r("navigate", null)
|
|
500
|
-
}, p(v(i).mediaLibrary.allFiles), 1), (o(!0), g(
|
|
502
|
+
}, p(v(i).mediaLibrary.allFiles), 1), (o(!0), g(O, null, c(a.value, (e, t) => (o(), g(O, { key: e.id }, [j(v(te), {
|
|
501
503
|
size: 12,
|
|
502
504
|
"stroke-width": 2
|
|
503
505
|
}), t < a.value.length - 1 ? (o(), g("button", {
|
|
@@ -943,7 +945,7 @@ var at = U("vue-handler-wrapper"), ot = {
|
|
|
943
945
|
};
|
|
944
946
|
ot.render = function(e, n, i, a, s, c) {
|
|
945
947
|
var l = r("DraggableElement");
|
|
946
|
-
return o(), b("div", { class: c.classes.root }, [
|
|
948
|
+
return o(), b("div", { class: c.classes.root }, [j(l, {
|
|
947
949
|
class: c.classes.draggable,
|
|
948
950
|
onDrag: n[1] ||= function(t) {
|
|
949
951
|
return e.$emit("drag", t);
|
|
@@ -1580,7 +1582,7 @@ Yt.render = function(e, t, n, i, a, s) {
|
|
|
1580
1582
|
onLeave: s.onLeave
|
|
1581
1583
|
}, {
|
|
1582
1584
|
default: u((function() {
|
|
1583
|
-
return [
|
|
1585
|
+
return [j("div", { class: s.classes.default }, null, 2)];
|
|
1584
1586
|
})),
|
|
1585
1587
|
_: 1
|
|
1586
1588
|
}, 8, [
|
|
@@ -1644,7 +1646,7 @@ Qt.render = function(e, t, n, i, a, s) {
|
|
|
1644
1646
|
onLeave: s.onLeave
|
|
1645
1647
|
}, {
|
|
1646
1648
|
default: u((function() {
|
|
1647
|
-
return [
|
|
1649
|
+
return [j("div", { class: s.classes.root }, null, 2)];
|
|
1648
1650
|
})),
|
|
1649
1651
|
_: 1
|
|
1650
1652
|
}, 8, [
|
|
@@ -1848,7 +1850,7 @@ nn.render = function(e, n, r, i, s, l) {
|
|
|
1848
1850
|
style: l.style
|
|
1849
1851
|
}, [
|
|
1850
1852
|
t(e.$slots, "default"),
|
|
1851
|
-
|
|
1853
|
+
j("div", null, [(o(!0), b(O, null, c(l.lineNodes, (function(e) {
|
|
1852
1854
|
return o(), b(a(e.component), {
|
|
1853
1855
|
key: e.name,
|
|
1854
1856
|
"default-class": e.class,
|
|
@@ -1871,7 +1873,7 @@ nn.render = function(e, n, r, i, s, l) {
|
|
|
1871
1873
|
"onDrag"
|
|
1872
1874
|
]);
|
|
1873
1875
|
})), 128))]),
|
|
1874
|
-
(o(!0), b(
|
|
1876
|
+
(o(!0), b(O, null, c(l.handlerNodes, (function(e) {
|
|
1875
1877
|
return o(), b("div", {
|
|
1876
1878
|
key: e.name,
|
|
1877
1879
|
style: e.wrapperStyle,
|
|
@@ -2157,11 +2159,11 @@ function fn(e, t) {
|
|
|
2157
2159
|
};
|
|
2158
2160
|
}
|
|
2159
2161
|
dn.render = function(e, t, n, r, i, a) {
|
|
2160
|
-
return o(), b("div", { class: a.classes.root }, [
|
|
2162
|
+
return o(), b("div", { class: a.classes.root }, [j("div", {
|
|
2161
2163
|
ref: "wrapper",
|
|
2162
2164
|
class: a.classes.wrapper,
|
|
2163
2165
|
style: a.wrapperStyle
|
|
2164
|
-
}, [
|
|
2166
|
+
}, [j("img", {
|
|
2165
2167
|
ref: "image",
|
|
2166
2168
|
src: n.image.src,
|
|
2167
2169
|
class: a.classes.image,
|
|
@@ -2480,11 +2482,11 @@ gn.render = function(e, t, r, i, a, s) {
|
|
|
2480
2482
|
ref: "root",
|
|
2481
2483
|
class: s.classes.root,
|
|
2482
2484
|
style: s.style
|
|
2483
|
-
}, [
|
|
2485
|
+
}, [j("div", {
|
|
2484
2486
|
ref: "wrapper",
|
|
2485
2487
|
class: s.classes.wrapper,
|
|
2486
2488
|
style: s.wrapperStyle
|
|
2487
|
-
}, [n(
|
|
2489
|
+
}, [n(j("img", {
|
|
2488
2490
|
ref: "image",
|
|
2489
2491
|
src: r.image && r.image.src,
|
|
2490
2492
|
class: s.classes.image,
|
|
@@ -2624,7 +2626,7 @@ yn.render = function(e, t, n, i, a, s) {
|
|
|
2624
2626
|
return o(), b("div", {
|
|
2625
2627
|
class: s.classes.stencil,
|
|
2626
2628
|
style: s.style
|
|
2627
|
-
}, [
|
|
2629
|
+
}, [j(d, {
|
|
2628
2630
|
width: n.stencilCoordinates.width,
|
|
2629
2631
|
height: n.stencilCoordinates.height,
|
|
2630
2632
|
transitions: n.transitions,
|
|
@@ -2642,13 +2644,13 @@ yn.render = function(e, t, n, i, a, s) {
|
|
|
2642
2644
|
onResizeEnd: s.onResizeEnd
|
|
2643
2645
|
}, {
|
|
2644
2646
|
default: u((function() {
|
|
2645
|
-
return [
|
|
2647
|
+
return [j(l, {
|
|
2646
2648
|
movable: n.movable,
|
|
2647
2649
|
onMove: s.onMove,
|
|
2648
2650
|
onMoveEnd: s.onMoveEnd
|
|
2649
2651
|
}, {
|
|
2650
2652
|
default: u((function() {
|
|
2651
|
-
return [
|
|
2653
|
+
return [j(c, {
|
|
2652
2654
|
image: n.image,
|
|
2653
2655
|
coordinates: n.coordinates,
|
|
2654
2656
|
width: n.stencilCoordinates.width,
|
|
@@ -2821,7 +2823,7 @@ xn.render = function(e, t, n, i, a, s) {
|
|
|
2821
2823
|
return o(), b("div", {
|
|
2822
2824
|
class: s.classes.stencil,
|
|
2823
2825
|
style: s.style
|
|
2824
|
-
}, [
|
|
2826
|
+
}, [j(d, {
|
|
2825
2827
|
width: n.stencilCoordinates.width,
|
|
2826
2828
|
height: n.stencilCoordinates.height,
|
|
2827
2829
|
transitions: n.transitions,
|
|
@@ -2839,13 +2841,13 @@ xn.render = function(e, t, n, i, a, s) {
|
|
|
2839
2841
|
onResizeEnd: s.onResizeEnd
|
|
2840
2842
|
}, {
|
|
2841
2843
|
default: u((function() {
|
|
2842
|
-
return [
|
|
2844
|
+
return [j(l, {
|
|
2843
2845
|
movable: n.movable,
|
|
2844
2846
|
onMove: s.onMove,
|
|
2845
2847
|
onMoveEnd: s.onMoveEnd
|
|
2846
2848
|
}, {
|
|
2847
2849
|
default: u((function() {
|
|
2848
|
-
return [
|
|
2850
|
+
return [j(c, {
|
|
2849
2851
|
image: n.image,
|
|
2850
2852
|
coordinates: n.coordinates,
|
|
2851
2853
|
width: n.stencilCoordinates.width,
|
|
@@ -4009,10 +4011,10 @@ wn.render = function(t, r, i, s, c, l) {
|
|
|
4009
4011
|
return o(), b("div", {
|
|
4010
4012
|
ref: "cropper",
|
|
4011
4013
|
class: l.classes.cropper
|
|
4012
|
-
}, [
|
|
4014
|
+
}, [j("div", {
|
|
4013
4015
|
ref: "stretcher",
|
|
4014
4016
|
class: l.classes.stretcher
|
|
4015
|
-
}, null, 2),
|
|
4017
|
+
}, null, 2), j("div", {
|
|
4016
4018
|
class: l.classes.boundaries,
|
|
4017
4019
|
style: l.boundariesStyle
|
|
4018
4020
|
}, [(o(), b(a(i.backgroundWrapperComponent), {
|
|
@@ -4026,11 +4028,11 @@ wn.render = function(t, r, i, s, c, l) {
|
|
|
4026
4028
|
}, {
|
|
4027
4029
|
default: u((function() {
|
|
4028
4030
|
return [
|
|
4029
|
-
|
|
4031
|
+
j("div", {
|
|
4030
4032
|
class: l.classes.background,
|
|
4031
4033
|
style: l.boundariesStyle
|
|
4032
4034
|
}, null, 6),
|
|
4033
|
-
|
|
4035
|
+
j("div", { class: l.classes.imageWrapper }, [j("img", {
|
|
4034
4036
|
ref: "image",
|
|
4035
4037
|
crossorigin: c.imageAttributes.crossOrigin,
|
|
4036
4038
|
src: c.imageAttributes.src,
|
|
@@ -4038,7 +4040,7 @@ wn.render = function(t, r, i, s, c, l) {
|
|
|
4038
4040
|
style: l.imageStyle,
|
|
4039
4041
|
onMousedown: r[1] ||= y((function() {}), ["prevent"])
|
|
4040
4042
|
}, null, 46, ["crossorigin", "src"])], 2),
|
|
4041
|
-
|
|
4043
|
+
j("div", {
|
|
4042
4044
|
class: l.classes.foreground,
|
|
4043
4045
|
style: l.boundariesStyle
|
|
4044
4046
|
}, null, 6),
|
|
@@ -4130,7 +4132,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4130
4132
|
}, nr = {
|
|
4131
4133
|
class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium",
|
|
4132
4134
|
style: { color: "var(--tpl-text-muted)" }
|
|
4133
|
-
}, rr = ["placeholder"], ir = { class: "tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2 tpl:p-5 tpl:pt-4" }, ar = ["disabled"], or = /*#__PURE__*/
|
|
4135
|
+
}, rr = ["placeholder"], ir = { class: "tpl:flex tpl:shrink-0 tpl:justify-end tpl:gap-2 tpl:p-5 tpl:pt-4" }, ar = ["disabled"], or = /*#__PURE__*/ ie(/* @__PURE__ */ A({
|
|
4134
4136
|
__name: "MediaEditModal",
|
|
4135
4137
|
props: {
|
|
4136
4138
|
visible: { type: Boolean },
|
|
@@ -4138,14 +4140,14 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4138
4140
|
},
|
|
4139
4141
|
emits: ["save", "close"],
|
|
4140
4142
|
setup(e, { emit: t }) {
|
|
4141
|
-
let r = e, i = t, { t: a } = z(), s = l("tplUiTheme"), f = l(Pe, d(null)), T = a.mediaLibrary, { isImageMimeType:
|
|
4143
|
+
let r = e, i = t, { t: a } = z(), s = l("tplUiTheme"), f = l(Pe, d(null)), T = a.mediaLibrary, { isImageMimeType: D } = Oe(), A = d(""), te = d(""), ne = d(null), M = d("free"), N = d(void 0), re = d(void 0), ie = d(""), P = d(""), F = d(void 0), I = d(null), ae = d(!1), L = d(!1), oe = d(!1), se = h(() => r.item ? [
|
|
4142
4144
|
"image/jpeg",
|
|
4143
4145
|
"image/png",
|
|
4144
4146
|
"image/webp",
|
|
4145
4147
|
"image/gif"
|
|
4146
|
-
].includes(r.item.mime_type) : !1), ce = h(() =>
|
|
4147
|
-
|
|
4148
|
-
e && r.item && (
|
|
4148
|
+
].includes(r.item.mime_type) : !1), ce = h(() => M.value === "original" ? F.value : ke[M.value]), le = h(() => I.value ? Ne(I.value.width, I.value.height, N.value, re.value) : null);
|
|
4149
|
+
ee(() => r.visible, (e) => {
|
|
4150
|
+
e && r.item && (A.value = r.item.filename, te.value = r.item.alt_text || "", M.value = "free", N.value = void 0, re.value = void 0, ie.value = "", P.value = "", F.value = void 0, I.value = null, ae.value = !1, oe.value = !1, r.item.width && r.item.height && (F.value = r.item.width / r.item.height));
|
|
4149
4151
|
});
|
|
4150
4152
|
function ue(e) {
|
|
4151
4153
|
e.coordinates && (I.value = {
|
|
@@ -4153,41 +4155,41 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4153
4155
|
height: Math.round(e.coordinates.height)
|
|
4154
4156
|
}, oe.value = !0);
|
|
4155
4157
|
}
|
|
4156
|
-
function
|
|
4157
|
-
|
|
4158
|
+
function de() {
|
|
4159
|
+
ae.value = !0, !F.value && r.item?.width && r.item?.height && (F.value = r.item.width / r.item.height);
|
|
4158
4160
|
}
|
|
4159
|
-
function
|
|
4161
|
+
function fe(e) {
|
|
4160
4162
|
let t = e.target.value;
|
|
4161
|
-
|
|
4163
|
+
ie.value = t, N.value = t && parseInt(t, 10) || void 0;
|
|
4162
4164
|
}
|
|
4163
|
-
function
|
|
4165
|
+
function R(e) {
|
|
4164
4166
|
let t = e.target.value;
|
|
4165
|
-
|
|
4167
|
+
P.value = t, re.value = t && parseInt(t, 10) || void 0;
|
|
4166
4168
|
}
|
|
4167
4169
|
async function pe() {
|
|
4168
|
-
let e =
|
|
4169
|
-
if (!e || !r.item ||
|
|
4170
|
-
let t =
|
|
4171
|
-
if (se.value &&
|
|
4172
|
-
|
|
4170
|
+
let e = A.value.trim();
|
|
4171
|
+
if (!e || !r.item || L.value) return;
|
|
4172
|
+
let t = D(r.item.mime_type), n;
|
|
4173
|
+
if (se.value && ne.value && oe.value) {
|
|
4174
|
+
L.value = !0;
|
|
4173
4175
|
try {
|
|
4174
|
-
let { canvas: e } =
|
|
4176
|
+
let { canvas: e } = ne.value.getResult();
|
|
4175
4177
|
if (e) {
|
|
4176
|
-
let t = je(e,
|
|
4178
|
+
let t = je(e, N.value, re.value), i = Ae(r.item.mime_type);
|
|
4177
4179
|
n = { file: await Me(t, r.item.filename, i) };
|
|
4178
4180
|
}
|
|
4179
4181
|
} catch {
|
|
4180
|
-
|
|
4182
|
+
L.value = !1;
|
|
4181
4183
|
return;
|
|
4182
4184
|
}
|
|
4183
|
-
|
|
4185
|
+
L.value = !1;
|
|
4184
4186
|
}
|
|
4185
|
-
i("save", r.item.id, e, t ?
|
|
4187
|
+
i("save", r.item.id, e, t ? te.value : void 0, n), i("close");
|
|
4186
4188
|
}
|
|
4187
4189
|
function me(e) {
|
|
4188
|
-
e.key === "Enter" && !
|
|
4190
|
+
e.key === "Enter" && !L.value && (e.preventDefault(), pe()), e.key === "Escape" && i("close");
|
|
4189
4191
|
}
|
|
4190
|
-
return (t, r) => (o(), b(m, { to: v(f) || "body" }, [
|
|
4192
|
+
return (t, r) => (o(), b(m, { to: v(f) || "body" }, [j(x, {
|
|
4191
4193
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
4192
4194
|
"enter-from-class": "tpl:opacity-0",
|
|
4193
4195
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -4208,17 +4210,17 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4208
4210
|
}, [
|
|
4209
4211
|
w("div", On, [w("h3", kn, p(v(a).mediaLibrary.editFile), 1)]),
|
|
4210
4212
|
w("div", An, [
|
|
4211
|
-
se.value ? (o(), g("div", jn, [w("div", Mn, [
|
|
4213
|
+
se.value ? (o(), g("div", jn, [w("div", Mn, [j(v(wn), {
|
|
4212
4214
|
ref_key: "cropperRef",
|
|
4213
|
-
ref:
|
|
4215
|
+
ref: ne,
|
|
4214
4216
|
src: e.item.url,
|
|
4215
4217
|
"stencil-props": { aspectRatio: ce.value },
|
|
4216
4218
|
class: "tpl:h-full tpl:w-full",
|
|
4217
4219
|
"background-class": "tpl-cropper-background",
|
|
4218
4220
|
onChange: ue,
|
|
4219
|
-
onReady:
|
|
4221
|
+
onReady: de
|
|
4220
4222
|
}, null, 8, ["src", "stencil-props"])]), w("div", Nn, [
|
|
4221
|
-
w("div", null, [w("label", Pn, p(v(a).mediaLibrary.cropAspectRatio), 1), w("div", Fn, [(o(), g(
|
|
4223
|
+
w("div", null, [w("label", Pn, p(v(a).mediaLibrary.cropAspectRatio), 1), w("div", Fn, [(o(), g(O, null, c([
|
|
4222
4224
|
"free",
|
|
4223
4225
|
"square",
|
|
4224
4226
|
"landscape43",
|
|
@@ -4229,14 +4231,14 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4229
4231
|
type: "button",
|
|
4230
4232
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
4231
4233
|
style: E({
|
|
4232
|
-
borderColor:
|
|
4233
|
-
backgroundColor:
|
|
4234
|
-
color:
|
|
4234
|
+
borderColor: M.value === e ? "var(--tpl-primary)" : "var(--tpl-border)",
|
|
4235
|
+
backgroundColor: M.value === e ? "var(--tpl-primary-light)" : "var(--tpl-bg)",
|
|
4236
|
+
color: M.value === e ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
4235
4237
|
}),
|
|
4236
|
-
onClick: (t) =>
|
|
4238
|
+
onClick: (t) => M.value = e
|
|
4237
4239
|
}, p(v(T)[`crop${e.charAt(0).toUpperCase()}${e.slice(1)}`]), 13, In)), 64))])]),
|
|
4238
|
-
w("div", Ln, [w("div", Rn, [w("label", zn, [
|
|
4239
|
-
value:
|
|
4240
|
+
w("div", Ln, [w("div", Rn, [w("label", zn, [k(p(v(a).mediaLibrary.cropMaxWidth) + " ", 1), w("span", Bn, p(v(a).mediaLibrary.cropOptional), 1)]), w("div", Vn, [w("input", {
|
|
4241
|
+
value: ie.value,
|
|
4240
4242
|
type: "number",
|
|
4241
4243
|
min: "1",
|
|
4242
4244
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-8 tpl:pl-3 tpl:text-xs tpl:outline-none",
|
|
@@ -4246,9 +4248,9 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4246
4248
|
color: "var(--tpl-text)"
|
|
4247
4249
|
},
|
|
4248
4250
|
placeholder: I.value?.width?.toString() || "",
|
|
4249
|
-
onInput:
|
|
4250
|
-
}, null, 40, Hn), w("span", Un, p(v(a).mediaLibrary.cropPixels), 1)])]), w("div", Wn, [w("label", Gn, [
|
|
4251
|
-
value:
|
|
4251
|
+
onInput: fe
|
|
4252
|
+
}, null, 40, Hn), w("span", Un, p(v(a).mediaLibrary.cropPixels), 1)])]), w("div", Wn, [w("label", Gn, [k(p(v(a).mediaLibrary.cropMaxHeight) + " ", 1), w("span", Kn, p(v(a).mediaLibrary.cropOptional), 1)]), w("div", qn, [w("input", {
|
|
4253
|
+
value: P.value,
|
|
4252
4254
|
type: "number",
|
|
4253
4255
|
min: "1",
|
|
4254
4256
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-8 tpl:pl-3 tpl:text-xs tpl:outline-none",
|
|
@@ -4258,12 +4260,12 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4258
4260
|
color: "var(--tpl-text)"
|
|
4259
4261
|
},
|
|
4260
4262
|
placeholder: I.value?.height?.toString() || "",
|
|
4261
|
-
onInput:
|
|
4263
|
+
onInput: R
|
|
4262
4264
|
}, null, 40, Jn), w("span", Yn, p(v(a).mediaLibrary.cropPixels), 1)])])]),
|
|
4263
4265
|
le.value ? (o(), g("div", Xn, [w("span", null, p(v(a).mediaLibrary.cropOutputSize) + ": ", 1), w("span", Zn, p(le.value.width) + " x " + p(le.value.height) + " " + p(v(a).mediaLibrary.cropPixels), 1)])) : _("", !0)
|
|
4264
4266
|
])])) : _("", !0),
|
|
4265
4267
|
w("div", Qn, [w("label", $n, p(v(a).mediaLibrary.fileName), 1), n(w("input", {
|
|
4266
|
-
"onUpdate:modelValue": r[0] ||= (e) =>
|
|
4268
|
+
"onUpdate:modelValue": r[0] ||= (e) => A.value = e,
|
|
4267
4269
|
type: "text",
|
|
4268
4270
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
|
|
4269
4271
|
style: {
|
|
@@ -4272,9 +4274,9 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4272
4274
|
color: "var(--tpl-text)"
|
|
4273
4275
|
},
|
|
4274
4276
|
autofocus: !se.value
|
|
4275
|
-
}, null, 8, er), [[S,
|
|
4276
|
-
v(
|
|
4277
|
-
"onUpdate:modelValue": r[1] ||= (e) =>
|
|
4277
|
+
}, null, 8, er), [[S, A.value]])]),
|
|
4278
|
+
v(D)(e.item.mime_type) ? (o(), g("div", tr, [w("label", nr, p(v(a).mediaLibrary.altText), 1), n(w("input", {
|
|
4279
|
+
"onUpdate:modelValue": r[1] ||= (e) => te.value = e,
|
|
4278
4280
|
type: "text",
|
|
4279
4281
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
|
|
4280
4282
|
style: {
|
|
@@ -4283,7 +4285,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4283
4285
|
color: "var(--tpl-text)"
|
|
4284
4286
|
},
|
|
4285
4287
|
placeholder: v(a).mediaLibrary.altTextPlaceholder
|
|
4286
|
-
}, null, 8, rr), [[S,
|
|
4288
|
+
}, null, 8, rr), [[S, te.value]])])) : _("", !0)
|
|
4287
4289
|
]),
|
|
4288
4290
|
w("div", ir, [w("button", {
|
|
4289
4291
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
@@ -4296,9 +4298,9 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4296
4298
|
}, p(v(a).mediaLibrary.cancel), 1), w("button", {
|
|
4297
4299
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-white tpl:transition-all tpl:duration-150 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
4298
4300
|
style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
|
|
4299
|
-
disabled:
|
|
4301
|
+
disabled: L.value,
|
|
4300
4302
|
onClick: pe
|
|
4301
|
-
}, p(
|
|
4303
|
+
}, p(L.value ? v(a).mediaLibrary.saving : v(a).mediaLibrary.saveChanges), 9, ar)])
|
|
4302
4304
|
], 2)], 40, Dn)) : _("", !0)]),
|
|
4303
4305
|
_: 1
|
|
4304
4306
|
})], 8, ["to"]));
|
|
@@ -4312,7 +4314,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4312
4314
|
}, lr = {
|
|
4313
4315
|
key: 3,
|
|
4314
4316
|
class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-0.5 tpl:opacity-0 tpl:transition-opacity tpl:group-hover:opacity-100"
|
|
4315
|
-
}, ur = ["title"], dr = ["title"], fr = { key: 0 }, pr = ["placeholder"], mr = 5, hr = /* @__PURE__ */
|
|
4317
|
+
}, ur = ["title"], dr = ["title"], fr = { key: 0 }, pr = ["placeholder"], mr = 5, hr = /* @__PURE__ */ A({
|
|
4316
4318
|
__name: "MediaFolderTreeNode",
|
|
4317
4319
|
props: {
|
|
4318
4320
|
folder: {},
|
|
@@ -4326,7 +4328,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4326
4328
|
"deleteFolder"
|
|
4327
4329
|
],
|
|
4328
4330
|
setup(e, { emit: t }) {
|
|
4329
|
-
let i = e, a = t, { t: s } = z(), l = d(!1), u = d(!1), m = d(""), x = d(!1), T = d(""),
|
|
4331
|
+
let i = e, a = t, { t: s } = z(), l = d(!1), u = d(!1), m = d(""), x = d(!1), T = d(""), D = h(() => (i.folder.children?.length ?? 0) > 0), k = h(() => i.depth < mr - 1), A = h(() => i.currentFolderId === i.folder.id), ee = h(() => !i.currentFolderId || !i.folder.children ? !1 : M(i.folder.children, i.currentFolderId)), ne = h(() => l.value || ee.value);
|
|
4330
4332
|
function M(e, t) {
|
|
4331
4333
|
for (let n of e) if (n.id === t || n.children && M(n.children, t)) return !0;
|
|
4332
4334
|
return !1;
|
|
@@ -4334,23 +4336,23 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4334
4336
|
function N() {
|
|
4335
4337
|
l.value = !l.value;
|
|
4336
4338
|
}
|
|
4337
|
-
function
|
|
4339
|
+
function ie() {
|
|
4338
4340
|
u.value = !0, m.value = i.folder.name;
|
|
4339
4341
|
}
|
|
4340
4342
|
function P() {
|
|
4341
4343
|
let e = m.value.trim();
|
|
4342
4344
|
e && e !== i.folder.name && a("renameFolder", i.folder.id, e), u.value = !1, m.value = "";
|
|
4343
4345
|
}
|
|
4344
|
-
function
|
|
4346
|
+
function F() {
|
|
4345
4347
|
u.value = !1, m.value = "";
|
|
4346
4348
|
}
|
|
4347
|
-
function
|
|
4349
|
+
function I() {
|
|
4348
4350
|
x.value = !0, T.value = "", l.value = !0;
|
|
4349
4351
|
}
|
|
4350
|
-
function
|
|
4352
|
+
function ae() {
|
|
4351
4353
|
T.value.trim() && a("createFolder", T.value.trim(), i.folder.id), x.value = !1, T.value = "";
|
|
4352
4354
|
}
|
|
4353
|
-
function
|
|
4355
|
+
function L() {
|
|
4354
4356
|
x.value = !1, T.value = "";
|
|
4355
4357
|
}
|
|
4356
4358
|
return (t, i) => {
|
|
@@ -4359,23 +4361,23 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4359
4361
|
class: "tpl:group tpl:flex tpl:w-full tpl:items-center tpl:gap-1 tpl:py-1.5 tpl:pr-2 tpl:text-left tpl:text-xs tpl:transition-all tpl:duration-150",
|
|
4360
4362
|
style: E({
|
|
4361
4363
|
paddingLeft: `${e.depth * 16 + 8}px`,
|
|
4362
|
-
backgroundColor:
|
|
4363
|
-
color:
|
|
4364
|
+
backgroundColor: A.value ? "var(--tpl-bg-active)" : "transparent",
|
|
4365
|
+
color: A.value ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
4364
4366
|
})
|
|
4365
4367
|
}, [
|
|
4366
|
-
|
|
4368
|
+
D.value || x.value ? (o(), g("button", {
|
|
4367
4369
|
key: 0,
|
|
4368
4370
|
class: "tpl:flex tpl:size-4 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
4369
4371
|
onClick: y(N, ["stop"])
|
|
4370
|
-
}, [
|
|
4371
|
-
class: C(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90":
|
|
4372
|
+
}, [j(v(te), {
|
|
4373
|
+
class: C(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": ne.value }]),
|
|
4372
4374
|
size: 10,
|
|
4373
4375
|
"stroke-width": 2
|
|
4374
4376
|
}, null, 8, ["class"])])) : (o(), g("span", sr)),
|
|
4375
4377
|
w("button", {
|
|
4376
4378
|
class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-1.5",
|
|
4377
4379
|
onClick: i[0] ||= (t) => a("navigate", e.folder.id)
|
|
4378
|
-
}, [
|
|
4380
|
+
}, [j(v(me), {
|
|
4379
4381
|
class: "tpl:shrink-0",
|
|
4380
4382
|
size: 14,
|
|
4381
4383
|
"stroke-width": 1.5
|
|
@@ -4391,38 +4393,38 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4391
4393
|
color: "var(--tpl-text)"
|
|
4392
4394
|
},
|
|
4393
4395
|
autofocus: "",
|
|
4394
|
-
onKeydown: [f(P, ["enter"]), f(
|
|
4396
|
+
onKeydown: [f(P, ["enter"]), f(F, ["escape"])],
|
|
4395
4397
|
onBlur: P,
|
|
4396
4398
|
onClick: i[2] ||= y(() => {}, ["stop"])
|
|
4397
4399
|
}, null, 544)), [[S, m.value]]) : _("", !0),
|
|
4398
4400
|
u.value ? _("", !0) : (o(), g("span", lr, [
|
|
4399
|
-
|
|
4401
|
+
k.value ? (o(), g("button", {
|
|
4400
4402
|
key: 0,
|
|
4401
4403
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
4402
4404
|
title: v(s).mediaLibrary.addSubfolder,
|
|
4403
|
-
onClick: y(
|
|
4404
|
-
}, [
|
|
4405
|
+
onClick: y(I, ["stop"])
|
|
4406
|
+
}, [j(v(ge), {
|
|
4405
4407
|
size: 12,
|
|
4406
4408
|
"stroke-width": 2
|
|
4407
4409
|
})], 8, ur)) : _("", !0),
|
|
4408
4410
|
w("button", {
|
|
4409
4411
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
4410
4412
|
title: v(s).mediaLibrary.renameFolder,
|
|
4411
|
-
onClick: y(
|
|
4412
|
-
}, [
|
|
4413
|
+
onClick: y(ie, ["stop"])
|
|
4414
|
+
}, [j(v(re), {
|
|
4413
4415
|
size: 12,
|
|
4414
4416
|
"stroke-width": 2
|
|
4415
4417
|
})], 8, dr),
|
|
4416
4418
|
w("button", {
|
|
4417
4419
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
4418
4420
|
onClick: i[3] ||= y((t) => a("deleteFolder", e.folder.id), ["stop"])
|
|
4419
|
-
}, [
|
|
4421
|
+
}, [j(v(fe), {
|
|
4420
4422
|
size: 12,
|
|
4421
4423
|
"stroke-width": 2,
|
|
4422
4424
|
style: { color: "var(--tpl-danger)" }
|
|
4423
4425
|
})])
|
|
4424
4426
|
]))
|
|
4425
|
-
], 4),
|
|
4427
|
+
], 4), ne.value ? (o(), g("div", fr, [(o(!0), g(O, null, c(e.folder.children, (t) => (o(), b(l, {
|
|
4426
4428
|
key: t.id,
|
|
4427
4429
|
folder: t,
|
|
4428
4430
|
"current-folder-id": e.currentFolderId,
|
|
@@ -4450,15 +4452,15 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4450
4452
|
},
|
|
4451
4453
|
placeholder: v(s).mediaLibrary.subfolderName,
|
|
4452
4454
|
autofocus: "",
|
|
4453
|
-
onKeydown: [f(
|
|
4454
|
-
onBlur:
|
|
4455
|
+
onKeydown: [f(ae, ["enter"]), f(L, ["escape"])],
|
|
4456
|
+
onBlur: ae
|
|
4455
4457
|
}, null, 40, pr), [[S, T.value]])], 4)) : _("", !0)])) : _("", !0)]);
|
|
4456
4458
|
};
|
|
4457
4459
|
}
|
|
4458
4460
|
}), gr = { class: "tpl:flex tpl:h-full tpl:flex-col tpl:overflow-y-auto" }, _r = {
|
|
4459
4461
|
key: 0,
|
|
4460
4462
|
class: "tpl:px-3 tpl:py-2"
|
|
4461
|
-
}, vr = ["placeholder"], yr = /* @__PURE__ */
|
|
4463
|
+
}, vr = ["placeholder"], yr = /* @__PURE__ */ A({
|
|
4462
4464
|
__name: "MediaFolderTree",
|
|
4463
4465
|
props: {
|
|
4464
4466
|
folders: {},
|
|
@@ -4492,11 +4494,11 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4492
4494
|
color: e.viewMode === "files" && e.currentFolderId === null ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
4493
4495
|
}),
|
|
4494
4496
|
onClick: d[0] ||= (e) => r("navigate", null)
|
|
4495
|
-
}, [
|
|
4497
|
+
}, [j(v(be), {
|
|
4496
4498
|
size: 14,
|
|
4497
4499
|
"stroke-width": 1.5
|
|
4498
|
-
}),
|
|
4499
|
-
(o(!0), g(
|
|
4500
|
+
}), k(" " + p(v(i).mediaLibrary.allFiles), 1)], 4),
|
|
4501
|
+
(o(!0), g(O, null, c(e.folders, (t) => (o(), b(hr, {
|
|
4500
4502
|
key: t.id,
|
|
4501
4503
|
folder: t,
|
|
4502
4504
|
"current-folder-id": e.currentFolderId,
|
|
@@ -4525,10 +4527,10 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4525
4527
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:transition-all tpl:duration-150",
|
|
4526
4528
|
style: { color: "var(--tpl-text-muted)" },
|
|
4527
4529
|
onClick: l
|
|
4528
|
-
}, [
|
|
4530
|
+
}, [j(v(ge), {
|
|
4529
4531
|
size: 14,
|
|
4530
4532
|
"stroke-width": 1.5
|
|
4531
|
-
}),
|
|
4533
|
+
}), k(" " + p(v(i).mediaLibrary.newFolder), 1)])),
|
|
4532
4534
|
d[7] ||= w("div", { class: "tpl:flex-1" }, null, -1),
|
|
4533
4535
|
e.hasFrequentlyUsed ? (o(), g("button", {
|
|
4534
4536
|
key: 2,
|
|
@@ -4539,13 +4541,13 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4539
4541
|
color: e.viewMode === "frequently-used" ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
4540
4542
|
}),
|
|
4541
4543
|
onClick: d[6] ||= (e) => r("showFrequentlyUsed")
|
|
4542
|
-
}, [
|
|
4544
|
+
}, [j(v(ye), {
|
|
4543
4545
|
size: 14,
|
|
4544
4546
|
"stroke-width": 1.5
|
|
4545
|
-
}),
|
|
4547
|
+
}), k(" " + p(v(i).mediaLibrary.frequentlyUsed), 1)], 4)) : _("", !0)
|
|
4546
4548
|
]));
|
|
4547
4549
|
}
|
|
4548
|
-
}), br = { class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2" }, xr = /* @__PURE__ */
|
|
4550
|
+
}), br = { class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2" }, xr = /* @__PURE__ */ A({
|
|
4549
4551
|
__name: "MediaFileIcon",
|
|
4550
4552
|
props: { mimeType: {} },
|
|
4551
4553
|
setup(e) {
|
|
@@ -4756,7 +4758,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4756
4758
|
}, Yr = {
|
|
4757
4759
|
key: 4,
|
|
4758
4760
|
class: "tpl:flex tpl:justify-center tpl:py-4"
|
|
4759
|
-
}, Xr = /*#__PURE__*/
|
|
4761
|
+
}, Xr = /*#__PURE__*/ ie(/* @__PURE__ */ A({
|
|
4760
4762
|
__name: "MediaGrid",
|
|
4761
4763
|
props: {
|
|
4762
4764
|
items: {},
|
|
@@ -4782,7 +4784,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4782
4784
|
r("select", e);
|
|
4783
4785
|
}
|
|
4784
4786
|
let { t: u } = z(), f = d(null);
|
|
4785
|
-
|
|
4787
|
+
ce(f, ([{ isIntersecting: e }]) => {
|
|
4786
4788
|
e && n.hasMore && !n.isLoading && r("loadMore");
|
|
4787
4789
|
}, { threshold: .1 });
|
|
4788
4790
|
function m(e) {
|
|
@@ -4799,16 +4801,16 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4799
4801
|
e.isLoading && e.items.length === 0 ? (o(), g("div", {
|
|
4800
4802
|
key: 0,
|
|
4801
4803
|
class: C(e.layout === "list" ? "tpl:flex tpl:flex-col tpl:gap-1" : "tpl:grid tpl:grid-cols-4 tpl:gap-3")
|
|
4802
|
-
}, [(o(), g(
|
|
4804
|
+
}, [(o(), g(O, null, c(8, (t) => w("div", {
|
|
4803
4805
|
key: t,
|
|
4804
4806
|
class: C(["tpl-pulse tpl:rounded-lg", e.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
|
|
4805
4807
|
style: { "background-color": "var(--tpl-bg-hover)" }
|
|
4806
|
-
}, null, 2)), 64))], 2)) : e.items.length === 0 ? (o(), g("div", Cr, [
|
|
4808
|
+
}, null, 2)), 64))], 2)) : e.items.length === 0 ? (o(), g("div", Cr, [j(v(be), {
|
|
4807
4809
|
class: "tpl:mb-3",
|
|
4808
4810
|
size: 40,
|
|
4809
4811
|
"stroke-width": 1,
|
|
4810
4812
|
style: { color: "var(--tpl-text-dim)" }
|
|
4811
|
-
}), w("p", wr, p(v(u).mediaLibrary.noFiles), 1)])) : e.layout === "list" ? (o(), g("div", Lr, [(o(!0), g(
|
|
4813
|
+
}), w("p", wr, p(v(u).mediaLibrary.noFiles), 1)])) : e.layout === "list" ? (o(), g("div", Lr, [(o(!0), g(O, null, c(e.items, (t) => (o(), g("div", {
|
|
4812
4814
|
key: t.id,
|
|
4813
4815
|
class: C(["tpl-media-list-item tpl:group tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-3 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:transition-all tpl:duration-150", [!s(t) && !e.selectedIds.has(t.id) ? "tpl:opacity-60" : ""]]),
|
|
4814
4816
|
style: E({ backgroundColor: e.selectedIds.has(t.id) ? "var(--tpl-bg-hover)" : "transparent" }),
|
|
@@ -4820,14 +4822,14 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4820
4822
|
alt: t.filename,
|
|
4821
4823
|
class: "tpl:size-full tpl:object-cover",
|
|
4822
4824
|
loading: "lazy"
|
|
4823
|
-
}, null, 8, Br)) : (o(), g("div", Vr, [
|
|
4824
|
-
w("div", Hr, [w("p", Ur, p(t.filename), 1), w("p", Wr, [
|
|
4825
|
+
}, null, 8, Br)) : (o(), g("div", Vr, [j(xr, { "mime-type": t.mime_type }, null, 8, ["mime-type"])]))]),
|
|
4826
|
+
w("div", Hr, [w("p", Ur, p(t.filename), 1), w("p", Wr, [k(p(m(t.size)) + " · " + p(h(t.created_at)) + " ", 1), v(a)(t.mime_type) && t.width && t.height ? (o(), g(O, { key: 0 }, [k(" · " + p(t.width) + "×" + p(t.height), 1)], 64)) : _("", !0)])]),
|
|
4825
4827
|
w("div", Gr, [w("button", {
|
|
4826
4828
|
class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
|
|
4827
4829
|
style: { color: "var(--tpl-text-muted)" },
|
|
4828
4830
|
title: v(u).mediaLibrary.editFile,
|
|
4829
4831
|
onClick: y((e) => r("edit", t), ["stop"])
|
|
4830
|
-
}, [
|
|
4832
|
+
}, [j(v(re), {
|
|
4831
4833
|
size: 12,
|
|
4832
4834
|
"stroke-width": 2
|
|
4833
4835
|
})], 8, Kr), w("button", {
|
|
@@ -4835,15 +4837,15 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4835
4837
|
style: { color: "var(--tpl-text-muted)" },
|
|
4836
4838
|
title: v(u).mediaLibrary.replaceFile,
|
|
4837
4839
|
onClick: y((e) => r("replace", t), ["stop"])
|
|
4838
|
-
}, [
|
|
4840
|
+
}, [j(v(oe), {
|
|
4839
4841
|
size: 12,
|
|
4840
4842
|
"stroke-width": 2
|
|
4841
4843
|
})], 8, qr)]),
|
|
4842
|
-
e.selectedIds.has(t.id) ? (o(), g("div", Jr, [
|
|
4844
|
+
e.selectedIds.has(t.id) ? (o(), g("div", Jr, [j(v(M), {
|
|
4843
4845
|
size: 12,
|
|
4844
4846
|
"stroke-width": 3
|
|
4845
4847
|
})])) : _("", !0)
|
|
4846
|
-
], 14, Rr))), 128))])) : (o(), g("div", Tr, [(o(!0), g(
|
|
4848
|
+
], 14, Rr))), 128))])) : (o(), g("div", Tr, [(o(!0), g(O, null, c(e.items, (t) => (o(), g("div", {
|
|
4847
4849
|
key: t.id,
|
|
4848
4850
|
class: C(["tpl-media-item tpl:group tpl:relative tpl:overflow-hidden tpl:rounded-lg tpl:border-2 tpl:transition-all tpl:duration-150", [
|
|
4849
4851
|
"tpl:cursor-pointer",
|
|
@@ -4872,7 +4874,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4872
4874
|
style: { "background-color": "rgba(0, 0, 0, 0.6)" },
|
|
4873
4875
|
title: v(u).mediaLibrary.editFile,
|
|
4874
4876
|
onClick: y((e) => r("edit", t), ["stop"])
|
|
4875
|
-
}, [
|
|
4877
|
+
}, [j(v(re), {
|
|
4876
4878
|
size: 11,
|
|
4877
4879
|
"stroke-width": 2
|
|
4878
4880
|
})], 8, Pr), w("button", {
|
|
@@ -4880,11 +4882,11 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4880
4882
|
style: { "background-color": "rgba(0, 0, 0, 0.6)" },
|
|
4881
4883
|
title: v(u).mediaLibrary.replaceFile,
|
|
4882
4884
|
onClick: y((e) => r("replace", t), ["stop"])
|
|
4883
|
-
}, [
|
|
4885
|
+
}, [j(v(oe), {
|
|
4884
4886
|
size: 11,
|
|
4885
4887
|
"stroke-width": 2
|
|
4886
4888
|
})], 8, Fr)]),
|
|
4887
|
-
e.selectedIds.has(t.id) ? (o(), g("div", Ir, [
|
|
4889
|
+
e.selectedIds.has(t.id) ? (o(), g("div", Ir, [j(v(M), {
|
|
4888
4890
|
size: 12,
|
|
4889
4891
|
"stroke-width": 3
|
|
4890
4892
|
})])) : _("", !0)
|
|
@@ -4894,7 +4896,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4894
4896
|
ref: f,
|
|
4895
4897
|
class: "tpl:h-4"
|
|
4896
4898
|
}, null, 512),
|
|
4897
|
-
e.isLoading && e.items.length > 0 ? (o(), g("div", Yr, [
|
|
4899
|
+
e.isLoading && e.items.length > 0 ? (o(), g("div", Yr, [j(v(P), {
|
|
4898
4900
|
class: "tpl-spinner",
|
|
4899
4901
|
size: 20,
|
|
4900
4902
|
"stroke-width": 2,
|
|
@@ -4915,7 +4917,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4915
4917
|
}, ri = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, ii = ["disabled"], ai = ["disabled"], oi = {
|
|
4916
4918
|
key: 0,
|
|
4917
4919
|
class: "tpl:flex tpl:items-center tpl:gap-1.5"
|
|
4918
|
-
}, si = { key: 1 }, ci = /* @__PURE__ */
|
|
4920
|
+
}, si = { key: 1 }, ci = /* @__PURE__ */ A({
|
|
4919
4921
|
__name: "MediaImportUrlModal",
|
|
4920
4922
|
props: {
|
|
4921
4923
|
visible: { type: Boolean },
|
|
@@ -4925,7 +4927,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4925
4927
|
emits: ["import", "close"],
|
|
4926
4928
|
setup(e, { emit: t }) {
|
|
4927
4929
|
let r = e, i = t, { t: a } = z(), s = l("tplUiTheme"), c = l(Pe, d(null)), f = d("");
|
|
4928
|
-
|
|
4930
|
+
ee(() => r.visible, (e) => {
|
|
4929
4931
|
e && (f.value = "");
|
|
4930
4932
|
});
|
|
4931
4933
|
function h() {
|
|
@@ -4938,7 +4940,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4938
4940
|
function E(e) {
|
|
4939
4941
|
e.key === "Enter" && (e.preventDefault(), h()), e.key === "Escape" && T();
|
|
4940
4942
|
}
|
|
4941
|
-
return (t, r) => (o(), b(m, { to: v(c) || "body" }, [
|
|
4943
|
+
return (t, r) => (o(), b(m, { to: v(c) || "body" }, [j(x, {
|
|
4942
4944
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
4943
4945
|
"enter-from-class": "tpl:opacity-0",
|
|
4944
4946
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -4983,11 +4985,11 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4983
4985
|
style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
|
|
4984
4986
|
disabled: !f.value.trim() || e.isImporting,
|
|
4985
4987
|
onClick: h
|
|
4986
|
-
}, [e.isImporting ? (o(), g("span", oi, [
|
|
4988
|
+
}, [e.isImporting ? (o(), g("span", oi, [j(v(P), {
|
|
4987
4989
|
class: "tpl:animate-spin",
|
|
4988
4990
|
size: 12,
|
|
4989
4991
|
"stroke-width": 2
|
|
4990
|
-
}),
|
|
4992
|
+
}), k(" " + p(v(a).mediaLibrary.importing), 1)])) : (o(), g("span", si, p(v(a).mediaLibrary.import), 1))], 8, ai)])
|
|
4991
4993
|
])], 40, Zr)) : _("", !0)]),
|
|
4992
4994
|
_: 1
|
|
4993
4995
|
})], 8, ["to"]));
|
|
@@ -4996,7 +4998,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
4996
4998
|
key: 0,
|
|
4997
4999
|
class: "tpl:shrink-0",
|
|
4998
5000
|
style: { color: "var(--tpl-text-dim)" }
|
|
4999
|
-
}, pi = /* @__PURE__ */
|
|
5001
|
+
}, pi = /* @__PURE__ */ A({
|
|
5000
5002
|
__name: "MediaMovePicker",
|
|
5001
5003
|
props: {
|
|
5002
5004
|
folders: {},
|
|
@@ -5014,7 +5016,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
5014
5016
|
}), r.children?.length && n.push(...a(r.children, t + 1));
|
|
5015
5017
|
return n;
|
|
5016
5018
|
}
|
|
5017
|
-
return
|
|
5019
|
+
return se(i, () => {
|
|
5018
5020
|
n("close");
|
|
5019
5021
|
}), (t, s) => (o(), g("div", {
|
|
5020
5022
|
ref_key: "pickerRef",
|
|
@@ -5029,11 +5031,11 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
5029
5031
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-1.5 tpl:px-3 tpl:py-1.5 tpl:text-left tpl:text-xs tpl:transition-colors tpl:duration-100",
|
|
5030
5032
|
style: { color: "var(--tpl-text)" },
|
|
5031
5033
|
onClick: s[0] ||= (e) => n("select", null)
|
|
5032
|
-
}, [
|
|
5034
|
+
}, [j(v(be), {
|
|
5033
5035
|
class: "tpl:shrink-0",
|
|
5034
5036
|
size: 14,
|
|
5035
5037
|
"stroke-width": 1.5
|
|
5036
|
-
}),
|
|
5038
|
+
}), k(" " + p(v(r).mediaLibrary.moveToRoot), 1)])), (o(!0), g(O, null, c(a(e.folders), (t) => (o(), g("button", {
|
|
5037
5039
|
key: t.id,
|
|
5038
5040
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-1.5 tpl:py-1.5 tpl:pr-3 tpl:text-left tpl:text-xs tpl:transition-colors tpl:duration-100",
|
|
5039
5041
|
style: E({
|
|
@@ -5044,7 +5046,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
5044
5046
|
disabled: t.id === e.currentFolderId,
|
|
5045
5047
|
onClick: (e) => n("select", t.id)
|
|
5046
5048
|
}, [
|
|
5047
|
-
|
|
5049
|
+
j(v(me), {
|
|
5048
5050
|
class: "tpl:shrink-0",
|
|
5049
5051
|
size: 14,
|
|
5050
5052
|
"stroke-width": 1.5
|
|
@@ -5069,7 +5071,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
5069
5071
|
}, xi = {
|
|
5070
5072
|
class: "tpl:block tpl:text-[10px]",
|
|
5071
5073
|
style: { color: "var(--tpl-text-muted)" }
|
|
5072
|
-
}, Si = ["value"], Ci = ["value"], wi = /*#__PURE__*/
|
|
5074
|
+
}, Si = ["value"], Ci = ["value"], wi = /*#__PURE__*/ ie(/* @__PURE__ */ A({
|
|
5073
5075
|
__name: "MediaPreviewPanel",
|
|
5074
5076
|
props: {
|
|
5075
5077
|
item: {},
|
|
@@ -5144,23 +5146,23 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
5144
5146
|
alt: e.item.alt_text || e.item.filename,
|
|
5145
5147
|
class: "tpl:size-10 tpl:shrink-0 tpl:rounded tpl:object-cover",
|
|
5146
5148
|
style: { border: "1px solid var(--tpl-border)" }
|
|
5147
|
-
}, null, 8, hi)) : (o(), g("div", gi, [
|
|
5149
|
+
}, null, 8, hi)) : (o(), g("div", gi, [j(xr, {
|
|
5148
5150
|
"mime-type": e.item.mime_type,
|
|
5149
5151
|
class: "tpl-preview-icon"
|
|
5150
5152
|
}, null, 8, ["mime-type"])])),
|
|
5151
5153
|
w("div", _i, [
|
|
5152
5154
|
w("p", vi, p(e.item.filename), 1),
|
|
5153
5155
|
w("p", yi, [
|
|
5154
|
-
|
|
5155
|
-
y.value && e.item.width && e.item.height ? (o(), g(
|
|
5156
|
-
m.value ? (o(), g(
|
|
5157
|
-
n[0] ||=
|
|
5158
|
-
|
|
5156
|
+
k(p(b(e.item.size)) + " · " + p(x(e.item.created_at)) + " ", 1),
|
|
5157
|
+
y.value && e.item.width && e.item.height ? (o(), g(O, { key: 0 }, [k(" · " + p(e.item.width) + "×" + p(e.item.height) + "px ", 1)], 64)) : _("", !0),
|
|
5158
|
+
m.value ? (o(), g(O, { key: 1 }, [
|
|
5159
|
+
n[0] ||= k(" · ", -1),
|
|
5160
|
+
j(v(me), {
|
|
5159
5161
|
class: "tpl:mb-px tpl:inline",
|
|
5160
5162
|
size: 9,
|
|
5161
5163
|
"stroke-width": 2
|
|
5162
5164
|
}),
|
|
5163
|
-
|
|
5165
|
+
k(" " + p(m.value), 1)
|
|
5164
5166
|
], 64)) : _("", !0)
|
|
5165
5167
|
]),
|
|
5166
5168
|
y.value ? (o(), g("p", {
|
|
@@ -5178,7 +5180,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
5178
5180
|
},
|
|
5179
5181
|
value: e.selectedConversion,
|
|
5180
5182
|
onChange: d
|
|
5181
|
-
}, [(o(!0), g(
|
|
5183
|
+
}, [(o(!0), g(O, null, c(s.value, (e) => (o(), g("option", {
|
|
5182
5184
|
key: e.value,
|
|
5183
5185
|
value: e.value
|
|
5184
5186
|
}, p(e.label), 9, Ci))), 128))], 40, Si)])) : _("", !0)
|
|
@@ -5210,7 +5212,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
5210
5212
|
key: 1,
|
|
5211
5213
|
class: "tpl:mb-3 tpl:text-xs",
|
|
5212
5214
|
style: { color: "var(--tpl-danger)" }
|
|
5213
|
-
}, Ii = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Li = ["disabled"], Ri = ["disabled"], zi = /* @__PURE__ */
|
|
5215
|
+
}, Ii = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Li = ["disabled"], Ri = ["disabled"], zi = /* @__PURE__ */ A({
|
|
5214
5216
|
__name: "MediaReplaceModal",
|
|
5215
5217
|
props: {
|
|
5216
5218
|
visible: { type: Boolean },
|
|
@@ -5226,20 +5228,20 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
5226
5228
|
let e = n.item.filename.split(".");
|
|
5227
5229
|
return e.length > 1 ? e[e.length - 1].toLowerCase() : "";
|
|
5228
5230
|
}), C = h(() => S.value ? `.${S.value}` : "*"), T = h(() => (n.usageInfo?.template_count ?? 0) > 0);
|
|
5229
|
-
|
|
5231
|
+
ee(() => n.visible, (e) => {
|
|
5230
5232
|
e || (f.value = null, c.value && (c.value.value = ""));
|
|
5231
5233
|
});
|
|
5232
5234
|
function E(e) {
|
|
5233
5235
|
let t = e.target;
|
|
5234
5236
|
t.files && t.files.length > 0 && (f.value = t.files[0]);
|
|
5235
5237
|
}
|
|
5236
|
-
function
|
|
5238
|
+
function D() {
|
|
5237
5239
|
f.value && r("replace", f.value);
|
|
5238
5240
|
}
|
|
5239
|
-
function
|
|
5241
|
+
function O(e) {
|
|
5240
5242
|
e.key === "Escape" && r("close");
|
|
5241
5243
|
}
|
|
5242
|
-
return (t, n) => (o(), b(m, { to: v(s) || "body" }, [
|
|
5244
|
+
return (t, n) => (o(), b(m, { to: v(s) || "body" }, [j(x, {
|
|
5243
5245
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
5244
5246
|
"enter-from-class": "tpl:opacity-0",
|
|
5245
5247
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -5253,7 +5255,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
5253
5255
|
class: "tpl tpl:fixed tpl:inset-0 tpl:z-[10000] tpl:flex tpl:items-center tpl:justify-center",
|
|
5254
5256
|
style: { "background-color": "var(--tpl-overlay)" },
|
|
5255
5257
|
onClick: n[1] ||= y((e) => r("close"), ["self"]),
|
|
5256
|
-
onKeydown:
|
|
5258
|
+
onKeydown: O
|
|
5257
5259
|
}, [w("div", Ei, [
|
|
5258
5260
|
w("h3", Di, p(v(i).mediaLibrary.replaceWarningTitle), 1),
|
|
5259
5261
|
w("p", Oi, p(v(i).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${S.value}`)), 1),
|
|
@@ -5286,7 +5288,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
5286
5288
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-white tpl:transition-all tpl:duration-150 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
5287
5289
|
style: { background: "linear-gradient(\n 135deg,\n var(--tpl-primary),\n var(--tpl-primary-hover)\n )" },
|
|
5288
5290
|
disabled: !f.value || e.isReplacing,
|
|
5289
|
-
onClick:
|
|
5291
|
+
onClick: D
|
|
5290
5292
|
}, p(e.isReplacing ? v(i).mediaLibrary.replacing : v(i).mediaLibrary.replace), 9, Ri)])
|
|
5291
5293
|
])], 40, Ti)) : _("", !0)]),
|
|
5292
5294
|
_: 1
|
|
@@ -5304,7 +5306,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
5304
5306
|
}, Ui = {
|
|
5305
5307
|
class: "tpl:mt-1 tpl:text-[10px]",
|
|
5306
5308
|
style: { color: "var(--tpl-text-dim)" }
|
|
5307
|
-
}, Wi = /* @__PURE__ */
|
|
5309
|
+
}, Wi = /* @__PURE__ */ A({
|
|
5308
5310
|
__name: "MediaUploadZone",
|
|
5309
5311
|
props: {
|
|
5310
5312
|
isUploading: { type: Boolean },
|
|
@@ -5322,9 +5324,9 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
5322
5324
|
let t = u(e);
|
|
5323
5325
|
t.length && n("upload", t);
|
|
5324
5326
|
}
|
|
5325
|
-
let { isOverDropZone: m } =
|
|
5327
|
+
let { isOverDropZone: m } = I(l, { onDrop: (e) => {
|
|
5326
5328
|
e?.length && f(e);
|
|
5327
|
-
} }), { open: h, onChange: _ } =
|
|
5329
|
+
} }), { open: h, onChange: _ } = le({
|
|
5328
5330
|
accept: s.value,
|
|
5329
5331
|
multiple: !0
|
|
5330
5332
|
});
|
|
@@ -5339,7 +5341,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
5339
5341
|
"background-color": "var(--tpl-bg)"
|
|
5340
5342
|
},
|
|
5341
5343
|
onClick: n[0] ||= (e) => v(h)()
|
|
5342
|
-
}, [e.isUploading ? (o(), g("div", Bi, [
|
|
5344
|
+
}, [e.isUploading ? (o(), g("div", Bi, [j(v(P), {
|
|
5343
5345
|
class: "tpl-spinner",
|
|
5344
5346
|
size: 20,
|
|
5345
5347
|
"stroke-width": 2,
|
|
@@ -5347,8 +5349,8 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
5347
5349
|
}), w("span", Vi, p(e.uploadProgress && e.uploadProgress.total > 1 ? v(i)(v(r).mediaLibrary.uploadingProgress, {
|
|
5348
5350
|
current: e.uploadProgress.current,
|
|
5349
5351
|
total: e.uploadProgress.total
|
|
5350
|
-
}) : v(r).mediaLibrary.uploading), 1)])) : (o(), g(
|
|
5351
|
-
|
|
5352
|
+
}) : v(r).mediaLibrary.uploading), 1)])) : (o(), g(O, { key: 1 }, [
|
|
5353
|
+
j(v(F), {
|
|
5352
5354
|
class: "tpl:mb-2",
|
|
5353
5355
|
size: 24,
|
|
5354
5356
|
"stroke-width": 1.5,
|
|
@@ -5382,7 +5384,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
5382
5384
|
"background-color": "var(--tpl-text)",
|
|
5383
5385
|
color: "var(--tpl-bg-elevated)"
|
|
5384
5386
|
}
|
|
5385
|
-
}, Yi = /* @__PURE__ */
|
|
5387
|
+
}, Yi = /* @__PURE__ */ A({
|
|
5386
5388
|
__name: "StorageProgressRing",
|
|
5387
5389
|
props: {
|
|
5388
5390
|
usedBytes: {},
|
|
@@ -5433,7 +5435,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
5433
5435
|
"stroke-dasharray": l.value,
|
|
5434
5436
|
"stroke-dashoffset": m.value,
|
|
5435
5437
|
class: "tpl:transition-all tpl:duration-300 tpl:ease-out"
|
|
5436
|
-
}, null, 8, qi)], 8, Gi)),
|
|
5438
|
+
}, null, 8, qi)], 8, Gi)), j(x, {
|
|
5437
5439
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
5438
5440
|
"enter-from-class": "tpl:opacity-0 tpl:translate-y-1",
|
|
5439
5441
|
"enter-to-class": "tpl:opacity-100 tpl:translate-y-0",
|
|
@@ -5441,7 +5443,7 @@ var Dn = ["data-tpl-theme"], On = { class: "tpl:shrink-0 tpl:p-5 tpl:pb-4" }, kn
|
|
|
5441
5443
|
"leave-from-class": "tpl:opacity-100 tpl:translate-y-0",
|
|
5442
5444
|
"leave-to-class": "tpl:opacity-0 tpl:translate-y-1"
|
|
5443
5445
|
}, {
|
|
5444
|
-
default: u(() => [i.value ? (o(), g("div", Ji, [
|
|
5446
|
+
default: u(() => [i.value ? (o(), g("div", Ji, [k(p(E.value) + " ", 1), t[2] ||= w("div", {
|
|
5445
5447
|
class: "tpl:absolute tpl:-top-1 tpl:left-1/2 tpl:size-2 tpl:-translate-x-1/2 tpl:rotate-45",
|
|
5446
5448
|
style: { "background-color": "var(--tpl-text)" }
|
|
5447
5449
|
}, null, -1)])) : _("", !0)]),
|
|
@@ -5474,18 +5476,18 @@ function Xi(e) {
|
|
|
5474
5476
|
function y(e) {
|
|
5475
5477
|
return v[e]?.() ?? e;
|
|
5476
5478
|
}
|
|
5477
|
-
|
|
5479
|
+
ee(o, (e) => {
|
|
5478
5480
|
e && n.value && t.loadFolders();
|
|
5479
|
-
}),
|
|
5481
|
+
}), ee(() => t.previewItem.value?.id, () => {
|
|
5480
5482
|
c.value = "original";
|
|
5481
5483
|
});
|
|
5482
|
-
let b =
|
|
5484
|
+
let b = L((e) => {
|
|
5483
5485
|
t.search(e);
|
|
5484
5486
|
}, 300);
|
|
5485
5487
|
function x(e) {
|
|
5486
5488
|
s.value = e, b(e);
|
|
5487
5489
|
}
|
|
5488
|
-
let { copy: S, copied: C } =
|
|
5490
|
+
let { copy: S, copied: C } = de({
|
|
5489
5491
|
copiedDuring: 2e3,
|
|
5490
5492
|
legacy: !0
|
|
5491
5493
|
});
|
|
@@ -5498,34 +5500,34 @@ function Xi(e) {
|
|
|
5498
5500
|
async function E(e, n) {
|
|
5499
5501
|
await t.createFolder(e, n);
|
|
5500
5502
|
}
|
|
5501
|
-
async function
|
|
5503
|
+
async function D(e, n) {
|
|
5502
5504
|
await t.renameFolder(e, n);
|
|
5503
5505
|
}
|
|
5504
|
-
async function
|
|
5506
|
+
async function O(e) {
|
|
5505
5507
|
await t.deleteFolder(e);
|
|
5506
5508
|
}
|
|
5507
|
-
function
|
|
5509
|
+
function k(e) {
|
|
5508
5510
|
l.value = e;
|
|
5509
5511
|
}
|
|
5510
|
-
async function
|
|
5512
|
+
async function A(e, n, r, i) {
|
|
5511
5513
|
i && await t.replaceMediaDirectly(e, i.file), await t.updateFile(e, n, r), l.value = null;
|
|
5512
5514
|
}
|
|
5513
|
-
async function
|
|
5515
|
+
async function j(e) {
|
|
5514
5516
|
await t.importFromUrl(e) && (u.value = !1);
|
|
5515
5517
|
}
|
|
5516
|
-
async function
|
|
5518
|
+
async function te(e) {
|
|
5517
5519
|
f.value = !1, await t.moveSelected(e);
|
|
5518
5520
|
}
|
|
5519
|
-
async function
|
|
5521
|
+
async function ne() {
|
|
5520
5522
|
await t.checkUsageBeforeDelete();
|
|
5521
5523
|
}
|
|
5522
|
-
function
|
|
5524
|
+
function M(e) {
|
|
5523
5525
|
t.checkUsageBeforeReplace(e);
|
|
5524
5526
|
}
|
|
5525
|
-
async function
|
|
5527
|
+
async function N(e) {
|
|
5526
5528
|
await t.replaceFile(e);
|
|
5527
5529
|
}
|
|
5528
|
-
function
|
|
5530
|
+
function re() {
|
|
5529
5531
|
t.clearSelection(), t.cancelDelete(), t.cancelReplace(), s.value = "", t.categoryFilter.value = null, t.sortOption.value = "newest", t.viewMode.value = "files", l.value = null, u.value = !1, c.value = "original";
|
|
5530
5532
|
}
|
|
5531
5533
|
return {
|
|
@@ -5547,16 +5549,16 @@ function Xi(e) {
|
|
|
5547
5549
|
handleUpload: w,
|
|
5548
5550
|
handleSelect: T,
|
|
5549
5551
|
handleCreateFolder: E,
|
|
5550
|
-
handleRenameFolder:
|
|
5551
|
-
handleDeleteFolder:
|
|
5552
|
-
handleEditItem:
|
|
5553
|
-
handleEditSave:
|
|
5554
|
-
handleImportFromUrl:
|
|
5555
|
-
handleMoveToFolder:
|
|
5556
|
-
handleDeleteClick:
|
|
5557
|
-
handleReplaceItem:
|
|
5558
|
-
handleReplaceFile:
|
|
5559
|
-
resetUI:
|
|
5552
|
+
handleRenameFolder: D,
|
|
5553
|
+
handleDeleteFolder: O,
|
|
5554
|
+
handleEditItem: k,
|
|
5555
|
+
handleEditSave: A,
|
|
5556
|
+
handleImportFromUrl: j,
|
|
5557
|
+
handleMoveToFolder: te,
|
|
5558
|
+
handleDeleteClick: ne,
|
|
5559
|
+
handleReplaceItem: M,
|
|
5560
|
+
handleReplaceFile: N,
|
|
5561
|
+
resetUI: re
|
|
5560
5562
|
};
|
|
5561
5563
|
}
|
|
5562
5564
|
//#endregion
|
|
@@ -5627,7 +5629,7 @@ var Zi = ["data-tpl-theme"], Qi = {
|
|
|
5627
5629
|
}, Ra = {
|
|
5628
5630
|
key: 1,
|
|
5629
5631
|
class: "tpl:relative"
|
|
5630
|
-
}, za = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ba = ["disabled"], Va = /* @__PURE__ */
|
|
5632
|
+
}, za = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ba = ["disabled"], Va = /* @__PURE__ */ A({
|
|
5631
5633
|
__name: "MediaLibraryModal",
|
|
5632
5634
|
props: {
|
|
5633
5635
|
visible: { type: Boolean },
|
|
@@ -5637,35 +5639,35 @@ var Zi = ["data-tpl-theme"], Qi = {
|
|
|
5637
5639
|
emits: ["close", "select"],
|
|
5638
5640
|
setup(e, { emit: t }) {
|
|
5639
5641
|
let n = e, r = t, { t: i } = z(), a = l("tplUiTheme");
|
|
5640
|
-
s(Pe,
|
|
5641
|
-
let d = l("authManager"), f = l("projectId"), S = h(() => f.value), T = l("planConfig"),
|
|
5642
|
+
s(Pe, D(() => n.popoverTarget ?? null));
|
|
5643
|
+
let d = l("authManager"), f = l("projectId"), S = h(() => f.value), T = l("planConfig"), A = h(() => T.hasFeature("media_folders")), te = h(() => T.hasFeature("import_from_url")), N = h(() => T.config.value?.storage.used_bytes ?? 0), re = h(() => T.config.value?.storage.limit_bytes ?? 0), { isAcceptedMimeType: ie, availableCategories: P } = Oe(), F = Ce({
|
|
5642
5644
|
projectId: S.value,
|
|
5643
5645
|
authManager: d
|
|
5644
|
-
}),
|
|
5645
|
-
library:
|
|
5646
|
-
canUseMediaFolders:
|
|
5646
|
+
}), I = Xi({
|
|
5647
|
+
library: F,
|
|
5648
|
+
canUseMediaFolders: A,
|
|
5647
5649
|
translations: i
|
|
5648
5650
|
});
|
|
5649
|
-
|
|
5650
|
-
e ? (
|
|
5651
|
+
ee(() => n.visible, (e) => {
|
|
5652
|
+
e ? (F.loadItems(), F.loadFrequentlyUsed()) : I.resetUI();
|
|
5651
5653
|
});
|
|
5652
|
-
function
|
|
5654
|
+
function L(e) {
|
|
5653
5655
|
e.key === "Escape" && r("close");
|
|
5654
5656
|
}
|
|
5655
|
-
|
|
5657
|
+
ae(document, "keydown", L);
|
|
5656
5658
|
function oe() {
|
|
5657
|
-
return
|
|
5659
|
+
return F.previewItem.value ? n.accept?.length ? ie(F.previewItem.value.mime_type, n.accept) : !0 : !1;
|
|
5658
5660
|
}
|
|
5659
5661
|
function se() {
|
|
5660
5662
|
if (oe()) {
|
|
5661
|
-
let e =
|
|
5663
|
+
let e = F.previewItem.value;
|
|
5662
5664
|
r("select", {
|
|
5663
5665
|
...e,
|
|
5664
|
-
url:
|
|
5666
|
+
url: I.selectedUrl.value || e.url
|
|
5665
5667
|
}), r("close");
|
|
5666
5668
|
}
|
|
5667
5669
|
}
|
|
5668
|
-
return (t, n) => (o(), b(m, { to: e.popoverTarget || "body" }, [
|
|
5670
|
+
return (t, n) => (o(), b(m, { to: e.popoverTarget || "body" }, [j(x, {
|
|
5669
5671
|
"enter-active-class": "tpl:transition tpl:duration-200",
|
|
5670
5672
|
"enter-from-class": "tpl:opacity-0",
|
|
5671
5673
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -5680,13 +5682,13 @@ var Zi = ["data-tpl-theme"], Qi = {
|
|
|
5680
5682
|
onClick: n[18] ||= y((e) => r("close"), ["self"])
|
|
5681
5683
|
}, [w("div", Qi, [
|
|
5682
5684
|
w("div", $i, [w("h2", ea, p(v(i).mediaLibrary.title), 1), w("div", ta, [
|
|
5683
|
-
|
|
5684
|
-
"used-bytes":
|
|
5685
|
-
"limit-bytes":
|
|
5685
|
+
j(Yi, {
|
|
5686
|
+
"used-bytes": N.value,
|
|
5687
|
+
"limit-bytes": re.value,
|
|
5686
5688
|
size: 22
|
|
5687
5689
|
}, null, 8, ["used-bytes", "limit-bytes"]),
|
|
5688
5690
|
w("div", na, [w("input", {
|
|
5689
|
-
value: v(
|
|
5691
|
+
value: v(I).searchInput.value,
|
|
5690
5692
|
type: "text",
|
|
5691
5693
|
class: "tpl:w-52 tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-3 tpl:pl-8 tpl:text-xs tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:outline-none tpl:focus:shadow-[var(--tpl-ring)]",
|
|
5692
5694
|
style: {
|
|
@@ -5695,8 +5697,8 @@ var Zi = ["data-tpl-theme"], Qi = {
|
|
|
5695
5697
|
color: "var(--tpl-text)"
|
|
5696
5698
|
},
|
|
5697
5699
|
placeholder: v(i).mediaLibrary.searchPlaceholder,
|
|
5698
|
-
onInput: n[0] ||= (e) => v(
|
|
5699
|
-
}, null, 40, ra),
|
|
5700
|
+
onInput: n[0] ||= (e) => v(I).handleSearchInput(e.target.value)
|
|
5701
|
+
}, null, 40, ra), j(v(xe), {
|
|
5700
5702
|
class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
|
|
5701
5703
|
size: 13,
|
|
5702
5704
|
"stroke-width": 2,
|
|
@@ -5706,12 +5708,12 @@ var Zi = ["data-tpl-theme"], Qi = {
|
|
|
5706
5708
|
class: "tpl:flex tpl:size-7 tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
|
|
5707
5709
|
style: { color: "var(--tpl-text-muted)" },
|
|
5708
5710
|
onClick: n[1] ||= (e) => r("close")
|
|
5709
|
-
}, [
|
|
5711
|
+
}, [j(v(ue), {
|
|
5710
5712
|
size: 18,
|
|
5711
5713
|
"stroke-width": 2
|
|
5712
5714
|
})])
|
|
5713
5715
|
])]),
|
|
5714
|
-
w("div", ia, [
|
|
5716
|
+
w("div", ia, [j(x, {
|
|
5715
5717
|
"enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
|
|
5716
5718
|
"enter-from-class": "tpl:-ml-48 tpl:opacity-0",
|
|
5717
5719
|
"enter-to-class": "tpl:ml-0 tpl:opacity-100",
|
|
@@ -5719,16 +5721,16 @@ var Zi = ["data-tpl-theme"], Qi = {
|
|
|
5719
5721
|
"leave-from-class": "tpl:ml-0 tpl:opacity-100",
|
|
5720
5722
|
"leave-to-class": "tpl:-ml-48 tpl:opacity-0"
|
|
5721
5723
|
}, {
|
|
5722
|
-
default: u(() => [
|
|
5723
|
-
folders: v(
|
|
5724
|
-
"current-folder-id": v(
|
|
5725
|
-
"view-mode": v(
|
|
5726
|
-
"has-frequently-used": v(
|
|
5727
|
-
onNavigate: v(
|
|
5728
|
-
onCreateFolder: v(
|
|
5729
|
-
onRenameFolder: v(
|
|
5730
|
-
onDeleteFolder: v(
|
|
5731
|
-
onShowFrequentlyUsed: v(
|
|
5724
|
+
default: u(() => [A.value && v(I).showSidebar.value ? (o(), g("div", aa, [j(yr, {
|
|
5725
|
+
folders: v(F).folders.value,
|
|
5726
|
+
"current-folder-id": v(F).currentFolderId.value,
|
|
5727
|
+
"view-mode": v(F).viewMode.value,
|
|
5728
|
+
"has-frequently-used": v(I).hasFrequentlyUsed.value,
|
|
5729
|
+
onNavigate: v(F).navigateToFolder,
|
|
5730
|
+
onCreateFolder: v(I).handleCreateFolder,
|
|
5731
|
+
onRenameFolder: v(I).handleRenameFolder,
|
|
5732
|
+
onDeleteFolder: v(I).handleDeleteFolder,
|
|
5733
|
+
onShowFrequentlyUsed: v(F).showFrequentlyUsed
|
|
5732
5734
|
}, null, 8, [
|
|
5733
5735
|
"folders",
|
|
5734
5736
|
"current-folder-id",
|
|
@@ -5742,25 +5744,25 @@ var Zi = ["data-tpl-theme"], Qi = {
|
|
|
5742
5744
|
])])) : _("", !0)]),
|
|
5743
5745
|
_: 1
|
|
5744
5746
|
}), w("div", oa, [w("div", sa, [w("div", ca, [
|
|
5745
|
-
|
|
5747
|
+
A.value ? (o(), g("button", {
|
|
5746
5748
|
key: 0,
|
|
5747
5749
|
class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
|
|
5748
5750
|
style: E({
|
|
5749
|
-
color: v(
|
|
5750
|
-
backgroundColor: v(
|
|
5751
|
-
border: v(
|
|
5751
|
+
color: v(I).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
5752
|
+
backgroundColor: v(I).showSidebar.value ? "var(--tpl-bg)" : "transparent",
|
|
5753
|
+
border: v(I).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
|
|
5752
5754
|
}),
|
|
5753
|
-
title: v(
|
|
5754
|
-
onClick: n[2] ||= (e) => v(
|
|
5755
|
-
}, [
|
|
5755
|
+
title: v(I).showSidebar.value ? v(i).mediaLibrary.hideFolders : v(i).mediaLibrary.showFolders,
|
|
5756
|
+
onClick: n[2] ||= (e) => v(I).showSidebar.value = !v(I).showSidebar.value
|
|
5757
|
+
}, [j(v(ve), {
|
|
5756
5758
|
size: 16,
|
|
5757
5759
|
"stroke-width": 2
|
|
5758
5760
|
})], 12, la)) : _("", !0),
|
|
5759
|
-
v(
|
|
5761
|
+
v(F).viewMode.value === "frequently-used" ? (o(), g("span", ua, p(v(i).mediaLibrary.frequentlyUsed), 1)) : (o(), b(De, {
|
|
5760
5762
|
key: 2,
|
|
5761
|
-
folders: v(
|
|
5762
|
-
"current-folder-id": v(
|
|
5763
|
-
onNavigate: v(
|
|
5763
|
+
folders: v(F).folders.value,
|
|
5764
|
+
"current-folder-id": v(F).currentFolderId.value,
|
|
5765
|
+
onNavigate: v(F).navigateToFolder
|
|
5764
5766
|
}, null, 8, [
|
|
5765
5767
|
"folders",
|
|
5766
5768
|
"current-folder-id",
|
|
@@ -5769,27 +5771,27 @@ var Zi = ["data-tpl-theme"], Qi = {
|
|
|
5769
5771
|
w("div", da, [w("button", {
|
|
5770
5772
|
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
|
|
5771
5773
|
style: E({
|
|
5772
|
-
color: v(
|
|
5773
|
-
backgroundColor: v(
|
|
5774
|
+
color: v(I).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
5775
|
+
backgroundColor: v(I).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
|
|
5774
5776
|
}),
|
|
5775
5777
|
title: v(i).mediaLibrary.viewGrid,
|
|
5776
|
-
onClick: n[3] ||= (e) => v(
|
|
5777
|
-
}, [
|
|
5778
|
+
onClick: n[3] ||= (e) => v(I).layoutMode.value = "grid"
|
|
5779
|
+
}, [j(v(_e), {
|
|
5778
5780
|
size: 14,
|
|
5779
5781
|
"stroke-width": 2
|
|
5780
5782
|
})], 12, fa), w("button", {
|
|
5781
5783
|
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
|
|
5782
5784
|
style: E({
|
|
5783
|
-
color: v(
|
|
5784
|
-
backgroundColor: v(
|
|
5785
|
+
color: v(I).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
5786
|
+
backgroundColor: v(I).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
|
|
5785
5787
|
}),
|
|
5786
5788
|
title: v(i).mediaLibrary.viewList,
|
|
5787
|
-
onClick: n[4] ||= (e) => v(
|
|
5788
|
-
}, [
|
|
5789
|
+
onClick: n[4] ||= (e) => v(I).layoutMode.value = "list"
|
|
5790
|
+
}, [j(v(he), {
|
|
5789
5791
|
size: 14,
|
|
5790
5792
|
"stroke-width": 2
|
|
5791
5793
|
})], 12, pa)])
|
|
5792
|
-
]), w("div", ma, [v(
|
|
5794
|
+
]), w("div", ma, [v(P).length > 1 ? (o(), g("select", {
|
|
5793
5795
|
key: 0,
|
|
5794
5796
|
class: "tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-7 tpl:pl-2.5 tpl:text-xs tpl:transition-all tpl:duration-150 tpl:outline-none",
|
|
5795
5797
|
style: {
|
|
@@ -5797,20 +5799,20 @@ var Zi = ["data-tpl-theme"], Qi = {
|
|
|
5797
5799
|
"background-color": "var(--tpl-bg)",
|
|
5798
5800
|
color: "var(--tpl-text)"
|
|
5799
5801
|
},
|
|
5800
|
-
value: v(
|
|
5801
|
-
onChange: n[5] ||= (e) => v(
|
|
5802
|
-
}, [w("option", ga, p(v(i).mediaLibrary.filterAll), 1), (o(!0), g(
|
|
5802
|
+
value: v(F).categoryFilter.value ?? "",
|
|
5803
|
+
onChange: n[5] ||= (e) => v(F).filterByCategory(e.target.value || null)
|
|
5804
|
+
}, [w("option", ga, p(v(i).mediaLibrary.filterAll), 1), (o(!0), g(O, null, c(v(P), (e) => (o(), g("option", {
|
|
5803
5805
|
key: e,
|
|
5804
5806
|
value: e
|
|
5805
|
-
}, p(v(
|
|
5807
|
+
}, p(v(I).getCategoryLabel(e)), 9, _a))), 128))], 40, ha)) : _("", !0), w("select", {
|
|
5806
5808
|
class: "tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-7 tpl:pl-2.5 tpl:text-xs tpl:transition-all tpl:duration-150 tpl:outline-none",
|
|
5807
5809
|
style: {
|
|
5808
5810
|
"border-color": "var(--tpl-border)",
|
|
5809
5811
|
"background-color": "var(--tpl-bg)",
|
|
5810
5812
|
color: "var(--tpl-text)"
|
|
5811
5813
|
},
|
|
5812
|
-
value: v(
|
|
5813
|
-
onChange: n[6] ||= (e) => v(
|
|
5814
|
+
value: v(F).sortOption.value,
|
|
5815
|
+
onChange: n[6] ||= (e) => v(F).sortBy(e.target.value)
|
|
5814
5816
|
}, [
|
|
5815
5817
|
w("option", ya, p(v(i).mediaLibrary.sortNewest), 1),
|
|
5816
5818
|
w("option", ba, p(v(i).mediaLibrary.sortOldest), 1),
|
|
@@ -5818,15 +5820,15 @@ var Zi = ["data-tpl-theme"], Qi = {
|
|
|
5818
5820
|
w("option", Sa, p(v(i).mediaLibrary.sortNameDesc), 1),
|
|
5819
5821
|
w("option", Ca, p(v(i).mediaLibrary.sortSizeAsc), 1),
|
|
5820
5822
|
w("option", wa, p(v(i).mediaLibrary.sortSizeDesc), 1)
|
|
5821
|
-
], 40, va)])]), w("div", Ta, [v(
|
|
5822
|
-
"is-uploading": v(
|
|
5823
|
-
"upload-progress": v(
|
|
5824
|
-
onUpload: v(
|
|
5823
|
+
], 40, va)])]), w("div", Ta, [v(F).viewMode.value === "files" ? (o(), g("div", Ea, [j(Wi, {
|
|
5824
|
+
"is-uploading": v(F).isUploading.value,
|
|
5825
|
+
"upload-progress": v(F).uploadProgress.value,
|
|
5826
|
+
onUpload: v(I).handleUpload
|
|
5825
5827
|
}, null, 8, [
|
|
5826
5828
|
"is-uploading",
|
|
5827
5829
|
"upload-progress",
|
|
5828
5830
|
"onUpload"
|
|
5829
|
-
]),
|
|
5831
|
+
]), te.value ? (o(), g("button", {
|
|
5830
5832
|
key: 0,
|
|
5831
5833
|
class: "tpl:mt-2 tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-dashed tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
5832
5834
|
style: {
|
|
@@ -5834,22 +5836,22 @@ var Zi = ["data-tpl-theme"], Qi = {
|
|
|
5834
5836
|
color: "var(--tpl-text-muted)",
|
|
5835
5837
|
"background-color": "var(--tpl-bg)"
|
|
5836
5838
|
},
|
|
5837
|
-
onClick: n[7] ||= (e) => v(
|
|
5838
|
-
}, [
|
|
5839
|
+
onClick: n[7] ||= (e) => v(I).showImportUrlModal.value = !0
|
|
5840
|
+
}, [j(v(pe), {
|
|
5839
5841
|
size: 14,
|
|
5840
5842
|
"stroke-width": 2
|
|
5841
|
-
}),
|
|
5842
|
-
items: v(
|
|
5843
|
-
"selected-ids": v(
|
|
5844
|
-
"is-loading": v(
|
|
5845
|
-
"has-more": v(
|
|
5843
|
+
}), k(" " + p(v(i).mediaLibrary.importFromUrl), 1)])) : _("", !0)])) : _("", !0), j(Xr, {
|
|
5844
|
+
items: v(I).displayItems.value,
|
|
5845
|
+
"selected-ids": v(F).selectedItems.value,
|
|
5846
|
+
"is-loading": v(F).isLoading.value,
|
|
5847
|
+
"has-more": v(F).viewMode.value === "files" && v(F).hasMore.value,
|
|
5846
5848
|
accept: e.accept,
|
|
5847
|
-
layout: v(
|
|
5848
|
-
onSelect: v(
|
|
5849
|
-
onToggle: v(
|
|
5850
|
-
onLoadMore: v(
|
|
5851
|
-
onEdit: v(
|
|
5852
|
-
onReplace: v(
|
|
5849
|
+
layout: v(I).layoutMode.value,
|
|
5850
|
+
onSelect: v(I).handleSelect,
|
|
5851
|
+
onToggle: v(F).toggleSelection,
|
|
5852
|
+
onLoadMore: v(F).loadMore,
|
|
5853
|
+
onEdit: v(I).handleEditItem,
|
|
5854
|
+
onReplace: v(I).handleReplaceItem
|
|
5853
5855
|
}, null, 8, [
|
|
5854
5856
|
"items",
|
|
5855
5857
|
"selected-ids",
|
|
@@ -5863,36 +5865,36 @@ var Zi = ["data-tpl-theme"], Qi = {
|
|
|
5863
5865
|
"onEdit",
|
|
5864
5866
|
"onReplace"
|
|
5865
5867
|
])])])]),
|
|
5866
|
-
|
|
5867
|
-
visible: v(
|
|
5868
|
-
"is-importing": v(
|
|
5869
|
-
error: v(
|
|
5870
|
-
onImport: v(
|
|
5871
|
-
onClose: n[8] ||= (e) => v(
|
|
5868
|
+
j(ci, {
|
|
5869
|
+
visible: v(I).showImportUrlModal.value,
|
|
5870
|
+
"is-importing": v(F).isImportingFromUrl.value,
|
|
5871
|
+
error: v(F).importFromUrlError.value,
|
|
5872
|
+
onImport: v(I).handleImportFromUrl,
|
|
5873
|
+
onClose: n[8] ||= (e) => v(I).showImportUrlModal.value = !1
|
|
5872
5874
|
}, null, 8, [
|
|
5873
5875
|
"visible",
|
|
5874
5876
|
"is-importing",
|
|
5875
5877
|
"error",
|
|
5876
5878
|
"onImport"
|
|
5877
5879
|
]),
|
|
5878
|
-
|
|
5879
|
-
visible: !!v(
|
|
5880
|
-
item: v(
|
|
5881
|
-
onSave: v(
|
|
5882
|
-
onClose: n[9] ||= (e) => v(
|
|
5880
|
+
j(or, {
|
|
5881
|
+
visible: !!v(I).editingItem.value,
|
|
5882
|
+
item: v(I).editingItem.value,
|
|
5883
|
+
onSave: v(I).handleEditSave,
|
|
5884
|
+
onClose: n[9] ||= (e) => v(I).editingItem.value = null
|
|
5883
5885
|
}, null, 8, [
|
|
5884
5886
|
"visible",
|
|
5885
5887
|
"item",
|
|
5886
5888
|
"onSave"
|
|
5887
5889
|
]),
|
|
5888
|
-
|
|
5889
|
-
visible: v(
|
|
5890
|
-
item: v(
|
|
5891
|
-
"usage-info": v(
|
|
5892
|
-
"is-replacing": v(
|
|
5893
|
-
error: v(
|
|
5894
|
-
onReplace: v(
|
|
5895
|
-
onClose: v(
|
|
5890
|
+
j(zi, {
|
|
5891
|
+
visible: v(F).showReplaceWarning.value,
|
|
5892
|
+
item: v(F).pendingReplaceItem.value,
|
|
5893
|
+
"usage-info": v(F).replaceUsageInfo.value,
|
|
5894
|
+
"is-replacing": v(F).isReplacing.value,
|
|
5895
|
+
error: v(F).replaceError.value,
|
|
5896
|
+
onReplace: v(I).handleReplaceFile,
|
|
5897
|
+
onClose: v(F).cancelReplace
|
|
5896
5898
|
}, null, 8, [
|
|
5897
5899
|
"visible",
|
|
5898
5900
|
"item",
|
|
@@ -5902,7 +5904,7 @@ var Zi = ["data-tpl-theme"], Qi = {
|
|
|
5902
5904
|
"onReplace",
|
|
5903
5905
|
"onClose"
|
|
5904
5906
|
]),
|
|
5905
|
-
|
|
5907
|
+
j(x, {
|
|
5906
5908
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
5907
5909
|
"enter-from-class": "tpl:opacity-0",
|
|
5908
5910
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -5910,7 +5912,7 @@ var Zi = ["data-tpl-theme"], Qi = {
|
|
|
5910
5912
|
"leave-from-class": "tpl:opacity-100",
|
|
5911
5913
|
"leave-to-class": "tpl:opacity-0"
|
|
5912
5914
|
}, {
|
|
5913
|
-
default: u(() => [v(
|
|
5915
|
+
default: u(() => [v(F).showDeleteWarning.value ? (o(), g("div", {
|
|
5914
5916
|
key: 0,
|
|
5915
5917
|
class: "tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-lg)]",
|
|
5916
5918
|
style: {
|
|
@@ -5918,19 +5920,19 @@ var Zi = ["data-tpl-theme"], Qi = {
|
|
|
5918
5920
|
"backdrop-filter": "blur(8px)",
|
|
5919
5921
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
5920
5922
|
},
|
|
5921
|
-
onClick: n[12] ||= y((...e) => v(
|
|
5923
|
+
onClick: n[12] ||= y((...e) => v(F).cancelDelete && v(F).cancelDelete(...e), ["self"])
|
|
5922
5924
|
}, [w("div", Da, [
|
|
5923
5925
|
w("h3", Oa, p(v(i).mediaLibrary.deleteWarningTitle), 1),
|
|
5924
5926
|
w("p", {
|
|
5925
|
-
class: C(["tpl:text-xs", v(
|
|
5927
|
+
class: C(["tpl:text-xs", v(I).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
|
|
5926
5928
|
style: { color: "var(--tpl-text-muted)" }
|
|
5927
5929
|
}, p(v(i).mediaLibrary.deleteWarningMessage), 3),
|
|
5928
|
-
v(
|
|
5929
|
-
v(
|
|
5930
|
+
v(I).hasUsedFiles.value ? (o(), g("p", ka, p(v(i).mediaLibrary.deleteWarningUsageNote), 1)) : _("", !0),
|
|
5931
|
+
v(I).hasUsedFiles.value ? (o(), g("div", Aa, [(o(!0), g(O, null, c(v(F).deleteUsageInfo.value, (e, t) => (o(), g("div", {
|
|
5930
5932
|
key: t,
|
|
5931
5933
|
class: "tpl:text-xs",
|
|
5932
5934
|
style: { color: "var(--tpl-text)" }
|
|
5933
|
-
}, [e.template_count > 0 ? (o(), g(
|
|
5935
|
+
}, [e.template_count > 0 ? (o(), g(O, { key: 0 }, [w("span", ja, p(v(I).displayItems.value.find((e) => e.id === t)?.filename || t), 1), w("span", Ma, " - " + p(v(i).mediaLibrary.usedInTemplates.replace("{count}", e.template_count.toString())), 1)], 64)) : _("", !0)]))), 128))])) : _("", !0),
|
|
5934
5936
|
w("div", Na, [w("button", {
|
|
5935
5937
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
5936
5938
|
style: {
|
|
@@ -5938,7 +5940,7 @@ var Zi = ["data-tpl-theme"], Qi = {
|
|
|
5938
5940
|
color: "var(--tpl-text)",
|
|
5939
5941
|
"background-color": "var(--tpl-bg)"
|
|
5940
5942
|
},
|
|
5941
|
-
onClick: n[10] ||= (...e) => v(
|
|
5943
|
+
onClick: n[10] ||= (...e) => v(F).cancelDelete && v(F).cancelDelete(...e)
|
|
5942
5944
|
}, p(v(i).mediaLibrary.cancel), 1), w("button", {
|
|
5943
5945
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
5944
5946
|
style: {
|
|
@@ -5946,57 +5948,57 @@ var Zi = ["data-tpl-theme"], Qi = {
|
|
|
5946
5948
|
color: "var(--tpl-danger)",
|
|
5947
5949
|
"background-color": "var(--tpl-danger-light)"
|
|
5948
5950
|
},
|
|
5949
|
-
onClick: n[11] ||= (...e) => v(
|
|
5950
|
-
}, p(v(
|
|
5951
|
+
onClick: n[11] ||= (...e) => v(F).confirmDelete && v(F).confirmDelete(...e)
|
|
5952
|
+
}, p(v(I).hasUsedFiles.value ? v(i).mediaLibrary.deleteAnyway : v(i).mediaLibrary.confirmDelete), 1)])
|
|
5951
5953
|
])])) : _("", !0)]),
|
|
5952
5954
|
_: 1
|
|
5953
5955
|
}),
|
|
5954
|
-
w("div", Pa, [w("div", Fa, [v(
|
|
5956
|
+
w("div", Pa, [w("div", Fa, [v(F).previewItem.value ? (o(), b(wi, {
|
|
5955
5957
|
key: 0,
|
|
5956
|
-
"selected-conversion": v(
|
|
5957
|
-
"onUpdate:selectedConversion": n[13] ||= (e) => v(
|
|
5958
|
-
item: v(
|
|
5959
|
-
folders: v(
|
|
5958
|
+
"selected-conversion": v(I).selectedConversion.value,
|
|
5959
|
+
"onUpdate:selectedConversion": n[13] ||= (e) => v(I).selectedConversion.value = e,
|
|
5960
|
+
item: v(F).previewItem.value,
|
|
5961
|
+
folders: v(F).folders.value
|
|
5960
5962
|
}, null, 8, [
|
|
5961
5963
|
"selected-conversion",
|
|
5962
5964
|
"item",
|
|
5963
5965
|
"folders"
|
|
5964
|
-
])) : _("", !0)]), w("div", Ia, [v(
|
|
5966
|
+
])) : _("", !0)]), w("div", Ia, [v(F).selectedItems.value.size > 0 ? (o(), g("div", La, [v(F).previewItem.value ? (o(), g("button", {
|
|
5965
5967
|
key: 0,
|
|
5966
5968
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
5967
5969
|
style: E({
|
|
5968
|
-
borderColor: v(
|
|
5969
|
-
color: v(
|
|
5970
|
+
borderColor: v(I).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
|
|
5971
|
+
color: v(I).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
|
|
5970
5972
|
backgroundColor: "var(--tpl-bg)"
|
|
5971
5973
|
}),
|
|
5972
|
-
onClick: n[14] ||= (e) => v(
|
|
5973
|
-
}, [v(
|
|
5974
|
+
onClick: n[14] ||= (e) => v(I).copy(v(I).selectedUrl.value)
|
|
5975
|
+
}, [v(I).copied.value ? (o(), b(v(M), {
|
|
5974
5976
|
key: 1,
|
|
5975
5977
|
size: 12,
|
|
5976
5978
|
"stroke-width": 2
|
|
5977
|
-
})) : (o(), b(v(
|
|
5979
|
+
})) : (o(), b(v(ne), {
|
|
5978
5980
|
key: 0,
|
|
5979
5981
|
size: 12,
|
|
5980
5982
|
"stroke-width": 2
|
|
5981
|
-
})),
|
|
5983
|
+
})), k(" " + p(v(I).copied.value ? v(i).mediaLibrary.copied : v(i).mediaLibrary.copyUrl), 1)], 4)) : _("", !0), A.value ? (o(), g("div", Ra, [w("button", {
|
|
5982
5984
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
5983
5985
|
style: {
|
|
5984
5986
|
"border-color": "var(--tpl-border)",
|
|
5985
5987
|
color: "var(--tpl-text)",
|
|
5986
5988
|
"background-color": "var(--tpl-bg)"
|
|
5987
5989
|
},
|
|
5988
|
-
onClick: n[15] ||= (e) => v(
|
|
5989
|
-
}, p(v(i).mediaLibrary.moveSelected), 1), v(
|
|
5990
|
+
onClick: n[15] ||= (e) => v(I).showMovePicker.value = !v(I).showMovePicker.value
|
|
5991
|
+
}, p(v(i).mediaLibrary.moveSelected), 1), v(I).showMovePicker.value ? (o(), b(pi, {
|
|
5990
5992
|
key: 0,
|
|
5991
|
-
folders: v(
|
|
5992
|
-
"current-folder-id": v(
|
|
5993
|
-
onSelect: v(
|
|
5994
|
-
onClose: n[16] ||= (e) => v(
|
|
5993
|
+
folders: v(F).folders.value,
|
|
5994
|
+
"current-folder-id": v(F).currentFolderId.value,
|
|
5995
|
+
onSelect: v(I).handleMoveToFolder,
|
|
5996
|
+
onClose: n[16] ||= (e) => v(I).showMovePicker.value = !1
|
|
5995
5997
|
}, null, 8, [
|
|
5996
5998
|
"folders",
|
|
5997
5999
|
"current-folder-id",
|
|
5998
6000
|
"onSelect"
|
|
5999
|
-
])) : _("", !0)])) : _("", !0)])) : _("", !0), w("div", za, [v(
|
|
6001
|
+
])) : _("", !0)])) : _("", !0)])) : _("", !0), w("div", za, [v(F).selectedItems.value.size > 0 ? (o(), g("button", {
|
|
6000
6002
|
key: 0,
|
|
6001
6003
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
6002
6004
|
style: {
|
|
@@ -6004,7 +6006,7 @@ var Zi = ["data-tpl-theme"], Qi = {
|
|
|
6004
6006
|
color: "var(--tpl-danger)",
|
|
6005
6007
|
"background-color": "var(--tpl-danger-light)"
|
|
6006
6008
|
},
|
|
6007
|
-
onClick: n[17] ||= (...e) => v(
|
|
6009
|
+
onClick: n[17] ||= (...e) => v(I).handleDeleteClick && v(I).handleDeleteClick(...e)
|
|
6008
6010
|
}, p(v(i).mediaLibrary.deleteSelected), 1)) : _("", !0), w("button", {
|
|
6009
6011
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-4 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
6010
6012
|
style: {
|
|
@@ -6022,4 +6024,4 @@ var Zi = ["data-tpl-theme"], Qi = {
|
|
|
6022
6024
|
//#endregion
|
|
6023
6025
|
export { zi as a, ci as c, or as d, Oe as f, Se as g, Ce as h, Wi as i, Xr as l, z as m, Xi as n, wi as o, De as p, Yi as r, pi as s, Va as t, yr as u };
|
|
6024
6026
|
|
|
6025
|
-
//# sourceMappingURL=media-library-
|
|
6027
|
+
//# sourceMappingURL=media-library-DMRIPx4g.js.map
|