@samitouri / QOSami-HFS / commits / 00687224

admin/plugins/search: nicer warning dialog

Massimo Melina committed May 17, 2024 at 12:57 UTC 00687224d775047ff535b6e1c53cd13603716ed1
1 file changed +5 -2
admin/src/OnlinePlugins.ts
+5 -2
@@ -4,7 +4,7 @@ import { apiCall, useApiList } from './api'
4 import { Fragment, createElement as h, useState } from 'react'
5 import { DataTable } from './DataTable'
6 import { HTTP_FAILED_DEPENDENCY, newDialog, wantArray, xlate } from './misc'
7 -import { ArrowBack, ArrowForward, Download, RemoveRedEye, Search } from '@mui/icons-material'
7 +import { ArrowBack, ArrowForward, Download, RemoveRedEye, Search, Warning } from '@mui/icons-material'
8 import { StringField } from '@hfs/mui-grid-form'
9 import { useDebounce } from 'usehooks-ts'
10 import { descriptionField, renderName, startPlugin, themeField } from './InstalledPlugins'
@@ -76,7 +76,10 @@ export default function OnlinePlugins() {
76 progress: row.downloading,
77 disabled: row.installed && "Already installed",
78 tooltipProps: { placement:'bottom-end' }, // workaround problem with horizontal scrolling by moving the tooltip leftward
79 - confirm: "WARNING - Proceed only if you trust this author and this plugin",
79 + confirm: h(Flex, { vert: true, alignItems: 'center' },
80 + h(Warning, { color: 'warning', fontSize: 'large' }),
81 + "Proceed only if you trust this plugin",
82 + ),
83 async onClick() {
84 if (row.missing && !await confirmDialog("This will also install: " + _.map(row.missing, 'repo').join(', '))) return
85 const branch = row.branch || row.default_branch