mirror of
https://github.com/marktext/marktext.git
synced 2025-05-02 21:02:27 +08:00
opti: change the scroll bar background color
This commit is contained in:
parent
12c22ce588
commit
2e8149a9b3
@ -1 +0,0 @@
|
||||
wowowo wowowow
|
@ -239,7 +239,7 @@ const formatCtrl = ContentState => {
|
||||
end
|
||||
})
|
||||
}
|
||||
console.log(start, end)
|
||||
|
||||
this.cursor = { start, end }
|
||||
this.render()
|
||||
}
|
||||
|
@ -102,7 +102,6 @@ class ContentState {
|
||||
this.stateRender.render(blocks, cursor, activeBlocks, matches)
|
||||
if (isRenderCursor) this.setCursor()
|
||||
this.pre2CodeMirror()
|
||||
console.log('render')
|
||||
}
|
||||
|
||||
createBlock (type = 'p', text = '') {
|
||||
|
@ -203,7 +203,6 @@ const paragraphCtrl = ContentState => {
|
||||
const isBlockQuote = affiliation.slice(0, 2).filter(b => /blockquote/.test(b.type))
|
||||
if (isBlockQuote.length) {
|
||||
const quoteBlock = isBlockQuote[0]
|
||||
console.log(quoteBlock)
|
||||
const children = quoteBlock.children
|
||||
for (const child of children) {
|
||||
this.insertBefore(child, quoteBlock)
|
||||
|
@ -168,7 +168,6 @@ const tableBlockCtrl = ContentState => {
|
||||
|
||||
const handler = (row, column) => {
|
||||
const { row: oldRow, column: oldColumn } = table
|
||||
console.log(oldRow, oldColumn)
|
||||
const tBody = table.children[1]
|
||||
const tHead = table.children[0]
|
||||
const headerRow = tHead.children[0]
|
||||
|
@ -2,8 +2,17 @@ import fs from 'fs'
|
||||
import path from 'path'
|
||||
import { ipcMain, BrowserWindow } from 'electron'
|
||||
import { getMenuItem } from '../utils'
|
||||
/**
|
||||
* Set `__static` path to static files in production
|
||||
* https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-static-assets.html
|
||||
*/
|
||||
|
||||
if (process.env.NODE_ENV !== 'development') {
|
||||
global.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\')
|
||||
}
|
||||
|
||||
const THEME_PATH = path.join(__static, '/themes')
|
||||
|
||||
const THEME_PATH = path.resolve(__dirname, '../../editor/themes')
|
||||
const themeCSS = {}
|
||||
|
||||
export const selectTheme = (win, theme, themeCSS) => {
|
||||
@ -29,13 +38,10 @@ ipcMain.on('AGANI::ask-for-theme', e => {
|
||||
Promise.all(promises)
|
||||
.then(themes => {
|
||||
themes.forEach(t => {
|
||||
console.log(t)
|
||||
const { theme, data } = t
|
||||
themeCSS[theme] = data
|
||||
})
|
||||
const selectedTheme = getSelectTheme().label.toLowerCase()
|
||||
console.log(selectedTheme)
|
||||
console.log(themeCSS)
|
||||
selectTheme(win, selectedTheme, themeCSS)
|
||||
})
|
||||
} else {
|
||||
|
@ -6,14 +6,6 @@ import createWindow, { windows } from './createWindow'
|
||||
|
||||
const openFilesCache = []
|
||||
|
||||
/**
|
||||
* Set `__static` path to static files in production
|
||||
* https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-static-assets.html
|
||||
*/
|
||||
if (process.env.NODE_ENV !== 'development') {
|
||||
global.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\')
|
||||
}
|
||||
|
||||
const onReady = () => {
|
||||
if (openFilesCache.length) {
|
||||
openFilesCache.forEach(path => createWindow(path))
|
||||
|
@ -2,6 +2,5 @@ import { Menu } from 'electron'
|
||||
|
||||
export const getMenuItem = menuName => {
|
||||
const menus = Menu.getApplicationMenu()
|
||||
console.log(typeof menus.append)
|
||||
return menus.items.find(menu => menu.label === menuName)
|
||||
}
|
||||
|
@ -146,7 +146,6 @@
|
||||
bus.$on('find', this.handleFind)
|
||||
|
||||
this.editor.on('change', (markdown, wordCount, cursor) => {
|
||||
console.log(cursor)
|
||||
this.$store.dispatch('SAVE_FILE', { markdown, wordCount, cursor })
|
||||
})
|
||||
|
||||
|
@ -280,6 +280,7 @@
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
padding: 0 8px;
|
||||
background: rgb(252, 252, 252);
|
||||
}
|
||||
/* css for dark theme*/
|
||||
.dark {
|
||||
|
@ -15,6 +15,14 @@ body {
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
background: rgb(43, 43, 43);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: rgb(55, 55, 55);
|
||||
}
|
||||
|
||||
#ag-editor-id {
|
||||
max-width: 860px;
|
||||
margin: 0 auto;
|
Loading…
Reference in New Issue
Block a user