mirror of
https://github.com/marktext/marktext.git
synced 2025-05-02 11:32:13 +08:00

* Experimental spellchecker for testing purpose * Fix 'apache' license validation * Use local electron-spellchecker for development * Add settings and bug fixes * Fix Hunspell switchLanguage bug and improvements * Fix attach to editor when enabling spell check again * Add Hunspell license * Copy default Huspell dictionary on first start * Fix full language name * Some code improvements * Allow to add words to user dict and bug fixes * Allow to change Muya's spellcheck container attribute * feat: Don't underline misspelled words * Allow to set Hunspell on macOS * Fix spellchecker changed value * Refactor switchLanguage, init and enableSpellchecker * Refactor and some fixes * Code improvements * electron-spellchecker cleanup and optimization * Disable automatic language detection for Hunspell * Fix init on macOS and update JSDoc * Fix macOS issues and some improvements * Load single settings value only * Fix rebase * Remove debug code * Move electron-spellchecker to scoped npm repo * Fix dictionary of ignored words on macOS * Move replaceWordInline to core API * Remove comment block * Fix upstream lint error
109 lines
2.0 KiB
JavaScript
109 lines
2.0 KiB
JavaScript
import Vue from 'vue'
|
|
import VueElectron from 'vue-electron'
|
|
import sourceMapSupport from 'source-map-support'
|
|
import bootstrapRenderer from './bootstrap'
|
|
import VueRouter from 'vue-router'
|
|
import lang from 'element-ui/lib/locale/lang/en'
|
|
import locale from 'element-ui/lib/locale'
|
|
import axios from './axios'
|
|
import store from './store'
|
|
import './assets/symbolIcon'
|
|
import {
|
|
Dialog,
|
|
Form,
|
|
FormItem,
|
|
InputNumber,
|
|
Button,
|
|
Tooltip,
|
|
Upload,
|
|
Slider,
|
|
Checkbox,
|
|
ColorPicker,
|
|
Col,
|
|
Row,
|
|
Tree,
|
|
Autocomplete,
|
|
Switch,
|
|
Select,
|
|
Option,
|
|
Radio,
|
|
RadioGroup,
|
|
Table,
|
|
TableColumn,
|
|
Tabs,
|
|
TabPane,
|
|
Input
|
|
} from 'element-ui'
|
|
import services from './services'
|
|
import routes from './router'
|
|
import { addElementStyle } from '@/util/theme'
|
|
|
|
import './assets/styles/index.css'
|
|
import './assets/styles/printService.css'
|
|
|
|
// -----------------------------------------------
|
|
|
|
// Decode source map in production - must be registered first
|
|
sourceMapSupport.install({
|
|
environment: 'node',
|
|
handleUncaughtExceptions: false,
|
|
hookRequire: false
|
|
})
|
|
|
|
global.marktext = {}
|
|
bootstrapRenderer()
|
|
|
|
addElementStyle()
|
|
|
|
// -----------------------------------------------
|
|
// Be careful when changing code before this line!
|
|
|
|
// Configure Vue
|
|
locale.use(lang)
|
|
|
|
Vue.use(Dialog)
|
|
Vue.use(Form)
|
|
Vue.use(FormItem)
|
|
Vue.use(InputNumber)
|
|
Vue.use(Button)
|
|
Vue.use(Tooltip)
|
|
Vue.use(Upload)
|
|
Vue.use(Slider)
|
|
Vue.use(Checkbox)
|
|
Vue.use(ColorPicker)
|
|
Vue.use(Col)
|
|
Vue.use(Row)
|
|
Vue.use(Tree)
|
|
Vue.use(Autocomplete)
|
|
Vue.use(Switch)
|
|
Vue.use(Select)
|
|
Vue.use(Option)
|
|
Vue.use(Radio)
|
|
Vue.use(RadioGroup)
|
|
Vue.use(Table)
|
|
Vue.use(TableColumn)
|
|
Vue.use(Tabs)
|
|
Vue.use(TabPane)
|
|
Vue.use(Input)
|
|
|
|
Vue.use(VueRouter)
|
|
|
|
Vue.use(VueElectron)
|
|
Vue.http = Vue.prototype.$http = axios
|
|
Vue.config.productionTip = false
|
|
|
|
services.forEach(s => {
|
|
Vue.prototype['$' + s.name] = s[s.name]
|
|
})
|
|
|
|
const router = new VueRouter({
|
|
routes: routes(global.marktext.env.type)
|
|
})
|
|
|
|
/* eslint-disable no-new */
|
|
new Vue({
|
|
store,
|
|
router,
|
|
template: '<router-view class="view"></router-view>'
|
|
}).$mount('#app')
|