Netflex 0.1.2: new screens, and an ARM build for the Raspberry Pi
Some checks failed
release / release (push) Failing after 18m38s
Some checks failed
release / release (push) Failing after 18m38s
- Pages from the web app: search, my list, anime hub and anime details, settings; the home and detail screens moved under src/screens on the shared page model (src/page.rs, ui/page.slint). - package.sh --arm cross-compiles support.bluefox.netflex-<version>-aarch64.tar.zst, which Fennec OS on ARM installs (docs/store.md). The release CI builds both: the GStreamer dev packages of amd64 and arm64 can't be installed together, so it swaps them between the two builds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
25
src/app.rs
25
src/app.rs
@@ -115,9 +115,7 @@ type SelectDone = Box<dyn FnOnce(&Controller, usize)>;
|
||||
|
||||
enum Effect {
|
||||
Push(Box<dyn Screen>),
|
||||
Pop,
|
||||
Refresh,
|
||||
Section(usize),
|
||||
Play(player::Request),
|
||||
}
|
||||
|
||||
@@ -190,9 +188,6 @@ impl<'a> Cx<'a> {
|
||||
pub fn api(&self) -> Api {
|
||||
self.c.api()
|
||||
}
|
||||
pub fn api_base_image(&self, url: Option<&str>) -> String {
|
||||
self.c.state.borrow().api.image(url, false)
|
||||
}
|
||||
pub fn user(&self) -> User {
|
||||
self.c.state.borrow().user.clone()
|
||||
}
|
||||
@@ -235,15 +230,9 @@ impl<'a> Cx<'a> {
|
||||
pub fn push(&self, s: Box<dyn Screen>) {
|
||||
self.c.effects.borrow_mut().push(Effect::Push(s));
|
||||
}
|
||||
pub fn pop(&self) {
|
||||
self.c.effects.borrow_mut().push(Effect::Pop);
|
||||
}
|
||||
pub fn refresh(&self) {
|
||||
self.c.effects.borrow_mut().push(Effect::Refresh);
|
||||
}
|
||||
pub fn section(&self, n: usize) {
|
||||
self.c.effects.borrow_mut().push(Effect::Section(n));
|
||||
}
|
||||
pub fn play(&self, r: player::Request) {
|
||||
self.c.effects.borrow_mut().push(Effect::Play(r));
|
||||
}
|
||||
@@ -282,10 +271,6 @@ impl<'a> Cx<'a> {
|
||||
e.view.focus_on(line, col);
|
||||
}
|
||||
}
|
||||
/// Physical pixels per design pixel.
|
||||
pub fn px(&self) -> f32 {
|
||||
self.c.px()
|
||||
}
|
||||
}
|
||||
|
||||
impl Controller {
|
||||
@@ -370,11 +355,8 @@ impl Controller {
|
||||
self.state.borrow().api.clone()
|
||||
}
|
||||
|
||||
pub fn is_admin(&self) -> bool {
|
||||
self.state.borrow().user.is_admin
|
||||
}
|
||||
|
||||
fn show(&self, screen: &'static str) {
|
||||
pub fn show(&self, screen: &'static str) {
|
||||
self.state.borrow_mut().screen = screen;
|
||||
if let Some(ui) = self.ui() {
|
||||
ui.set_screen(screen.into());
|
||||
@@ -886,9 +868,7 @@ impl Controller {
|
||||
for e in effects {
|
||||
match e {
|
||||
Effect::Push(s) => self.push_now(s),
|
||||
Effect::Pop => self.pop_now(),
|
||||
Effect::Refresh => refresh = true,
|
||||
Effect::Section(n) => self.section_now(n),
|
||||
Effect::Play(r) => player::play(self, r),
|
||||
}
|
||||
}
|
||||
@@ -1050,7 +1030,8 @@ impl Controller {
|
||||
if self.state.borrow().select.is_some() {
|
||||
return self.select_key(a);
|
||||
}
|
||||
match self.state.borrow().screen {
|
||||
let screen = self.state.borrow().screen;
|
||||
match screen {
|
||||
"message" => return self.message_key(a),
|
||||
"player" => return player::key(self, a, repeat),
|
||||
_ => {}
|
||||
|
||||
Reference in New Issue
Block a user