@vasakgroup/plugin-config-manager 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-js/index.cjs +4 -0
- package/dist-js/index.d.ts +1 -0
- package/dist-js/index.js +4 -1
- package/package.json +1 -1
package/dist-js/index.cjs
CHANGED
|
@@ -9,6 +9,9 @@ async function writeConfig(value) {
|
|
|
9
9
|
payload: JSON.stringify(value), // Serializar VSKConfig y enviarlo como 'payload'
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
+
async function setDarkMode(darkmode) {
|
|
13
|
+
await core.invoke("plugin:config-manager|set_darkmode", { darkmode });
|
|
14
|
+
}
|
|
12
15
|
async function readConfig() {
|
|
13
16
|
const jsonString = await core.invoke(// Esperar que invoke resuelva directamente con la cadena JSON
|
|
14
17
|
"plugin:config-manager|read_config");
|
|
@@ -55,5 +58,6 @@ const useConfigStore = pinia.defineStore("config", () => {
|
|
|
55
58
|
});
|
|
56
59
|
|
|
57
60
|
exports.readConfig = readConfig;
|
|
61
|
+
exports.setDarkMode = setDarkMode;
|
|
58
62
|
exports.useConfigStore = useConfigStore;
|
|
59
63
|
exports.writeConfig = writeConfig;
|
package/dist-js/index.d.ts
CHANGED
package/dist-js/index.js
CHANGED
|
@@ -7,6 +7,9 @@ async function writeConfig(value) {
|
|
|
7
7
|
payload: JSON.stringify(value), // Serializar VSKConfig y enviarlo como 'payload'
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
|
+
async function setDarkMode(darkmode) {
|
|
11
|
+
await invoke("plugin:config-manager|set_darkmode", { darkmode });
|
|
12
|
+
}
|
|
10
13
|
async function readConfig() {
|
|
11
14
|
const jsonString = await invoke(// Esperar que invoke resuelva directamente con la cadena JSON
|
|
12
15
|
"plugin:config-manager|read_config");
|
|
@@ -52,4 +55,4 @@ const useConfigStore = defineStore("config", () => {
|
|
|
52
55
|
};
|
|
53
56
|
});
|
|
54
57
|
|
|
55
|
-
export { readConfig, useConfigStore, writeConfig };
|
|
58
|
+
export { readConfig, setDarkMode, useConfigStore, writeConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vasakgroup/plugin-config-manager",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"author": "Joaquin (Pato) Decima <jdecima@vasak.net.ar>",
|
|
5
5
|
"description": "A tauri plugin for managing configuration in a Vue 3 application using Pinia.",
|
|
6
6
|
"type": "module",
|