Skip to content

Commit

Permalink
debug finished
Browse files Browse the repository at this point in the history
  • Loading branch information
{Shore} committed Dec 13, 2023
1 parent ac14f5d commit 0d8c06a
Show file tree
Hide file tree
Showing 7 changed files with 185 additions and 106 deletions.
4 changes: 2 additions & 2 deletions src/components/tabitems/font/FontCustomizer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ const FontCustomizer = () => {
<IconButton
icon={<BoldOutlined />}
cssKey={'font-weight'}
actualValue={'700'}
defaultValue={'400'}
actualValue={'bold'}
defaultValue={'normal'}
id={103}
onChange={onChange}
/>
Expand Down
6 changes: 4 additions & 2 deletions src/components/tabitems/layer/LayerCustomizer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Tree, Button } from 'antd';
import { getStyleLayer } from '../../../features/style_layer';
import { ElementSelectionContext } from '../../../contexts/ElementSelectionContext';
import { getAbsoluteCSSSelector } from '../../../utils/CSSUtils';
import { deleteFromAry } from '../../../features/formatter';
import { deleteCssCommandGenerator } from '../../../features/formatter';
import t from '../../../features/translator';
import { updateFormat } from '../../../features/prop';
import { saveFormat } from '../../../features/format_manager';
Expand Down Expand Up @@ -86,7 +86,9 @@ const LayerCustomizer = () => {
id: string | number,
) => {
(async () => {
deleteFromAry(selector, cssKey, id, prop);
const c = deleteCssCommandGenerator(selector, cssKey, id, prop);
if (!c) return;
await c.execute();
updateFormat(selector, cssKey, prop);
await saveFormat(prop);
})();
Expand Down
4 changes: 1 addition & 3 deletions src/features/format_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ export const saveImediately = async (prop: IPropsContext): Promise<any> => {
};

export const save = async (ary: FormatBlockByURL[]) => {
await chrome.storage.local.set({ formats: JSON.stringify(ary) }).then(() => {
resta_console.log('save', ary);
});
await chrome.storage.local.set({ formats: JSON.stringify(ary) });
};

/**
Expand Down
Loading

0 comments on commit 0d8c06a

Please sign in to comment.