|
|
@ -10,7 +10,7 @@ local theme = require("theme") |
|
|
|
local screen = require("screen") |
|
|
|
local screen = require("screen") |
|
|
|
local filesystem = require("filesystem") |
|
|
|
local filesystem = require("filesystem") |
|
|
|
|
|
|
|
|
|
|
|
return screen:new{ |
|
|
|
return screen:new { |
|
|
|
createUi = function(self) |
|
|
|
createUi = function(self) |
|
|
|
self.root = lvgl.Object(nil, { |
|
|
|
self.root = lvgl.Object(nil, { |
|
|
|
flex = { |
|
|
|
flex = { |
|
|
@ -30,7 +30,7 @@ return screen:new{ |
|
|
|
title = self.title |
|
|
|
title = self.title |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
local header = self.root:Object{ |
|
|
|
local header = self.root:Object { |
|
|
|
flex = { |
|
|
|
flex = { |
|
|
|
flex_direction = "column", |
|
|
|
flex_direction = "column", |
|
|
|
flex_wrap = "wrap", |
|
|
|
flex_wrap = "wrap", |
|
|
@ -49,7 +49,7 @@ return screen:new{ |
|
|
|
theme.set_style(header, "header") |
|
|
|
theme.set_style(header, "header") |
|
|
|
|
|
|
|
|
|
|
|
if self.breadcrumb then |
|
|
|
if self.breadcrumb then |
|
|
|
header:Label{ |
|
|
|
header:Label { |
|
|
|
text = self.breadcrumb, |
|
|
|
text = self.breadcrumb, |
|
|
|
text_font = font.fusion_10 |
|
|
|
text_font = font.fusion_10 |
|
|
|
} |
|
|
|
} |
|
|
@ -60,7 +60,7 @@ return screen:new{ |
|
|
|
return function() |
|
|
|
return function() |
|
|
|
local is_dir = item:is_directory() |
|
|
|
local is_dir = item:is_directory() |
|
|
|
if is_dir then |
|
|
|
if is_dir then |
|
|
|
backstack.push(require("file_browser"):new{ |
|
|
|
backstack.push(require("file_browser"):new { |
|
|
|
title = self.title, |
|
|
|
title = self.title, |
|
|
|
iterator = filesystem.iterator(item:filepath()), |
|
|
|
iterator = filesystem.iterator(item:filepath()), |
|
|
|
breadcrumb = item:filepath() |
|
|
|
breadcrumb = item:filepath() |
|
|
@ -68,6 +68,7 @@ return screen:new{ |
|
|
|
end |
|
|
|
end |
|
|
|
if item:filepath():match("%.playlist$") then |
|
|
|
if item:filepath():match("%.playlist$") then |
|
|
|
queue.open_playlist(item:filepath()) |
|
|
|
queue.open_playlist(item:filepath()) |
|
|
|
|
|
|
|
playback.playing:set(true) |
|
|
|
backstack.push(playing:new()) |
|
|
|
backstack.push(playing:new()) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|