Skip to content

Commit

Permalink
chore(monorepo): theme and logger
Browse files Browse the repository at this point in the history
  • Loading branch information
Novout committed Dec 19, 2021
1 parent 47f26b9 commit d00e632
Show file tree
Hide file tree
Showing 52 changed files with 4,597 additions and 480 deletions.
7 changes: 4 additions & 3 deletions packages/better-write-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@
"@vueuse/integrations": "7.3.0",
"@vueuse/motion": "2.0.0-beta.4",
"autoprefixer": "10.4.0",
"better-write-entity": "^0.11.0",
"better-write-plugin-core": "^0.11.0",
"better-write-types": "^0.11.0",
"better-write-entity": "0.11.0",
"better-write-plugin-core": "0.11.0",
"better-write-plugin-logger": "0.11.0",
"better-write-types": "0.11.0",
"date-fns": "2.27.0",
"docx": "7.2.0",
"dropbox": "10.23.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/better-write-app/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import { onBeforeUnmount } from 'vue'
import { useStart } from '@/use/start'
import { useDestroy } from '@/use/destroy'
import { LoggerPlugin } from './plugin/logger'
import { ThemePlugin } from './plugin/theme'
import { LoggerPlugin } from 'better-write-plugin-logger'
import { ThemePlugin } from 'better-write-plugin-theme'
const start = useStart()
const destroy = useDestroy()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import { useRouter } from 'vue-router'
import { useEditorStore } from '@/store/editor'
import { computed, watch, ref } from 'vue'
import { setEditorLogo } from '@/plugin/theme/external'
import { setEditorLogo } from 'better-write-plugin-theme'
import { Cycle } from 'better-write-plugin-core'
import { useUtils } from '@/use/utils'
Expand All @@ -34,11 +34,11 @@
const theme = computed(() => EDITOR.configuration.theme)
Cycle.onAfterMounted(() => {
path.value = setEditorLogo(theme.value)
path.value = setEditorLogo(theme.value, useUtils())
})
watch(theme, (_theme) => {
path.value = setEditorLogo(_theme)
path.value = setEditorLogo(_theme, useUtils())
})
const onClick = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@
import { useAbsoluteStore } from '@/store/absolute'
import { useLocalStorage } from '@/use/storage/local'
import { useDefines } from '@/use/defines'
import { ThemeNormalize } from '@/plugin/theme/utils'
import { setContentTheme } from '@/plugin/theme/external'
import { usePlugin } from 'better-write-plugin-core'
const ABSOLUTE = useAbsoluteStore()
const EDITOR = useEditorStore()
const local = useLocalStorage()
const plugin = usePlugin()
const { t, locale } = useI18n()
Expand All @@ -66,10 +66,8 @@
})
})
watch(theme, (_theme) => {
const value = ThemeNormalize(_theme)
setContentTheme(value)
watch(theme, () => {
plugin.emit('plugin-theme-set')
})
const convert = (iso: string) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;400;700&family=Raleway:wght@200;400;700&display=swap');

@import url('./plugin/theme/inject.css');

* {
margin: 0;
padding: 0;
Expand Down
File renamed without changes.
5 changes: 3 additions & 2 deletions packages/better-write-app/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ import i18n from './lang'

import App from './App.vue'

import './preset.css'
import './tailwind.css'
import './css/preset.css'
import './css/tailwind.css'
import './css/inject.css'
import 'v-tooltip/dist/v-tooltip.css'
import 'vue-toastification/dist/index.css'

Expand Down
118 changes: 0 additions & 118 deletions packages/better-write-app/src/plugin/logger/actions.ts

This file was deleted.

7 changes: 0 additions & 7 deletions packages/better-write-app/src/plugin/logger/index.ts

This file was deleted.

Loading

0 comments on commit d00e632

Please sign in to comment.