diff --git a/directory/src/component/dropdown.jsx b/directory/src/component/dropdown.jsx
index 307ccce..b54ede2 100644
--- a/directory/src/component/dropdown.jsx
+++ b/directory/src/component/dropdown.jsx
@@ -24,6 +24,17 @@ export default function Dropdown(props) {
{
props.menu.map((item) => {
+ if (item.type === 'group') {
+ return (
+
+ )
+ }
return (
-
-
+
@@ -278,10 +279,58 @@ HeaderTabsElement.propTypes = {
item: PropTypes.object.isRequired,
}
-function HeaderReturnButton() {
+function HeaderButton() {
const navigate = useNavigate()
+ let location = useLocation();
+ const { operators } = useConfig()
+ const { language } = useLanguage()
- return useMemo(() => {
+ const fastNavigateDict = useMemo(() => {
+ const dict = {}
+ operators.forEach((item) => {
+ if (!(item.date in dict)) {
+ dict[item.date] = []
+ }
+ dict[item.date].push({
+ codename: item.codename,
+ link: item.link,
+ })
+ })
+ return dict
+ }, [operators])
+
+ const fastNavigateList = useMemo(() => {
+ const list = []
+ for (const [key, value] of Object.entries(fastNavigateDict)) {
+ list.push({
+ name: key,
+ value: null,
+ type: "group",
+ })
+ value.forEach((item) => {
+ list.push({
+ name: item.codename[language],
+ value: item.link,
+ type: "item",
+ })
+ })
+ }
+ return list
+ }, [fastNavigateDict, language])
+
+ if (location.pathname === routes.find((item) => item.index).path) {
+ return (
+
+ {
+ navigate(item.value)
+ }}
+ className={classes['operator-fast-navigate']}
+ />
+
+ )
+ } else {
return (
)
- }, [navigate])
+ }
}
\ No newline at end of file
diff --git a/directory/src/scss/root/Root.module.scss b/directory/src/scss/root/Root.module.scss
index 40c2e0d..909ab60 100644
--- a/directory/src/scss/root/Root.module.scss
+++ b/directory/src/scss/root/Root.module.scss
@@ -76,6 +76,13 @@
}
}
+ .operator-fast-navigate {
+ position: absolute;
+ right: -3rem;
+ bottom: -2rem;
+ font-size: 32px;
+ }
+
.return-button {
position: absolute;
right: -4rem;