mirror of
https://github.com/kristoferssolo/solorice.git
synced 2025-10-21 20:10:34 +00:00
Update 2025-03-03 Update 2025-03-07 Update 2025-03-13 Update 2025-03-14 Update 2025-03-22 Update 2025-03-24 Update 2025-03-29
34 lines
848 B
Lua
34 lines
848 B
Lua
--- @since 25.2.26
|
|
--- @sync entry
|
|
|
|
local function entry(st)
|
|
ya.notify {
|
|
title = "Deprecated plugin",
|
|
content = "The `hide-preview` plugin is deprecated, please use the new `toggle-pane` plugin instead: https://github.com/yazi-rs/plugins/tree/main/toggle-pane.yazi",
|
|
timeout = 10,
|
|
level = "warn",
|
|
}
|
|
|
|
if st.old then
|
|
Tab.layout, st.old = st.old, nil
|
|
else
|
|
st.old = Tab.layout
|
|
Tab.layout = function(self)
|
|
local r = rt.mgr.ratio
|
|
self._chunks = ui.Layout()
|
|
:direction(ui.Layout.HORIZONTAL)
|
|
:constraints({
|
|
ui.Constraint.Ratio(r.parent, r.parent + r.current),
|
|
ui.Constraint.Ratio(r.current, r.parent + r.current),
|
|
ui.Constraint.Length(1),
|
|
})
|
|
:split(self._area)
|
|
end
|
|
end
|
|
ya.app_emit("resize", {})
|
|
end
|
|
|
|
local function enabled(st) return st.old ~= nil end
|
|
|
|
return { entry = entry, enabled = enabled }
|