Skip to content

Commit

Permalink
fix(projects): fixed tab not switching colors when switching color th…
Browse files Browse the repository at this point in the history
…emes
  • Loading branch information
mufeng889 committed Aug 8, 2024
1 parent bc23e18 commit 5afba5e
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Changelog


## [v0.2.0](https://github.com/mufeng889/react-soybean-admin/compare/undefined...v0.2.0) (2024-08-08)

###    🚀 Features

- **.github**:
- add workflows &nbsp;-&nbsp; by **DESKTOP-31IBRMI\Administrator** [<samp>(d3e8c)</samp>](https://github.com/mufeng889/react-soybean-admin/commit/d3e8c65)
- **.npmr**:
- cancel Taobao mirror address &nbsp;-&nbsp; by **DESKTOP-31IBRMI\Administrator** [<samp>(1f90f)</samp>](https://github.com/mufeng889/react-soybean-admin/commit/1f90f11)
- **pachages**:
- add parse query & stringify query &nbsp;-&nbsp; by **wang** [<samp>(c0134)</samp>](https://github.com/mufeng889/react-soybean-admin/commit/c0134c7)
- **packages**:
- add route Transition animation &nbsp;-&nbsp; by **wang** [<samp>(da94e)</samp>](https://github.com/mufeng889/react-soybean-admin/commit/da94e7c)
- **projects**:
- init project &nbsp;-&nbsp; by **DESKTOP-31IBRMI\Administrator** [<samp>(651d3)</samp>](https://github.com/mufeng889/react-soybean-admin/commit/651d3bb)
- add configuration &nbsp;-&nbsp; by **DESKTOP-31IBRMI\Administrator** [<samp>(6c976)</samp>](https://github.com/mufeng889/react-soybean-admin/commit/6c976ba)
- remove restrictions on locked files &nbsp;-&nbsp; by **DESKTOP-31IBRMI\Administrator** [<samp>(9138d)</samp>](https://github.com/mufeng889/react-soybean-admin/commit/9138d77)
- perfect user interface &nbsp;-&nbsp; by **DESKTOP-31IBRMI\Administrator** [<samp>(1cc8a)</samp>](https://github.com/mufeng889/react-soybean-admin/commit/1cc8a60)
- add il18 for error boundary component &nbsp;-&nbsp; by **wang** [<samp>(8d6cc)</samp>](https://github.com/mufeng889/react-soybean-admin/commit/8d6cc79)

### &nbsp;&nbsp;&nbsp;🛠 Optimizations

- optimized code & remove useless code &nbsp;-&nbsp; by **wang** [<samp>(2ac61)</samp>](https://github.com/mufeng889/react-soybean-admin/commit/2ac611f)
- **projects**: place the error boundary under the root route & add the internationalized language of the login page &nbsp;-&nbsp; by **wang** [<samp>(1e4a1)</samp>](https://github.com/mufeng889/react-soybean-admin/commit/1e4a109)

### &nbsp;&nbsp;&nbsp;🏡 Chore

- **deps**:
- update deps &nbsp;-&nbsp; by **DESKTOP-31IBRMI\Administrator** [<samp>(beea6)</samp>](https://github.com/mufeng889/react-soybean-admin/commit/beea6ad)
- add deps vite-plugin-remove-console & optimize code style &nbsp;-&nbsp; by **wang** [<samp>(6387f)</samp>](https://github.com/mufeng889/react-soybean-admin/commit/6387f23)
- update deps &nbsp;-&nbsp; by **wang** [<samp>(965df)</samp>](https://github.com/mufeng889/react-soybean-admin/commit/965df84)

### &nbsp;&nbsp;&nbsp;🤖 CI

- **vercel**: add vercel profile &nbsp;-&nbsp; by **wang** [<samp>(8b275)</samp>](https://github.com/mufeng889/react-soybean-admin/commit/8b27596)

### &nbsp;&nbsp;&nbsp;❤️ Contributors


[wang](mailto:[email protected])

3 changes: 3 additions & 0 deletions src/layouts/modules/global-tab/ContextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ interface ContextMenuProps {
locale: App.I18n.LangType;
mode: UnionKey.ThemeTabMode;
i18nKey: App.Global.Tab['i18nKey'];
darkMode: boolean;
}

interface DropdownOption {
key: App.Global.DropdownKey;
label: string;
Expand All @@ -37,6 +39,7 @@ function getMenu(options: DropdownOption[]) {

function arePropsEqual(oldProps: Readonly<ContextMenuProps>, newProps: Readonly<ContextMenuProps>) {
if (oldProps.active !== newProps.active) return false;
if (oldProps.darkMode !== newProps.darkMode) return false;
if (oldProps.i18nKey !== newProps.i18nKey) return false;
if (oldProps.mode !== newProps.mode) return false;
if (oldProps.locale !== newProps.locale) return false;
Expand Down
1 change: 1 addition & 0 deletions src/layouts/modules/global-tab/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ const GlobalTab = memo(() => {
i18nKey={item.i18nKey}
active={item.id === activeTabId}
mode={themeSettings.tab.mode}
darkMode={darkMode}
>
<div id={item.id}>
<PageTab
Expand Down

0 comments on commit 5afba5e

Please sign in to comment.