Skip to content

Commit aee9983

Browse files
committed
feat (core): 禁用右键菜单
1 parent 0f7b4fb commit aee9983

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

src-tauri/tauri.conf.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
{
1515
"title": "CodeForge",
1616
"width": 1800,
17-
"height": 1200
17+
"height": 1200,
18+
"additionalBrowserArgs": "--disable-context-menu"
1819
}
1920
],
2021
"security": {

src/App.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,8 @@ const clearOutput = () => {
283283
showToast('输出已清空', 'info')
284284
}
285285
286+
window.addEventListener("contextmenu", (e) => e.preventDefault(), false);
287+
286288
onMounted(async () => {
287289
await getSupportedLanguages()
288290

src/components/StatusBar.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<template>
2-
<div class="bg-blue-600 text-white px-4 py-2 text-sm flex items-center justify-between">
2+
<div class="text-white px-3.5 py-1 text-sm flex items-center justify-between"
3+
:class="[envInfo.installed ? 'bg-green-500' : 'bg-red-500']">
34
<div class="flex items-center space-x-6">
45
<div class="flex items-center space-x-2">
56
<component :is="envInfo.installed ? CheckCircle : XCircle"
6-
:class="envInfo.installed ? 'text-green-300' : 'text-red-300'"
7+
:class="envInfo.installed ? 'text-green-300' : 'text-white'"
78
class="w-4 h-4"/>
89
<span>{{ envInfo.installed ? `${ envInfo.language }: ${ envInfo.version }` : `${ envInfo.language } 环境未安装` }}</span>
910
</div>

0 commit comments

Comments
 (0)