diff --git a/main.ts b/main.ts index d0521ec..6496023 100644 --- a/main.ts +++ b/main.ts @@ -20,7 +20,8 @@ export default class TypingAsstPlugin extends Plugin { scrollArea?: Element; settings: ExamplePluginSettings; async loadSettings() { - this.settings = Object.assign({}, { showPlaceholder: true, cmdsSorting: HEADING_MENU }, await this.loadData()); + const initialMenu = HEADING_MENU.filter(item => item === 'insert-note-callout' || !item.includes("callout")); + this.settings = Object.assign({}, { showPlaceholder: true, cmdsSorting: initialMenu }, await this.loadData()); // console.log('commands======>', this.app.commands.commands) } @@ -201,7 +202,7 @@ export default class TypingAsstPlugin extends Plugin { this.commands = new CommandMenu({ scrollArea, onMenu: onMenuClick, - cmds:this.settings.cmdsSorting + cmds: this.settings.cmdsSorting }); this.btns?.remove(); diff --git a/manifest.json b/manifest.json index 59f68f9..a658cd2 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "typing-assistant", "name": "Typing Assistant", - "version": "0.2.2", + "version": "0.2.3", "minAppVersion": "0.15.0", "description": "Support multiple shortcut menus to improve input efficiency", "author": "Jambo", diff --git a/package.json b/package.json index 221d658..525d469 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "typing-assistant", - "version": "0.2.2", + "version": "0.2.3", "description": "Notion Assistant is a plugin that improves input efficiency and provides a user experience similar to that of【Notion】", "main": "main.js", "scripts": { diff --git a/src/components/plugin-setting.ts b/src/components/plugin-setting.ts index ff9fad0..97933bb 100644 --- a/src/components/plugin-setting.ts +++ b/src/components/plugin-setting.ts @@ -65,7 +65,8 @@ export class ExampleSettingTab extends PluginSettingTab { } else { HeaderItem = CmdsOff.createDiv({ cls: 'heading-item' }) } - setIcon(HeaderItem, CMD_CONFIG[cmd].icon); + const IconDiv = HeaderItem.createDiv({ cls: 'heading-item-icon' }) + setIcon(IconDiv, CMD_CONFIG[cmd].icon); new Setting(HeaderItem) .setName(CMD_CONFIG[cmd].title) .addToggle((component) => diff --git a/styles.css b/styles.css index 3229094..3838604 100644 --- a/styles.css +++ b/styles.css @@ -270,7 +270,14 @@ border-top: none; } } -.heading-item path { - fill: var(--color-base-100); - stroke: var(--color-base-100); -} + + +.heading-item-icon{ + display: flex; + align-items: center; + margin-right: 12px; + padding: 8px; + background-color: #f6f6f6; + border-radius: 3px; + box-shadow: var(--shadow-s); +} \ No newline at end of file