11<script >
2- import { SaveProxyConfig , SetDebugLogging , GetTerraformMirrorConfig , SaveTerraformMirrorConfig , TestTerraformEndpoints , SetNotificationEnabled , SetDisableRightClick , SetSpotMonitorEnabled , SetSpotAutoRecoverEnabled , GetWebhookConfig , SetWebhookConfig , TestWebhook , GetHTTPServerConfig , SetHTTPServerConfig , StartHTTPServer , StopHTTPServer , GetHTTPServerStatus } from ' ../../../wailsjs/go/main/App.js' ;
2+ import { SaveProxyConfig , SetDebugLogging , GetTerraformMirrorConfig , SaveTerraformMirrorConfig , TestTerraformEndpoints , SetNotificationEnabled , SetSpotMonitorEnabled , SetSpotAutoRecoverEnabled , GetWebhookConfig , SetWebhookConfig , TestWebhook , GetHTTPServerConfig , SetHTTPServerConfig , StartHTTPServer , StopHTTPServer , GetHTTPServerStatus } from ' ../../../wailsjs/go/main/App.js' ;
33
4- let { t, config = $bindable ({ redcPath: ' ' , projectPath: ' ' , logPath: ' ' }), terraformMirror = $bindable ({ enabled: false , configPath: ' ' , managed: false , fromEnv: false , providers: [] }), debugEnabled = $bindable (false ), notificationEnabled = $bindable (false ), spotMonitorEnabled = $bindable (false ), spotAutoRecoverEnabled = $bindable (false ), rightClickDisabled = $bindable ( false ) } = $props ();
4+ let { t, config = $bindable ({ redcPath: ' ' , projectPath: ' ' , logPath: ' ' }), terraformMirror = $bindable ({ enabled: false , configPath: ' ' , managed: false , fromEnv: false , providers: [] }), debugEnabled = $bindable (false ), notificationEnabled = $bindable (false ), spotMonitorEnabled = $bindable (false ), spotAutoRecoverEnabled = $bindable (false ) } = $props ();
55 let proxyForm = $state ({ httpProxy: ' ' , httpsProxy: ' ' , socks5Proxy: ' ' , noProxy: ' ' });
66 let proxySaving = $state (false );
77 let proxySaved = $state (false );
@@ -16,7 +16,6 @@ let { t, config = $bindable({ redcPath: '', projectPath: '', logPath: '' }), ter
1616 let notificationSaving = $state (false );
1717 let spotMonitorSaving = $state (false );
1818 let spotAutoRecoverSaving = $state (false );
19- let rightClickSaving = $state (false );
2019 let webhookForm = $state ({ enabled: false , slack: ' ' , dingtalk: ' ' , dingtalkSecret: ' ' , feishu: ' ' , feishuSecret: ' ' , discord: ' ' , wecom: ' ' });
2120 let webhookSaving = $state (false );
2221 let webhookMessage = $state (' ' );
@@ -271,19 +270,6 @@ let { t, config = $bindable({ redcPath: '', projectPath: '', logPath: '' }), ter
271270 spotAutoRecoverSaving = false ;
272271 }
273272 }
274-
275- async function handleToggleRightClick () {
276- const nextValue = ! rightClickDisabled;
277- rightClickSaving = true ;
278- try {
279- await SetDisableRightClick (nextValue);
280- rightClickDisabled = nextValue;
281- } catch (e) {
282- console .error (' Failed to toggle right click:' , e);
283- } finally {
284- rightClickSaving = false ;
285- }
286- }
287273
288274 async function handleToggleTerraformMirror () {
289275 const nextValue = ! terraformMirrorForm .enabled ;
@@ -795,24 +781,6 @@ let { t, config = $bindable({ redcPath: '', projectPath: '', logPath: '' }), ter
795781 < / button>
796782 < / div>
797783 {/ if }
798- <!-- 右键菜单 -->
799- < div class = " flex items-center justify-between px-4 sm:px-5 py-3.5" >
800- < div>
801- < div class = " text-[13px] sm:text-[14px] font-medium text-gray-900" > {t .disableRightClick }< / div>
802- < div class = " text-[11px] sm:text-[12px] text-gray-500 mt-0.5" > {t .disableRightClickDesc }< / div>
803- < / div>
804- < button
805- class = " relative inline-flex h-6 w-11 flex-shrink-0 items-center rounded-full transition-colors disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer"
806- class: bg- emerald- 500 = {rightClickDisabled}
807- class: bg- gray- 300 = {! rightClickDisabled}
808- onclick= {handleToggleRightClick}
809- disabled= {rightClickSaving}
810- aria- label= {rightClickDisabled ? t .enable : t .disable }
811- >
812- < span class = " inline-block h-4 w-4 transform rounded-full bg-white transition-transform"
813- class: translate- x- 6 = {rightClickDisabled} class: translate- x- 1 = {! rightClickDisabled}>< / span>
814- < / button>
815- < / div>
816784 < / div>
817785
818786 <!-- HTTP Server Section -->
0 commit comments