Skip to content

Commit

Permalink
fix: Interface details
Browse files Browse the repository at this point in the history
  • Loading branch information
1943time committed Mar 7, 2024
1 parent 40b07cf commit 66bba10
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 18 deletions.
8 changes: 0 additions & 8 deletions src/main/appMenus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,6 @@ const getSystemMenus = () => {
{role: 'zoomIn', accelerator: 'Alt+Shift+=', label: 'Zoom In'},
{role: 'zoomOut', accelerator: 'Alt+Shift+-', label: 'Zoom Out'},
{type: 'separator'},
{
label: 'Search',
id: 'search',
accelerator: `${cmd}+f`,
click: e => {
BrowserWindow.getFocusedWindow()?.webContents.send('open-search')
}
},
{type: 'separator'},
{role: 'togglefullscreen'},
{role: 'reload'},
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/src/editor/tools/TableAttr.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {TableCellNode, TableNode, TableRowNode} from '../../el'
import {treeStore} from '../../store/tree'
import {EditorUtils} from '../utils/editorUtils'
import {useSubject} from '../../hooks/subscribe'
import {configStore} from '../../store/config'

export const TableAttr = observer(() => {
const store = useEditorStore()
Expand Down Expand Up @@ -179,7 +180,7 @@ export const TableAttr = observer(() => {

useEffect(() => {
resize()
}, [treeStore.size, store.openSearch, treeStore.tabs.length])
}, [treeStore.size, store.openSearch, treeStore.tabs.length, configStore.config.showLeading])

const insertRow = useCallback((path: Path, columns: number) => {
Transforms.insertNodes(editor, {
Expand Down
8 changes: 1 addition & 7 deletions src/renderer/src/store/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,6 @@ class ConfigStore {
this.visible = true
})
})
window.electron.ipcRenderer.on('changeConfig', action((e, key: any, value: any) => {
if (key === 'theme') {
this.setTheme(value, false)
}
this.config[key] = value
}))
}
async reloadHighlighter(refresh = false) {
try {
Expand Down Expand Up @@ -150,7 +144,7 @@ class ConfigStore {
}

toggleShowLeading() {
window.electron.ipcRenderer.send('toggleShowLeading')
this.setConfig('showLeading', !this.config.showLeading)
}

async setConfig<T extends keyof typeof this.config>(key: T, value: typeof this.config[T]) {
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/src/styles/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,11 @@ ol.m-list {
direction: ltr;
&.frontmatter{
&:before{
top:2px;
top:0;
content: 'Front Matter';
width: 100%;
height: 22px;
line-height: 21px;
color: rgba(255, 255, 255, .5);
position: absolute;
z-index: 10;
Expand All @@ -424,7 +425,6 @@ ol.m-list {
height: calc(100% - 24px);
}
pre {
position: relative;
padding-top: 32px;
}
}
Expand Down

0 comments on commit 66bba10

Please sign in to comment.