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
1 change: 1 addition & 0 deletions examples/wasm/images/chevron-left-solid-full.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions examples/wasm/images/chevron-right-solid-full.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions examples/wasm/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 47 additions & 1 deletion examples/wasm/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,52 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<link data-trunk rel="rust" data-keep-debug />
<link data-trunk rel="icon" href="images/logo.svg" />
<link data-trunk rel="copy-dir" href="images/" />
<link data-trunk rel="css" href="styles.css" />

<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Prompt:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Rubik:ital,wght@0,300..900;1,300..900&display=swap"
rel="stylesheet"
/>
<title>Xila WASM Example</title>
</head>
<body>
<div id="sidebar">
<h2>Default credentials</h2>
<ul>
<li><strong>Username:</strong> administrator</li>
<li><strong>Password:</strong> (no password)</li>
</ul>
See <a href="https://www.xila.dev">xila.dev</a> for more information.

<button
id="sidebar-toggle"
onclick="toggleSidebar()"
aria-label="Toggle Credentials Sidebar"
>
<img
id="sidebar-arrow"
src="images/chevron-right-solid-full.svg"
alt="Toggle Sidebar"
style="width: 20px; height: 20px; transition: transform 0.2s"
/>
</button>
</div>
<script>
function toggleSidebar() {
const sidebar = document.getElementById("sidebar");
const arrow = document.getElementById("sidebar-arrow");
sidebar.classList.toggle("open");
if (sidebar.classList.contains("open")) {
arrow.src = "images/chevron-left-solid-full.svg";
} else {
arrow.src = "images/chevron-right-solid-full.svg";
}
}
</script>
</body>
</html>
59 changes: 59 additions & 0 deletions examples/wasm/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
body,
#sidebar {
font-family: "Montserrat", Arial, Helvetica, sans-serif;
}
a,
a:visited,
a:active {
color: #fff;
text-decoration: underline;
}
#sidebar {
position: fixed;
left: 0;
top: 0;
width: 250px;
height: 100%;
background: #222;
color: #fff;
padding: 20px 10px 10px 20px;
box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
transform: translateX(-100%);
transition: transform 0.3s ease;
z-index: 1000;
}
a:hover {
color: #eee;
}
#sidebar.open {
transform: translateX(0);
}
#sidebar-toggle {
position: absolute;
left: 100%;
top: 50%;
transform: translateY(-50%);
z-index: 1100;
background: #444;
color: #fff;
border: none;
padding: 8px 0 8px 2px;
border-radius: 0 6px 6px 0;
cursor: pointer;
width: 32px;
height: 48px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5em;
box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.15);
transition: left 0.3s;
}
/* Removed rule that moves the toggle button when sidebar is open */
#sidebar h2 {
margin-top: 0;
font-size: 1.2em;
}
#sidebar ul {
padding-left: 18px;
}
4 changes: 1 addition & 3 deletions executables/settings/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ impl Settings {
];

for tab in &mut tabs {
tab.create_ui(tabview)
.await
.expect("Failed to create tab UI");
tab.create_ui(tabview).await?;
}

let manager = Self { window, tabs };
Expand Down
1 change: 1 addition & 0 deletions modules/virtual_file_system/src/hierarchy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pub async fn create_default_hierarchy(
Path::BINARIES,
Path::TEMPORARY,
Path::LOGS,
Path::NETWORK_DEVICES,
];

for path in paths {
Expand Down