import { RiErrorWarningLine } from 'react-icons/ri'; import { SelectFile } from '../components/SelectFile'; import { DownloadAll } from '~/components/DownloadAll.tsx'; import { FileListing } from '~/features/file-listing/FileListing'; import { useAppDispatch, useAppSelector } from '~/hooks.ts'; import { selectIsSettingsNotSaved } from '~/features/settings/settingsSelector.ts'; import { commitStagingChange } from '~/features/settings/settingsSlice.ts'; export function MainTab() { const dispatch = useAppDispatch(); const isSettingsNotSaved = useAppSelector(selectIsSettingsNotSaved); const onClickSaveSettings = () => { dispatch(commitStagingChange()); }; return (
{isSettingsNotSaved && (
警告
警告 有尚未储存的设置, 设定将在保存后生效。
)}
); }