Skip to content

Commit

Permalink
fix combo parameter values
Browse files Browse the repository at this point in the history
  • Loading branch information
Armaldio committed Feb 6, 2025
1 parent 76af100 commit cb727dd
Show file tree
Hide file tree
Showing 5 changed files with 140 additions and 122 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ A plugin that integrate with Pipelab <br>
Author: Armaldio <br>
Website: https://github.com/CynToolkit/construct-plugin <br>
Addon Url: https://github.com/CynToolkit/construct-plugin <br>
Download Latest Version : [Version: 1.7.1](https://github.com/CynToolkit/construct-plugin/releases/latest) <br>
Download Latest Version : [Version: 1.8.0](https://github.com/CynToolkit/construct-plugin/releases/latest) <br>
<sub>Made using [c3ide2-framework](https://github.com/ConstructFund/c3ide2-framework) </sub><br>

## Table of Contents
Expand Down
Binary file modified examples/example.c3p
Binary file not shown.
13 changes: 7 additions & 6 deletions src/instance.js
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ export function getInstanceJs(parentClass, addonTriggers, C3) {
const order = {
url: '/window/set-always-on-top',
body: {
value: mode === 'enable' ? true : false
value: mode === 1 ? true : false
}
}

Expand Down Expand Up @@ -565,7 +565,7 @@ export function getInstanceJs(parentClass, addonTriggers, C3) {
const order = {
url: '/window/set-resizable',
body: {
value: resizable === 'enable' ? true : false
value: resizable === 1 ? true : false
}
}

Expand Down Expand Up @@ -625,7 +625,7 @@ export function getInstanceJs(parentClass, addonTriggers, C3) {
const order = {
url: '/window/show-dev-tools',
body: {
value: toggle === 'show' ? true : false
value: toggle === 1 ? true : false
}
}

Expand All @@ -637,7 +637,7 @@ export function getInstanceJs(parentClass, addonTriggers, C3) {
const order = {
url: '/window/set-fullscreen',
body: {
value: toggle
value: toggle === 0 ? 'normal' : 'fullscreen'
}
}

Expand Down Expand Up @@ -1236,8 +1236,9 @@ export function getInstanceJs(parentClass, addonTriggers, C3) {
})

_IsEngine = this.wrap(super._IsEngine, (engine) => {
// console.log('engine', engine)
return this._engine === engine
if (engine === 0 && this._engine === 'electron') return true
if (engine === 1 && this._engine === 'tauri') return true
return false
})

_LastPathExists = this.wrap(super._LastPathExists, () => {
Expand Down
8 changes: 4 additions & 4 deletions src/pluginConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -719,8 +719,8 @@ const Config = /** @type {const} */({
name: "Mode",
type: 'combo',
items: [
{ "enable": "Not always on top" },
{ "disable": "Always on top" },
{ "enable": "Not always on top" },
]
}
],
Expand Down Expand Up @@ -816,8 +816,8 @@ const Config = /** @type {const} */({
name: "Resizable",
type: 'combo',
items: [
{ "enable": "Not resizable" },
{ "disable": "Resizable" },
{ "enable": "Not resizable" },
]
}
],
Expand Down Expand Up @@ -919,8 +919,8 @@ const Config = /** @type {const} */({
name: "Show",
type: 'combo',
items: [
{ "show": "Show dev tools" },
{ "hide": "Hide dev tools" },
{ "show": "Show dev tools" },
]
}
],
Expand Down Expand Up @@ -959,7 +959,7 @@ const Config = /** @type {const} */({
}
],
listName: "Set Fullscreen",
displayText: "Set fullscreen {0}",
displayText: "Set fullscreen state to \"{0}\"",
description: "Change fullscreen state",
}
},
Expand Down
Loading

0 comments on commit cb727dd

Please sign in to comment.