mirror of
https://github.com/CrazyJasonwell/clash-verge-rev.git
synced 2026-10-20 18:18:32 +08:00
refactor: editor-viewer using react-monaco-editor
This commit is contained in:
1 parent
13618e6a0a
commit
bf158b3bf0
8 files changed
+195
-182
No files matched your search
@@ -50,7 +50,6 @@ import { BaseStyledTextField } from "@/components/base/base-styled-text-field";
|
||||
import { listen } from "@tauri-apps/api/event";
|
||||
import { readTextFile } from "@tauri-apps/api/fs";
|
||||
import { readText } from "@tauri-apps/api/clipboard";
|
||||
import { EditorViewer } from "@/components/profile/editor-viewer";
|
||||
|
||||
const ProfilePage = () => {
|
||||
const { t } = useTranslation();
|
||||
@@ -378,7 +377,7 @@ const ProfilePage = () => {
|
||||
itemData={item}
|
||||
onSelect={(f) => onSelect(item.uid, f)}
|
||||
onEdit={() => viewerRef.current?.edit(item)}
|
||||
onChange={async (prev, curr) => {
|
||||
onSave={async (prev, curr) => {
|
||||
if (prev !== curr && profiles.current === item.uid) {
|
||||
await onEnhance();
|
||||
}
|
||||
@@ -401,7 +400,7 @@ const ProfilePage = () => {
|
||||
<Grid item xs={12} sm={6} md={6} lg={6}>
|
||||
<ProfileMore
|
||||
id="Merge"
|
||||
onChange={async (prev, curr) => {
|
||||
onSave={async (prev, curr) => {
|
||||
if (prev !== curr) {
|
||||
await onEnhance();
|
||||
}
|
||||
@@ -412,7 +411,7 @@ const ProfilePage = () => {
|
||||
<ProfileMore
|
||||
id="Script"
|
||||
logInfo={chainLogs["Script"]}
|
||||
onChange={async (prev, curr) => {
|
||||
onSave={async (prev, curr) => {
|
||||
if (prev !== curr) {
|
||||
await onEnhance();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user