Skip to content

Commit

Permalink
chore(package): remove logger plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Novout committed Aug 26, 2022
1 parent 5e506a8 commit 8ebb9a7
Show file tree
Hide file tree
Showing 30 changed files with 4 additions and 2,459 deletions.
1 change: 0 additions & 1 deletion packages/better-write-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"better-write-plugin-exporter-pdf": "^0.16.14",
"better-write-plugin-exporter-txt": "^0.16.14",
"better-write-plugin-importer": "^0.16.14",
"better-write-plugin-logger": "^0.16.14",
"better-write-plugin-multiplayer": "^0.16.14",
"better-write-plugin-theme": "^0.16.14",
"better-write-types": "^0.16.14",
Expand Down
2 changes: 0 additions & 2 deletions packages/better-write-app/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

<script setup lang="ts">
import { useStart } from '@/use/start'
import { LoggerPlugin } from 'better-write-plugin-logger'
import { ThemePlugin } from 'better-write-plugin-theme'
import { ImporterPlugin } from 'better-write-plugin-importer'
import { PDFPlugin } from 'better-write-plugin-exporter-pdf'
Expand All @@ -18,7 +17,6 @@
const start = useStart()
start.init([
LoggerPlugin(),
ThemePlugin(),
ImporterPlugin(),
PDFPlugin(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@
@action="onSaveProjectSupabase"
/>
<EditorHeaderItemDiv v-if="PROJECT.name !== env.projectEmpty()" />
<EditorHeaderItem
v-if="PROJECT.name !== env.projectEmpty()"
:text="t('editor.bar.assistants.actions')"
@action="onLogger"
/>
<EditorHeaderItem
v-if="PROJECT.name !== env.projectEmpty()"
:text="t('editor.bar.project.statistics')"
Expand Down Expand Up @@ -120,10 +115,4 @@
supabase.saveProject()
}
const onLogger = async () => {
await storage.normalize()
ABSOLUTE.logger = true
}
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<EditorEntityDefaultComment v-else-if="ABSOLUTE.entity.comment" />
<EditorEntityDefaultCustomize v-else-if="ABSOLUTE.entity.customize" />
<EditorPagesDrafts v-else-if="ABSOLUTE.pages.drafts" />
<ProviderLogger v-else-if="ABSOLUTE.logger" />
<ProviderProjectCreate v-else-if="ABSOLUTE.project.new" />
<EditorProjectStatistics v-else-if="ABSOLUTE.project.statistics" />
<EditorProjectCorrector v-else-if="ABSOLUTE.project.corrector" />
Expand Down

This file was deleted.

6 changes: 3 additions & 3 deletions packages/better-write-app/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ app.config.globalProperties.emitter = emitter

app.use(pdf)
app.use(router)
app.use(store as any)
app.use(store)
app.use(i18n)
app.use(motion as any)
app.use(motion)
app.use(head)
app.use(core as any)
app.use(core)
app.use(tooltip, {
themes: {
'better-write': {
Expand Down
1 change: 0 additions & 1 deletion packages/better-write-app/src/store/absolute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export const useAbsoluteStore = defineStore('absolute', {
switcher: false,
finder: false,
},
logger: false,
pdf: {
configuration: false,
generate: false,
Expand Down
3 changes: 0 additions & 3 deletions packages/better-write-app/src/store/global.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { defineStore } from 'pinia'
import { useLoggerStore } from './logger'
import { useEditorStore } from './editor'
import { usePDFStore } from './pdf'
import { useAbsoluteStore } from './absolute'
Expand All @@ -15,7 +14,6 @@ export const useGlobalStore = defineStore('global', {
actions: {
reset() {
const context = useContextStore()
const logger = useLoggerStore()
const editor = useEditorStore()
const pdf = usePDFStore()
const docx = useDOCXStore()
Expand All @@ -27,7 +25,6 @@ export const useGlobalStore = defineStore('global', {
editor.$reset()
pdf.resetStyles()
docx.$reset()
logger.reset()
project.$reset()
},
},
Expand Down
25 changes: 0 additions & 25 deletions packages/better-write-app/src/store/logger.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/better-write-app/src/use/listener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { useEventListener } from '@vueuse/core'
import { usePlugin } from 'better-write-plugin-core'
import { read } from 'better-write-plugin-importer'
import { isImageExtension } from 'better-write-image-converter'
import { ProjectObject } from 'better-write-types'
import { useI18n } from 'vue-i18n'
import { useToast } from 'vue-toastification'
import { useProject } from './project'
Expand Down
6 changes: 0 additions & 6 deletions packages/better-write-app/src/use/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { useProjectStore } from '@/store/project'
import { useContextStore } from '@/store/context'
import { useLocalStorage } from './storage/local'
import { useEditorStore } from '@/store/editor'
import { useLoggerStore } from '@/store/logger'
import { usePDFStore } from '@/store/pdf'
import { useAbsoluteStore } from '@/store/absolute'
import {
Expand Down Expand Up @@ -36,7 +35,6 @@ export const useProject = () => {
const PROJECT = useProjectStore()
const CONTEXT = useContextStore()
const EDITOR = useEditorStore()
const LOGGER = useLoggerStore()
const PDF = usePDFStore()
const DOCX = useDOCXStore()
const ABSOLUTE = useAbsoluteStore()
Expand Down Expand Up @@ -135,10 +133,6 @@ export const useProject = () => {

await nextTick

LOGGER.load(context.logger)

await nextTick

EDITOR.load(context.editor)

PDF.load(context.pdf)
Expand Down
2 changes: 0 additions & 2 deletions packages/better-write-app/src/use/start.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useFormat } from './format'
import { useEnv } from './env'
import { useLoggerStore } from '@/store/logger'
import { useAuthStore } from '@/store/auth'
import { useAbsoluteStore } from '@/store/absolute'
import { useContextStore } from '@/store/context'
Expand Down Expand Up @@ -170,7 +169,6 @@ export const useStart = () => {
AUTH: useAuthStore(),
CONTEXT: useContextStore(),
EDITOR: useEditorStore(),
LOGGER: useLoggerStore(),
PDF: usePDFStore(),
DOCX: useDOCXStore(),
PROJECT: useProjectStore(),
Expand Down
7 changes: 1 addition & 6 deletions packages/better-write-app/src/use/storage/storage.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { useEnv } from '../env'
import { useProjectStore } from '@/store/project'
import { useEditorStore } from '@/store/editor'
import { useLoggerStore } from '@/store/logger'
import { usePDFStore } from '@/store/pdf'
import { ProjectObject, ProjectState } from 'better-write-types'
import { ProjectObject } from 'better-write-types'
import { nextTick } from 'vue'
import useEmitter from '../emitter'
import { useContextStore } from '@/store/context'
Expand All @@ -15,7 +14,6 @@ export const useStorage = () => {
const PROJECT = useProjectStore()
const CONTEXT = useContextStore()
const EDITOR = useEditorStore()
const LOGGER = useLoggerStore()
const PDF = usePDFStore()
const DOCX = useDOCXStore()
const AUTH = useAuthStore()
Expand Down Expand Up @@ -132,7 +130,6 @@ export const useStorage = () => {
id: AUTH.account.project_id_activity || undefined,
project: PROJECT.$state,
editor: EDITOR.$state,
logger: LOGGER.$state,
pdf: {
styles: PDF.styles,
fonts: [],
Expand All @@ -143,8 +140,6 @@ export const useStorage = () => {
}

const purge = () => {
LOGGER.content = LOGGER.content.slice(-1 * 100)

PROJECT.pages.forEach((page) => {
page.entities.forEach((entity) => {
if (
Expand Down
4 changes: 0 additions & 4 deletions packages/better-write-languages/src/en-US/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ export default {
},
window: {
confirmConfiguration: 'Do you want to quit saving the settings?',
confirmClearLogger: 'Do you want to delete all data?',
saveDropbox: 'Are you sure to save this file to Dropbox?',
saveLocal: 'Are you sure to save this file?',
deleteChapterPage: 'Are you sure to delete the current chapter?',
Expand Down Expand Up @@ -287,9 +286,6 @@ export default {
project: {
title: 'Project',
addons: {
logger: {
title: 'Actions',
},
textSwitcher: {
title: 'Replace Text',
},
Expand Down
4 changes: 0 additions & 4 deletions packages/better-write-languages/src/pt-BR/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ export default {
},
window: {
confirmConfiguration: 'Você quer sair salvando as configurações?',
confirmClearLogger: 'Você quer excluir todos os dados?',
saveDropbox: 'Você tem certeza em salvar este arquivo no Dropbox?',
saveLocal: 'Você tem certeza em salvar este arquivo?',
deleteChapterPage: 'Você tem certeza em excluir o capítulo atual?',
Expand Down Expand Up @@ -287,9 +286,6 @@ export default {
project: {
title: 'Projeto',
addons: {
logger: {
title: 'Ações',
},
textSwitcher: {
title: 'Substituir Texto',
},
Expand Down
6 changes: 0 additions & 6 deletions packages/better-write-plugin-logger/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions packages/better-write-plugin-logger/.prettierrc.json

This file was deleted.

10 changes: 0 additions & 10 deletions packages/better-write-plugin-logger/build.config.ts

This file was deleted.

43 changes: 0 additions & 43 deletions packages/better-write-plugin-logger/package.json

This file was deleted.

Loading

0 comments on commit 8ebb9a7

Please sign in to comment.