feat: queue, channel view, downloads/saved pages, repeat/loop, accessibility, perf, multithreading

This commit is contained in:
Jonathan Sykes
2026-06-21 15:39:58 +08:00
parent b67e40348b
commit 38511fa450
6 changed files with 1040 additions and 93 deletions

View File

@@ -16,13 +16,14 @@ const Handler = zero_native.bridge.Handler;
// Commands the UI is allowed to call, matched against window.zero.invoke names.
const policies = [_]zero_native.bridge.CommandPolicy{
.{ .command = "yt.search" },
.{ .command = "yt.channel" },
.{ .command = "yt.streams" },
.{ .command = "store.load" },
.{ .command = "store.save" },
};
pub const App = struct {
handlers: [4]Handler = undefined,
handlers: [5]Handler = undefined,
pub fn app(self: *App) zero_native.App {
return .{
@@ -37,6 +38,7 @@ pub const App = struct {
fn bridge(self: *App) zero_native.BridgeDispatcher {
self.handlers = .{
.{ .name = "yt.search", .context = self, .invoke_fn = handlers_impl.ytSearch },
.{ .name = "yt.channel", .context = self, .invoke_fn = handlers_impl.ytChannel },
.{ .name = "yt.streams", .context = self, .invoke_fn = handlers_impl.ytStreams },
.{ .name = "store.load", .context = self, .invoke_fn = handlers_impl.storeLoad },
.{ .name = "store.save", .context = self, .invoke_fn = handlers_impl.storeSave },