Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .erb/configs/webpack.config.renderer.dev.mts
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,21 @@ const configuration: webpack.Configuration = {
__dirname: false,
__filename: false,
},

devServer: {
port,
compress: true,
hot: true,
headers: { 'Access-Control-Allow-Origin': '*' },
devMiddleware: {
writeToDisk: true,
},
static: {
publicPath: '/',
},
historyApiFallback: {
verbose: true,
},

setupMiddlewares(middlewares) {
console.log('Starting preload.js builder...');
const preloadProcess = spawn('npm', ['run', 'start:preload'], {
Expand Down
5 changes: 3 additions & 2 deletions src-rust/src/invokables/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use crate::{invokables::Invokable, state::AppState};
use anyhow::{anyhow, Context, Result};
use image::RgbaImage;
use serde::{Deserialize, Serialize};
use std::io::BufReader;
use stracciatella::file_formats::stci::{Stci, StciRgb888};

#[derive(Debug)]
Expand Down Expand Up @@ -61,7 +62,7 @@ impl Invokable for Render {

fn invoke(&self, state: &AppState) -> Result<Self::Output> {
let state = state.read();
let mut f = state.open_file(&self.file).context("failed to read file")?;
let mut f = BufReader::new(state.open_file(&self.file).context("failed to read file")?);
let stci = Stci::from_input(&mut f)?;
let sub_image = self.subimage.unwrap_or(0);
let size = match &stci {
Expand Down Expand Up @@ -162,7 +163,7 @@ impl Invokable for ReadMetadata {

fn invoke(&self, state: &AppState) -> Result<Self::Output> {
let state = state.read();
let mut f = state.open_file(&self.file).context("failed to read file")?;
let mut f = BufReader::new(state.open_file(&self.file).context("failed to read file")?);
let stci = Stci::from_input(&mut f)?;
let images = match stci {
Stci::Indexed { sub_images, .. } => sub_images
Expand Down
3 changes: 2 additions & 1 deletion src-rust/src/invokables/sounds.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::{invokables::Invokable, state};
use anyhow::{anyhow, Context, Result};
use serde::{Deserialize, Serialize};
use std::io::{BufReader, Read as _};

#[derive(Debug)]
pub enum Base64Sound {
Expand Down Expand Up @@ -47,7 +48,7 @@ impl Invokable for Read {

fn invoke(&self, state: &state::AppState) -> Result<Self::Output> {
let state = state.read();
let mut f = state.open_file(&self.file).context("failed to open file")?;
let mut f = BufReader::new(state.open_file(&self.file).context("failed to open file")?);
let mut content = vec![];

f.read_to_end(&mut content).context("failed to read file")?;
Expand Down
7 changes: 0 additions & 7 deletions src/renderer/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,3 @@ body {
overflow-x: hidden;
overflow-y: hidden;
}

/* Fix cursor turning white while transitioning the input border color on Windows */
body .ant-input-outlined,
body .ant-input-number-outlined,
body .ant-select-outlined .ant-select-selector {
transition: none !important;
}
2 changes: 2 additions & 0 deletions src/renderer/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ export function AppWithoutProviders() {
const appStore = createAppStore();
const THEME_CONFIG: ThemeConfig = {
token: {
// Disable all animations because of https://issues.chromium.org/issues/40239916
motion: false,
colorPrimary: '#9d1e1c',
},
};
Expand Down