Add front-end components for setting variants, fix back-end segfault

This commit is contained in:
NGnius (Graham) 2024-01-21 20:03:04 -05:00
parent 743f642580
commit bba9452383
11 changed files with 309 additions and 157 deletions

1
backend/Cargo.lock generated
View file

@ -1073,6 +1073,7 @@ version = "1.5.0-ng1"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"community_settings_core", "community_settings_core",
"libc",
"libryzenadj", "libryzenadj",
"limits_core", "limits_core",
"log", "log",

View file

@ -31,6 +31,7 @@ limits_core = { version = "3", path = "./limits_core" }
community_settings_core = { version = "0.1", path = "./community_settings_core" } community_settings_core = { version = "0.1", path = "./community_settings_core" }
regex = "1" regex = "1"
smokepatio = { version = "0.1", features = [ "std" ], path = "../../smokepatio" } smokepatio = { version = "0.1", features = [ "std" ], path = "../../smokepatio" }
libc = "0.2"
#libryzenadj = { version = "0.14", path = "../../libryzenadj-rs-14" } #libryzenadj = { version = "0.14", path = "../../libryzenadj-rs-14" }
libryzenadj = { version = "0.13" } libryzenadj = { version = "0.13" }
# ureq's tls feature does not like musl targets # ureq's tls feature does not like musl targets

View file

@ -65,17 +65,17 @@ pub fn load_settings(
move |params_in: super::ApiParameterType| { move |params_in: super::ApiParameterType| {
if let Some(Primitive::String(id)) = params_in.get(0) { if let Some(Primitive::String(id)) = params_in.get(0) {
if let Some(Primitive::String(name)) = params_in.get(1) { if let Some(Primitive::String(name)) = params_in.get(1) {
if let Some(Primitive::F64(variant_id)) = params_in.get(2) { if let Some(Primitive::String(variant_id)) = params_in.get(2) {
if let Some(Primitive::String(variant_name)) = params_in.get(3) { if let Some(Primitive::String(variant_name)) = params_in.get(3) {
setter(id.parse().unwrap_or_default(), setter(id.parse().unwrap_or_default(),
name.to_owned(), name.to_owned(),
*variant_id as _, variant_id.parse().unwrap_or_default(),
Some(variant_name.to_owned())); Some(variant_name.to_owned()));
vec![true.into()] vec![true.into()]
} else { } else {
setter(id.parse().unwrap_or_default(), setter(id.parse().unwrap_or_default(),
name.to_owned(), name.to_owned(),
*variant_id as _, variant_id.parse().unwrap_or_default(),
None); None);
vec![true.into()] vec![true.into()]
} }
@ -95,6 +95,36 @@ pub fn load_settings(
} }
} }
/// Generate load app settings from file web method
pub fn load_variant(
sender: Sender<ApiMessage>,
) -> impl Fn(super::ApiParameterType) -> super::ApiParameterType {
let sender = Mutex::new(sender); // Sender is not Sync; this is required for safety
let setter = move |variant: u64, variant_name: Option<String>| {
sender
.lock()
.unwrap()
.send(ApiMessage::LoadVariant(variant, variant_name.unwrap_or_else(|| crate::consts::DEFAULT_SETTINGS_VARIANT_NAME.to_owned())))
.expect("load_settings send failed")
};
move |params_in: super::ApiParameterType| {
if let Some(Primitive::String(variant_id)) = params_in.get(0) {
if let Some(Primitive::String(variant_name)) = params_in.get(1) {
setter(variant_id.parse().unwrap_or(u64::MAX),
Some(variant_name.to_owned()));
vec![true.into()]
} else {
setter(variant_id.parse().unwrap_or_default(),
None);
vec![true.into()]
}
} else {
log::warn!("load_settings missing variant id parameter");
vec!["load_settings missing variant id parameter".into()]
}
}
}
/// Generate load default settings from file web method /// Generate load default settings from file web method
pub fn load_default_settings( pub fn load_default_settings(
sender: Sender<ApiMessage>, sender: Sender<ApiMessage>,

View file

@ -23,6 +23,7 @@ pub enum ApiMessage {
PowerVibeCheck, PowerVibeCheck,
WaitForEmptyQueue(Callback<()>), WaitForEmptyQueue(Callback<()>),
LoadSettings(u64, String, u64, String), // (path, name, variant, variant name) LoadSettings(u64, String, u64, String), // (path, name, variant, variant name)
LoadVariant(u64, String), // (variant, variant name) -- path and name assumed to be for current profile
LoadMainSettings, LoadMainSettings,
LoadSystemSettings, LoadSystemSettings,
GetLimits(Callback<super::SettingsLimits>), GetLimits(Callback<super::SettingsLimits>),
@ -275,6 +276,7 @@ fn print_errors(call_name: &str, errors: Vec<crate::settings::SettingError>) {
impl ApiMessageHandler { impl ApiMessageHandler {
pub fn process_forever(&mut self, settings: &mut Settings) { pub fn process_forever(&mut self, settings: &mut Settings) {
crate::utility::ioperm_power_ec();
//let mut dirty_echo = true; // set everything twice, to make sure PowerTools wins on race conditions //let mut dirty_echo = true; // set everything twice, to make sure PowerTools wins on race conditions
while let Ok(msg) = self.intake.recv() { while let Ok(msg) = self.intake.recv() {
let mut dirty = self.process(settings, msg); let mut dirty = self.process(settings, msg);
@ -387,6 +389,14 @@ impl ApiMessageHandler {
} }
true true
} }
ApiMessage::LoadVariant(variant_id, variant_name) => {
let path = settings.general.get_path();
match settings.load_file(path.into(), settings.general.get_name().to_owned(), variant_id, variant_name, false) {
Ok(success) => log::info!("Loaded settings file? {}", success),
Err(e) => log::warn!("Load file err: {}", e),
}
true
}
ApiMessage::LoadMainSettings => { ApiMessage::LoadMainSettings => {
match settings.load_file( match settings.load_file(
crate::consts::DEFAULT_SETTINGS_FILE.into(), crate::consts::DEFAULT_SETTINGS_FILE.into(),

View file

@ -254,6 +254,10 @@ fn main() -> Result<(), ()> {
"GENERAL_load_settings", "GENERAL_load_settings",
api::general::load_settings(api_sender.clone()), api::general::load_settings(api_sender.clone()),
) )
.register(
"GENERAL_load_variant",
api::general::load_variant(api_sender.clone()),
)
.register( .register(
"GENERAL_load_default_settings", "GENERAL_load_default_settings",
api::general::load_default_settings(api_sender.clone()), api::general::load_default_settings(api_sender.clone()),
@ -318,6 +322,8 @@ fn main() -> Result<(), ()> {
api::web::download_new_config(api_sender.clone()) api::web::download_new_config(api_sender.clone())
); );
utility::ioperm_power_ec();
if let Err(e) = loaded_settings.on_set() { if let Err(e) = loaded_settings.on_set() {
e.iter() e.iter()
.for_each(|e| log::error!("Startup Settings.on_set() error: {}", e)); .for_each(|e| log::error!("Startup Settings.on_set() error: {}", e));

View file

@ -229,27 +229,38 @@ impl Settings {
) -> Result<bool, SettingError> { ) -> Result<bool, SettingError> {
let json_path = crate::utility::settings_dir().join(&filename); let json_path = crate::utility::settings_dir().join(&filename);
if json_path.exists() { if json_path.exists() {
let file_json = FileJson::open(&json_path).map_err(|e| SettingError { if variant == u64::MAX {
msg: format!("Failed to open settings {}: {}", json_path.display(), e), *self.general.persistent() = true;
setting: SettingVariant::General, let file_json = FileJson::update_variant_or_create(&json_path, self.json(), variant_name.clone()).map_err(|e| SettingError {
})?; msg: format!("Failed to open settings {}: {}", json_path.display(), e),
let settings_json = Self::get_variant(&file_json, variant, variant_name)?; setting: SettingVariant::General,
if !settings_json.persistent { })?;
log::warn!( self.general.variant_id(file_json.variants.iter().find(|(_key, val)| val.name == variant_name).map(|(key, _val)| *key).expect("Setting variant was not added properly"));
"Loaded persistent config `{}` ({}) with persistent=false", self.general.variant_name(variant_name);
&settings_json.name,
json_path.display()
);
*self.general.persistent() = false;
self.general.name(name);
} else { } else {
let x = super::Driver::init(name, settings_json, json_path.clone()); let file_json = FileJson::open(&json_path).map_err(|e| SettingError {
log::info!("Loaded settings with drivers general:{:?},cpus:{:?},gpu:{:?},battery:{:?}", x.general.provider(), x.cpus.provider(), x.gpu.provider(), x.battery.provider()); msg: format!("Failed to open settings {}: {}", json_path.display(), e),
self.general = x.general; setting: SettingVariant::General,
self.cpus = x.cpus; })?;
self.gpu = x.gpu; let settings_json = Self::get_variant(&file_json, variant, variant_name)?;
self.battery = x.battery; if !settings_json.persistent {
log::warn!(
"Loaded persistent config `{}` ({}) with persistent=false",
&settings_json.name,
json_path.display()
);
*self.general.persistent() = false;
self.general.name(name);
} else {
let x = super::Driver::init(name, settings_json, json_path.clone());
log::info!("Loaded settings with drivers general:{:?},cpus:{:?},gpu:{:?},battery:{:?}", x.general.provider(), x.cpus.provider(), x.gpu.provider(), x.battery.provider());
self.general = x.general;
self.cpus = x.cpus;
self.gpu = x.gpu;
self.battery = x.battery;
}
} }
} else { } else {
if system_defaults { if system_defaults {
self.load_system_default(name, variant, variant_name); self.load_system_default(name, variant, variant_name);

View file

@ -103,6 +103,16 @@ pub fn read_version_file() -> String {
} }
} }
} }
pub fn ioperm_power_ec() {
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
unsafe {
let temp_ec = smokepatio::ec::unnamed_power::UnnamedPowerEC::new();
libc::ioperm(temp_ec.ec().data() as _, 1, 1);
libc::ioperm(temp_ec.ec().cmd() as _, 1, 1);
}
}
#[cfg(test)] #[cfg(test)]
mod generate { mod generate {
#[test] #[test]

View file

@ -31,16 +31,16 @@
"@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-replace": "^4.0.0",
"@rollup/plugin-typescript": "^8.5.0", "@rollup/plugin-typescript": "^8.5.0",
"@types/react": "16.14.0", "@types/react": "16.14.0",
"@types/webpack": "^5.28.1", "@types/webpack": "^5.28.5",
"rollup": "^2.79.1", "rollup": "^2.79.1",
"rollup-plugin-import-assets": "^1.1.1", "rollup-plugin-import-assets": "^1.1.1",
"shx": "^0.3.4", "shx": "^0.3.4",
"tslib": "^2.5.3", "tslib": "^2.6.2",
"typescript": "^4.9.5" "typescript": "^4.9.5"
}, },
"dependencies": { "dependencies": {
"decky-frontend-lib": "~3.21.1", "decky-frontend-lib": "~3.24.3",
"react-icons": "^4.9.0", "react-icons": "^5.0.1",
"usdpl-front": "file:src/usdpl_front" "usdpl-front": "file:src/usdpl_front"
} }
} }

View file

@ -6,11 +6,11 @@ settings:
dependencies: dependencies:
decky-frontend-lib: decky-frontend-lib:
specifier: ~3.21.1 specifier: ~3.24.3
version: 3.21.1 version: 3.24.3
react-icons: react-icons:
specifier: ^4.9.0 specifier: ^5.0.1
version: 4.9.0(react@18.2.0) version: 5.0.1(react@18.2.0)
usdpl-front: usdpl-front:
specifier: file:src/usdpl_front specifier: file:src/usdpl_front
version: file:src/usdpl_front version: file:src/usdpl_front
@ -30,13 +30,13 @@ devDependencies:
version: 4.0.0(rollup@2.79.1) version: 4.0.0(rollup@2.79.1)
'@rollup/plugin-typescript': '@rollup/plugin-typescript':
specifier: ^8.5.0 specifier: ^8.5.0
version: 8.5.0(rollup@2.79.1)(tslib@2.5.3)(typescript@4.9.5) version: 8.5.0(rollup@2.79.1)(tslib@2.6.2)(typescript@4.9.5)
'@types/react': '@types/react':
specifier: 16.14.0 specifier: 16.14.0
version: 16.14.0 version: 16.14.0
'@types/webpack': '@types/webpack':
specifier: ^5.28.1 specifier: ^5.28.5
version: 5.28.1 version: 5.28.5
rollup: rollup:
specifier: ^2.79.1 specifier: ^2.79.1
version: 2.79.1 version: 2.79.1
@ -47,8 +47,8 @@ devDependencies:
specifier: ^0.3.4 specifier: ^0.3.4
version: 0.3.4 version: 0.3.4
tslib: tslib:
specifier: ^2.5.3 specifier: ^2.6.2
version: 2.5.3 version: 2.6.2
typescript: typescript:
specifier: ^4.9.5 specifier: ^4.9.5
version: 4.9.5 version: 4.9.5
@ -61,11 +61,11 @@ packages:
dependencies: dependencies:
'@jridgewell/set-array': 1.1.2 '@jridgewell/set-array': 1.1.2
'@jridgewell/sourcemap-codec': 1.4.15 '@jridgewell/sourcemap-codec': 1.4.15
'@jridgewell/trace-mapping': 0.3.18 '@jridgewell/trace-mapping': 0.3.22
dev: true dev: true
/@jridgewell/resolve-uri@3.1.0: /@jridgewell/resolve-uri@3.1.1:
resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==}
engines: {node: '>=6.0.0'} engines: {node: '>=6.0.0'}
dev: true dev: true
@ -74,26 +74,22 @@ packages:
engines: {node: '>=6.0.0'} engines: {node: '>=6.0.0'}
dev: true dev: true
/@jridgewell/source-map@0.3.3: /@jridgewell/source-map@0.3.5:
resolution: {integrity: sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg==} resolution: {integrity: sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==}
dependencies: dependencies:
'@jridgewell/gen-mapping': 0.3.3 '@jridgewell/gen-mapping': 0.3.3
'@jridgewell/trace-mapping': 0.3.18 '@jridgewell/trace-mapping': 0.3.22
dev: true
/@jridgewell/sourcemap-codec@1.4.14:
resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==}
dev: true dev: true
/@jridgewell/sourcemap-codec@1.4.15: /@jridgewell/sourcemap-codec@1.4.15:
resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==}
dev: true dev: true
/@jridgewell/trace-mapping@0.3.18: /@jridgewell/trace-mapping@0.3.22:
resolution: {integrity: sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==} resolution: {integrity: sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==}
dependencies: dependencies:
'@jridgewell/resolve-uri': 3.1.0 '@jridgewell/resolve-uri': 3.1.1
'@jridgewell/sourcemap-codec': 1.4.14 '@jridgewell/sourcemap-codec': 1.4.15
dev: true dev: true
/@rollup/plugin-commonjs@21.1.0(rollup@2.79.1): /@rollup/plugin-commonjs@21.1.0(rollup@2.79.1):
@ -108,7 +104,7 @@ packages:
glob: 7.2.3 glob: 7.2.3
is-reference: 1.2.1 is-reference: 1.2.1
magic-string: 0.25.9 magic-string: 0.25.9
resolve: 1.22.2 resolve: 1.22.8
rollup: 2.79.1 rollup: 2.79.1
dev: true dev: true
@ -132,7 +128,7 @@ packages:
deepmerge: 4.3.1 deepmerge: 4.3.1
is-builtin-module: 3.2.1 is-builtin-module: 3.2.1
is-module: 1.0.0 is-module: 1.0.0
resolve: 1.22.2 resolve: 1.22.8
rollup: 2.79.1 rollup: 2.79.1
dev: true dev: true
@ -146,7 +142,7 @@ packages:
rollup: 2.79.1 rollup: 2.79.1
dev: true dev: true
/@rollup/plugin-typescript@8.5.0(rollup@2.79.1)(tslib@2.5.3)(typescript@4.9.5): /@rollup/plugin-typescript@8.5.0(rollup@2.79.1)(tslib@2.6.2)(typescript@4.9.5):
resolution: {integrity: sha512-wMv1/scv0m/rXx21wD2IsBbJFba8wGF3ErJIr6IKRfRj49S85Lszbxb4DCo8iILpluTjk2GAAu9CoZt4G3ppgQ==} resolution: {integrity: sha512-wMv1/scv0m/rXx21wD2IsBbJFba8wGF3ErJIr6IKRfRj49S85Lszbxb4DCo8iILpluTjk2GAAu9CoZt4G3ppgQ==}
engines: {node: '>=8.0.0'} engines: {node: '>=8.0.0'}
peerDependencies: peerDependencies:
@ -158,9 +154,9 @@ packages:
optional: true optional: true
dependencies: dependencies:
'@rollup/pluginutils': 3.1.0(rollup@2.79.1) '@rollup/pluginutils': 3.1.0(rollup@2.79.1)
resolve: 1.22.2 resolve: 1.22.8
rollup: 2.79.1 rollup: 2.79.1
tslib: 2.5.3 tslib: 2.6.2
typescript: 4.9.5 typescript: 4.9.5
dev: true dev: true
@ -176,59 +172,61 @@ packages:
rollup: 2.79.1 rollup: 2.79.1
dev: true dev: true
/@types/eslint-scope@3.7.4: /@types/eslint-scope@3.7.7:
resolution: {integrity: sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==} resolution: {integrity: sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==}
dependencies: dependencies:
'@types/eslint': 8.40.2 '@types/eslint': 8.56.2
'@types/estree': 1.0.1 '@types/estree': 1.0.5
dev: true dev: true
/@types/eslint@8.40.2: /@types/eslint@8.56.2:
resolution: {integrity: sha512-PRVjQ4Eh9z9pmmtaq8nTjZjQwKFk7YIHIud3lRoKRBgUQjgjRmoGxxGEPXQkF+lH7QkHJRNr5F4aBgYCW0lqpQ==} resolution: {integrity: sha512-uQDwm1wFHmbBbCZCqAlq6Do9LYwByNZHWzXppSnay9SuwJ+VRbjkbLABer54kcPnMSlG6Fdiy2yaFXm/z9Z5gw==}
dependencies: dependencies:
'@types/estree': 1.0.1 '@types/estree': 1.0.5
'@types/json-schema': 7.0.12 '@types/json-schema': 7.0.15
dev: true dev: true
/@types/estree@0.0.39: /@types/estree@0.0.39:
resolution: {integrity: sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==} resolution: {integrity: sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==}
dev: true dev: true
/@types/estree@1.0.1: /@types/estree@1.0.5:
resolution: {integrity: sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==} resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==}
dev: true dev: true
/@types/json-schema@7.0.12: /@types/json-schema@7.0.15:
resolution: {integrity: sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==} resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
dev: true dev: true
/@types/node@20.3.1: /@types/node@20.11.5:
resolution: {integrity: sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==} resolution: {integrity: sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==}
dependencies:
undici-types: 5.26.5
dev: true dev: true
/@types/prop-types@15.7.5: /@types/prop-types@15.7.11:
resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==} resolution: {integrity: sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==}
dev: true dev: true
/@types/react@16.14.0: /@types/react@16.14.0:
resolution: {integrity: sha512-jJjHo1uOe+NENRIBvF46tJimUvPnmbQ41Ax0pEm7pRvhPg+wuj8VMOHHiMvaGmZRzRrCtm7KnL5OOE/6kHPK8w==} resolution: {integrity: sha512-jJjHo1uOe+NENRIBvF46tJimUvPnmbQ41Ax0pEm7pRvhPg+wuj8VMOHHiMvaGmZRzRrCtm7KnL5OOE/6kHPK8w==}
dependencies: dependencies:
'@types/prop-types': 15.7.5 '@types/prop-types': 15.7.11
csstype: 3.1.2 csstype: 3.1.3
dev: true dev: true
/@types/resolve@1.17.1: /@types/resolve@1.17.1:
resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==}
dependencies: dependencies:
'@types/node': 20.3.1 '@types/node': 20.11.5
dev: true dev: true
/@types/webpack@5.28.1: /@types/webpack@5.28.5:
resolution: {integrity: sha512-qw1MqGZclCoBrpiSe/hokSgQM/su8Ocpl3L/YHE0L6moyaypg4+5F7Uzq7NgaPKPxUxUbQ4fLPLpDWdR27bCZw==} resolution: {integrity: sha512-wR87cgvxj3p6D0Crt1r5avwqffqPXUkNlnQ1mjU93G7gCuFjufZR4I6j8cz5g1F1tTYpfOOFvly+cmIQwL9wvw==}
dependencies: dependencies:
'@types/node': 20.3.1 '@types/node': 20.11.5
tapable: 2.2.1 tapable: 2.2.1
webpack: 5.87.0 webpack: 5.89.0
transitivePeerDependencies: transitivePeerDependencies:
- '@swc/core' - '@swc/core'
- esbuild - esbuild
@ -350,16 +348,16 @@ packages:
resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==} resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==}
dev: true dev: true
/acorn-import-assertions@1.9.0(acorn@8.9.0): /acorn-import-assertions@1.9.0(acorn@8.11.3):
resolution: {integrity: sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==} resolution: {integrity: sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==}
peerDependencies: peerDependencies:
acorn: ^8 acorn: ^8
dependencies: dependencies:
acorn: 8.9.0 acorn: 8.11.3
dev: true dev: true
/acorn@8.9.0: /acorn@8.11.3:
resolution: {integrity: sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==} resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==}
engines: {node: '>=0.4.0'} engines: {node: '>=0.4.0'}
hasBin: true hasBin: true
dev: true dev: true
@ -392,15 +390,15 @@ packages:
concat-map: 0.0.1 concat-map: 0.0.1
dev: true dev: true
/browserslist@4.21.9: /browserslist@4.22.2:
resolution: {integrity: sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==} resolution: {integrity: sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==}
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true hasBin: true
dependencies: dependencies:
caniuse-lite: 1.0.30001503 caniuse-lite: 1.0.30001579
electron-to-chromium: 1.4.433 electron-to-chromium: 1.4.640
node-releases: 2.0.12 node-releases: 2.0.14
update-browserslist-db: 1.0.11(browserslist@4.21.9) update-browserslist-db: 1.0.13(browserslist@4.22.2)
dev: true dev: true
/buffer-from@1.1.2: /buffer-from@1.1.2:
@ -412,8 +410,8 @@ packages:
engines: {node: '>=6'} engines: {node: '>=6'}
dev: true dev: true
/caniuse-lite@1.0.30001503: /caniuse-lite@1.0.30001579:
resolution: {integrity: sha512-Sf9NiF+wZxPfzv8Z3iS0rXM1Do+iOy2Lxvib38glFX+08TCYYYGR5fRJXk4d77C4AYwhUjgYgMsMudbh2TqCKw==} resolution: {integrity: sha512-u5AUVkixruKHJjw/pj9wISlcMpgFWzSrczLZbrqBSxukQixmg0SJ5sZTpvaFvxU0HoQKd4yoyAogyrAz9pzJnA==}
dev: true dev: true
/chrome-trace-event@1.0.3: /chrome-trace-event@1.0.3:
@ -433,12 +431,12 @@ packages:
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
dev: true dev: true
/csstype@3.1.2: /csstype@3.1.3:
resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==} resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==}
dev: true dev: true
/decky-frontend-lib@3.21.1: /decky-frontend-lib@3.24.3:
resolution: {integrity: sha512-30605ET9qqZ6St6I9WmMmLGgSrTIdMwo7xy85+lRaF1miUd2icOGEJjwnbVcZDdkal+1fJ3tNEDXlchVfG4TrA==} resolution: {integrity: sha512-293oUaAgLrezvoz+TOQkarjwAlVlejkelB1WjtxQV4Y5qMpUZhNUtfpQAscGhwg9oQy6UGpZ5urkdPzLiVY52w==}
dev: false dev: false
/deepmerge@4.3.1: /deepmerge@4.3.1:
@ -446,8 +444,8 @@ packages:
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
dev: true dev: true
/electron-to-chromium@1.4.433: /electron-to-chromium@1.4.640:
resolution: {integrity: sha512-MGO1k0w1RgrfdbLVwmXcDhHHuxCn2qRgR7dYsJvWFKDttvYPx6FNzCGG0c/fBBvzK2LDh3UV7Tt9awnHnvAAUQ==} resolution: {integrity: sha512-z/6oZ/Muqk4BaE7P69bXhUhpJbUM9ZJeka43ZwxsDshKtePns4mhBlh8bU5+yrnOnz3fhG82XLzGUXazOmsWnA==}
dev: true dev: true
/enhanced-resolve@5.15.0: /enhanced-resolve@5.15.0:
@ -458,8 +456,8 @@ packages:
tapable: 2.2.1 tapable: 2.2.1
dev: true dev: true
/es-module-lexer@1.3.0: /es-module-lexer@1.4.1:
resolution: {integrity: sha512-vZK7T0N2CBmBOixhmjdqx2gWVbFZ4DXZ/NyRMZVlJXPa7CyFS+/a4QQsDGDQy9ZfEzxFuNEsMLeQJnKP2p5/JA==} resolution: {integrity: sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==}
dev: true dev: true
/escalade@3.1.1: /escalade@3.1.1:
@ -521,16 +519,16 @@ packages:
resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==}
dev: true dev: true
/fsevents@2.3.2: /fsevents@2.3.3:
resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
os: [darwin] os: [darwin]
requiresBuild: true requiresBuild: true
dev: true dev: true
optional: true optional: true
/function-bind@1.1.1: /function-bind@1.1.2:
resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==}
dev: true dev: true
/glob-to-regexp@0.4.1: /glob-to-regexp@0.4.1:
@ -557,11 +555,11 @@ packages:
engines: {node: '>=8'} engines: {node: '>=8'}
dev: true dev: true
/has@1.0.3: /hasown@2.0.0:
resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==}
engines: {node: '>= 0.4.0'} engines: {node: '>= 0.4'}
dependencies: dependencies:
function-bind: 1.1.1 function-bind: 1.1.2
dev: true dev: true
/inflight@1.0.6: /inflight@1.0.6:
@ -587,10 +585,10 @@ packages:
builtin-modules: 3.3.0 builtin-modules: 3.3.0
dev: true dev: true
/is-core-module@2.12.1: /is-core-module@2.13.1:
resolution: {integrity: sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==} resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==}
dependencies: dependencies:
has: 1.0.3 hasown: 2.0.0
dev: true dev: true
/is-module@1.0.0: /is-module@1.0.0:
@ -600,14 +598,14 @@ packages:
/is-reference@1.2.1: /is-reference@1.2.1:
resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==}
dependencies: dependencies:
'@types/estree': 1.0.1 '@types/estree': 1.0.5
dev: true dev: true
/jest-worker@27.5.1: /jest-worker@27.5.1:
resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==}
engines: {node: '>= 10.13.0'} engines: {node: '>= 10.13.0'}
dependencies: dependencies:
'@types/node': 20.3.1 '@types/node': 20.11.5
merge-stream: 2.0.0 merge-stream: 2.0.0
supports-color: 8.1.1 supports-color: 8.1.1
dev: true dev: true
@ -672,8 +670,8 @@ packages:
resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
dev: true dev: true
/node-releases@2.0.12: /node-releases@2.0.14:
resolution: {integrity: sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==} resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==}
dev: true dev: true
/once@1.4.0: /once@1.4.0:
@ -700,8 +698,8 @@ packages:
engines: {node: '>=8.6'} engines: {node: '>=8.6'}
dev: true dev: true
/punycode@2.3.0: /punycode@2.3.1:
resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
engines: {node: '>=6'} engines: {node: '>=6'}
dev: true dev: true
@ -711,8 +709,8 @@ packages:
safe-buffer: 5.2.1 safe-buffer: 5.2.1
dev: true dev: true
/react-icons@4.9.0(react@18.2.0): /react-icons@5.0.1(react@18.2.0):
resolution: {integrity: sha512-ijUnFr//ycebOqujtqtV9PFS7JjhWg0QU6ykURVHuL4cbofvRCf3f6GMn9+fBktEFQOIVZnuAYLZdiyadRQRFg==} resolution: {integrity: sha512-WqLZJ4bLzlhmsvme6iFdgO8gfZP17rfjYEJ2m9RsZjZ+cc4k1hTzknEz63YS1MeT50kVzoa1Nz36f4BEx+Wigw==}
peerDependencies: peerDependencies:
react: '*' react: '*'
dependencies: dependencies:
@ -730,14 +728,14 @@ packages:
resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==} resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==}
engines: {node: '>= 0.10'} engines: {node: '>= 0.10'}
dependencies: dependencies:
resolve: 1.22.2 resolve: 1.22.8
dev: true dev: true
/resolve@1.22.2: /resolve@1.22.8:
resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==}
hasBin: true hasBin: true
dependencies: dependencies:
is-core-module: 2.12.1 is-core-module: 2.13.1
path-parse: 1.0.7 path-parse: 1.0.7
supports-preserve-symlinks-flag: 1.0.0 supports-preserve-symlinks-flag: 1.0.0
dev: true dev: true
@ -763,7 +761,7 @@ packages:
engines: {node: '>=10.0.0'} engines: {node: '>=10.0.0'}
hasBin: true hasBin: true
optionalDependencies: optionalDependencies:
fsevents: 2.3.2 fsevents: 2.3.3
dev: true dev: true
/safe-buffer@5.2.1: /safe-buffer@5.2.1:
@ -774,13 +772,13 @@ packages:
resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==} resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==}
engines: {node: '>= 10.13.0'} engines: {node: '>= 10.13.0'}
dependencies: dependencies:
'@types/json-schema': 7.0.12 '@types/json-schema': 7.0.15
ajv: 6.12.6 ajv: 6.12.6
ajv-keywords: 3.5.2(ajv@6.12.6) ajv-keywords: 3.5.2(ajv@6.12.6)
dev: true dev: true
/serialize-javascript@6.0.1: /serialize-javascript@6.0.2:
resolution: {integrity: sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==} resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==}
dependencies: dependencies:
randombytes: 2.1.0 randombytes: 2.1.0
dev: true dev: true
@ -838,8 +836,8 @@ packages:
engines: {node: '>=6'} engines: {node: '>=6'}
dev: true dev: true
/terser-webpack-plugin@5.3.9(webpack@5.87.0): /terser-webpack-plugin@5.3.10(webpack@5.89.0):
resolution: {integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==} resolution: {integrity: sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==}
engines: {node: '>= 10.13.0'} engines: {node: '>= 10.13.0'}
peerDependencies: peerDependencies:
'@swc/core': '*' '@swc/core': '*'
@ -854,27 +852,27 @@ packages:
uglify-js: uglify-js:
optional: true optional: true
dependencies: dependencies:
'@jridgewell/trace-mapping': 0.3.18 '@jridgewell/trace-mapping': 0.3.22
jest-worker: 27.5.1 jest-worker: 27.5.1
schema-utils: 3.3.0 schema-utils: 3.3.0
serialize-javascript: 6.0.1 serialize-javascript: 6.0.2
terser: 5.18.0 terser: 5.27.0
webpack: 5.87.0 webpack: 5.89.0
dev: true dev: true
/terser@5.18.0: /terser@5.27.0:
resolution: {integrity: sha512-pdL757Ig5a0I+owA42l6tIuEycRuM7FPY4n62h44mRLRfnOxJkkOHd6i89dOpwZlpF6JXBwaAHF6yWzFrt+QyA==} resolution: {integrity: sha512-bi1HRwVRskAjheeYl291n3JC4GgO/Ty4z1nVs5AAsmonJulGxpSektecnNedrwK9C7vpvVtcX3cw00VSLt7U2A==}
engines: {node: '>=10'} engines: {node: '>=10'}
hasBin: true hasBin: true
dependencies: dependencies:
'@jridgewell/source-map': 0.3.3 '@jridgewell/source-map': 0.3.5
acorn: 8.9.0 acorn: 8.11.3
commander: 2.20.3 commander: 2.20.3
source-map-support: 0.5.21 source-map-support: 0.5.21
dev: true dev: true
/tslib@2.5.3: /tslib@2.6.2:
resolution: {integrity: sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==} resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==}
dev: true dev: true
/typescript@4.9.5: /typescript@4.9.5:
@ -883,13 +881,17 @@ packages:
hasBin: true hasBin: true
dev: true dev: true
/update-browserslist-db@1.0.11(browserslist@4.21.9): /undici-types@5.26.5:
resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==} resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
dev: true
/update-browserslist-db@1.0.13(browserslist@4.22.2):
resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==}
hasBin: true hasBin: true
peerDependencies: peerDependencies:
browserslist: '>= 4.21.0' browserslist: '>= 4.21.0'
dependencies: dependencies:
browserslist: 4.21.9 browserslist: 4.22.2
escalade: 3.1.1 escalade: 3.1.1
picocolors: 1.0.0 picocolors: 1.0.0
dev: true dev: true
@ -897,7 +899,7 @@ packages:
/uri-js@4.4.1: /uri-js@4.4.1:
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
dependencies: dependencies:
punycode: 2.3.0 punycode: 2.3.1
dev: true dev: true
/url-join@4.0.1: /url-join@4.0.1:
@ -917,8 +919,8 @@ packages:
engines: {node: '>=10.13.0'} engines: {node: '>=10.13.0'}
dev: true dev: true
/webpack@5.87.0: /webpack@5.89.0:
resolution: {integrity: sha512-GOu1tNbQ7p1bDEoFRs2YPcfyGs8xq52yyPBZ3m2VGnXGtV9MxjrkABHm4V9Ia280OefsSLzvbVoXcfLxjKY/Iw==} resolution: {integrity: sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==}
engines: {node: '>=10.13.0'} engines: {node: '>=10.13.0'}
hasBin: true hasBin: true
peerDependencies: peerDependencies:
@ -927,17 +929,17 @@ packages:
webpack-cli: webpack-cli:
optional: true optional: true
dependencies: dependencies:
'@types/eslint-scope': 3.7.4 '@types/eslint-scope': 3.7.7
'@types/estree': 1.0.1 '@types/estree': 1.0.5
'@webassemblyjs/ast': 1.11.6 '@webassemblyjs/ast': 1.11.6
'@webassemblyjs/wasm-edit': 1.11.6 '@webassemblyjs/wasm-edit': 1.11.6
'@webassemblyjs/wasm-parser': 1.11.6 '@webassemblyjs/wasm-parser': 1.11.6
acorn: 8.9.0 acorn: 8.11.3
acorn-import-assertions: 1.9.0(acorn@8.9.0) acorn-import-assertions: 1.9.0(acorn@8.11.3)
browserslist: 4.21.9 browserslist: 4.22.2
chrome-trace-event: 1.0.3 chrome-trace-event: 1.0.3
enhanced-resolve: 5.15.0 enhanced-resolve: 5.15.0
es-module-lexer: 1.3.0 es-module-lexer: 1.4.1
eslint-scope: 5.1.1 eslint-scope: 5.1.1
events: 3.3.0 events: 3.3.0
glob-to-regexp: 0.4.1 glob-to-regexp: 0.4.1
@ -948,7 +950,7 @@ packages:
neo-async: 2.6.2 neo-async: 2.6.2
schema-utils: 3.3.0 schema-utils: 3.3.0
tapable: 2.2.1 tapable: 2.2.1
terser-webpack-plugin: 5.3.9(webpack@5.87.0) terser-webpack-plugin: 5.3.10(webpack@5.89.0)
watchpack: 2.4.0 watchpack: 2.4.0
webpack-sources: 3.2.3 webpack-sources: 3.2.3
transitivePeerDependencies: transitivePeerDependencies:

View file

@ -247,7 +247,7 @@ export async function getGeneralPersistent(): Promise<boolean> {
return (await call_backend("GENERAL_get_persistent", []))[0]; return (await call_backend("GENERAL_get_persistent", []))[0];
} }
export async function loadGeneralSettings(id: string, name: string, variant_id: number, variant_name: string | undefined): Promise<boolean> { export async function loadGeneralSettings(id: string, name: string, variant_id: string, variant_name: string | undefined): Promise<boolean> {
if (variant_name) { if (variant_name) {
return (await call_backend("GENERAL_load_settings", [id, name, variant_id, variant_name]))[0]; return (await call_backend("GENERAL_load_settings", [id, name, variant_id, variant_name]))[0];
} else { } else {
@ -256,6 +256,15 @@ export async function loadGeneralSettings(id: string, name: string, variant_id:
} }
export async function loadGeneralSettingsVariant(variant_id: string, variant_name: string | undefined): Promise<boolean> {
console.log("GENERAL_load_variant");
if (variant_name) {
return (await call_backend("GENERAL_load_variant", [variant_id, variant_name]))[0];
} else {
return (await call_backend("GENERAL_load_variant", [variant_id]))[0];
}
}
export async function loadGeneralDefaultSettings(): Promise<boolean> { export async function loadGeneralDefaultSettings(): Promise<boolean> {
return (await call_backend("GENERAL_load_default_settings", []))[0]; return (await call_backend("GENERAL_load_default_settings", []))[0];
} }
@ -361,6 +370,7 @@ export type StoreMetadata = {
} }
export async function searchStoreByAppId(id: number): Promise<StoreMetadata[]> { export async function searchStoreByAppId(id: number): Promise<StoreMetadata[]> {
console.log("WEB_search_by_app");
return (await call_backend("WEB_search_by_app", [id]))[0]; return (await call_backend("WEB_search_by_app", [id]))[0];
} }
@ -374,9 +384,11 @@ export async function storeDownloadById(id: string): Promise<VariantInfo[]> {
} }
export async function getAllSettingVariants(): Promise<VariantInfo[]> { export async function getAllSettingVariants(): Promise<VariantInfo[]> {
console.log("GENERAL_get_all_variants");
return (await call_backend("GENERAL_get_all_variants", [])); return (await call_backend("GENERAL_get_all_variants", []));
} }
export async function getCurrentSettingVariant(): Promise<VariantInfo> { export async function getCurrentSettingVariant(): Promise<VariantInfo> {
console.log("GENERAL_get_current_variant");
return (await call_backend("GENERAL_get_current_variant", []))[0]; return (await call_backend("GENERAL_get_current_variant", []))[0];
} }

View file

@ -1,7 +1,7 @@
import { import {
ButtonItem, ButtonItem,
definePlugin, definePlugin,
//DialogButton, DialogButton,
//Menu, //Menu,
//MenuItem, //MenuItem,
PanelSection, PanelSection,
@ -13,15 +13,15 @@ import {
ToggleField, ToggleField,
//Dropdown, //Dropdown,
Field, Field,
//DropdownOption, Dropdown,
//SingleDropdownOption, SingleDropdownOption,
//NotchLabel //NotchLabel
//gamepadDialogClasses, //gamepadDialogClasses,
//joinClassNames, //joinClassNames,
} from "decky-frontend-lib"; } from "decky-frontend-lib";
import { VFC, useState } from "react"; import { VFC, useState } from "react";
import { GiDrill, GiTimeBomb, GiTimeTrap, GiDynamite } from "react-icons/gi"; import { GiDrill, GiTimeBomb, GiTimeTrap, GiDynamite } from "react-icons/gi";
import { HiRefresh, HiTrash } from "react-icons/hi"; import { HiRefresh, HiTrash, HiPlus, HiUpload } from "react-icons/hi";
//import * as python from "./python"; //import * as python from "./python";
import * as backend from "./backend"; import * as backend from "./backend";
@ -73,7 +73,7 @@ import { Battery } from "./components/battery";
import { Cpus } from "./components/cpus"; import { Cpus } from "./components/cpus";
import { DevMessages } from "./components/message"; import { DevMessages } from "./components/message";
var periodicHook: NodeJS.Timer | null = null; var periodicHook: NodeJS.Timeout | null = null;
var lifetimeHook: any = null; var lifetimeHook: any = null;
var startHook: any = null; var startHook: any = null;
var endHook: any = null; var endHook: any = null;
@ -206,11 +206,12 @@ const registerCallbacks = function(autoclear: boolean) {
startHook = SteamClient.Apps.RegisterForGameActionStart((actionType, id) => { startHook = SteamClient.Apps.RegisterForGameActionStart((actionType, id) => {
//@ts-ignore //@ts-ignore
let gameInfo: any = appStore.GetAppOverviewByGameID(id); let gameInfo: any = appStore.GetAppOverviewByGameID(id);
let appId = gameInfo.appid.toString();
backend.log(backend.LogLevel.Info, "RegisterForGameActionStart callback(" + actionType + ", " + id + ")"); backend.log(backend.LogLevel.Info, "RegisterForGameActionStart callback(" + actionType + ", " + id + ")");
// don't use gameInfo.appid, haha // don't use gameInfo.appid, haha
backend.resolve( backend.resolve(
backend.loadGeneralSettings(id.toString(), gameInfo.display_name, 0, undefined), backend.loadGeneralSettings(appId, gameInfo.display_name, "0", undefined),
(ok: boolean) => { (ok: boolean) => {
backend.log(backend.LogLevel.Debug, "Loading settings ok? " + ok); backend.log(backend.LogLevel.Debug, "Loading settings ok? " + ok);
reload(); reload();
@ -303,6 +304,11 @@ const Content: VFC<{ serverAPI: ServerAPI }> = ({}) => {
) )
} }
const variantOptions: SingleDropdownOption[] = (get_value(VARIANTS_GEN) as backend.VariantInfo[]).map((elem) => {return {
data: elem,
label: <span>{elem.name}</span>,
};});
return ( return (
<PanelSection> <PanelSection>
<DevMessages idc={idc}/> <DevMessages idc={idc}/>
@ -338,6 +344,69 @@ const Content: VFC<{ serverAPI: ServerAPI }> = ({}) => {
{get_value(NAME_GEN)} {get_value(NAME_GEN)}
</Field> </Field>
</PanelSectionRow> </PanelSectionRow>
<PanelSectionRow>
<Field
label={tr("Profile Variant")} // TODO translate
>
<Dropdown
menuLabel={tr("Profile Variant")}
rgOptions={variantOptions}
selectedOption={variantOptions.find((val: SingleDropdownOption, _index, _arr) => {
backend.log(backend.LogLevel.Debug, "POWERTOOLS: looking for data " + (get_value(CURRENT_VARIANT_GEN) as backend.VariantInfo).toString());
return (val.data as backend.VariantInfo).id == (get_value(CURRENT_VARIANT_GEN) as backend.VariantInfo).id;
})}
strDefaultLabel={(get_value(VARIANTS_GEN) as backend.VariantInfo[])[0].name}
onChange={(elem: SingleDropdownOption) => {
let data = elem.data as backend.VariantInfo;
backend.log(backend.LogLevel.Debug, "Profile variant dropdown selected " + elem.data.toString());
backend.loadGeneralSettingsVariant(data.id, data.name);
set_value(CURRENT_VARIANT_GEN, elem.data as backend.VariantInfo);
reloadGUI("ProfileVariantGovernor");
}}
/>
</Field>
</PanelSectionRow>
<PanelSectionRow style={{
alignItems: "center",
display: "flex",
justifyContent: "space-around",
}}>
<DialogButton
style={{
maxWidth: "45%",
minWidth: "auto",
}}
//layout="below"
onClick={(_: MouseEvent) => {
backend.log(backend.LogLevel.Debug, "Creating new PowerTools settings variant");
backend.resolve(
backend.loadGeneralSettingsVariant("please give me a new ID k thx bye" /* anything that cannot be parsed as a u64 will be set to u64::MAX, which will cause the back-end to auto-generate an ID */, undefined),
(ok: boolean) => {
backend.log(backend.LogLevel.Debug, "New settings variant ok? " + ok);
reload();
backend.resolve(backend.waitForComplete(), (_) => {
backend.log(backend.LogLevel.Debug, "Trying to tell UI to re-render due to new settings variant");
tryNotifyProfileChange();
});
}
);
}}
>
<HiPlus/>
</DialogButton>
<DialogButton
style={{
maxWidth: "45%",
minWidth: "auto",
}}
//layout="below"
onClick={(_: MouseEvent) => {
backend.log(backend.LogLevel.Debug, "Clicked on unimplemented upload button");
}}
>
<HiUpload/>
</DialogButton>
</PanelSectionRow>
<Debug idc={idc}/> <Debug idc={idc}/>
@ -389,9 +458,9 @@ export default definePlugin((serverApi: ServerAPI) => {
content: <Content serverAPI={serverApi} />, content: <Content serverAPI={serverApi} />,
icon: ico, icon: ico,
onDismount() { onDismount() {
tryNotifyProfileChange = function() {};
backend.log(backend.LogLevel.Debug, "PowerTools shutting down"); backend.log(backend.LogLevel.Debug, "PowerTools shutting down");
clearHooks(); clearHooks();
tryNotifyProfileChange = function() {};
//serverApi.routerHook.removeRoute("/decky-plugin-test"); //serverApi.routerHook.removeRoute("/decky-plugin-test");
}, },
}; };