feat: 合并代码后 系统设置 ui样式优化、bug修复、全局统一图标对齐等
This commit is contained in:
@@ -17,6 +17,19 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { LayoutTemplate as ActionLayoutTemplate } from '@/components/common/icons/ActionIcons';
|
||||
import { Image as TemplateImageIcon } from '@/components/common/icons/ActionIcons';
|
||||
import {
|
||||
ChevronDown as ActionChevronDown,
|
||||
Lock as ActionLock,
|
||||
Wallet as ActionWallet,
|
||||
ChevronUp as ActionChevronUp,
|
||||
ArrowLeft as ActionArrowLeft,
|
||||
Settings2 as ActionSettings2,
|
||||
History as ActionHistory,
|
||||
MoreHorizontal as ActionMoreHorizontal,
|
||||
X as ActionX,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, {
|
||||
useCallback,
|
||||
useContext,
|
||||
@@ -38,23 +51,13 @@ import {
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
AlertCircle,
|
||||
ArrowLeft,
|
||||
Bell,
|
||||
BellOff,
|
||||
ChevronDown,
|
||||
ChevronUp,
|
||||
Clapperboard,
|
||||
History,
|
||||
ImageIcon,
|
||||
ImagePlus,
|
||||
LayoutTemplate,
|
||||
Lock,
|
||||
MoreHorizontal,
|
||||
Settings2,
|
||||
Sparkles,
|
||||
Wand2,
|
||||
Wallet,
|
||||
X,
|
||||
} from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
@@ -330,7 +333,12 @@ const ParamChip = ({
|
||||
trigger={
|
||||
<button
|
||||
type='button'
|
||||
className={`cs-chip cs-param-chip${open ? ' is-active' : ''}`}
|
||||
className={[
|
||||
'app-action-button',
|
||||
`cs-chip cs-param-chip${open ? ' is-active' : ''}`,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')}
|
||||
aria-haspopup='dialog'
|
||||
aria-expanded={open}
|
||||
aria-label={`${label}:${text}`}
|
||||
@@ -338,7 +346,7 @@ const ParamChip = ({
|
||||
onClick={() => setOpen((v) => !v)}
|
||||
>
|
||||
<span className='cs-chip-text'>{text}</span>
|
||||
<ChevronDown size={12} aria-hidden />
|
||||
<ActionChevronDown size={12} aria-hidden />
|
||||
</button>
|
||||
}
|
||||
>
|
||||
@@ -369,7 +377,7 @@ const TemplatePicker = ({ kind, isMobile, onApply }) => {
|
||||
const { t } = useTranslation();
|
||||
const [open, setOpen] = useState(false);
|
||||
const list = useMemo(() => templatesOf(kind), [kind]);
|
||||
const Icon = kind === 'video' ? Clapperboard : ImageIcon;
|
||||
const Icon = kind === 'video' ? Clapperboard : TemplateImageIcon;
|
||||
if (!list.length) return null;
|
||||
return (
|
||||
<DockPopover
|
||||
@@ -382,12 +390,17 @@ const TemplatePicker = ({ kind, isMobile, onApply }) => {
|
||||
trigger={
|
||||
<button
|
||||
type='button'
|
||||
className={`cs-chip cs-tool${open ? ' is-active' : ''}`}
|
||||
className={[
|
||||
'app-action-button',
|
||||
`cs-chip cs-tool${open ? ' is-active' : ''}`,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')}
|
||||
aria-haspopup='dialog'
|
||||
aria-expanded={open}
|
||||
onClick={() => setOpen((v) => !v)}
|
||||
>
|
||||
<LayoutTemplate size={14} aria-hidden />
|
||||
<ActionLayoutTemplate size={14} aria-hidden />
|
||||
<span>{t('模板')}</span>
|
||||
</button>
|
||||
}
|
||||
@@ -1014,7 +1027,7 @@ const CreationDock = ({ form, compare = null }) => {
|
||||
<Button
|
||||
type='warning'
|
||||
theme='solid'
|
||||
icon={<Lock size={16} aria-hidden />}
|
||||
icon={<ActionLock size={16} aria-hidden />}
|
||||
onClick={() => navigate(TOPUP_PATH)}
|
||||
>
|
||||
{t('升级')}
|
||||
@@ -1026,7 +1039,7 @@ const CreationDock = ({ form, compare = null }) => {
|
||||
<Button
|
||||
type='warning'
|
||||
theme='solid'
|
||||
icon={<Wallet size={16} aria-hidden />}
|
||||
icon={<ActionWallet size={16} aria-hidden />}
|
||||
onClick={() => navigate(TOPUP_PATH)}
|
||||
>
|
||||
{t('去充值')}
|
||||
@@ -1088,7 +1101,12 @@ const CreationDock = ({ form, compare = null }) => {
|
||||
<div className='cs-dock cs-dock--collapsed' ref={dockRef}>
|
||||
<button
|
||||
type='button'
|
||||
className={`cs-collapsed-prompt${prompt ? '' : ' is-placeholder'}`}
|
||||
className={[
|
||||
'app-action-button',
|
||||
`cs-collapsed-prompt${prompt ? '' : ' is-placeholder'}`,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')}
|
||||
data-guide='prompt'
|
||||
onClick={expand}
|
||||
aria-label={t('展开创作台')}
|
||||
@@ -1100,7 +1118,7 @@ const CreationDock = ({ form, compare = null }) => {
|
||||
? t('描述你想要的画面…')
|
||||
: t('描述你想要的视频画面与运动…'))}
|
||||
</span>
|
||||
<ChevronUp size={14} aria-hidden />
|
||||
<ActionChevronUp size={14} aria-hidden />
|
||||
</button>
|
||||
<div className='cs-collapsed-model'>{modelPicker}</div>
|
||||
{generateButton(true)}
|
||||
@@ -1139,14 +1157,14 @@ const CreationDock = ({ form, compare = null }) => {
|
||||
>
|
||||
<button
|
||||
type='button'
|
||||
className='cs-chip cs-mode-chip'
|
||||
className='app-action-button cs-chip cs-mode-chip'
|
||||
aria-haspopup='menu'
|
||||
aria-label={t('生成模式:{{mode}}', {
|
||||
mode: t(modeLabels[mode] || mode),
|
||||
})}
|
||||
>
|
||||
<span>{t(modeLabels[mode] || mode)}</span>
|
||||
<ChevronDown size={12} aria-hidden />
|
||||
<ActionChevronDown size={12} aria-hidden />
|
||||
</button>
|
||||
</Dropdown>
|
||||
) : modeOptions.length === 1 ? (
|
||||
@@ -1239,11 +1257,11 @@ const CreationDock = ({ form, compare = null }) => {
|
||||
<span className='cs-dock-head-title'>{t('创作')}</span>
|
||||
<button
|
||||
type='button'
|
||||
className='cs-icon-btn'
|
||||
className='app-action-button cs-icon-btn'
|
||||
onClick={collapse}
|
||||
aria-label={t('收起创作台')}
|
||||
>
|
||||
<ChevronDown size={16} aria-hidden />
|
||||
<ActionChevronDown size={16} aria-hidden />
|
||||
</button>
|
||||
</div>
|
||||
) : null}
|
||||
@@ -1294,7 +1312,7 @@ const CreationDock = ({ form, compare = null }) => {
|
||||
{movable ? (
|
||||
<button
|
||||
type='button'
|
||||
className='cs-slot-move'
|
||||
className='app-action-button cs-slot-move'
|
||||
onClick={() =>
|
||||
handleMoveRef(entry.index, entry.index - 1)
|
||||
}
|
||||
@@ -1303,7 +1321,7 @@ const CreationDock = ({ form, compare = null }) => {
|
||||
})}
|
||||
title={t('前移')}
|
||||
>
|
||||
<ArrowLeft size={12} aria-hidden />
|
||||
<ActionArrowLeft size={12} aria-hidden />
|
||||
</button>
|
||||
) : null}
|
||||
</div>
|
||||
@@ -1329,7 +1347,7 @@ const CreationDock = ({ form, compare = null }) => {
|
||||
<>
|
||||
<button
|
||||
type='button'
|
||||
className='cs-chip cs-tool'
|
||||
className='app-action-button cs-chip cs-tool'
|
||||
disabled={localUploadBlocked}
|
||||
title={uploadBlockedReason || undefined}
|
||||
onClick={() => addInputRef.current?.click()}
|
||||
@@ -1431,12 +1449,17 @@ const CreationDock = ({ form, compare = null }) => {
|
||||
trigger={
|
||||
<button
|
||||
type='button'
|
||||
className={`cs-chip${advancedOpen ? ' is-active' : ''}`}
|
||||
className={[
|
||||
'app-action-button',
|
||||
`cs-chip${advancedOpen ? ' is-active' : ''}`,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')}
|
||||
aria-haspopup='dialog'
|
||||
aria-expanded={advancedOpen}
|
||||
onClick={() => setAdvancedOpen((v) => !v)}
|
||||
>
|
||||
<Settings2 size={14} aria-hidden />
|
||||
<ActionSettings2 size={14} aria-hidden />
|
||||
{t('高级')}
|
||||
</button>
|
||||
}
|
||||
@@ -1479,11 +1502,11 @@ const CreationDock = ({ form, compare = null }) => {
|
||||
>
|
||||
<button
|
||||
type='button'
|
||||
className='cs-chip cs-tool'
|
||||
className='app-action-button cs-chip cs-tool'
|
||||
aria-haspopup='menu'
|
||||
title={t('提示词历史')}
|
||||
>
|
||||
<History size={14} aria-hidden />
|
||||
<ActionHistory size={14} aria-hidden />
|
||||
<span>{t('历史')}</span>
|
||||
</button>
|
||||
</Dropdown>
|
||||
@@ -1495,7 +1518,7 @@ const CreationDock = ({ form, compare = null }) => {
|
||||
/>
|
||||
<button
|
||||
type='button'
|
||||
className='cs-chip cs-tool'
|
||||
className='app-action-button cs-chip cs-tool'
|
||||
onClick={handleOptimize}
|
||||
aria-busy={optimizing || undefined}
|
||||
title={
|
||||
@@ -1550,12 +1573,12 @@ const CreationDock = ({ form, compare = null }) => {
|
||||
>
|
||||
<button
|
||||
type='button'
|
||||
className='cs-chip cs-tool cs-icon-chip'
|
||||
className='app-action-button cs-chip cs-tool cs-icon-chip'
|
||||
aria-haspopup='menu'
|
||||
aria-label={t('更多')}
|
||||
title={t('更多')}
|
||||
>
|
||||
<MoreHorizontal size={14} aria-hidden />
|
||||
<ActionMoreHorizontal size={14} aria-hidden />
|
||||
{notify.enabled ? (
|
||||
<span className='cs-dot' aria-hidden />
|
||||
) : null}
|
||||
@@ -1593,11 +1616,11 @@ const CreationDock = ({ form, compare = null }) => {
|
||||
</span>
|
||||
<button
|
||||
type='button'
|
||||
className='cs-icon-btn'
|
||||
className='app-action-button cs-icon-btn'
|
||||
onClick={clearAdjustments}
|
||||
aria-label={t('关闭提示')}
|
||||
>
|
||||
<X size={14} aria-hidden />
|
||||
<ActionX size={14} aria-hidden />
|
||||
</button>
|
||||
</div>
|
||||
) : null}
|
||||
@@ -1624,11 +1647,11 @@ const CreationDock = ({ form, compare = null }) => {
|
||||
) : null}
|
||||
<button
|
||||
type='button'
|
||||
className='cs-icon-btn'
|
||||
className='app-action-button cs-icon-btn'
|
||||
onClick={clearError}
|
||||
aria-label={t('关闭提示')}
|
||||
>
|
||||
<X size={14} aria-hidden />
|
||||
<ActionX size={14} aria-hidden />
|
||||
</button>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
@@ -17,9 +17,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import {
|
||||
Lock as ActionLock,
|
||||
ChevronDown as ActionChevronDown,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
||||
import { Popover, SideSheet } from '@/components/ui';
|
||||
import { ChevronDown, Lock } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useIsMobile } from '../../../hooks/common/useIsMobile';
|
||||
import ModelPickerPanel from './ModelPickerPanel';
|
||||
@@ -127,16 +130,21 @@ const ModelPicker = ({
|
||||
<button
|
||||
ref={triggerRef}
|
||||
type='button'
|
||||
className={`mp-trigger${comparing ? ' is-compare' : ''} ${className}`}
|
||||
className={[
|
||||
'app-action-button',
|
||||
`mp-trigger${comparing ? ' is-compare' : ''} ${className}`,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')}
|
||||
aria-haspopup='listbox'
|
||||
aria-expanded={open}
|
||||
aria-label={t('选择模型:{{name}}', { name: label })}
|
||||
disabled={disabled}
|
||||
onClick={() => setOpen((v) => !v)}
|
||||
>
|
||||
{selected?.level_locked ? <Lock size={13} aria-hidden /> : null}
|
||||
{selected?.level_locked ? <ActionLock size={13} aria-hidden /> : null}
|
||||
<span className='mp-trigger-name'>{label}</span>
|
||||
<ChevronDown size={14} aria-hidden className='mp-trigger-caret' />
|
||||
<ActionChevronDown size={14} aria-hidden className='mp-trigger-caret' />
|
||||
</button>
|
||||
);
|
||||
|
||||
|
||||
@@ -17,9 +17,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import {
|
||||
Code2 as ActionCode2,
|
||||
ChevronDown as ActionChevronDown,
|
||||
Copy as ActionCopy,
|
||||
KeyRound as ActionKeyRound,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useContext, useMemo, useState } from 'react';
|
||||
import { Button } from '@/components/ui';
|
||||
import { ChevronDown, Code2, Copy, KeyRound } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { StatusContext } from '../../../context/Status';
|
||||
@@ -84,15 +89,15 @@ const ApiCodePanel = ({ task }) => {
|
||||
<section className='wf-api'>
|
||||
<button
|
||||
type='button'
|
||||
className='wf-api-toggle'
|
||||
className='app-action-button wf-api-toggle'
|
||||
aria-expanded={open}
|
||||
aria-controls={panelId}
|
||||
onClick={toggle}
|
||||
>
|
||||
<Code2 size={14} aria-hidden='true' />
|
||||
<ActionCode2 size={14} aria-hidden='true' />
|
||||
<span className='wf-api-title'>{t('获取 API 代码')}</span>
|
||||
<span className='wf-api-badge'>{t('API 同价')}</span>
|
||||
<ChevronDown
|
||||
<ActionChevronDown
|
||||
size={14}
|
||||
aria-hidden='true'
|
||||
className={`wf-api-caret${open ? ' is-open' : ''}`}
|
||||
@@ -125,7 +130,7 @@ const ApiCodePanel = ({ task }) => {
|
||||
<Button
|
||||
size='small'
|
||||
theme='borderless'
|
||||
icon={<Copy size={12} aria-hidden='true' />}
|
||||
icon={<ActionCopy size={12} aria-hidden='true' />}
|
||||
onClick={async () => {
|
||||
if (await copy(code)) showSuccess(t('已复制'));
|
||||
}}
|
||||
@@ -155,7 +160,7 @@ const ApiCodePanel = ({ task }) => {
|
||||
<Button
|
||||
size='small'
|
||||
theme='solid'
|
||||
icon={<KeyRound size={12} aria-hidden='true' />}
|
||||
icon={<ActionKeyRound size={12} aria-hidden='true' />}
|
||||
onClick={() => navigate(KEY_MANAGEMENT_FROM_STUDIO)}
|
||||
>
|
||||
{t('创建密钥')}
|
||||
|
||||
@@ -17,6 +17,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { GitCompare as ActionGitCompare } from '@/components/common/icons/ActionIcons';
|
||||
import {
|
||||
Star as ActionStar,
|
||||
Filter as ActionFilter,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, {
|
||||
useEffect,
|
||||
useMemo,
|
||||
@@ -31,7 +36,7 @@ import {
|
||||
Select,
|
||||
SideSheet,
|
||||
} from '@/components/ui';
|
||||
import { Filter, GitCompare, Search, Star } from 'lucide-react';
|
||||
import { Search } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useIsMobile } from '../../../hooks/common/useIsMobile';
|
||||
import {
|
||||
@@ -149,7 +154,7 @@ const Controls = ({ kind, api, facets, vertical, input, setInput }) => {
|
||||
<Button
|
||||
theme={filters.favoritesOnly ? 'solid' : 'light'}
|
||||
type={filters.favoritesOnly ? 'warning' : 'tertiary'}
|
||||
icon={<Star size={14} aria-hidden='true' />}
|
||||
icon={<ActionStar size={14} aria-hidden='true' />}
|
||||
aria-pressed={filters.favoritesOnly}
|
||||
onClick={() => setFilters({ favoritesOnly: !filters.favoritesOnly })}
|
||||
>
|
||||
@@ -182,7 +187,7 @@ const FilterBar = ({ kind, api, selecting, onToggleSelecting }) => {
|
||||
<Button
|
||||
theme={selecting ? 'solid' : 'light'}
|
||||
type={selecting ? 'primary' : 'tertiary'}
|
||||
icon={<GitCompare size={14} aria-hidden='true' />}
|
||||
icon={<ActionGitCompare size={14} aria-hidden='true' />}
|
||||
aria-pressed={selecting}
|
||||
aria-label={t('多选对比')}
|
||||
title={t('多选对比')}
|
||||
@@ -240,7 +245,7 @@ const FilterBar = ({ kind, api, selecting, onToggleSelecting }) => {
|
||||
<Button
|
||||
theme='light'
|
||||
type='tertiary'
|
||||
icon={<Filter size={16} aria-hidden='true' />}
|
||||
icon={<ActionFilter size={16} aria-hidden='true' />}
|
||||
aria-label={t('筛选')}
|
||||
aria-expanded={open}
|
||||
onClick={() => setOpen((v) => !v)}
|
||||
|
||||
@@ -17,17 +17,19 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import {
|
||||
RefreshCw as ActionRefreshCw,
|
||||
Check as ActionCheck,
|
||||
Star as ActionStar,
|
||||
MoreHorizontal as ActionMoreHorizontal,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { memo, useEffect, useRef, useState } from 'react';
|
||||
import { Button, Dropdown } from '@/components/ui';
|
||||
import {
|
||||
AlertCircle,
|
||||
Check,
|
||||
Clapperboard,
|
||||
Image as ImageIcon,
|
||||
LayoutGrid,
|
||||
MoreHorizontal,
|
||||
RefreshCw,
|
||||
Star,
|
||||
} from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { renderQuota } from '../../../helpers';
|
||||
@@ -98,7 +100,7 @@ export const ResultImage = ({ task, index, onRefresh, className, alt }) => {
|
||||
<Button
|
||||
size='small'
|
||||
theme='borderless'
|
||||
icon={<RefreshCw size={12} aria-hidden='true' />}
|
||||
icon={<ActionRefreshCw size={12} aria-hidden='true' />}
|
||||
loading={busy}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
@@ -372,7 +374,7 @@ const WorkCard = ({
|
||||
>
|
||||
<button
|
||||
type='button'
|
||||
className='wf-media'
|
||||
className='app-action-button wf-media'
|
||||
style={{ aspectRatio: String(ratio) }}
|
||||
onClick={handleMediaClick}
|
||||
aria-label={mediaLabel}
|
||||
@@ -402,7 +404,7 @@ const WorkCard = ({
|
||||
) : null}
|
||||
{selecting && selectable ? (
|
||||
<span className='wf-check' aria-hidden='true'>
|
||||
{selected ? <Check size={14} /> : null}
|
||||
{selected ? <ActionCheck size={14} /> : null}
|
||||
</span>
|
||||
) : null}
|
||||
</button>
|
||||
@@ -422,13 +424,18 @@ const WorkCard = ({
|
||||
{!active ? (
|
||||
<button
|
||||
type='button'
|
||||
className={`wf-icon-btn${task.favorited ? ' is-on' : ''}`}
|
||||
className={[
|
||||
'app-action-button',
|
||||
`wf-icon-btn${task.favorited ? ' is-on' : ''}`,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')}
|
||||
aria-pressed={task.favorited}
|
||||
aria-label={task.favorited ? t('取消收藏') : t('收藏')}
|
||||
title={task.favorited ? t('取消收藏') : t('收藏')}
|
||||
onClick={() => onFavorite?.(task)}
|
||||
>
|
||||
<Star
|
||||
<ActionStar
|
||||
size={15}
|
||||
aria-hidden='true'
|
||||
fill={task.favorited ? 'currentColor' : 'none'}
|
||||
@@ -456,11 +463,11 @@ const WorkCard = ({
|
||||
>
|
||||
<button
|
||||
type='button'
|
||||
className='wf-icon-btn'
|
||||
className='app-action-button wf-icon-btn'
|
||||
aria-label={t('更多操作')}
|
||||
title={t('更多操作')}
|
||||
>
|
||||
<MoreHorizontal size={15} aria-hidden='true' />
|
||||
<ActionMoreHorizontal size={15} aria-hidden='true' />
|
||||
</button>
|
||||
</Dropdown>
|
||||
) : null}
|
||||
|
||||
@@ -17,9 +17,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import {
|
||||
Star as ActionStar,
|
||||
Copy as ActionCopy,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { Button, SideSheet, Spin } from '@/components/ui';
|
||||
import { Copy, Star } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { ERROR_ACTIONS } from '../../../helpers/creationError';
|
||||
@@ -292,7 +295,7 @@ const WorkDetailDrawer = ({
|
||||
{!active ? (
|
||||
<Button
|
||||
icon={
|
||||
<Star
|
||||
<ActionStar
|
||||
size={14}
|
||||
aria-hidden='true'
|
||||
fill={task.favorited ? 'currentColor' : 'none'}
|
||||
@@ -329,7 +332,7 @@ const WorkDetailDrawer = ({
|
||||
<Button
|
||||
size='small'
|
||||
theme='borderless'
|
||||
icon={<Copy size={12} aria-hidden='true' />}
|
||||
icon={<ActionCopy size={12} aria-hidden='true' />}
|
||||
onClick={async () => {
|
||||
if (await copy(task.prompt)) showSuccess(t('已复制'));
|
||||
}}
|
||||
|
||||
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { Image as TemplateImageIcon } from '@/components/common/icons/ActionIcons';
|
||||
import React, {
|
||||
useCallback,
|
||||
useEffect,
|
||||
@@ -31,7 +32,6 @@ import {
|
||||
Dices,
|
||||
Download,
|
||||
Film,
|
||||
ImageIcon,
|
||||
ImagePlus,
|
||||
PenLine,
|
||||
RotateCcw,
|
||||
@@ -144,7 +144,7 @@ const useNow = (enabled) => {
|
||||
const TemplateWall = ({ kind, onApply, onStart }) => {
|
||||
const { t } = useTranslation();
|
||||
const groups = useMemo(() => templateGroupsOf(kind), [kind]);
|
||||
const Icon = kind === 'video' ? Clapperboard : ImageIcon;
|
||||
const Icon = kind === 'video' ? Clapperboard : TemplateImageIcon;
|
||||
return (
|
||||
<div className='wf-wall'>
|
||||
<div className='wf-wall-head'>
|
||||
|
||||
@@ -17,9 +17,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import {
|
||||
RotateCcw as ActionRotateCcw,
|
||||
X as ActionX,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useRef, useState } from 'react';
|
||||
import { Spin, Tooltip } from '@/components/ui';
|
||||
import { ImagePlus, RotateCcw, X } from 'lucide-react';
|
||||
import { ImagePlus } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import './creation-params.css';
|
||||
|
||||
@@ -204,13 +208,13 @@ const ImageSlot = ({
|
||||
{onRetry ? (
|
||||
<button
|
||||
type='button'
|
||||
className='cp-slot-action'
|
||||
className='app-action-button cp-slot-action'
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
onRetry();
|
||||
}}
|
||||
>
|
||||
<RotateCcw size={14} aria-hidden='true' />
|
||||
<ActionRotateCcw size={14} aria-hidden='true' />
|
||||
<span>{t('重试')}</span>
|
||||
</button>
|
||||
) : null}
|
||||
@@ -224,7 +228,7 @@ const ImageSlot = ({
|
||||
{status !== 'empty' && onRemove && !disabled ? (
|
||||
<button
|
||||
type='button'
|
||||
className='cp-slot-remove'
|
||||
className='app-action-button cp-slot-remove'
|
||||
aria-label={t('移除{{label}}', { label: labelText })}
|
||||
title={t('移除')}
|
||||
onClick={(e) => {
|
||||
@@ -232,7 +236,7 @@ const ImageSlot = ({
|
||||
onRemove();
|
||||
}}
|
||||
>
|
||||
<X size={14} aria-hidden='true' />
|
||||
<ActionX size={14} aria-hidden='true' />
|
||||
</button>
|
||||
) : null}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ const SeedInput = ({ param, value, onChange, disabledReason }) => {
|
||||
/>
|
||||
<button
|
||||
type='button'
|
||||
className='cp-icon-btn'
|
||||
className='app-action-button cp-icon-btn'
|
||||
disabled={disabled}
|
||||
aria-label={t('随机生成一个种子并锁定')}
|
||||
title={t('随机生成一个种子并锁定')}
|
||||
|
||||
Reference in New Issue
Block a user