1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/renderer/components/dock/logs/download-logs.injectable.ts
Alex Andreev 627dcec932 Fix line-break symbol
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-08-15 14:43:24 +03:00

16 lines
477 B
TypeScript

import { getInjectable } from "@ogre-tools/injectable";
import openSaveFileDialogInjectable from "../../../utils/save-file.injectable";
const downloadLogsInjectable = getInjectable({
id: "download-logs",
instantiate: (di) => {
const openSaveFileDialog = di.inject(openSaveFileDialogInjectable)
return (filename: string, logs: string[]) => {
openSaveFileDialog(filename, logs.join("\n"), "text/plain");
}
},
});
export default downloadLogsInjectable;