Add terminal snippets feature with sidebar UI (#377)
* Add terminal snippets feature with sidebar UI - Add snippets CRUD API endpoints and database schema - Implement snippets sidebar accessible from TopNavbar - Add copy to clipboard functionality - Include tooltips and optimized styling - Add English and Chinese translations * Update src/backend/database/routes/snippets.ts Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --------- Co-authored-by: ZacharyZcR <zacharyzcr1984@gmail.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit was merged in pull request #377.
This commit is contained in:
@@ -191,6 +191,40 @@
|
||||
"enableRightClickCopyPaste": "Enable right‑click copy/paste",
|
||||
"shareIdeas": "Have ideas for what should come next for ssh tools? Share them on"
|
||||
},
|
||||
"snippets": {
|
||||
"title": "Snippets",
|
||||
"new": "New Snippet",
|
||||
"create": "Create Snippet",
|
||||
"edit": "Edit Snippet",
|
||||
"run": "Run",
|
||||
"empty": "No snippets yet",
|
||||
"emptyHint": "Create a snippet to save commonly used commands",
|
||||
"name": "Name",
|
||||
"description": "Description",
|
||||
"content": "Command",
|
||||
"namePlaceholder": "e.g., Restart Nginx",
|
||||
"descriptionPlaceholder": "Optional description",
|
||||
"contentPlaceholder": "e.g., sudo systemctl restart nginx",
|
||||
"nameRequired": "Name is required",
|
||||
"contentRequired": "Command is required",
|
||||
"createDescription": "Create a new command snippet for quick execution",
|
||||
"editDescription": "Edit this command snippet",
|
||||
"deleteConfirmTitle": "Delete Snippet",
|
||||
"deleteConfirmDescription": "Are you sure you want to delete \"{{name}}\"?",
|
||||
"createSuccess": "Snippet created successfully",
|
||||
"updateSuccess": "Snippet updated successfully",
|
||||
"deleteSuccess": "Snippet deleted successfully",
|
||||
"createFailed": "Failed to create snippet",
|
||||
"updateFailed": "Failed to update snippet",
|
||||
"deleteFailed": "Failed to delete snippet",
|
||||
"failedToFetch": "Failed to fetch snippets",
|
||||
"executeSuccess": "Executing: {{name}}",
|
||||
"copySuccess": "Copied \"{{name}}\" to clipboard",
|
||||
"runTooltip": "Execute this snippet in the terminal",
|
||||
"copyTooltip": "Copy snippet to clipboard",
|
||||
"editTooltip": "Edit this snippet",
|
||||
"deleteTooltip": "Delete this snippet"
|
||||
},
|
||||
"homepage": {
|
||||
"loggedInTitle": "Logged in!",
|
||||
"loggedInMessage": "You are logged in! Use the sidebar to access all available tools. To get started, create an SSH Host in the SSH Manager tab. Once created, you can connect to that host using the other apps in the sidebar.",
|
||||
@@ -357,6 +391,7 @@
|
||||
"admin": "Admin",
|
||||
"userProfile": "User Profile",
|
||||
"tools": "Tools",
|
||||
"snippets": "Snippets",
|
||||
"newTab": "New Tab",
|
||||
"splitScreen": "Split Screen",
|
||||
"closeTab": "Close Tab",
|
||||
|
||||
@@ -189,6 +189,40 @@
|
||||
"enableRightClickCopyPaste": "启用右键复制/粘贴",
|
||||
"shareIdeas": "对 SSH 工具有什么想法?在此分享"
|
||||
},
|
||||
"snippets": {
|
||||
"title": "代码片段",
|
||||
"new": "新建片段",
|
||||
"create": "创建代码片段",
|
||||
"edit": "编辑代码片段",
|
||||
"run": "运行",
|
||||
"empty": "暂无代码片段",
|
||||
"emptyHint": "创建代码片段以保存常用命令",
|
||||
"name": "名称",
|
||||
"description": "描述",
|
||||
"content": "命令",
|
||||
"namePlaceholder": "例如: 重启 Nginx",
|
||||
"descriptionPlaceholder": "可选描述",
|
||||
"contentPlaceholder": "例如: sudo systemctl restart nginx",
|
||||
"nameRequired": "名称不能为空",
|
||||
"contentRequired": "命令不能为空",
|
||||
"createDescription": "创建新的命令片段以便快速执行",
|
||||
"editDescription": "编辑此命令片段",
|
||||
"deleteConfirmTitle": "删除代码片段",
|
||||
"deleteConfirmDescription": "确定要删除 \"{{name}}\" 吗?",
|
||||
"createSuccess": "代码片段创建成功",
|
||||
"updateSuccess": "代码片段更新成功",
|
||||
"deleteSuccess": "代码片段删除成功",
|
||||
"createFailed": "创建代码片段失败",
|
||||
"updateFailed": "更新代码片段失败",
|
||||
"deleteFailed": "删除代码片段失败",
|
||||
"failedToFetch": "获取代码片段失败",
|
||||
"executeSuccess": "正在执行: {{name}}",
|
||||
"copySuccess": "已复制 \"{{name}}\" 到剪贴板",
|
||||
"runTooltip": "在终端中执行此片段",
|
||||
"copyTooltip": "复制片段到剪贴板",
|
||||
"editTooltip": "编辑此片段",
|
||||
"deleteTooltip": "删除此片段"
|
||||
},
|
||||
"homepage": {
|
||||
"loggedInTitle": "登录成功!",
|
||||
"loggedInMessage": "您已登录!使用侧边栏访问所有可用工具。要开始使用,请在 SSH 管理器选项卡中创建 SSH 主机。创建后,您可以使用侧边栏中的其他应用程序连接到该主机。",
|
||||
@@ -343,6 +377,7 @@
|
||||
"admin": "管理员",
|
||||
"userProfile": "用户资料",
|
||||
"tools": "工具",
|
||||
"snippets": "代码片段",
|
||||
"newTab": "新标签页",
|
||||
"splitScreen": "分屏",
|
||||
"closeTab": "关闭标签页",
|
||||
|
||||
Reference in New Issue
Block a user