Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

907 B
Raw Blame
import { useTranslation } from '@/i18n/react-i18next-compat'
import { useLocalize } from '@/lib/extensions/l10n'
import { PermissionList } from './PermissionList'
import { StagedDialog, type StagedDialogProps } from './StagedDialog'

/** Consent to a first install: everything the extension requests. */
export function ConsentDialog(props: StagedDialogProps) {
  const { t } = useTranslation()
  const localize = useLocalize()
  const { manifest } = props.staged
  return (
    <StagedDialog
      {...props}
      title={t('extensions:install.title', {
        name: localize(manifest, manifest.displayName),
      })}
      description={t('extensions:install.description', {
        publisher: manifest.publisher,
        version: manifest.version,
      })}
      confirmLabel={t('extensions:install.confirm')}
    >
      <PermissionList permissions={manifest.permissions} />
    </StagedDialog>
  )
}