fix(style): dark style
This commit is contained in:
+1
-1
@@ -120,7 +120,7 @@ export default [
|
|||||||
name: '404',
|
name: '404',
|
||||||
path: '*',
|
path: '*',
|
||||||
key: '404',
|
key: '404',
|
||||||
layout: false,
|
hideInMenu: true,
|
||||||
component: './404'
|
component: './404'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
@@ -96,7 +96,7 @@ const AutoTooltip: React.FC<AutoTooltipProps> = ({
|
|||||||
...tooltipProps,
|
...tooltipProps,
|
||||||
destroyTooltipOnHide: false
|
destroyTooltipOnHide: false
|
||||||
}}
|
}}
|
||||||
title={isOverflowing || showTitle ? children : false}
|
title={isOverflowing || showTitle ? title || children : false}
|
||||||
>
|
>
|
||||||
{ghost ? (
|
{ghost ? (
|
||||||
<div ref={contentRef} style={tagStyle} data-overflow={isOverflowing}>
|
<div ref={contentRef} style={tagStyle} data-overflow={isOverflowing}>
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ const Scatter: React.FC<ChartProps> = (props) => {
|
|||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'item',
|
trigger: 'item',
|
||||||
borderWidth: 0,
|
borderWidth: 0,
|
||||||
backgroundColor: chartColorMap.colorBgBase,
|
backgroundColor: chartColorMap.splitLineColor,
|
||||||
borderColor: 'transparent',
|
borderColor: 'transparent',
|
||||||
formatter(params: any, callback?: (val: any) => any) {
|
formatter(params: any, callback?: (val: any) => any) {
|
||||||
const dataList = findOverlappingPoints(seriseDataList, params.data);
|
const dataList = findOverlappingPoints(seriseDataList, params.data);
|
||||||
|
|||||||
@@ -25,10 +25,11 @@ const useStyles = createStyles(({ token, css }) => ({
|
|||||||
|
|
||||||
const Footer: React.FC = () => {
|
const Footer: React.FC = () => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
const [modal, contextHolder] = Modal.useModal();
|
||||||
const { styles } = useStyles();
|
const { styles } = useStyles();
|
||||||
|
|
||||||
const showVersion = () => {
|
const showVersion = () => {
|
||||||
Modal.info({
|
modal.info({
|
||||||
...modalConfig,
|
...modalConfig,
|
||||||
width: 460,
|
width: 460,
|
||||||
content: <VersionInfo intl={intl} />
|
content: <VersionInfo intl={intl} />
|
||||||
@@ -36,32 +37,35 @@ const Footer: React.FC = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.footer}>
|
<>
|
||||||
<div className="footer-content">
|
{contextHolder}
|
||||||
<div className="footer-content-left">
|
<div className={styles.footer}>
|
||||||
<div className={styles['footer-content-left-text']}>
|
<div className="footer-content">
|
||||||
<Space size={4}>
|
<div className="footer-content-left">
|
||||||
<span>©</span>
|
<div className={styles['footer-content-left-text']}>
|
||||||
<span> {new Date().getFullYear()}</span>
|
<Space size={4}>
|
||||||
<span> {intl.formatMessage({ id: 'settings.company' })}</span>
|
<span>©</span>
|
||||||
</Space>
|
<span> {new Date().getFullYear()}</span>
|
||||||
<Space size={8} style={{ marginLeft: 18 }}>
|
<span> {intl.formatMessage({ id: 'settings.company' })}</span>
|
||||||
<Button
|
</Space>
|
||||||
type="link"
|
<Space size={8} style={{ marginLeft: 18 }}>
|
||||||
size="small"
|
<Button
|
||||||
href={externalLinks.documentation}
|
type="link"
|
||||||
target="_blank"
|
size="small"
|
||||||
>
|
href={externalLinks.documentation}
|
||||||
{intl.formatMessage({ id: 'common.button.help' })}
|
target="_blank"
|
||||||
</Button>
|
>
|
||||||
<Button type="link" size="small" onClick={showVersion}>
|
{intl.formatMessage({ id: 'common.button.help' })}
|
||||||
{getAtomStorage(GPUStackVersionAtom)?.version}
|
</Button>
|
||||||
</Button>
|
<Button type="link" size="small" onClick={showVersion}>
|
||||||
</Space>
|
{getAtomStorage(GPUStackVersionAtom)?.version}
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,39 @@ const InputWrapper = styled.div`
|
|||||||
top: 9px;
|
top: 9px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ============= input initial =============
|
||||||
|
.ant-input-outlined.ant-input-status-error:not(.ant-input-disabled) {
|
||||||
|
border: none;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-input-outlined.ant-input-status-error:not(.ant-input-disabled):focus,
|
||||||
|
.ant-input-outlined.ant-input-status-error:not(
|
||||||
|
.ant-input-disabled
|
||||||
|
):focus-within {
|
||||||
|
border: none;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-input-number-outlined.ant-input-number-status-error:not(
|
||||||
|
.ant-input-number-disabled
|
||||||
|
) {
|
||||||
|
border: none;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-input-number-outlined.ant-input-number-status-error:not(
|
||||||
|
.ant-input-number-disabled
|
||||||
|
):focus,
|
||||||
|
.ant-input-number-outlined.ant-input-number-status-error:not(
|
||||||
|
.ant-input-disabled
|
||||||
|
):focus-within {
|
||||||
|
border: none;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
// ============= input initial end =============
|
||||||
|
|
||||||
.seal-input-wrapper-disabled {
|
.seal-input-wrapper-disabled {
|
||||||
background-color: var(--ant-color-bg-container-disabled);
|
background-color: var(--ant-color-bg-container-disabled);
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ const SliderWrapper = styled.div`
|
|||||||
|
|
||||||
.ant-input-number-input {
|
.ant-input-number-input {
|
||||||
text-align: center !important;
|
text-align: center !important;
|
||||||
background-color: var(--color-white-1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ interface HeaderPrefixProps {
|
|||||||
indeterminate?: boolean;
|
indeterminate?: boolean;
|
||||||
selectAll?: boolean;
|
selectAll?: boolean;
|
||||||
hasColumns?: boolean;
|
hasColumns?: boolean;
|
||||||
|
disabled?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const HeaderPrefix: React.FC<HeaderPrefixProps> = (props) => {
|
const HeaderPrefix: React.FC<HeaderPrefixProps> = (props) => {
|
||||||
@@ -24,7 +25,8 @@ const HeaderPrefix: React.FC<HeaderPrefixProps> = (props) => {
|
|||||||
onExpandAll,
|
onExpandAll,
|
||||||
indeterminate,
|
indeterminate,
|
||||||
selectAll,
|
selectAll,
|
||||||
expandAll
|
expandAll,
|
||||||
|
disabled
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const handleToggleExpand = () => {
|
const handleToggleExpand = () => {
|
||||||
@@ -68,6 +70,7 @@ const HeaderPrefix: React.FC<HeaderPrefixProps> = (props) => {
|
|||||||
onChange={onSelectAll}
|
onChange={onSelectAll}
|
||||||
indeterminate={indeterminate}
|
indeterminate={indeterminate}
|
||||||
checked={selectAll}
|
checked={selectAll}
|
||||||
|
disabled={disabled}
|
||||||
></Checkbox>
|
></Checkbox>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
@@ -87,7 +90,9 @@ const HeaderPrefix: React.FC<HeaderPrefixProps> = (props) => {
|
|||||||
}
|
}
|
||||||
if (enableSelection) {
|
if (enableSelection) {
|
||||||
return (
|
return (
|
||||||
<div className="header-row-prefix-wrapper">{<Checkbox></Checkbox>}</div>
|
<div className="header-row-prefix-wrapper">
|
||||||
|
{<Checkbox disabled={disabled}></Checkbox>}
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ const Wrapper = styled.div<{ $token: any }>`
|
|||||||
--ant-table-cell-padding-block: ${(props) => props.$token.cellPaddingBlock}px;
|
--ant-table-cell-padding-block: ${(props) => props.$token.cellPaddingBlock}px;
|
||||||
--ant-table-header-border-radius: ${(props) =>
|
--ant-table-header-border-radius: ${(props) =>
|
||||||
props.$token.headerBorderRadius}px;
|
props.$token.headerBorderRadius}px;
|
||||||
--ant-table-header-split-color: ${(props) => props.$token.headerSplitColor};
|
--ant-table-header-split-color: ${(props) =>
|
||||||
|
props.$token.colorBorderSecondary};
|
||||||
--ant-table-row-selected-bg: ${(props) => props.$token.rowSelectedBg};
|
--ant-table-row-selected-bg: ${(props) => props.$token.rowSelectedBg};
|
||||||
--ant-table-row-selected-hover-bg: ${(props) =>
|
--ant-table-row-selected-hover-bg: ${(props) =>
|
||||||
props.$token.rowSelectedHoverBg};
|
props.$token.rowSelectedHoverBg};
|
||||||
@@ -47,7 +48,6 @@ const SealTable: React.FC<SealTableProps & { pagination: PaginationProps }> = (
|
|||||||
loadChildrenAPI
|
loadChildrenAPI
|
||||||
} = props;
|
} = props;
|
||||||
const { token } = theme.useToken();
|
const { token } = theme.useToken();
|
||||||
console.log('seal-table-props', token.Table);
|
|
||||||
const parsedColumns = useMemo(() => {
|
const parsedColumns = useMemo(() => {
|
||||||
if (columns) return columns;
|
if (columns) return columns;
|
||||||
|
|
||||||
@@ -137,7 +137,12 @@ const SealTable: React.FC<SealTableProps & { pagination: PaginationProps }> = (
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Wrapper $token={token.Table}>
|
<Wrapper
|
||||||
|
$token={{
|
||||||
|
...token.Table,
|
||||||
|
colorBorderSecondary: token.colorBorderSecondary
|
||||||
|
}}
|
||||||
|
>
|
||||||
<div className="seal-table-container">
|
<div className="seal-table-container">
|
||||||
<div className="header-row-wrapper">
|
<div className="header-row-wrapper">
|
||||||
<HeaderPrefix
|
<HeaderPrefix
|
||||||
@@ -148,6 +153,7 @@ const SealTable: React.FC<SealTableProps & { pagination: PaginationProps }> = (
|
|||||||
expandAll={expandAll}
|
expandAll={expandAll}
|
||||||
expandable={expandable}
|
expandable={expandable}
|
||||||
enableSelection={rowSelection?.enableSelection}
|
enableSelection={rowSelection?.enableSelection}
|
||||||
|
disabled={!props.dataSource?.length}
|
||||||
hasColumns={parsedColumns.length > 0}
|
hasColumns={parsedColumns.length > 0}
|
||||||
></HeaderPrefix>
|
></HeaderPrefix>
|
||||||
<Header onSort={onSort} columns={parsedColumns}></Header>
|
<Header onSort={onSort} columns={parsedColumns}></Header>
|
||||||
|
|||||||
@@ -1,10 +1,21 @@
|
|||||||
.table-header {
|
.table-header {
|
||||||
|
position: relative;
|
||||||
min-height: 20px;
|
min-height: 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
padding-inline: var(--ant-table-cell-padding-inline);
|
padding-inline: var(--ant-table-cell-padding-inline);
|
||||||
border-right: 1px solid var(--ant-table-header-split-color);
|
|
||||||
|
&::before {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
inset-inline-end: 0;
|
||||||
|
width: 1px;
|
||||||
|
height: 1.6em;
|
||||||
|
background-color: var(--ant-table-header-split-color);
|
||||||
|
transform: translateY(-50%);
|
||||||
|
content: '';
|
||||||
|
}
|
||||||
|
|
||||||
&-last {
|
&-last {
|
||||||
border-right: none;
|
border-right: none;
|
||||||
|
|||||||
+38
-49
@@ -94,9 +94,13 @@ html[data-theme='realDark'] {
|
|||||||
--color-bg-tooltip: #424242;
|
--color-bg-tooltip: #424242;
|
||||||
--color-editor-header-bg: #292929;
|
--color-editor-header-bg: #292929;
|
||||||
--color-progress-text: rgba(255, 255, 255, 80%);
|
--color-progress-text: rgba(255, 255, 255, 80%);
|
||||||
--color-modal-content-bg: #1f1f1f;
|
--color-modal-content-bg: #080808;
|
||||||
|
|
||||||
background: #141414;
|
background: #141414;
|
||||||
|
|
||||||
|
.ant-result-image {
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
@@ -118,6 +122,10 @@ body {
|
|||||||
|
|
||||||
// table
|
// table
|
||||||
.ant-table-wrapper {
|
.ant-table-wrapper {
|
||||||
|
.ant-table {
|
||||||
|
background: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
.ant-table-selection-column {
|
.ant-table-selection-column {
|
||||||
padding-inline-start: 16px !important;
|
padding-inline-start: 16px !important;
|
||||||
}
|
}
|
||||||
@@ -144,11 +152,21 @@ body {
|
|||||||
display: flex !important;
|
display: flex !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
tr > th {
|
.ant-table-thead {
|
||||||
border: none;
|
tr {
|
||||||
padding-block: 0;
|
background-color: var(--ant-color-fill-tertiary);
|
||||||
height: 50px;
|
|
||||||
background-color: var(--ant-color-fill-tertiary);
|
> th {
|
||||||
|
border: none;
|
||||||
|
padding-block: 0;
|
||||||
|
height: 50px;
|
||||||
|
background-color: transparent;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
transition: none !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tr > td {
|
tr > td {
|
||||||
@@ -157,46 +175,17 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// input
|
.ant-input-outlined,
|
||||||
// .ant-input-css-var.ant-input {
|
.ant-input-number,
|
||||||
// height: 40px;
|
.ant-select-selector {
|
||||||
// }
|
background: transparent !important;
|
||||||
|
|
||||||
// .ant-input-outlined,
|
|
||||||
// .ant-input-affix-wrapper,
|
|
||||||
// .ant-picker {
|
|
||||||
// height: 40px;
|
|
||||||
// }
|
|
||||||
|
|
||||||
.ant-input-outlined.ant-input-status-error:not(.ant-input-disabled) {
|
|
||||||
border: none;
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-input-outlined.ant-input-status-error:not(.ant-input-disabled):focus,
|
// set for the non-form item
|
||||||
.ant-input-outlined.ant-input-status-error:not(
|
.ant-input-outlined,
|
||||||
.ant-input-disabled
|
.ant-input-affix-wrapper,
|
||||||
):focus-within {
|
.ant-picker {
|
||||||
border: none;
|
height: 40px;
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
// input number
|
|
||||||
.ant-input-number-outlined.ant-input-number-status-error:not(
|
|
||||||
.ant-input-number-disabled
|
|
||||||
) {
|
|
||||||
border: none;
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-input-number-outlined.ant-input-number-status-error:not(
|
|
||||||
.ant-input-number-disabled
|
|
||||||
):focus,
|
|
||||||
.ant-input-number-outlined.ant-input-number-status-error:not(
|
|
||||||
.ant-input-disabled
|
|
||||||
):focus-within {
|
|
||||||
border: none;
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// form item help
|
// form item help
|
||||||
@@ -261,10 +250,6 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-table-wrapper .ant-table {
|
|
||||||
background-color: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ant-table-content table {
|
.ant-table-content table {
|
||||||
.ant-table-tbody {
|
.ant-table-tbody {
|
||||||
.ant-table-row {
|
.ant-table-row {
|
||||||
@@ -732,7 +717,11 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: var(--ant-color-link-hover);
|
color: var(--ant-blue);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: var(--ant-blue-5);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ export default (props: any) => {
|
|||||||
const { initialize: initialize } = useOverlayScroller({
|
const { initialize: initialize } = useOverlayScroller({
|
||||||
defer: false
|
defer: false
|
||||||
});
|
});
|
||||||
|
const [modal, contextHolder] = Modal.useModal();
|
||||||
const { themeData, setTheme, userSettings, isDarkTheme } = useUserSettings();
|
const { themeData, setTheme, userSettings, isDarkTheme } = useUserSettings();
|
||||||
const { saveScrollHeight, restoreScrollHeight } = useBodyScroll();
|
const { saveScrollHeight, restoreScrollHeight } = useBodyScroll();
|
||||||
const { initialize: initializeMenu } = useOverlayScroller();
|
const { initialize: initializeMenu } = useOverlayScroller();
|
||||||
@@ -132,7 +133,7 @@ export default (props: any) => {
|
|||||||
|
|
||||||
const showVersion = () => {
|
const showVersion = () => {
|
||||||
saveScrollHeight();
|
saveScrollHeight();
|
||||||
Modal.info({
|
modal.info({
|
||||||
...modalConfig,
|
...modalConfig,
|
||||||
width: 460,
|
width: 460,
|
||||||
content: <VersionInfo intl={intl} />,
|
content: <VersionInfo intl={intl} />,
|
||||||
@@ -477,6 +478,7 @@ export default (props: any) => {
|
|||||||
)}
|
)}
|
||||||
</Exception>
|
</Exception>
|
||||||
</ProLayout>
|
</ProLayout>
|
||||||
|
{contextHolder}
|
||||||
</ConfigProvider>
|
</ConfigProvider>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -238,5 +238,6 @@ export default {
|
|||||||
'common.appearance': 'Appearance',
|
'common.appearance': 'Appearance',
|
||||||
'common.appearance.dark': 'Dark',
|
'common.appearance.dark': 'Dark',
|
||||||
'common.appearance.light': 'Light',
|
'common.appearance.light': 'Light',
|
||||||
'common.appearance.system': 'System Default'
|
'common.appearance.system': 'System Default',
|
||||||
|
'common.exception.404': 'Sorry, the page you visited does not exist.'
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -238,7 +238,8 @@ export default {
|
|||||||
'common.appearance': 'Appearance',
|
'common.appearance': 'Appearance',
|
||||||
'common.appearance.dark': 'Dark',
|
'common.appearance.dark': 'Dark',
|
||||||
'common.appearance.light': 'Light',
|
'common.appearance.light': 'Light',
|
||||||
'common.appearance.system': 'System Default'
|
'common.appearance.system': 'System Default',
|
||||||
|
'common.exception.404': 'Sorry, the page you visited does not exist.'
|
||||||
};
|
};
|
||||||
|
|
||||||
// ========== To-Do: Translate Keys (Remove After Translation) ==========
|
// ========== To-Do: Translate Keys (Remove After Translation) ==========
|
||||||
@@ -246,4 +247,5 @@ export default {
|
|||||||
// 2. 'common.appearance.light': 'Light',
|
// 2. 'common.appearance.light': 'Light',
|
||||||
// 3. 'common.appearance.system': 'System Default',
|
// 3. 'common.appearance.system': 'System Default',
|
||||||
// 4. 'common.appearance': 'Appearance',
|
// 4. 'common.appearance': 'Appearance',
|
||||||
|
// 5. 'common.exception.404': 'Sorry, the page you visited does not exist.'
|
||||||
// ========== End of To-Do List ==========
|
// ========== End of To-Do List ==========
|
||||||
|
|||||||
@@ -236,9 +236,10 @@ export default {
|
|||||||
'common.appearance': 'Внешний вид',
|
'common.appearance': 'Внешний вид',
|
||||||
'common.appearance.dark': 'Темная',
|
'common.appearance.dark': 'Темная',
|
||||||
'common.appearance.light': 'Светлая',
|
'common.appearance.light': 'Светлая',
|
||||||
'common.appearance.system': 'Как в системе'
|
'common.appearance.system': 'Как в системе',
|
||||||
|
'common.exception.404': 'Sorry, the page you visited does not exist.'
|
||||||
};
|
};
|
||||||
|
|
||||||
// ========== To-Do: Translate Keys (Remove After Translation) ==========
|
// ========== To-Do: Translate Keys (Remove After Translation) ==========
|
||||||
|
// 1. 'common.exception.404': 'Sorry, the page you visited does not exist.'
|
||||||
// ========== End of To-Do List ==========
|
// ========== End of To-Do List ==========
|
||||||
|
|||||||
@@ -233,5 +233,6 @@ export default {
|
|||||||
'common.appearance': '外观',
|
'common.appearance': '外观',
|
||||||
'common.appearance.dark': '深色',
|
'common.appearance.dark': '深色',
|
||||||
'common.appearance.light': '浅色',
|
'common.appearance.light': '浅色',
|
||||||
'common.appearance.system': '跟随系统'
|
'common.appearance.system': '跟随系统',
|
||||||
|
'common.exception.404': '抱歉,你访问的页面不存在'
|
||||||
};
|
};
|
||||||
|
|||||||
+12
-14
@@ -1,18 +1,16 @@
|
|||||||
import { history } from '@umijs/max';
|
import { useIntl } from '@umijs/max';
|
||||||
import { Button, Result } from 'antd';
|
import { Result } from 'antd';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
const NoFoundPage: React.FC = () => (
|
const NoFoundPage: React.FC = () => {
|
||||||
<Result
|
const intl = useIntl();
|
||||||
status="404"
|
return (
|
||||||
title="404"
|
<Result
|
||||||
subTitle="Sorry, the page you visited does not exist."
|
status="404"
|
||||||
extra={
|
title="404"
|
||||||
<Button type="primary" onClick={() => history.push('/')}>
|
subTitle={intl.formatMessage({ id: 'common.exception.404' })}
|
||||||
Back Home
|
/>
|
||||||
</Button>
|
);
|
||||||
}
|
};
|
||||||
/>
|
|
||||||
);
|
|
||||||
|
|
||||||
export default NoFoundPage;
|
export default NoFoundPage;
|
||||||
|
|||||||
@@ -154,6 +154,7 @@ const AddModal: FC<AddModalProps> = (props) => {
|
|||||||
|
|
||||||
const handleOnSelectModel = (item: any, evaluate?: boolean) => {
|
const handleOnSelectModel = (item: any, evaluate?: boolean) => {
|
||||||
setSelectedModel(item);
|
setSelectedModel(item);
|
||||||
|
console.log('item.isGGUF=========>', item.isGGUF);
|
||||||
if (!item.isGGUF) {
|
if (!item.isGGUF) {
|
||||||
setIsGGUF(false);
|
setIsGGUF(false);
|
||||||
form.current?.form?.resetFields(resetFields);
|
form.current?.form?.resetFields(resetFields);
|
||||||
|
|||||||
@@ -489,7 +489,8 @@ export const updateExcludeFields = [
|
|||||||
'ollama_library_model_name',
|
'ollama_library_model_name',
|
||||||
'scheduleType',
|
'scheduleType',
|
||||||
'backend',
|
'backend',
|
||||||
'gpu_selector'
|
'gpu_selector',
|
||||||
|
'categories'
|
||||||
];
|
];
|
||||||
|
|
||||||
export const formFields = [
|
export const formFields = [
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import Bg2 from '@/assets/images/bg-2.png';
|
import Bg2 from '@/assets/images/bg-2.png';
|
||||||
|
import GridBg from '@/assets/images/grid_background_1920x1080.png';
|
||||||
import { userAtom } from '@/atoms/user';
|
import { userAtom } from '@/atoms/user';
|
||||||
import Footer from '@/components/footer';
|
import Footer from '@/components/footer';
|
||||||
import useUserSettings from '@/hooks/use-user-settings';
|
import useUserSettings from '@/hooks/use-user-settings';
|
||||||
@@ -21,7 +22,7 @@ const Wrapper = styled.div<{ $isDarkTheme: boolean }>`
|
|||||||
z-index: -1;
|
z-index: -1;
|
||||||
background: ${({ $isDarkTheme }) =>
|
background: ${({ $isDarkTheme }) =>
|
||||||
$isDarkTheme
|
$isDarkTheme
|
||||||
? `repeating-linear-gradient(45deg, #000, transparent 120px)`
|
? `url(${GridBg}) center center /cover no-repeat`
|
||||||
: `url(${Bg2}) center center /cover no-repeat`};
|
: `url(${Bg2}) center center /cover no-repeat`};
|
||||||
opacity: ${({ $isDarkTheme }) => ($isDarkTheme ? 1 : 0.6)};
|
opacity: ${({ $isDarkTheme }) => ($isDarkTheme ? 1 : 0.6)};
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -80,7 +80,6 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
background-color: var(--ant-color-bg-elevated);
|
|
||||||
border-radius: var(--border-radius-base);
|
border-radius: var(--border-radius-base);
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
|
|||||||
@@ -154,8 +154,10 @@ const getWorkerName = (
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getModelInfo = (record: ListItem) => {
|
const getModelInfo = (record: ListItem) => {
|
||||||
|
const source = _.get(modelSourceMap, record.source, '');
|
||||||
if (record.source === modelSourceMap.huggingface_value) {
|
if (record.source === modelSourceMap.huggingface_value) {
|
||||||
return {
|
return {
|
||||||
|
source: `${source}/${record.huggingface_repo_id}`,
|
||||||
repo_id: record.huggingface_repo_id,
|
repo_id: record.huggingface_repo_id,
|
||||||
title: `${record.huggingface_repo_id}/${record.huggingface_filename}`,
|
title: `${record.huggingface_repo_id}/${record.huggingface_filename}`,
|
||||||
filename: record.huggingface_filename || record.huggingface_repo_id
|
filename: record.huggingface_filename || record.huggingface_repo_id
|
||||||
@@ -163,6 +165,7 @@ const getModelInfo = (record: ListItem) => {
|
|||||||
}
|
}
|
||||||
if (record.source === modelSourceMap.modelscope_value) {
|
if (record.source === modelSourceMap.modelscope_value) {
|
||||||
return {
|
return {
|
||||||
|
source: `${source}/${record.model_scope_model_id}`,
|
||||||
repo_id: record.model_scope_model_id,
|
repo_id: record.model_scope_model_id,
|
||||||
title: `${record.model_scope_model_id}/${record.model_scope_file_path}`,
|
title: `${record.model_scope_model_id}/${record.model_scope_file_path}`,
|
||||||
filename: record.model_scope_file_path || record.model_scope_model_id
|
filename: record.model_scope_file_path || record.model_scope_model_id
|
||||||
@@ -170,12 +173,14 @@ const getModelInfo = (record: ListItem) => {
|
|||||||
}
|
}
|
||||||
if (record.source === modelSourceMap.ollama_library_value) {
|
if (record.source === modelSourceMap.ollama_library_value) {
|
||||||
return {
|
return {
|
||||||
|
source: `${source}/${record.ollama_library_model_name}`,
|
||||||
repo_id: record.ollama_library_model_name,
|
repo_id: record.ollama_library_model_name,
|
||||||
title: record.ollama_library_model_name,
|
title: record.ollama_library_model_name,
|
||||||
filename: record.ollama_library_model_name
|
filename: record.ollama_library_model_name
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
source: `${source}${record.local_path}`,
|
||||||
repo_id: record.local_path,
|
repo_id: record.local_path,
|
||||||
title: record.local_path,
|
title: record.local_path,
|
||||||
filename: _.split(record.local_path, /[\\/]/).pop()
|
filename: _.split(record.local_path, /[\\/]/).pop()
|
||||||
@@ -551,11 +556,11 @@ const ModelFiles = () => {
|
|||||||
},
|
},
|
||||||
render: (text: string, record: ListItem) => {
|
render: (text: string, record: ListItem) => {
|
||||||
const modelInfo = getModelInfo(record);
|
const modelInfo = getModelInfo(record);
|
||||||
const { repo_id } = modelInfo;
|
const { repo_id, source } = modelInfo;
|
||||||
return (
|
return (
|
||||||
<TextWrapper>
|
<TextWrapper style={{ paddingRight: 8 }}>
|
||||||
<AutoTooltip ghost showTitle title={repo_id}>
|
<AutoTooltip ghost title={source}>
|
||||||
{_.get(modelSourceMap, record.source, '')}
|
{source}
|
||||||
</AutoTooltip>
|
</AutoTooltip>
|
||||||
</TextWrapper>
|
</TextWrapper>
|
||||||
);
|
);
|
||||||
@@ -586,7 +591,7 @@ const ModelFiles = () => {
|
|||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: 'resources.modelfiles.form.path' }),
|
title: intl.formatMessage({ id: 'resources.modelfiles.form.path' }),
|
||||||
dataIndex: 'resolved_paths',
|
dataIndex: 'resolved_paths',
|
||||||
width: '35%',
|
width: '30%',
|
||||||
ellipsis: {
|
ellipsis: {
|
||||||
showTitle: false
|
showTitle: false
|
||||||
},
|
},
|
||||||
@@ -597,6 +602,7 @@ const ModelFiles = () => {
|
|||||||
{
|
{
|
||||||
title: intl.formatMessage({ id: 'resources.modelfiles.size' }),
|
title: intl.formatMessage({ id: 'resources.modelfiles.size' }),
|
||||||
dataIndex: 'size',
|
dataIndex: 'size',
|
||||||
|
width: 100,
|
||||||
ellipsis: {
|
ellipsis: {
|
||||||
showTitle: false
|
showTitle: false
|
||||||
},
|
},
|
||||||
@@ -612,6 +618,7 @@ const ModelFiles = () => {
|
|||||||
title: intl.formatMessage({ id: 'common.table.createTime' }),
|
title: intl.formatMessage({ id: 'common.table.createTime' }),
|
||||||
dataIndex: 'created_at',
|
dataIndex: 'created_at',
|
||||||
sorter: false,
|
sorter: false,
|
||||||
|
width: 180,
|
||||||
ellipsis: {
|
ellipsis: {
|
||||||
showTitle: false
|
showTitle: false
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ const Wrapper = styled.div`
|
|||||||
.ant-page-header-heading {
|
.ant-page-header-heading {
|
||||||
padding-inline: 8px;
|
padding-inline: 8px;
|
||||||
}
|
}
|
||||||
|
.ant-tabs-nav .ant-tabs-tab-active,
|
||||||
|
.ant-tabs-tab {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const Resources = () => {
|
const Resources = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user