mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-09 10:50:24 +00:00
basic codes
remove useless
This commit is contained in:
36
frontend/src/components/repo-info-bar-migrate.js
Normal file
36
frontend/src/components/repo-info-bar-migrate.js
Normal file
@@ -0,0 +1,36 @@
|
||||
import React from 'react';
|
||||
import { Button } from 'reactstrap';
|
||||
import { gettext } from '../utils/constants';
|
||||
import { useMetadataStatus } from '../hooks';
|
||||
import { eventBus } from '../components/common/event-bus';
|
||||
import { EVENT_BUS_TYPE } from '../components/common/event-bus-type';
|
||||
|
||||
const RepoInfoBarMigrate = () => {
|
||||
|
||||
const { enableMetadata } = useMetadataStatus();
|
||||
|
||||
const openMigrate = () => {
|
||||
eventBus.dispatch(EVENT_BUS_TYPE.OPEN_TREE_PANEL, () => eventBus.dispatch(EVENT_BUS_TYPE.OPEN_LIBRARY_SETTINGS_TAGS));
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="repo-info-bar-migrate mt-2">
|
||||
{enableMetadata ?
|
||||
(
|
||||
<>
|
||||
{gettext('Tips: There are tags of old version. Please migrate tags to new version.')}
|
||||
<Button color="link" size="sm" tag="a" onClick={openMigrate}>{gettext('Migrate')}</Button>
|
||||
</>
|
||||
) :
|
||||
(
|
||||
<>{gettext('Tips: These are tags of old version. The feature is deprecated and can no longer be used.')}</>
|
||||
)
|
||||
}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
RepoInfoBarMigrate.propTypes = {
|
||||
};
|
||||
|
||||
export default RepoInfoBarMigrate;
|
Reference in New Issue
Block a user