1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-09 10:50:24 +00:00

change file icons (#7100)

* change file icons

* detail panel use big icon
This commit is contained in:
Michael An
2024-11-25 20:19:44 +08:00
committed by GitHub
parent 4093c27ed7
commit d407c9fd63
24 changed files with 5 additions and 11 deletions

View File

@@ -15,7 +15,7 @@ const Header = ({ title, icon, iconSize = 32, onClose, component = {} }) => {
<span className="name ellipsis" title={title}>{title}</span> <span className="name ellipsis" title={title}>{title}</span>
</div> </div>
<div className="detail-control" onClick={onClose}> <div className="detail-control" onClick={onClose}>
{closeIcon ? closeIcon : (<Icon symbol="close" className="detail-control-close" />)} {closeIcon ? closeIcon : <Icon symbol="close" className="detail-control-close" />}
</div> </div>
</div> </div>
); );

View File

@@ -96,12 +96,9 @@ class DirentDetails extends React.Component {
render() { render() {
const { dirent, direntDetail } = this.state; const { dirent, direntDetail } = this.state;
const { repoID, path, fileTags } = this.props; const { repoID, path, fileTags } = this.props;
const direntName = dirent?.name || '';
const smallIconUrl = Utils.getDirentIcon(dirent);
return ( return (
<Detail> <Detail>
<Header title={direntName} icon={smallIconUrl} onClose={this.props.onClose} /> <Header title={dirent?.name || ''} icon={Utils.getDirentIcon(dirent, true)} onClose={this.props.onClose} />
<Body> <Body>
{this.renderImage()} {this.renderImage()}
{dirent && direntDetail && ( {dirent && direntDetail && (

View File

@@ -35,9 +35,6 @@ const EmbeddedFileDetails = ({ repoID, repoInfo, dirent, path, onClose, width =
// eslint-disable-next-line react-hooks/exhaustive-deps // eslint-disable-next-line react-hooks/exhaustive-deps
}, []); }, []);
const direntName = dirent?.name || '';
const smallIconUrl = Utils.getDirentIcon(dirent);
return ( return (
<div <div
className={classnames('cur-view-detail', className, { className={classnames('cur-view-detail', className, {
@@ -46,7 +43,7 @@ const EmbeddedFileDetails = ({ repoID, repoInfo, dirent, path, onClose, width =
})} })}
style={{ width }} style={{ width }}
> >
<Header title={direntName} icon={smallIconUrl} onClose={onClose} component={headerComponent} /> <Header title={dirent?.name || ''} icon={Utils.getDirentIcon(dirent, true)} onClose={onClose} component={headerComponent} />
<Body> <Body>
{dirent && direntDetail && ( {dirent && direntDetail && (
<div className="detail-content"> <div className="detail-content">

View File

@@ -14,7 +14,7 @@ import { CellType } from '../../metadata/constants';
const LibDetail = React.memo(({ currentRepoInfo, onClose }) => { const LibDetail = React.memo(({ currentRepoInfo, onClose }) => {
const [isLoading, setLoading] = useState(true); const [isLoading, setLoading] = useState(true);
const [repo, setRepo] = useState({}); const [repo, setRepo] = useState({});
const smallIconUrl = useMemo(() => Utils.getLibIconUrl(currentRepoInfo), [currentRepoInfo]); const libIconUrl = useMemo(() => Utils.getLibIconUrl(currentRepoInfo, true), [currentRepoInfo]);
const filesField = useMemo(() => ({ type: CellType.NUMBER, name: gettext('Files') }), []); const filesField = useMemo(() => ({ type: CellType.NUMBER, name: gettext('Files') }), []);
const sizeField = useMemo(() => ({ type: 'size', name: gettext('Size') }), []); const sizeField = useMemo(() => ({ type: 'size', name: gettext('Size') }), []);
const creatorField = useMemo(() => ({ type: CellType.CREATOR, name: gettext('Creator') }), []); const creatorField = useMemo(() => ({ type: CellType.CREATOR, name: gettext('Creator') }), []);
@@ -34,7 +34,7 @@ const LibDetail = React.memo(({ currentRepoInfo, onClose }) => {
return ( return (
<Detail> <Detail>
<Header title={currentRepoInfo.repo_name} icon={smallIconUrl} onClose={onClose} /> <Header title={currentRepoInfo.repo_name} icon={libIconUrl} onClose={onClose} />
<Body> <Body>
{isLoading ? {isLoading ?
<div className="w-100 h-100 d-flex algin-items-center justify-content-center"><Loading /></div> <div className="w-100 h-100 d-flex algin-items-center justify-content-center"><Loading /></div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB