Versión visible en la barra de la app (clic = buscar actualización)
La barra muestra la versión real del paquete (viene de Rust en el payload ls-tabs, no quemada en el HTML) junto al menú ⋮. Clic en la etiqueta → "Buscar actualización…" con aviso del resultado (evento ls-check-update). Versión 1.3.0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Este commit está contenido en:
14
dist/index.html
vendido
14
dist/index.html
vendido
@@ -146,6 +146,16 @@
|
||||
font-size: 11.5px;
|
||||
}
|
||||
#z-pct.activo { color: var(--accent); font-weight: 600; }
|
||||
#version {
|
||||
flex: 0 0 auto;
|
||||
margin: 2px 0 7px;
|
||||
padding: 0 7px;
|
||||
color: var(--muted);
|
||||
font-size: 11px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
white-space: nowrap;
|
||||
}
|
||||
#version:hover { color: var(--accent); }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -158,6 +168,7 @@
|
||||
<button id="z-pct" title="Restablecer zoom (⌘/Ctrl+0)">100%</button>
|
||||
<button id="z-mas" title="Acercar (⌘/Ctrl++)">+</button>
|
||||
</div>
|
||||
<button id="version" title="Versión de la app · clic: buscar actualización"></button>
|
||||
<button class="icono" id="menu" title="Opciones de la app">⋮</button>
|
||||
</div>
|
||||
<script>
|
||||
@@ -171,6 +182,7 @@
|
||||
|
||||
const $tabs = document.getElementById("tabs");
|
||||
const $pct = document.getElementById("z-pct");
|
||||
const $ver = document.getElementById("version");
|
||||
|
||||
function render() {
|
||||
$tabs.textContent = "";
|
||||
@@ -206,6 +218,7 @@
|
||||
|
||||
$pct.textContent = estado.zoom + "%";
|
||||
$pct.classList.toggle("activo", estado.zoom !== 100);
|
||||
$ver.textContent = estado.version ? "v" + estado.version : "";
|
||||
}
|
||||
|
||||
if (E) {
|
||||
@@ -219,6 +232,7 @@
|
||||
document.getElementById("recargar").addEventListener("click", () => emitir("ls-reload", {}));
|
||||
// Menú de OPCIONES de la app (nativo, lo pinta Rust): botón ⋮ o clic derecho en la barra.
|
||||
document.getElementById("menu").addEventListener("click", () => emitir("ls-menu", {}));
|
||||
$ver.addEventListener("click", () => emitir("ls-check-update", {}));
|
||||
document.getElementById("bar").addEventListener("contextmenu", (e) => {
|
||||
e.preventDefault();
|
||||
emitir("ls-menu", {});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "labstream-desktop",
|
||||
"version": "1.2.0",
|
||||
"version": "1.3.0",
|
||||
"private": true,
|
||||
"description": "App de escritorio (Windows) que envuelve Labstream OS — cliente del servidor del NAS.",
|
||||
"scripts": {
|
||||
|
||||
2
src-tauri/Cargo.lock
generado
2
src-tauri/Cargo.lock
generado
@@ -1946,7 +1946,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "labstream-desktop"
|
||||
version = "1.2.0"
|
||||
version = "1.3.0"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "labstream-desktop"
|
||||
version = "1.2.0"
|
||||
version = "1.3.0"
|
||||
description = "Cliente de escritorio de Labstream OS"
|
||||
authors = ["Labstream SAS"]
|
||||
edition = "2021"
|
||||
|
||||
@@ -269,7 +269,7 @@ fn current_zoom<R: Runtime>(app: &AppHandle<R>) -> f64 {
|
||||
ZOOM_STEPS[s.zoom_idx.min(ZOOM_STEPS.len() - 1)]
|
||||
}
|
||||
|
||||
// Manda el estado de pestañas + zoom a la barra (webview "chrome").
|
||||
// Manda el estado de pestañas + zoom + versión a la barra (webview "chrome").
|
||||
fn broadcast<R: Runtime>(app: &AppHandle<R>) {
|
||||
let payload = {
|
||||
let shell = app.state::<ShellState>();
|
||||
@@ -280,7 +280,11 @@ fn broadcast<R: Runtime>(app: &AppHandle<R>) {
|
||||
.enumerate()
|
||||
.map(|(i, t)| json!({ "label": t.label, "title": t.title, "active": i == s.active }))
|
||||
.collect();
|
||||
json!({ "tabs": tabs, "zoom": (ZOOM_STEPS[s.zoom_idx.min(ZOOM_STEPS.len()-1)] * 100.0).round() as u32 })
|
||||
json!({
|
||||
"tabs": tabs,
|
||||
"zoom": (ZOOM_STEPS[s.zoom_idx.min(ZOOM_STEPS.len()-1)] * 100.0).round() as u32,
|
||||
"version": app.package_info().version.to_string(),
|
||||
})
|
||||
};
|
||||
let _ = app.emit_to(EventTarget::webview(CHROME), "ls-tabs", payload);
|
||||
}
|
||||
@@ -861,6 +865,12 @@ pub fn run() {
|
||||
handle.listen_any("ls-menu", move |_| {
|
||||
show_app_menu(&h);
|
||||
});
|
||||
// Clic en la etiqueta de versión de la barra → buscar actualización (con aviso).
|
||||
let h = handle.clone();
|
||||
handle.listen_any("ls-check-update", move |_| {
|
||||
#[cfg(desktop)]
|
||||
tauri::async_runtime::spawn(check_update_manual(h.clone()));
|
||||
});
|
||||
let h = handle.clone();
|
||||
handle.listen_any("ls-title", move |e| {
|
||||
let (label, title, url) = (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://schema.tauri.app/config/2",
|
||||
"productName": "Labstream OS",
|
||||
"version": "1.2.0",
|
||||
"version": "1.3.0",
|
||||
"identifier": "co.labstream.os",
|
||||
"build": {
|
||||
"frontendDist": "../dist"
|
||||
|
||||
Referencia en una nueva incidencia
Block a user