Skip to content
Merged

2.0.8 #130

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
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iyeris",
"version": "2.0.7",
"version": "2.0.8",
"private": true,
"type": "module",
"description": "A beautiful cross-platform file explorer built with Tauri, featuring a simple yet advanced modern design.",
Expand Down Expand Up @@ -66,6 +66,7 @@
"vi": "node scripts/vi.js",
"b": "git fetch && git switch beta && npm run vi",
"r": "git switch main && npm run vi && npm run gitprune:force",
"u": "npm update && npm run release:prepare && npm run format && npm run test:all",
"win-compiler:x64": "powershell -NoProfile -ExecutionPolicy Bypass -NoExit -Command \"& 'C:\\Program Files\\Microsoft Visual Studio\\18\\Community\\Common7\\Tools\\Launch-VsDevShell.ps1' -SkipAutomaticLocation\"",
"win-compiler:arm64": "powershell -NoProfile -ExecutionPolicy Bypass -NoExit -Command \"& 'C:\\Program Files\\Microsoft Visual Studio\\18\\Community\\Common7\\Tools\\Launch-VsDevShell.ps1' -SkipAutomaticLocation -Arch arm64 -HostArch amd64\"",
"dist:clean": "node scripts/dist-tools.js clean",
Expand Down
5 changes: 5 additions & 0 deletions run.rosie.iyeris.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
</screenshot>
</screenshots>
<releases>
<release version="2.0.8" date="2026-04-01"/>
<release version="2.0.8-beta.4" date="2026-04-01"/>
<release version="2.0.8-beta.3" date="2026-03-31"/>
<release version="2.0.8-beta.2" date="2026-03-31"/>
<release version="2.0.8-beta.1" date="2026-03-31"/>
<release version="2.0.7" date="2026-03-31"/>
<release version="2.0.7-beta.5" date="2026-03-30"/>
<release version="2.0.7-beta.4" date="2026-03-30"/>
Expand Down
2 changes: 1 addition & 1 deletion scripts/vi.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ try {
run('git', ['reset', '--hard', '@{u}']);
run('git', ['clean', '-fd']);
run('git', ['pull']);
run('npm', ['i']);
run('npm', ['ci']);

const branch = execSync('git rev-parse --abbrev-ref HEAD', { encoding: 'utf8' }).trim();
const green = '\x1b[32m';
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "iyeris"
version = "2.0.7"
version = "2.0.8"
description = "A beautiful cross-platform file explorer."
authors = ["BurntToasters <code@rosie.run>"]
edition = "2021"
Expand Down
8 changes: 8 additions & 0 deletions src-tauri/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSQuitAlwaysKeepsWindows</key>
<false/>
</dict>
</plist>
71 changes: 66 additions & 5 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ fn read_early_setting_bool(key: &str) -> bool {
.unwrap_or(false)
}

fn has_minimized_launch_arg(args: &[String]) -> bool {
args.iter().any(|a| a == "--minimized" || a == "--hidden")
}

/// Set environment variables that must be configured before any threads are spawned.
fn setup_environment(disable_hw_accel: bool, dev_mode: bool) {
#[cfg(target_os = "windows")]
Expand Down Expand Up @@ -167,11 +171,45 @@ fn setup_environment(disable_hw_accel: bool, dev_mode: bool) {
fn main() {
let args: Vec<String> = std::env::args().collect();
let dev_mode = args.iter().any(|a| a == "--dev" || a == "--verbose");
let start_minimized = args
.iter()
.any(|a| a == "--minimized" || a == "--hidden");
let mut start_minimized = has_minimized_launch_arg(&args);
DEV_MODE.store(dev_mode, Ordering::Relaxed);

#[cfg(target_os = "macos")]
{
let early_start_on_login = read_early_setting_bool("startOnLogin");

if !start_minimized && early_start_on_login {
if let Ok(output) = std::process::Command::new("sysctl")
.args(["-n", "kern.boottime"])
.output()
{
if let Ok(text) = std::string::String::from_utf8(output.stdout) {
if let Some(sec_str) = text
.split("sec = ")
.nth(1)
.and_then(|s| s.split(',')
.next())
{
if let Ok(boot_epoch) = sec_str.trim().parse::<u64>() {
let now = std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
.unwrap_or_default()
.as_secs();
let uptime = now.saturating_sub(boot_epoch);
if uptime < 120 {
log::info!(
"[Autostart] startOnLogin fallback: uptime {}s < 120s, starting minimized",
uptime
);
start_minimized = true;
}
}
}
}
}
}
}

let _disable_hw_accel = read_early_setting_bool("disableHardwareAcceleration");

setup_environment(_disable_hw_accel, dev_mode);
Expand Down Expand Up @@ -208,7 +246,17 @@ fn main() {

#[cfg(not(any(target_os = "android", target_os = "ios")))]
let builder = builder
.plugin(tauri_plugin_single_instance::init(|app, _args, _cwd| {
.plugin(tauri_plugin_single_instance::init(|app, args, _cwd| {
#[cfg(target_os = "macos")]
if has_minimized_launch_arg(&args) {
log::debug!("[SingleInstance] Ignoring minimized relaunch request");
return;
}

#[cfg(target_os = "macos")]
{
let _ = app.set_dock_visibility(true);
}
if let Some(window) = app.get_webview_window("main") {
let _ = window.show();
let _ = window.set_focus();
Expand Down Expand Up @@ -293,7 +341,7 @@ fn main() {
.ok()
.and_then(|v| v.get("startOnLogin").and_then(|f| f.as_bool()))
.unwrap_or(false);
{
if !cfg!(debug_assertions) {
use tauri_plugin_autostart::ManagerExt;
if start_on_login {
let _ = app.autolaunch().enable();
Expand Down Expand Up @@ -541,4 +589,17 @@ mod tests {
fn validate_path_rejects_relative() {
assert!(validate_path("relative/path", "Test").is_err());
}

#[test]
fn has_minimized_launch_arg_detects_supported_flags() {
let args = vec!["app".to_string(), "--minimized".to_string()];
assert!(has_minimized_launch_arg(&args));

let args = vec!["app".to_string(), "--hidden".to_string()];
assert!(has_minimized_launch_arg(&args));

let args = vec!["app".to_string(), "--dev".to_string()];
assert!(!has_minimized_launch_arg(&args));
}

}
10 changes: 7 additions & 3 deletions src-tauri/src/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,9 +594,9 @@ pub fn close_window(window: tauri::Window) -> Result<(), String> {
}

#[tauri::command]
pub fn open_new_window(app: tauri::AppHandle) -> Result<(), String> {
pub async fn open_new_window(app: tauri::AppHandle) -> Result<(), String> {
log::debug!("[System] open_new_window");
let label = format!("window-{}", WINDOW_COUNTER.fetch_add(1, std::sync::atomic::Ordering::Relaxed));
let label = format!("window-{}", WINDOW_COUNTER.fetch_add(1, Ordering::Relaxed));

let builder = tauri::WebviewWindowBuilder::new(
&app,
Expand All @@ -606,7 +606,8 @@ pub fn open_new_window(app: tauri::AppHandle) -> Result<(), String> {
.title("IYERIS")
.inner_size(1200.0, 800.0)
.min_inner_size(800.0, 500.0)
.background_color(tauri::utils::config::Color(24, 24, 24, 255));
.visible(true)
.focused(true);

#[cfg(target_os = "macos")]
let builder = builder.decorations(true).title_bar_style(tauri::TitleBarStyle::Overlay).hidden_title(true);
Expand Down Expand Up @@ -1201,6 +1202,9 @@ pub fn should_minimize_to_tray(app: &tauri::AppHandle) -> bool {

#[tauri::command]
pub fn set_autostart(app: tauri::AppHandle, enabled: bool) -> Result<(), String> {
if cfg!(debug_assertions) {
return Ok(());
}
use tauri_plugin_autostart::ManagerExt;
let manager = app.autolaunch();
if enabled {
Expand Down
5 changes: 3 additions & 2 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "IYERIS",
"version": "2.0.7",
"version": "2.0.8",
"identifier": "run.rosie.iyeris",
"build": {
"beforeDevCommand": "npm run dev",
Expand All @@ -24,7 +24,7 @@
}
],
"security": {
"csp": "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: asset: https://asset.localhost; media-src 'self' blob: asset: https://asset.localhost; font-src 'self' data:; frame-src 'none'; connect-src 'self' ipc: http://ipc.localhost https://api.github.com https://github.com asset: https://asset.localhost; object-src 'none'; base-uri 'self'; form-action 'none'",
"csp": "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: asset: http://asset.localhost; media-src 'self' blob: asset: http://asset.localhost; font-src 'self' data:; frame-src 'none'; connect-src 'self' ipc: http://ipc.localhost https://api.github.com https://github.com asset: http://asset.localhost; object-src 'none'; base-uri 'self'; form-action 'none'",
"assetProtocol": {
"enable": true,
"scope": ["**"]
Expand Down Expand Up @@ -53,6 +53,7 @@
"macOS": {
"entitlements": "entitlements.plist",
"hardenedRuntime": true,
"infoPlist": "Info.plist",
"minimumSystemVersion": "14.0"
},
"linux": {
Expand Down
8 changes: 8 additions & 0 deletions src/css/settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,14 @@
height: 14px;
}

.macos-login-warning {
display: none;
}

body.platform-darwin .macos-login-warning {
display: flex;
}

.setting-meta {
margin-top: 6px;
display: flex;
Expand Down
12 changes: 11 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
http-equiv="Content-Security-Policy"
content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: asset: https://asset.localhost; media-src 'self' blob: asset: https://asset.localhost; font-src 'self' data:; frame-src 'none'; connect-src 'self' ipc: http://ipc.localhost https://api.github.com https://github.com; object-src 'none'; base-uri 'self'; form-action 'none'"
content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: asset: http://asset.localhost; media-src 'self' blob: asset: http://asset.localhost; font-src 'self' data:; frame-src 'none'; connect-src 'self' ipc: http://ipc.localhost https://api.github.com https://github.com; object-src 'none'; base-uri 'self'; form-action 'none'"
/>
<title>IYERIS - File Explorer</title>
<link rel="stylesheet" href="css/main.css" />
Expand Down Expand Up @@ -2433,6 +2433,16 @@ <h4>
<p class="setting-description">
Automatically start IYERIS when you log in (minimized to tray)
</p>
<p class="setting-warning macos-login-warning">
<img
src="/twemoji/26a0.svg"
class="twemoji-small"
alt="⚠️"
draggable="false"
/>
On macOS, a Tauri V2 limitation may cause the app to start visible instead of
minimized. A fix is planned for a future update.
</p>
</div>
<label class="toggle-switch">
<input type="checkbox" id="start-on-login-toggle" />
Expand Down
2 changes: 1 addition & 1 deletion src/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const DANGEROUS_TAGS = new Set([
]);

const SAFE_URL_PATTERN = /^(?:https?|mailto|#):/i;
const SAFE_RESOURCE_URL_PATTERN = /^(?:asset:|https:\/\/asset\.localhost\/)/i;
const SAFE_RESOURCE_URL_PATTERN = /^(?:asset:|https?:\/\/asset\.localhost\/)/i;
const HAS_SCHEME_PATTERN = /^[a-z][a-z0-9+.-]*:/i;

export function sanitizeMarkdownHtml(html: string): string {
Expand Down
3 changes: 2 additions & 1 deletion src/tests/shared.markdownSanitize.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ describe('sanitizeMarkdownHtml resource URLs', () => {

it('keeps relative and trusted asset src URLs', () => {
const output = sanitizeMarkdownHtml(
'<img src="./local.png"><img src="/images/a.png"><img src="asset:/safe.png"><img src="https://asset.localhost/safe.png">'
'<img src="./local.png"><img src="/images/a.png"><img src="asset:/safe.png"><img src="https://asset.localhost/safe.png"><img src="http://asset.localhost/safe.png">'
);
expect(output).toContain('src="./local.png"');
expect(output).toContain('src="/images/a.png"');
expect(output).toContain('src="asset:/safe.png"');
expect(output).toContain('src="https://asset.localhost/safe.png"');
expect(output).toContain('src="http://asset.localhost/safe.png"');
});
});