feat: 新增脚本录制功能
This commit is contained in:
@@ -22,5 +22,6 @@ export const NAMESPACES = [
|
||||
'models',
|
||||
'skills',
|
||||
'cron',
|
||||
'script',
|
||||
] as const;
|
||||
export type Namespace = (typeof NAMESPACES)[number];
|
||||
54
src/i18n/locales/en/script.json
Normal file
54
src/i18n/locales/en/script.json
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"title": "Scripts",
|
||||
"subtitle": "Record, edit and run automation scripts",
|
||||
"newScript": "New Script",
|
||||
"refresh": "Refresh",
|
||||
"stats": {
|
||||
"total": "Total Scripts",
|
||||
"active": "Enabled",
|
||||
"failed": "Recently Failed"
|
||||
},
|
||||
"empty": {
|
||||
"title": "No scripts yet",
|
||||
"description": "Create or record automation scripts to extend platform support. Scripts run on Playwright.",
|
||||
"create": "Create your first script"
|
||||
},
|
||||
"card": {
|
||||
"test": "Test",
|
||||
"run": "Run",
|
||||
"deleteConfirm": "Are you sure you want to delete this script? The script file will also be removed.",
|
||||
"last": "Last run",
|
||||
"channel": "Channel",
|
||||
"common": "Common"
|
||||
},
|
||||
"dialog": {
|
||||
"createTitle": "New Script",
|
||||
"editTitle": "Edit Script",
|
||||
"description": "Write or record a Playwright automation script",
|
||||
"name": "Script Name",
|
||||
"namePlaceholder": "e.g. Fliggy room type update",
|
||||
"descriptionLabel": "Description",
|
||||
"descriptionPlaceholder": "Briefly describe what this script does...",
|
||||
"channel": "Target Channel",
|
||||
"channelPlaceholder": "Paste channel URL",
|
||||
"channelCommon": "Common",
|
||||
"code": "Script Code",
|
||||
"recordStart": "Start Recording",
|
||||
"recordStop": "Stop Recording",
|
||||
"recording": "Recording...",
|
||||
"recordTip": "Recording will open the Playwright Inspector. Record actions in the Inspector and copy the generated code into the editor.",
|
||||
"saveChanges": "Save Changes"
|
||||
},
|
||||
"toast": {
|
||||
"created": "Script created",
|
||||
"updated": "Script updated",
|
||||
"enabled": "Script enabled",
|
||||
"disabled": "Script disabled",
|
||||
"deleted": "Script deleted",
|
||||
"runSuccess": "Script ran successfully",
|
||||
"runFailed": "Script failed: {{error}}",
|
||||
"nameRequired": "Please enter a script name",
|
||||
"codeRequired": "Please enter script code",
|
||||
"channelRequired": "Please enter a channel URL"
|
||||
}
|
||||
}
|
||||
54
src/i18n/locales/ja/script.json
Normal file
54
src/i18n/locales/ja/script.json
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"title": "スクリプト管理",
|
||||
"subtitle": "自動化スクリプトの録画、編集、実行",
|
||||
"newScript": "新規スクリプト",
|
||||
"refresh": "更新",
|
||||
"stats": {
|
||||
"total": "総スクリプト数",
|
||||
"active": "有効",
|
||||
"failed": "最近の失敗"
|
||||
},
|
||||
"empty": {
|
||||
"title": "スクリプトがありません",
|
||||
"description": "自動化スクリプトを作成または録画して、各種プラットフォームへの対応を拡張します。スクリプトは Playwright で実行されます。",
|
||||
"create": "最初のスクリプトを作成"
|
||||
},
|
||||
"card": {
|
||||
"test": "テスト",
|
||||
"run": "実行",
|
||||
"deleteConfirm": "このスクリプトを削除してもよろしいですか?対応するスクリプトファイルも削除されます。",
|
||||
"last": "前回の実行",
|
||||
"channel": "チャンネル",
|
||||
"common": "汎用"
|
||||
},
|
||||
"dialog": {
|
||||
"createTitle": "新規スクリプト",
|
||||
"editTitle": "スクリプト編集",
|
||||
"description": "Playwright 自動化スクリプトを作成または録画",
|
||||
"name": "スクリプト名",
|
||||
"namePlaceholder": "例:Fliggy 部屋タイプ変更",
|
||||
"descriptionLabel": "説明",
|
||||
"descriptionPlaceholder": "スクリプトの用途を簡潔に説明...",
|
||||
"channel": "対象チャンネル",
|
||||
"channelPlaceholder": "チャンネルURLを貼り付け",
|
||||
"channelCommon": "汎用",
|
||||
"code": "スクリプトコード",
|
||||
"recordStart": "録画開始",
|
||||
"recordStop": "録画停止",
|
||||
"recording": "録画中...",
|
||||
"recordTip": "録画すると Playwright Inspector が開きます。Inspector で操作を録画し、生成されたコードをエディタに貼り付けてください。",
|
||||
"saveChanges": "変更を保存"
|
||||
},
|
||||
"toast": {
|
||||
"created": "スクリプトを作成しました",
|
||||
"updated": "スクリプトを更新しました",
|
||||
"enabled": "スクリプトを有効にしました",
|
||||
"disabled": "スクリプトを無効にしました",
|
||||
"deleted": "スクリプトを削除しました",
|
||||
"runSuccess": "スクリプトの実行に成功しました",
|
||||
"runFailed": "スクリプトの実行に失敗しました: {{error}}",
|
||||
"nameRequired": "スクリプト名を入力してください",
|
||||
"codeRequired": "スクリプトコードを入力してください",
|
||||
"channelRequired": "チャンネルURLを入力してください"
|
||||
}
|
||||
}
|
||||
54
src/i18n/locales/zh/script.json
Normal file
54
src/i18n/locales/zh/script.json
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
"title": "脚本管理",
|
||||
"subtitle": "录制、编辑和运行自动化脚本",
|
||||
"newScript": "新建脚本",
|
||||
"refresh": "刷新",
|
||||
"stats": {
|
||||
"total": "脚本总数",
|
||||
"active": "已启用",
|
||||
"failed": "最近失败"
|
||||
},
|
||||
"empty": {
|
||||
"title": "暂无脚本",
|
||||
"description": "创建或录制自动化脚本,以扩展对各类平台的适配能力。脚本基于 Playwright 运行。",
|
||||
"create": "创建第一个脚本"
|
||||
},
|
||||
"card": {
|
||||
"test": "测试",
|
||||
"run": "运行",
|
||||
"deleteConfirm": "确定要删除此脚本吗?对应的脚本文件也会被删除。",
|
||||
"last": "上次运行",
|
||||
"channel": "渠道",
|
||||
"common": "通用"
|
||||
},
|
||||
"dialog": {
|
||||
"createTitle": "新建脚本",
|
||||
"editTitle": "编辑脚本",
|
||||
"description": "编写或录制 Playwright 自动化脚本",
|
||||
"name": "脚本名称",
|
||||
"namePlaceholder": "例如:飞猪房型修改",
|
||||
"descriptionLabel": "脚本描述",
|
||||
"descriptionPlaceholder": "简要说明脚本用途...",
|
||||
"channel": "目标渠道",
|
||||
"channelPlaceholder": "粘贴渠道链接地址",
|
||||
"channelCommon": "通用",
|
||||
"code": "脚本代码",
|
||||
"recordStart": "开始录制",
|
||||
"recordStop": "停止录制",
|
||||
"recording": "录制中...",
|
||||
"recordTip": "录制将打开 Playwright Inspector,请在 Inspector 中录制并复制代码到编辑器。",
|
||||
"saveChanges": "保存更改"
|
||||
},
|
||||
"toast": {
|
||||
"created": "脚本已创建",
|
||||
"updated": "脚本已更新",
|
||||
"enabled": "脚本已启用",
|
||||
"disabled": "脚本已禁用",
|
||||
"deleted": "脚本已删除",
|
||||
"runSuccess": "脚本运行成功",
|
||||
"runFailed": "脚本运行失败: {{error}}",
|
||||
"nameRequired": "请输入脚本名称",
|
||||
"codeRequired": "请输入脚本代码",
|
||||
"channelRequired": "请输入渠道链接地址"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user