Skip to content

Commit

Permalink
fix: wrong header footer icon
Browse files Browse the repository at this point in the history
  • Loading branch information
Jocs committed Oct 10, 2024
1 parent dd978cd commit d81e194
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
10 changes: 5 additions & 5 deletions packages/docs-ui/src/controllers/menu/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
* limitations under the License.
*/

import type { IAccessor, PresetListType } from '@univerjs/core';
import type { IMenuButtonItem, IMenuItem, IMenuSelectorItem } from '@univerjs/ui';
import type { Subscription } from 'rxjs';
import {
BaselineOffset,
BooleanNumber,
Expand All @@ -36,11 +39,8 @@ import {
getMenuHiddenObservable,
MenuItemType,
} from '@univerjs/ui';
import { combineLatest, map, Observable } from 'rxjs';
import type { IAccessor, PresetListType } from '@univerjs/core';
import type { IMenuButtonItem, IMenuItem, IMenuSelectorItem } from '@univerjs/ui';

import type { Subscription } from 'rxjs';
import { combineLatest, map, Observable } from 'rxjs';
import { OpenHeaderFooterPanelCommand } from '../../commands/commands/doc-header-footer.command';
import { ResetInlineFormatTextBackgroundColorCommand, SetInlineFormatBoldCommand, SetInlineFormatCommand, SetInlineFormatFontFamilyCommand, SetInlineFormatFontSizeCommand, SetInlineFormatItalicCommand, SetInlineFormatStrikethroughCommand, SetInlineFormatSubscriptCommand, SetInlineFormatSuperscriptCommand, SetInlineFormatTextBackgroundColorCommand, SetInlineFormatTextColorCommand, SetInlineFormatUnderlineCommand } from '../../commands/commands/inline-format.command';
import { BulletListCommand, CheckListCommand, getParagraphsInRange, OrderListCommand } from '../../commands/commands/list.command';
Expand Down Expand Up @@ -526,7 +526,7 @@ export function HeaderFooterMenuItemFactory(accessor: IAccessor): IMenuButtonIte
return {
id: OpenHeaderFooterPanelCommand.id,
type: MenuItemType.BUTTON,
icon: 'FreezeRowSingle',
icon: 'HeaderFooterSingle',
tooltip: 'toolbar.headerFooter',
hidden$: combineLatest(getMenuHiddenObservable(accessor, UniverInstanceType.UNIVER_DOC), getHeaderFooterMenuHiddenObservable(accessor), (one, two) => {
return one || two;
Expand Down
10 changes: 6 additions & 4 deletions packages/ui/src/common/component-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
* limitations under the License.
*/

import type { IDisposable } from '@univerjs/core';
import type React from 'react';
import type { defineComponent } from 'vue';
import { toDisposable } from '@univerjs/core';

import {
AddDigitsSingle,
AdjustHeight,
Expand Down Expand Up @@ -58,6 +62,7 @@ import {
FreezeToSelectedSingle,
FunctionSingle,
GridSingle,
HeaderFooterSingle,
Hide,
HorizontalBorder,
HorizontallySingle,
Expand Down Expand Up @@ -118,10 +123,6 @@ import {
VerticalIntegrationSingle,
VerticalTextSingle,
} from '@univerjs/icons';
import type { IDisposable } from '@univerjs/core';
import type { defineComponent } from 'vue';

import type React from 'react';
import { cloneElement, createElement, useEffect, useRef } from 'react';

type ComponentFramework = 'vue3' | 'react';
Expand Down Expand Up @@ -230,6 +231,7 @@ export class ComponentManager {
FreezeColumnSingle,
FreezeRowSingle,
GridSingle,
HeaderFooterSingle,
FreezeToSelectedSingle,
CodeSingle,
FontSizeIncreaseSingle,
Expand Down

0 comments on commit d81e194

Please sign in to comment.