import { FunctionComponent } from 'preact'; import { Locale } from 'util/locale'; import { Links } from 'const/links'; import { LocalizedWith } from 'views/components/localized-with'; import { SettingsPlugin } from 'ui/settings/plugins/settings-plugin'; import { SettingsGalleryPlugin } from 'ui/settings/plugins/settings-gallery-plugin'; import { Plugin } from 'plugins/plugin'; import { PluginGalleryPlugin } from 'plugins/types'; import { classes } from 'util/ui/classes'; export const SettingsPluginsView: FunctionComponent<{ plugins: Plugin[]; galleryLoading: boolean; galleryLoadError: boolean; galleryPlugins?: PluginGalleryPlugin[]; gallerySearchStr: string; installingFromUrl: boolean; installUrl?: string; installUrlError?: string; installUrlMalformed: boolean; loadGalleryClicked: () => void; gallerySearchChanged: (text: string) => void; installUrlChanged: (url: string) => void; installFromUrlClicked: () => void; }> = ({ plugins, galleryLoading, galleryLoadError, galleryPlugins, gallerySearchStr, installingFromUrl, installUrl, installUrlError, installUrlMalformed, loadGalleryClicked, gallerySearchChanged, installUrlChanged, installFromUrlClicked }) => { return (

{Locale.plugins}

{Locale.setPlDevelop}{' '} {Locale.setPlDevelopStart} .{' '} {Locale.setPlTranslateLink} .
{plugins.map((plugin) => ( ))}

{galleryLoading ? Locale.setPlGalleryLoading + '...' : Locale.setPlInstallTitle}

{Locale.setPlInstallDesc}
{galleryLoadError ? (
{Locale.setPlGalleryLoadError}
) : null} {galleryPlugins ? ( <> gallerySearchChanged((e.target as HTMLInputElement).value) } /> ) : ( )}

{Locale.setPlInstallUrlTitle}

{Locale.setPlInstallUrlDesc}
installUrlChanged((e.target as HTMLInputElement).value)} />
{installUrlError}
); };