import { DialogButton, Focusable, showModal, } from "decky-frontend-lib"; import { FC, useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import LogViewModal from "./LogViewModal"; const LogList: FC<{ plugin: string }> = ({ plugin }) => { const [logList, setLogList] = useState([]); const { t } = useTranslation(); useEffect(() => { window.DeckyPluginLoader.callServerMethod("get_plugin_logs", { plugin_name: plugin, }).then((log_list) => { setLogList(log_list.result || []); }); }, []); return ( {logList.map((log_file) => ( showModal( , ) } onClick={() => showModal( , ) } >
{log_file}
))}
); }; export default LogList;