@opengis/fastify-table 2.4.1 → 2.4.3
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/server/helpers/utils/buttonDel.js +1 -1
- package/dist/server/routes/file/controllers/download.d.ts.map +1 -1
- package/dist/server/routes/file/controllers/download.js +1 -1
- package/dist/server/routes/file/controllers/files.d.ts.map +1 -1
- package/dist/server/routes/file/controllers/files.js +1 -1
- package/package.json +1 -1
|
@@ -22,7 +22,7 @@ export default function button(token, title, icon, permission = '') {
|
|
|
22
22
|
: `px-2 py-1 inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border border-transparent hover:text-white ring-offset-white bg-${COLOR}-100 text-${COLOR}-500 hover:bg-${COLOR}-500 focus:ring-${COLOR}-500`;
|
|
23
23
|
const buttonContent = icon
|
|
24
24
|
? `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="${COLOR}" class="size-3.5">
|
|
25
|
-
<path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1
|
|
25
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"/>
|
|
26
26
|
</svg>`
|
|
27
27
|
: `${title || "Вилучити"}`;
|
|
28
28
|
return `<button ${permissionAttr} onclick="${apiCall}" class="${buttonClass}">${buttonContent}</button>`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../../../../server/routes/file/controllers/download.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAqB5C;;;;;;;;;;;;;;;;GAgBG;AAEH,wBAA8B,QAAQ,CACpC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,GAAG,EACrB,KAAK,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../../../../server/routes/file/controllers/download.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAqB5C;;;;;;;;;;;;;;;;GAgBG;AAEH,wBAA8B,QAAQ,CACpC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,GAAG,EACrB,KAAK,EAAE,YAAY,gBA8CpB"}
|
|
@@ -53,7 +53,7 @@ export default async function download({ params, user }, reply) {
|
|
|
53
53
|
throw NotFoundError(`Файл не знайдено - ${filename}`);
|
|
54
54
|
}
|
|
55
55
|
const headers = {
|
|
56
|
-
"Content-Disposition": `attachment; filename=${path.basename(filename)}`,
|
|
56
|
+
"Content-Disposition": `attachment; filename=${encodeURIComponent(path.basename(filename))}`,
|
|
57
57
|
"Content-Type": getMimeType(filepath),
|
|
58
58
|
};
|
|
59
59
|
logger.file("file/download", { filepath: params["*"], uid: user?.uid });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../../../server/routes/file/controllers/files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAmB5C;;;;;;;;;;;;;;;;;GAiBG;AAEH,wBAA8B,OAAO,CACnC,EACE,MAAM,EACN,KAAK,EACL,IAAI,GACL,EAAE;IACD,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACxB,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,EACD,KAAK,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../../../server/routes/file/controllers/files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAmB5C;;;;;;;;;;;;;;;;;GAiBG;AAEH,wBAA8B,OAAO,CACnC,EACE,MAAM,EACN,KAAK,EACL,IAAI,GACL,EAAE;IACD,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACxB,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,EACD,KAAK,EAAE,YAAY,gBA8DpB"}
|
|
@@ -61,7 +61,7 @@ export default async function getFile({ params, query, user, }, reply) {
|
|
|
61
61
|
return reply.headers({ "Content-Type": "image/gif" }).send(grayGif);
|
|
62
62
|
}
|
|
63
63
|
const headers = {
|
|
64
|
-
"Content-Disposition": `inline; filename=${path.basename(filepath)}`,
|
|
64
|
+
"Content-Disposition": `inline; filename=${encodeURIComponent(path.basename(filepath))}`,
|
|
65
65
|
"Cache-Control": "max-age=86400",
|
|
66
66
|
"Content-Type": `${mime(filepath)}`, // ; charset=utf-8 --- untested
|
|
67
67
|
};
|