Vibecoded CI/CD
Some checks failed
Build and Deploy Lean / build (push) Failing after 16m44s
Build and Deploy Nuxt / build (push) Failing after 48s

This commit is contained in:
2026-10-06 00:23:17 +02:00
parent a57770619e
commit e2c2c66d7f
79 changed files with 6044 additions and 47 deletions

View File

@@ -0,0 +1,38 @@
/* Mathew as a window.
The shell is thin on purpose. Everything the app *is* — the open book, the
editor, the five interface languages — is the Nuxt bundle it loads, written
out by `npm run desktop:generate` and read from disk by the system webview
(see src-tauri/README.md). The wiki reaches its own API by itself: no Rust
command stands between the two, so an article is fetched the same way in the
window as in a browser.
Two things are the shell's own:
- `opener`, the door a link goes out by. The wiki asks for it by name
(app/utils/desktop.ts); `capabilities/default.json` is what answers.
- one window per launch. Pressing the icon again brings the window that is
already open to the front instead of stacking a second copy of the wiki
behind it. */
#[cfg(desktop)]
use tauri::Manager;
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
let mut builder = tauri::Builder::default().plugin(tauri_plugin_opener::init());
#[cfg(desktop)]
{
builder = builder.plugin(tauri_plugin_single_instance::init(|app, _argv, _cwd| {
if let Some(window) = app.get_webview_window("main") {
let _ = window.unminimize();
let _ = window.set_focus();
}
}));
}
builder
.run(tauri::generate_context!())
.expect("error while running Mathew");
}

View File

@@ -0,0 +1,7 @@
// An app window has no terminal to answer from: keep one from opening behind
// it on Windows, where a release build would otherwise start a console.
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
fn main() {
mathew_desktop_lib::run()
}