-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
219 additions
and
12 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 9 additions & 7 deletions
16
src/components/editor/project/corrector/EditorProjectCorrectorRow.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
<template> | ||
<div class="flex justify-between wb-text items-center w-72"> | ||
<p class="text-lg font-poppins">{{ props.title }}</p> | ||
<p class="font-bold">{{ props.result }}</p> | ||
<div | ||
class="flex justify-between wb-text items-center w-auto transition-all hover:bg-black-opacity p-2 mb-2" | ||
@mouseenter="emit('hover')" | ||
@touchstart="emit('hover')" | ||
> | ||
<p class="text-base font-poppins pointer-events-none">{{ props.title }}</p> | ||
<slot /> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
const emit = defineEmits(['hover']) | ||
const props = defineProps({ | ||
title: { | ||
required: true, | ||
type: String, | ||
}, | ||
result: { | ||
required: true, | ||
type: String || Number, | ||
}, | ||
}) | ||
</script> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { useRaw } from '@/use/raw' | ||
import { defineStore } from 'pinia' | ||
import { AddonsState } from '../types/addons' | ||
|
||
export const useAddonsStore = defineStore('addons', { | ||
state: (): AddonsState => { | ||
return { | ||
corrector: { | ||
options: [ | ||
{ | ||
title: 'editor.addons.corrector.removeStartWhitespace.title', | ||
description: | ||
'editor.addons.corrector.removeStartWhitespace.description', | ||
option: false, | ||
html: { | ||
before: `${useRaw() | ||
.v2() | ||
.html() | ||
.error() | ||
.item(' ')}Lorem ipsum dolor sit amet, consectetur adi...`, | ||
after: `${useRaw() | ||
.v2() | ||
.html() | ||
.correct() | ||
.item('Lorem')} ipsum dolor sit amet, consectetur adipis...`, | ||
}, | ||
}, | ||
{ | ||
title: 'editor.addons.corrector.removeEndWhitespace.title', | ||
description: | ||
'editor.addons.corrector.removeEndWhitespace.description', | ||
option: false, | ||
html: { | ||
before: `...sit amet, consectetur adi.${useRaw() | ||
.v2() | ||
.html() | ||
.error() | ||
.item(' ')}`, | ||
after: `...sit amet, consectetur ${useRaw() | ||
.v2() | ||
.html() | ||
.correct() | ||
.item('adi.')}`, | ||
}, | ||
}, | ||
], | ||
}, | ||
} | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export interface AddonsState { | ||
corrector: AddonsCorrector | ||
} | ||
|
||
export interface AddonsCorrector { | ||
options: Array<AddonsCorrectorOption> | ||
} | ||
|
||
export interface AddonsCorrectorOption { | ||
title: string | ||
description: string | ||
option: boolean | ||
html: { | ||
before: string | ||
after: string | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export const useCorrector = () => { | ||
const create = () => {} | ||
|
||
return { create } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters