Add front-end components for setting variants, fix back-end segfault
This commit is contained in:
parent
743f642580
commit
bba9452383
11 changed files with 309 additions and 157 deletions
1
backend/Cargo.lock
generated
1
backend/Cargo.lock
generated
|
@ -1073,6 +1073,7 @@ version = "1.5.0-ng1"
|
|||
dependencies = [
|
||||
"async-trait",
|
||||
"community_settings_core",
|
||||
"libc",
|
||||
"libryzenadj",
|
||||
"limits_core",
|
||||
"log",
|
||||
|
|
|
@ -31,6 +31,7 @@ limits_core = { version = "3", path = "./limits_core" }
|
|||
community_settings_core = { version = "0.1", path = "./community_settings_core" }
|
||||
regex = "1"
|
||||
smokepatio = { version = "0.1", features = [ "std" ], path = "../../smokepatio" }
|
||||
libc = "0.2"
|
||||
#libryzenadj = { version = "0.14", path = "../../libryzenadj-rs-14" }
|
||||
libryzenadj = { version = "0.13" }
|
||||
# ureq's tls feature does not like musl targets
|
||||
|
|
|
@ -65,17 +65,17 @@ pub fn load_settings(
|
|||
move |params_in: super::ApiParameterType| {
|
||||
if let Some(Primitive::String(id)) = params_in.get(0) {
|
||||
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) {
|
||||
setter(id.parse().unwrap_or_default(),
|
||||
name.to_owned(),
|
||||
*variant_id as _,
|
||||
variant_id.parse().unwrap_or_default(),
|
||||
Some(variant_name.to_owned()));
|
||||
vec![true.into()]
|
||||
} else {
|
||||
setter(id.parse().unwrap_or_default(),
|
||||
name.to_owned(),
|
||||
*variant_id as _,
|
||||
variant_id.parse().unwrap_or_default(),
|
||||
None);
|
||||
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
|
||||
pub fn load_default_settings(
|
||||
sender: Sender<ApiMessage>,
|
||||
|
|
|
@ -23,6 +23,7 @@ pub enum ApiMessage {
|
|||
PowerVibeCheck,
|
||||
WaitForEmptyQueue(Callback<()>),
|
||||
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,
|
||||
LoadSystemSettings,
|
||||
GetLimits(Callback<super::SettingsLimits>),
|
||||
|
@ -275,6 +276,7 @@ fn print_errors(call_name: &str, errors: Vec<crate::settings::SettingError>) {
|
|||
|
||||
impl ApiMessageHandler {
|
||||
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
|
||||
while let Ok(msg) = self.intake.recv() {
|
||||
let mut dirty = self.process(settings, msg);
|
||||
|
@ -387,6 +389,14 @@ impl ApiMessageHandler {
|
|||
}
|
||||
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 => {
|
||||
match settings.load_file(
|
||||
crate::consts::DEFAULT_SETTINGS_FILE.into(),
|
||||
|
|
|
@ -254,6 +254,10 @@ fn main() -> Result<(), ()> {
|
|||
"GENERAL_load_settings",
|
||||
api::general::load_settings(api_sender.clone()),
|
||||
)
|
||||
.register(
|
||||
"GENERAL_load_variant",
|
||||
api::general::load_variant(api_sender.clone()),
|
||||
)
|
||||
.register(
|
||||
"GENERAL_load_default_settings",
|
||||
api::general::load_default_settings(api_sender.clone()),
|
||||
|
@ -318,6 +322,8 @@ fn main() -> Result<(), ()> {
|
|||
api::web::download_new_config(api_sender.clone())
|
||||
);
|
||||
|
||||
utility::ioperm_power_ec();
|
||||
|
||||
if let Err(e) = loaded_settings.on_set() {
|
||||
e.iter()
|
||||
.for_each(|e| log::error!("Startup Settings.on_set() error: {}", e));
|
||||
|
|
|
@ -229,6 +229,15 @@ impl Settings {
|
|||
) -> Result<bool, SettingError> {
|
||||
let json_path = crate::utility::settings_dir().join(&filename);
|
||||
if json_path.exists() {
|
||||
if variant == u64::MAX {
|
||||
*self.general.persistent() = true;
|
||||
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),
|
||||
setting: SettingVariant::General,
|
||||
})?;
|
||||
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"));
|
||||
self.general.variant_name(variant_name);
|
||||
} else {
|
||||
let file_json = FileJson::open(&json_path).map_err(|e| SettingError {
|
||||
msg: format!("Failed to open settings {}: {}", json_path.display(), e),
|
||||
setting: SettingVariant::General,
|
||||
|
@ -250,6 +259,8 @@ impl Settings {
|
|||
self.gpu = x.gpu;
|
||||
self.battery = x.battery;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
if system_defaults {
|
||||
self.load_system_default(name, variant, variant_name);
|
||||
|
|
|
@ -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)]
|
||||
mod generate {
|
||||
#[test]
|
||||
|
|
|
@ -31,16 +31,16 @@
|
|||
"@rollup/plugin-replace": "^4.0.0",
|
||||
"@rollup/plugin-typescript": "^8.5.0",
|
||||
"@types/react": "16.14.0",
|
||||
"@types/webpack": "^5.28.1",
|
||||
"@types/webpack": "^5.28.5",
|
||||
"rollup": "^2.79.1",
|
||||
"rollup-plugin-import-assets": "^1.1.1",
|
||||
"shx": "^0.3.4",
|
||||
"tslib": "^2.5.3",
|
||||
"tslib": "^2.6.2",
|
||||
"typescript": "^4.9.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"decky-frontend-lib": "~3.21.1",
|
||||
"react-icons": "^4.9.0",
|
||||
"decky-frontend-lib": "~3.24.3",
|
||||
"react-icons": "^5.0.1",
|
||||
"usdpl-front": "file:src/usdpl_front"
|
||||
}
|
||||
}
|
||||
|
|
248
pnpm-lock.yaml
248
pnpm-lock.yaml
|
@ -6,11 +6,11 @@ settings:
|
|||
|
||||
dependencies:
|
||||
decky-frontend-lib:
|
||||
specifier: ~3.21.1
|
||||
version: 3.21.1
|
||||
specifier: ~3.24.3
|
||||
version: 3.24.3
|
||||
react-icons:
|
||||
specifier: ^4.9.0
|
||||
version: 4.9.0(react@18.2.0)
|
||||
specifier: ^5.0.1
|
||||
version: 5.0.1(react@18.2.0)
|
||||
usdpl-front:
|
||||
specifier: file:src/usdpl_front
|
||||
version: file:src/usdpl_front
|
||||
|
@ -30,13 +30,13 @@ devDependencies:
|
|||
version: 4.0.0(rollup@2.79.1)
|
||||
'@rollup/plugin-typescript':
|
||||
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':
|
||||
specifier: 16.14.0
|
||||
version: 16.14.0
|
||||
'@types/webpack':
|
||||
specifier: ^5.28.1
|
||||
version: 5.28.1
|
||||
specifier: ^5.28.5
|
||||
version: 5.28.5
|
||||
rollup:
|
||||
specifier: ^2.79.1
|
||||
version: 2.79.1
|
||||
|
@ -47,8 +47,8 @@ devDependencies:
|
|||
specifier: ^0.3.4
|
||||
version: 0.3.4
|
||||
tslib:
|
||||
specifier: ^2.5.3
|
||||
version: 2.5.3
|
||||
specifier: ^2.6.2
|
||||
version: 2.6.2
|
||||
typescript:
|
||||
specifier: ^4.9.5
|
||||
version: 4.9.5
|
||||
|
@ -61,11 +61,11 @@ packages:
|
|||
dependencies:
|
||||
'@jridgewell/set-array': 1.1.2
|
||||
'@jridgewell/sourcemap-codec': 1.4.15
|
||||
'@jridgewell/trace-mapping': 0.3.18
|
||||
'@jridgewell/trace-mapping': 0.3.22
|
||||
dev: true
|
||||
|
||||
/@jridgewell/resolve-uri@3.1.0:
|
||||
resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==}
|
||||
/@jridgewell/resolve-uri@3.1.1:
|
||||
resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==}
|
||||
engines: {node: '>=6.0.0'}
|
||||
dev: true
|
||||
|
||||
|
@ -74,26 +74,22 @@ packages:
|
|||
engines: {node: '>=6.0.0'}
|
||||
dev: true
|
||||
|
||||
/@jridgewell/source-map@0.3.3:
|
||||
resolution: {integrity: sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg==}
|
||||
/@jridgewell/source-map@0.3.5:
|
||||
resolution: {integrity: sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==}
|
||||
dependencies:
|
||||
'@jridgewell/gen-mapping': 0.3.3
|
||||
'@jridgewell/trace-mapping': 0.3.18
|
||||
dev: true
|
||||
|
||||
/@jridgewell/sourcemap-codec@1.4.14:
|
||||
resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==}
|
||||
'@jridgewell/trace-mapping': 0.3.22
|
||||
dev: true
|
||||
|
||||
/@jridgewell/sourcemap-codec@1.4.15:
|
||||
resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==}
|
||||
dev: true
|
||||
|
||||
/@jridgewell/trace-mapping@0.3.18:
|
||||
resolution: {integrity: sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==}
|
||||
/@jridgewell/trace-mapping@0.3.22:
|
||||
resolution: {integrity: sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==}
|
||||
dependencies:
|
||||
'@jridgewell/resolve-uri': 3.1.0
|
||||
'@jridgewell/sourcemap-codec': 1.4.14
|
||||
'@jridgewell/resolve-uri': 3.1.1
|
||||
'@jridgewell/sourcemap-codec': 1.4.15
|
||||
dev: true
|
||||
|
||||
/@rollup/plugin-commonjs@21.1.0(rollup@2.79.1):
|
||||
|
@ -108,7 +104,7 @@ packages:
|
|||
glob: 7.2.3
|
||||
is-reference: 1.2.1
|
||||
magic-string: 0.25.9
|
||||
resolve: 1.22.2
|
||||
resolve: 1.22.8
|
||||
rollup: 2.79.1
|
||||
dev: true
|
||||
|
||||
|
@ -132,7 +128,7 @@ packages:
|
|||
deepmerge: 4.3.1
|
||||
is-builtin-module: 3.2.1
|
||||
is-module: 1.0.0
|
||||
resolve: 1.22.2
|
||||
resolve: 1.22.8
|
||||
rollup: 2.79.1
|
||||
dev: true
|
||||
|
||||
|
@ -146,7 +142,7 @@ packages:
|
|||
rollup: 2.79.1
|
||||
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==}
|
||||
engines: {node: '>=8.0.0'}
|
||||
peerDependencies:
|
||||
|
@ -158,9 +154,9 @@ packages:
|
|||
optional: true
|
||||
dependencies:
|
||||
'@rollup/pluginutils': 3.1.0(rollup@2.79.1)
|
||||
resolve: 1.22.2
|
||||
resolve: 1.22.8
|
||||
rollup: 2.79.1
|
||||
tslib: 2.5.3
|
||||
tslib: 2.6.2
|
||||
typescript: 4.9.5
|
||||
dev: true
|
||||
|
||||
|
@ -176,59 +172,61 @@ packages:
|
|||
rollup: 2.79.1
|
||||
dev: true
|
||||
|
||||
/@types/eslint-scope@3.7.4:
|
||||
resolution: {integrity: sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==}
|
||||
/@types/eslint-scope@3.7.7:
|
||||
resolution: {integrity: sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==}
|
||||
dependencies:
|
||||
'@types/eslint': 8.40.2
|
||||
'@types/estree': 1.0.1
|
||||
'@types/eslint': 8.56.2
|
||||
'@types/estree': 1.0.5
|
||||
dev: true
|
||||
|
||||
/@types/eslint@8.40.2:
|
||||
resolution: {integrity: sha512-PRVjQ4Eh9z9pmmtaq8nTjZjQwKFk7YIHIud3lRoKRBgUQjgjRmoGxxGEPXQkF+lH7QkHJRNr5F4aBgYCW0lqpQ==}
|
||||
/@types/eslint@8.56.2:
|
||||
resolution: {integrity: sha512-uQDwm1wFHmbBbCZCqAlq6Do9LYwByNZHWzXppSnay9SuwJ+VRbjkbLABer54kcPnMSlG6Fdiy2yaFXm/z9Z5gw==}
|
||||
dependencies:
|
||||
'@types/estree': 1.0.1
|
||||
'@types/json-schema': 7.0.12
|
||||
'@types/estree': 1.0.5
|
||||
'@types/json-schema': 7.0.15
|
||||
dev: true
|
||||
|
||||
/@types/estree@0.0.39:
|
||||
resolution: {integrity: sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==}
|
||||
dev: true
|
||||
|
||||
/@types/estree@1.0.1:
|
||||
resolution: {integrity: sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==}
|
||||
/@types/estree@1.0.5:
|
||||
resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==}
|
||||
dev: true
|
||||
|
||||
/@types/json-schema@7.0.12:
|
||||
resolution: {integrity: sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==}
|
||||
/@types/json-schema@7.0.15:
|
||||
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
|
||||
dev: true
|
||||
|
||||
/@types/node@20.3.1:
|
||||
resolution: {integrity: sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==}
|
||||
/@types/node@20.11.5:
|
||||
resolution: {integrity: sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==}
|
||||
dependencies:
|
||||
undici-types: 5.26.5
|
||||
dev: true
|
||||
|
||||
/@types/prop-types@15.7.5:
|
||||
resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==}
|
||||
/@types/prop-types@15.7.11:
|
||||
resolution: {integrity: sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==}
|
||||
dev: true
|
||||
|
||||
/@types/react@16.14.0:
|
||||
resolution: {integrity: sha512-jJjHo1uOe+NENRIBvF46tJimUvPnmbQ41Ax0pEm7pRvhPg+wuj8VMOHHiMvaGmZRzRrCtm7KnL5OOE/6kHPK8w==}
|
||||
dependencies:
|
||||
'@types/prop-types': 15.7.5
|
||||
csstype: 3.1.2
|
||||
'@types/prop-types': 15.7.11
|
||||
csstype: 3.1.3
|
||||
dev: true
|
||||
|
||||
/@types/resolve@1.17.1:
|
||||
resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==}
|
||||
dependencies:
|
||||
'@types/node': 20.3.1
|
||||
'@types/node': 20.11.5
|
||||
dev: true
|
||||
|
||||
/@types/webpack@5.28.1:
|
||||
resolution: {integrity: sha512-qw1MqGZclCoBrpiSe/hokSgQM/su8Ocpl3L/YHE0L6moyaypg4+5F7Uzq7NgaPKPxUxUbQ4fLPLpDWdR27bCZw==}
|
||||
/@types/webpack@5.28.5:
|
||||
resolution: {integrity: sha512-wR87cgvxj3p6D0Crt1r5avwqffqPXUkNlnQ1mjU93G7gCuFjufZR4I6j8cz5g1F1tTYpfOOFvly+cmIQwL9wvw==}
|
||||
dependencies:
|
||||
'@types/node': 20.3.1
|
||||
'@types/node': 20.11.5
|
||||
tapable: 2.2.1
|
||||
webpack: 5.87.0
|
||||
webpack: 5.89.0
|
||||
transitivePeerDependencies:
|
||||
- '@swc/core'
|
||||
- esbuild
|
||||
|
@ -350,16 +348,16 @@ packages:
|
|||
resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==}
|
||||
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==}
|
||||
peerDependencies:
|
||||
acorn: ^8
|
||||
dependencies:
|
||||
acorn: 8.9.0
|
||||
acorn: 8.11.3
|
||||
dev: true
|
||||
|
||||
/acorn@8.9.0:
|
||||
resolution: {integrity: sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==}
|
||||
/acorn@8.11.3:
|
||||
resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==}
|
||||
engines: {node: '>=0.4.0'}
|
||||
hasBin: true
|
||||
dev: true
|
||||
|
@ -392,15 +390,15 @@ packages:
|
|||
concat-map: 0.0.1
|
||||
dev: true
|
||||
|
||||
/browserslist@4.21.9:
|
||||
resolution: {integrity: sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==}
|
||||
/browserslist@4.22.2:
|
||||
resolution: {integrity: sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==}
|
||||
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
caniuse-lite: 1.0.30001503
|
||||
electron-to-chromium: 1.4.433
|
||||
node-releases: 2.0.12
|
||||
update-browserslist-db: 1.0.11(browserslist@4.21.9)
|
||||
caniuse-lite: 1.0.30001579
|
||||
electron-to-chromium: 1.4.640
|
||||
node-releases: 2.0.14
|
||||
update-browserslist-db: 1.0.13(browserslist@4.22.2)
|
||||
dev: true
|
||||
|
||||
/buffer-from@1.1.2:
|
||||
|
@ -412,8 +410,8 @@ packages:
|
|||
engines: {node: '>=6'}
|
||||
dev: true
|
||||
|
||||
/caniuse-lite@1.0.30001503:
|
||||
resolution: {integrity: sha512-Sf9NiF+wZxPfzv8Z3iS0rXM1Do+iOy2Lxvib38glFX+08TCYYYGR5fRJXk4d77C4AYwhUjgYgMsMudbh2TqCKw==}
|
||||
/caniuse-lite@1.0.30001579:
|
||||
resolution: {integrity: sha512-u5AUVkixruKHJjw/pj9wISlcMpgFWzSrczLZbrqBSxukQixmg0SJ5sZTpvaFvxU0HoQKd4yoyAogyrAz9pzJnA==}
|
||||
dev: true
|
||||
|
||||
/chrome-trace-event@1.0.3:
|
||||
|
@ -433,12 +431,12 @@ packages:
|
|||
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
|
||||
dev: true
|
||||
|
||||
/csstype@3.1.2:
|
||||
resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==}
|
||||
/csstype@3.1.3:
|
||||
resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==}
|
||||
dev: true
|
||||
|
||||
/decky-frontend-lib@3.21.1:
|
||||
resolution: {integrity: sha512-30605ET9qqZ6St6I9WmMmLGgSrTIdMwo7xy85+lRaF1miUd2icOGEJjwnbVcZDdkal+1fJ3tNEDXlchVfG4TrA==}
|
||||
/decky-frontend-lib@3.24.3:
|
||||
resolution: {integrity: sha512-293oUaAgLrezvoz+TOQkarjwAlVlejkelB1WjtxQV4Y5qMpUZhNUtfpQAscGhwg9oQy6UGpZ5urkdPzLiVY52w==}
|
||||
dev: false
|
||||
|
||||
/deepmerge@4.3.1:
|
||||
|
@ -446,8 +444,8 @@ packages:
|
|||
engines: {node: '>=0.10.0'}
|
||||
dev: true
|
||||
|
||||
/electron-to-chromium@1.4.433:
|
||||
resolution: {integrity: sha512-MGO1k0w1RgrfdbLVwmXcDhHHuxCn2qRgR7dYsJvWFKDttvYPx6FNzCGG0c/fBBvzK2LDh3UV7Tt9awnHnvAAUQ==}
|
||||
/electron-to-chromium@1.4.640:
|
||||
resolution: {integrity: sha512-z/6oZ/Muqk4BaE7P69bXhUhpJbUM9ZJeka43ZwxsDshKtePns4mhBlh8bU5+yrnOnz3fhG82XLzGUXazOmsWnA==}
|
||||
dev: true
|
||||
|
||||
/enhanced-resolve@5.15.0:
|
||||
|
@ -458,8 +456,8 @@ packages:
|
|||
tapable: 2.2.1
|
||||
dev: true
|
||||
|
||||
/es-module-lexer@1.3.0:
|
||||
resolution: {integrity: sha512-vZK7T0N2CBmBOixhmjdqx2gWVbFZ4DXZ/NyRMZVlJXPa7CyFS+/a4QQsDGDQy9ZfEzxFuNEsMLeQJnKP2p5/JA==}
|
||||
/es-module-lexer@1.4.1:
|
||||
resolution: {integrity: sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==}
|
||||
dev: true
|
||||
|
||||
/escalade@3.1.1:
|
||||
|
@ -521,16 +519,16 @@ packages:
|
|||
resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==}
|
||||
dev: true
|
||||
|
||||
/fsevents@2.3.2:
|
||||
resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==}
|
||||
/fsevents@2.3.3:
|
||||
resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
|
||||
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
|
||||
os: [darwin]
|
||||
requiresBuild: true
|
||||
dev: true
|
||||
optional: true
|
||||
|
||||
/function-bind@1.1.1:
|
||||
resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==}
|
||||
/function-bind@1.1.2:
|
||||
resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==}
|
||||
dev: true
|
||||
|
||||
/glob-to-regexp@0.4.1:
|
||||
|
@ -557,11 +555,11 @@ packages:
|
|||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/has@1.0.3:
|
||||
resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==}
|
||||
engines: {node: '>= 0.4.0'}
|
||||
/hasown@2.0.0:
|
||||
resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dependencies:
|
||||
function-bind: 1.1.1
|
||||
function-bind: 1.1.2
|
||||
dev: true
|
||||
|
||||
/inflight@1.0.6:
|
||||
|
@ -587,10 +585,10 @@ packages:
|
|||
builtin-modules: 3.3.0
|
||||
dev: true
|
||||
|
||||
/is-core-module@2.12.1:
|
||||
resolution: {integrity: sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==}
|
||||
/is-core-module@2.13.1:
|
||||
resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==}
|
||||
dependencies:
|
||||
has: 1.0.3
|
||||
hasown: 2.0.0
|
||||
dev: true
|
||||
|
||||
/is-module@1.0.0:
|
||||
|
@ -600,14 +598,14 @@ packages:
|
|||
/is-reference@1.2.1:
|
||||
resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==}
|
||||
dependencies:
|
||||
'@types/estree': 1.0.1
|
||||
'@types/estree': 1.0.5
|
||||
dev: true
|
||||
|
||||
/jest-worker@27.5.1:
|
||||
resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==}
|
||||
engines: {node: '>= 10.13.0'}
|
||||
dependencies:
|
||||
'@types/node': 20.3.1
|
||||
'@types/node': 20.11.5
|
||||
merge-stream: 2.0.0
|
||||
supports-color: 8.1.1
|
||||
dev: true
|
||||
|
@ -672,8 +670,8 @@ packages:
|
|||
resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
|
||||
dev: true
|
||||
|
||||
/node-releases@2.0.12:
|
||||
resolution: {integrity: sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==}
|
||||
/node-releases@2.0.14:
|
||||
resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==}
|
||||
dev: true
|
||||
|
||||
/once@1.4.0:
|
||||
|
@ -700,8 +698,8 @@ packages:
|
|||
engines: {node: '>=8.6'}
|
||||
dev: true
|
||||
|
||||
/punycode@2.3.0:
|
||||
resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==}
|
||||
/punycode@2.3.1:
|
||||
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
|
||||
engines: {node: '>=6'}
|
||||
dev: true
|
||||
|
||||
|
@ -711,8 +709,8 @@ packages:
|
|||
safe-buffer: 5.2.1
|
||||
dev: true
|
||||
|
||||
/react-icons@4.9.0(react@18.2.0):
|
||||
resolution: {integrity: sha512-ijUnFr//ycebOqujtqtV9PFS7JjhWg0QU6ykURVHuL4cbofvRCf3f6GMn9+fBktEFQOIVZnuAYLZdiyadRQRFg==}
|
||||
/react-icons@5.0.1(react@18.2.0):
|
||||
resolution: {integrity: sha512-WqLZJ4bLzlhmsvme6iFdgO8gfZP17rfjYEJ2m9RsZjZ+cc4k1hTzknEz63YS1MeT50kVzoa1Nz36f4BEx+Wigw==}
|
||||
peerDependencies:
|
||||
react: '*'
|
||||
dependencies:
|
||||
|
@ -730,14 +728,14 @@ packages:
|
|||
resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==}
|
||||
engines: {node: '>= 0.10'}
|
||||
dependencies:
|
||||
resolve: 1.22.2
|
||||
resolve: 1.22.8
|
||||
dev: true
|
||||
|
||||
/resolve@1.22.2:
|
||||
resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==}
|
||||
/resolve@1.22.8:
|
||||
resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
is-core-module: 2.12.1
|
||||
is-core-module: 2.13.1
|
||||
path-parse: 1.0.7
|
||||
supports-preserve-symlinks-flag: 1.0.0
|
||||
dev: true
|
||||
|
@ -763,7 +761,7 @@ packages:
|
|||
engines: {node: '>=10.0.0'}
|
||||
hasBin: true
|
||||
optionalDependencies:
|
||||
fsevents: 2.3.2
|
||||
fsevents: 2.3.3
|
||||
dev: true
|
||||
|
||||
/safe-buffer@5.2.1:
|
||||
|
@ -774,13 +772,13 @@ packages:
|
|||
resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==}
|
||||
engines: {node: '>= 10.13.0'}
|
||||
dependencies:
|
||||
'@types/json-schema': 7.0.12
|
||||
'@types/json-schema': 7.0.15
|
||||
ajv: 6.12.6
|
||||
ajv-keywords: 3.5.2(ajv@6.12.6)
|
||||
dev: true
|
||||
|
||||
/serialize-javascript@6.0.1:
|
||||
resolution: {integrity: sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==}
|
||||
/serialize-javascript@6.0.2:
|
||||
resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==}
|
||||
dependencies:
|
||||
randombytes: 2.1.0
|
||||
dev: true
|
||||
|
@ -838,8 +836,8 @@ packages:
|
|||
engines: {node: '>=6'}
|
||||
dev: true
|
||||
|
||||
/terser-webpack-plugin@5.3.9(webpack@5.87.0):
|
||||
resolution: {integrity: sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==}
|
||||
/terser-webpack-plugin@5.3.10(webpack@5.89.0):
|
||||
resolution: {integrity: sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==}
|
||||
engines: {node: '>= 10.13.0'}
|
||||
peerDependencies:
|
||||
'@swc/core': '*'
|
||||
|
@ -854,27 +852,27 @@ packages:
|
|||
uglify-js:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@jridgewell/trace-mapping': 0.3.18
|
||||
'@jridgewell/trace-mapping': 0.3.22
|
||||
jest-worker: 27.5.1
|
||||
schema-utils: 3.3.0
|
||||
serialize-javascript: 6.0.1
|
||||
terser: 5.18.0
|
||||
webpack: 5.87.0
|
||||
serialize-javascript: 6.0.2
|
||||
terser: 5.27.0
|
||||
webpack: 5.89.0
|
||||
dev: true
|
||||
|
||||
/terser@5.18.0:
|
||||
resolution: {integrity: sha512-pdL757Ig5a0I+owA42l6tIuEycRuM7FPY4n62h44mRLRfnOxJkkOHd6i89dOpwZlpF6JXBwaAHF6yWzFrt+QyA==}
|
||||
/terser@5.27.0:
|
||||
resolution: {integrity: sha512-bi1HRwVRskAjheeYl291n3JC4GgO/Ty4z1nVs5AAsmonJulGxpSektecnNedrwK9C7vpvVtcX3cw00VSLt7U2A==}
|
||||
engines: {node: '>=10'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@jridgewell/source-map': 0.3.3
|
||||
acorn: 8.9.0
|
||||
'@jridgewell/source-map': 0.3.5
|
||||
acorn: 8.11.3
|
||||
commander: 2.20.3
|
||||
source-map-support: 0.5.21
|
||||
dev: true
|
||||
|
||||
/tslib@2.5.3:
|
||||
resolution: {integrity: sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==}
|
||||
/tslib@2.6.2:
|
||||
resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==}
|
||||
dev: true
|
||||
|
||||
/typescript@4.9.5:
|
||||
|
@ -883,13 +881,17 @@ packages:
|
|||
hasBin: true
|
||||
dev: true
|
||||
|
||||
/update-browserslist-db@1.0.11(browserslist@4.21.9):
|
||||
resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==}
|
||||
/undici-types@5.26.5:
|
||||
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
|
||||
peerDependencies:
|
||||
browserslist: '>= 4.21.0'
|
||||
dependencies:
|
||||
browserslist: 4.21.9
|
||||
browserslist: 4.22.2
|
||||
escalade: 3.1.1
|
||||
picocolors: 1.0.0
|
||||
dev: true
|
||||
|
@ -897,7 +899,7 @@ packages:
|
|||
/uri-js@4.4.1:
|
||||
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
|
||||
dependencies:
|
||||
punycode: 2.3.0
|
||||
punycode: 2.3.1
|
||||
dev: true
|
||||
|
||||
/url-join@4.0.1:
|
||||
|
@ -917,8 +919,8 @@ packages:
|
|||
engines: {node: '>=10.13.0'}
|
||||
dev: true
|
||||
|
||||
/webpack@5.87.0:
|
||||
resolution: {integrity: sha512-GOu1tNbQ7p1bDEoFRs2YPcfyGs8xq52yyPBZ3m2VGnXGtV9MxjrkABHm4V9Ia280OefsSLzvbVoXcfLxjKY/Iw==}
|
||||
/webpack@5.89.0:
|
||||
resolution: {integrity: sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==}
|
||||
engines: {node: '>=10.13.0'}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
|
@ -927,17 +929,17 @@ packages:
|
|||
webpack-cli:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@types/eslint-scope': 3.7.4
|
||||
'@types/estree': 1.0.1
|
||||
'@types/eslint-scope': 3.7.7
|
||||
'@types/estree': 1.0.5
|
||||
'@webassemblyjs/ast': 1.11.6
|
||||
'@webassemblyjs/wasm-edit': 1.11.6
|
||||
'@webassemblyjs/wasm-parser': 1.11.6
|
||||
acorn: 8.9.0
|
||||
acorn-import-assertions: 1.9.0(acorn@8.9.0)
|
||||
browserslist: 4.21.9
|
||||
acorn: 8.11.3
|
||||
acorn-import-assertions: 1.9.0(acorn@8.11.3)
|
||||
browserslist: 4.22.2
|
||||
chrome-trace-event: 1.0.3
|
||||
enhanced-resolve: 5.15.0
|
||||
es-module-lexer: 1.3.0
|
||||
es-module-lexer: 1.4.1
|
||||
eslint-scope: 5.1.1
|
||||
events: 3.3.0
|
||||
glob-to-regexp: 0.4.1
|
||||
|
@ -948,7 +950,7 @@ packages:
|
|||
neo-async: 2.6.2
|
||||
schema-utils: 3.3.0
|
||||
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
|
||||
webpack-sources: 3.2.3
|
||||
transitivePeerDependencies:
|
||||
|
|
|
@ -247,7 +247,7 @@ export async function getGeneralPersistent(): Promise<boolean> {
|
|||
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) {
|
||||
return (await call_backend("GENERAL_load_settings", [id, name, variant_id, variant_name]))[0];
|
||||
} 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> {
|
||||
return (await call_backend("GENERAL_load_default_settings", []))[0];
|
||||
}
|
||||
|
@ -361,6 +370,7 @@ export type 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];
|
||||
}
|
||||
|
||||
|
@ -374,9 +384,11 @@ export async function storeDownloadById(id: string): Promise<VariantInfo[]> {
|
|||
}
|
||||
|
||||
export async function getAllSettingVariants(): Promise<VariantInfo[]> {
|
||||
console.log("GENERAL_get_all_variants");
|
||||
return (await call_backend("GENERAL_get_all_variants", []));
|
||||
}
|
||||
|
||||
export async function getCurrentSettingVariant(): Promise<VariantInfo> {
|
||||
console.log("GENERAL_get_current_variant");
|
||||
return (await call_backend("GENERAL_get_current_variant", []))[0];
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import {
|
||||
ButtonItem,
|
||||
definePlugin,
|
||||
//DialogButton,
|
||||
DialogButton,
|
||||
//Menu,
|
||||
//MenuItem,
|
||||
PanelSection,
|
||||
|
@ -13,15 +13,15 @@ import {
|
|||
ToggleField,
|
||||
//Dropdown,
|
||||
Field,
|
||||
//DropdownOption,
|
||||
//SingleDropdownOption,
|
||||
Dropdown,
|
||||
SingleDropdownOption,
|
||||
//NotchLabel
|
||||
//gamepadDialogClasses,
|
||||
//joinClassNames,
|
||||
} from "decky-frontend-lib";
|
||||
import { VFC, useState } from "react";
|
||||
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 backend from "./backend";
|
||||
|
@ -73,7 +73,7 @@ import { Battery } from "./components/battery";
|
|||
import { Cpus } from "./components/cpus";
|
||||
import { DevMessages } from "./components/message";
|
||||
|
||||
var periodicHook: NodeJS.Timer | null = null;
|
||||
var periodicHook: NodeJS.Timeout | null = null;
|
||||
var lifetimeHook: any = null;
|
||||
var startHook: any = null;
|
||||
var endHook: any = null;
|
||||
|
@ -206,11 +206,12 @@ const registerCallbacks = function(autoclear: boolean) {
|
|||
startHook = SteamClient.Apps.RegisterForGameActionStart((actionType, id) => {
|
||||
//@ts-ignore
|
||||
let gameInfo: any = appStore.GetAppOverviewByGameID(id);
|
||||
let appId = gameInfo.appid.toString();
|
||||
|
||||
backend.log(backend.LogLevel.Info, "RegisterForGameActionStart callback(" + actionType + ", " + id + ")");
|
||||
// don't use gameInfo.appid, haha
|
||||
backend.resolve(
|
||||
backend.loadGeneralSettings(id.toString(), gameInfo.display_name, 0, undefined),
|
||||
backend.loadGeneralSettings(appId, gameInfo.display_name, "0", undefined),
|
||||
(ok: boolean) => {
|
||||
backend.log(backend.LogLevel.Debug, "Loading settings ok? " + ok);
|
||||
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 (
|
||||
<PanelSection>
|
||||
<DevMessages idc={idc}/>
|
||||
|
@ -338,6 +344,69 @@ const Content: VFC<{ serverAPI: ServerAPI }> = ({}) => {
|
|||
{get_value(NAME_GEN)}
|
||||
</Field>
|
||||
</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}/>
|
||||
|
||||
|
@ -389,9 +458,9 @@ export default definePlugin((serverApi: ServerAPI) => {
|
|||
content: <Content serverAPI={serverApi} />,
|
||||
icon: ico,
|
||||
onDismount() {
|
||||
tryNotifyProfileChange = function() {};
|
||||
backend.log(backend.LogLevel.Debug, "PowerTools shutting down");
|
||||
clearHooks();
|
||||
tryNotifyProfileChange = function() {};
|
||||
//serverApi.routerHook.removeRoute("/decky-plugin-test");
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue