diff --git a/.prettierrc b/.prettierrc index 7ca2d9c..1bc1ed2 100644 --- a/.prettierrc +++ b/.prettierrc @@ -9,7 +9,13 @@ "trailingComma": "all", "singleQuote": true, "semi": true, - "importOrder": ["^@core/(.*)$", "^@ui/(.*)$", "@assets/(.*)$", "^[./]"], + "importOrder": [ + "^@core/(.*)$", + "^@assets/(.*)$", + "^@components/(.*)$", + "^@views/(.*)$", + "^[./]" + ], "importOrderSeparation": true, "importOrderSortSpecifiers": true } diff --git a/index.html b/index.html index 9ff106c..844c35a 100644 --- a/index.html +++ b/index.html @@ -4,11 +4,17 @@ - Codename Launcher diff --git a/src-tauri/src/engines.rs b/src-tauri/src/engines.rs index 3437bcf..a385e58 100644 --- a/src-tauri/src/engines.rs +++ b/src-tauri/src/engines.rs @@ -33,6 +33,7 @@ use tauri::State; /// ``` /// #[derive(Serialize, Clone, Debug)] +#[serde(rename_all = "camelCase")] pub struct EngineContext { pub folder_path: String, pub exe_path: String, @@ -461,6 +462,7 @@ impl EngineImageInfo for FPSPlusDetector { } #[derive(serde::Serialize)] +#[serde(rename_all = "camelCase")] /// This is what we send to the frontend, it flattens the EngineContext fields and adds display info for the ui pub struct EngineCanonInfo { #[serde(flatten)] diff --git a/src-tauri/src/instances.rs b/src-tauri/src/instances.rs index 582c2c1..7151fac 100644 --- a/src-tauri/src/instances.rs +++ b/src-tauri/src/instances.rs @@ -48,6 +48,7 @@ use crate::{ /// }); /// ``` #[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(rename_all = "camelCase")] pub struct Instance { pub folder_path: String, pub edited_info: Option, @@ -56,6 +57,7 @@ pub struct Instance { } #[derive(Serialize, Deserialize, Debug, Clone, Default)] +#[serde(rename_all = "camelCase")] /// The editable info for an instance pub struct EditableInstanceInfo { pub display_name: Option, @@ -70,6 +72,7 @@ pub struct EditableInstanceInfo { } #[derive(Serialize, Deserialize, Debug, Clone, Default)] +#[serde(rename_all = "camelCase")] /// HashMap for ease of use, use order for displaying pub struct InstanceList { pub instances: HashMap, diff --git a/src-tauri/src/mods.rs b/src-tauri/src/mods.rs index 9390312..a9e3537 100644 --- a/src-tauri/src/mods.rs +++ b/src-tauri/src/mods.rs @@ -7,6 +7,7 @@ use std::{cell::RefCell, collections::HashMap, path::Path, sync::Mutex}; use tauri::State; #[derive(Serialize, Deserialize, Clone, Debug)] +#[serde(rename_all = "camelCase")] pub struct ModContext { pub folder_path: String, pub mod_kind: ModKind, @@ -417,6 +418,7 @@ impl ModImageInfo for VSliceModDetector { } #[derive(serde::Serialize)] +#[serde(rename_all = "camelCase")] pub struct ModCanonInfo { #[serde(flatten)] pub context: ModContext, diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 127df39..d03d445 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -16,21 +16,18 @@ "minWidth": 1000, "minHeight": 600, "visible": false, - "backgroundColor": "#2d1e32", + "backgroundColor": "#2c242e", "titleBarStyle": "Overlay", "hiddenTitle": true, "trafficLightPosition": { "x": 22, "y": 24 - } + }, + "devtools": true } ], "security": { - "csp": { - "default-src": [ - "'self' ipc: http://ipc.localhost; img-src 'self' asset: http://asset.localhost" - ] - }, + "csp": null, "assetProtocol": { "enable": true, "scope": ["**"] diff --git a/src/Root.vue b/src/Root.vue index a0f72c5..7951d18 100644 --- a/src/Root.vue +++ b/src/Root.vue @@ -1,23 +1,24 @@ diff --git a/src/assets/images/bg/bg-codename.png b/src/assets/images/bg/bg-codename.png deleted file mode 100644 index a55f780..0000000 Binary files a/src/assets/images/bg/bg-codename.png and /dev/null differ diff --git a/src/components/Background.vue b/src/components/Background.vue index 5c76a54..98dc007 100644 --- a/src/components/Background.vue +++ b/src/components/Background.vue @@ -60,7 +60,7 @@ watch( - diff --git a/src/components/library/InstanceSettingsPopover.vue b/src/components/library/InstanceSettingsPopover.vue index 8ac6b35..8931a9b 100644 --- a/src/components/library/InstanceSettingsPopover.vue +++ b/src/components/library/InstanceSettingsPopover.vue @@ -35,7 +35,7 @@ async function handleBannerSelect() { }); if (selected) { console.log('Selected banner:', selected); - editDraft.value.banner_path = selected; + editDraft.value.bannerPath = selected; } } @@ -52,24 +52,33 @@ defineProps<{ > + - + Instance Settings +
- + +
- +
- +
- - + +
- +
- +