mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-04-14 18:17:29 +08:00
polish webui and add desktop gateway service support
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import { AnimatePresence, motion } from 'motion/react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Button } from './Button';
|
||||
|
||||
type DialogOptions = {
|
||||
title?: string;
|
||||
@@ -61,11 +62,11 @@ export const GlobalDialog: React.FC<{
|
||||
</div>
|
||||
<div className="px-5 pb-5 flex items-center justify-end gap-2 relative z-[1]">
|
||||
{(kind === 'confirm' || kind === 'prompt') && (
|
||||
<button onClick={onCancel} className="ui-button ui-button-neutral px-3 py-1.5 text-sm">{options.cancelText || t('cancel')}</button>
|
||||
<Button onClick={onCancel} size="sm">{options.cancelText || t('cancel')}</Button>
|
||||
)}
|
||||
<button onClick={() => onConfirm(kind === 'prompt' ? value : undefined)} className={`ui-button px-3 py-1.5 text-sm ${options.danger ? 'ui-button-danger' : 'ui-button-primary'}`}>
|
||||
<Button onClick={() => onConfirm(kind === 'prompt' ? value : undefined)} variant={options.danger ? 'danger' : 'primary'} size="sm">
|
||||
{options.confirmText || t('dialogOk')}
|
||||
</button>
|
||||
</Button>
|
||||
</div>
|
||||
</motion.div>
|
||||
</motion.div>
|
||||
|
||||
Reference in New Issue
Block a user