chore: bump Yazi version to 25.12.29

This commit is contained in:
sxyazi
2025-12-30 07:58:34 +08:00
parent 1612f00cf1
commit 517619af12
6 changed files with 13 additions and 47 deletions

View File

@@ -1,4 +1,4 @@
--- @since 25.5.31 --- @since 25.12.29
local selected_or_hovered = ya.sync(function() local selected_or_hovered = ya.sync(function()
local tab, paths = cx.active, {} local tab, paths = cx.active, {}
@@ -32,7 +32,6 @@ return {
local value, event = ya.input { local value, event = ya.input {
title = "Chmod:", title = "Chmod:",
pos = { "top-center", y = 3, w = 40 }, pos = { "top-center", y = 3, w = 40 },
position = { "top-center", y = 3, w = 40 }, -- TODO: remove
} }
if event ~= 1 then if event ~= 1 then
return return

View File

@@ -125,12 +125,7 @@ local add = ya.sync(function(st, cwd, repo, changed)
st.repos[repo][path] = code st.repos[repo][path] = code
end end
end end
-- TODO: remove this
if ui.render then
ui.render() ui.render()
else
ya.render()
end
end) end)
---@param cwd string ---@param cwd string
@@ -142,12 +137,7 @@ local remove = ya.sync(function(st, cwd)
return return
end end
-- TODO: remove this
if ui.render then
ui.render() ui.render()
else
ya.render()
end
st.dirs[cwd] = nil st.dirs[cwd] = nil
if not st.repos[repo] then if not st.repos[repo] then
return return
@@ -189,8 +179,7 @@ local function setup(st, opts)
} }
Linemode:children_add(function(self) Linemode:children_add(function(self)
-- TODO: use `not self._file.in_current` instead if not self._file.in_current then
if self._file.in_current == false then
return "" return ""
end end

View File

@@ -4,12 +4,7 @@ local update = ya.sync(function(st, tags)
for path, tag in pairs(tags) do for path, tag in pairs(tags) do
st.tags[path] = #tag > 0 and tag or nil st.tags[path] = #tag > 0 and tag or nil
end end
-- TODO: remove this
if ui.render then
ui.render() ui.render()
else
ya.render()
end
end) end)
local selected_or_hovered = ya.sync(function() local selected_or_hovered = ya.sync(function()
@@ -32,8 +27,7 @@ local function setup(st, opts)
local url = tostring(self._file.url) local url = tostring(self._file.url)
local spans = {} local spans = {}
for _, tag in ipairs(st.tags[url] or {}) do for _, tag in ipairs(st.tags[url] or {}) do
-- TODO: use `not self._file.in_current` instead if not self._file.in_current then
if self._file.in_current == false then
elseif self._file.is_hovered then elseif self._file.is_hovered then
spans[#spans + 1] = ui.Span(""):bg(st.colors[tag] or "reset") spans[#spans + 1] = ui.Span(""):bg(st.colors[tag] or "reset")
else else

View File

@@ -1,4 +1,4 @@
--- @since 25.5.31 --- @since 25.12.29
local toggle_ui = ya.sync(function(self) local toggle_ui = ya.sync(function(self)
if self.children then if self.children then
@@ -7,12 +7,7 @@ local toggle_ui = ya.sync(function(self)
else else
self.children = Modal:children_add(self, 10) self.children = Modal:children_add(self, 10)
end end
-- TODO: remove this
if ui.render then
ui.render() ui.render()
else
ya.render()
end
end) end)
local subscribe = ya.sync(function(self) local subscribe = ya.sync(function(self)
@@ -23,12 +18,7 @@ end)
local update_partitions = ya.sync(function(self, partitions) local update_partitions = ya.sync(function(self, partitions)
self.partitions = partitions self.partitions = partitions
self.cursor = math.max(0, math.min(self.cursor or 0, #self.partitions - 1)) self.cursor = math.max(0, math.min(self.cursor or 0, #self.partitions - 1))
-- TODO: remove this
if ui.render then
ui.render() ui.render()
else
ya.render()
end
end) end)
local active_partition = ya.sync(function(self) return self.partitions[self.cursor + 1] end) local active_partition = ya.sync(function(self) return self.partitions[self.cursor + 1] end)
@@ -39,12 +29,7 @@ local update_cursor = ya.sync(function(self, cursor)
else else
self.cursor = ya.clamp(0, self.cursor + cursor, #self.partitions - 1) self.cursor = ya.clamp(0, self.cursor + cursor, #self.partitions - 1)
end end
-- TODO: remove this
if ui.render then
ui.render() ui.render()
else
ya.render()
end
end) end)
local M = { local M = {

View File

@@ -1,4 +1,4 @@
--- @since 25.5.31 --- @since 25.12.29
local hovered = ya.sync(function() local hovered = ya.sync(function()
local h = cx.active.current.hovered local h = cx.active.current.hovered
@@ -17,7 +17,6 @@ local function prompt()
return ya.input { return ya.input {
title = "Smart filter:", title = "Smart filter:",
pos = { "center", w = 50 }, pos = { "center", w = 50 },
position = { "center", w = 50 }, -- TODO: remove
realtime = true, realtime = true,
debounce = 0.1, debounce = 0.1,
} }

View File

@@ -1,4 +1,4 @@
--- @since 25.5.31 --- @since 25.12.29
--- Verify if `sudo` is already authenticated --- Verify if `sudo` is already authenticated
--- @return boolean --- @return boolean
@@ -21,7 +21,7 @@ local function run_with_sudo(program, args)
return cmd:output() return cmd:output()
end end
local permit = ui.hide and ui.hide() or ya.hide() -- TODO: remove this local permit = ui.hide()
print(string.format("Sudo password required to run: `%s %s`", program, table.concat(args))) print(string.format("Sudo password required to run: `%s %s`", program, table.concat(args)))
local output = cmd:output() local output = cmd:output()
permit:drop() permit:drop()