mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
Add changelog
This commit is contained in:
parent
57998b7e95
commit
4b1e110209
5 changed files with 9 additions and 2 deletions
|
|
@ -16,8 +16,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/):
|
||||||
|
|
||||||
- Custom tab name ([#3666])
|
- Custom tab name ([#3666])
|
||||||
- Allow using `ps.sub()` in `init.lua` directly without a plugin ([#3638])
|
- Allow using `ps.sub()` in `init.lua` directly without a plugin ([#3638])
|
||||||
|
- New `sort_fallback` option to control fallback sorting behavior ([#3077])
|
||||||
- New `fs.access()` API to access the filesystem ([#3668])
|
- New `fs.access()` API to access the filesystem ([#3668])
|
||||||
- New `relay-notify-push` DDS event to allow custom notification handlers ([#3642])
|
- New `relay-notify-push` DDS event to customize notification handlers ([#3642])
|
||||||
- New `ind-app-title` DDS event to customize the app title ([#3684])
|
- New `ind-app-title` DDS event to customize the app title ([#3684])
|
||||||
- New `fs.unique()` creates a unique file or directory ([#3677])
|
- New `fs.unique()` creates a unique file or directory ([#3677])
|
||||||
- New `cx.which` API to access the which component state ([#3617])
|
- New `cx.which` API to access the which component state ([#3617])
|
||||||
|
|
@ -1577,6 +1578,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/):
|
||||||
[#3038]: https://github.com/sxyazi/yazi/pull/3038
|
[#3038]: https://github.com/sxyazi/yazi/pull/3038
|
||||||
[#3059]: https://github.com/sxyazi/yazi/pull/3059
|
[#3059]: https://github.com/sxyazi/yazi/pull/3059
|
||||||
[#3067]: https://github.com/sxyazi/yazi/pull/3067
|
[#3067]: https://github.com/sxyazi/yazi/pull/3067
|
||||||
|
[#3077]: https://github.com/sxyazi/yazi/pull/3077
|
||||||
[#3083]: https://github.com/sxyazi/yazi/pull/3083
|
[#3083]: https://github.com/sxyazi/yazi/pull/3083
|
||||||
[#3084]: https://github.com/sxyazi/yazi/pull/3084
|
[#3084]: https://github.com/sxyazi/yazi/pull/3084
|
||||||
[#3091]: https://github.com/sxyazi/yazi/pull/3091
|
[#3091]: https://github.com/sxyazi/yazi/pull/3091
|
||||||
|
|
|
||||||
|
|
@ -46,5 +46,6 @@ impl UserData for Preference {
|
||||||
fields.add_field_method_get("sort_reverse", |_, me| Ok(me.sort_reverse));
|
fields.add_field_method_get("sort_reverse", |_, me| Ok(me.sort_reverse));
|
||||||
fields.add_field_method_get("sort_dir_first", |_, me| Ok(me.sort_dir_first));
|
fields.add_field_method_get("sort_dir_first", |_, me| Ok(me.sort_dir_first));
|
||||||
fields.add_field_method_get("sort_translit", |_, me| Ok(me.sort_translit));
|
fields.add_field_method_get("sort_translit", |_, me| Ok(me.sort_translit));
|
||||||
|
fields.add_field_method_get("sort_fallback", |_, me| Ok(me.sort_fallback.to_string()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ impl Actor for Sort {
|
||||||
pref.sort_dir_first = opt.dir_first.unwrap_or(pref.sort_dir_first);
|
pref.sort_dir_first = opt.dir_first.unwrap_or(pref.sort_dir_first);
|
||||||
pref.sort_sensitive = opt.sensitive.unwrap_or(pref.sort_sensitive);
|
pref.sort_sensitive = opt.sensitive.unwrap_or(pref.sort_sensitive);
|
||||||
pref.sort_translit = opt.translit.unwrap_or(pref.sort_translit);
|
pref.sort_translit = opt.translit.unwrap_or(pref.sort_translit);
|
||||||
|
pref.sort_fallback = opt.fallback.unwrap_or(pref.sort_fallback);
|
||||||
|
|
||||||
let sorter = FilesSorter::from(&*pref);
|
let sorter = FilesSorter::from(&*pref);
|
||||||
let hovered = cx.hovered().map(|f| f.urn().to_owned());
|
let hovered = cx.hovered().map(|f| f.urn().to_owned());
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
use mlua::{FromLua, IntoLua, Lua, LuaSerdeExt, Value};
|
use mlua::{FromLua, IntoLua, Lua, LuaSerdeExt, Value};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use yazi_binding::SER_OPT;
|
use yazi_binding::SER_OPT;
|
||||||
use yazi_fs::SortBy;
|
use yazi_fs::{SortBy, SortFallback};
|
||||||
use yazi_shared::event::CmdCow;
|
use yazi_shared::event::CmdCow;
|
||||||
|
|
||||||
#[derive(Debug, Default, Deserialize, Serialize)]
|
#[derive(Debug, Default, Deserialize, Serialize)]
|
||||||
|
|
@ -11,6 +11,7 @@ pub struct SortOpt {
|
||||||
pub dir_first: Option<bool>,
|
pub dir_first: Option<bool>,
|
||||||
pub sensitive: Option<bool>,
|
pub sensitive: Option<bool>,
|
||||||
pub translit: Option<bool>,
|
pub translit: Option<bool>,
|
||||||
|
pub fallback: Option<SortFallback>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TryFrom<CmdCow> for SortOpt {
|
impl TryFrom<CmdCow> for SortOpt {
|
||||||
|
|
@ -23,6 +24,7 @@ impl TryFrom<CmdCow> for SortOpt {
|
||||||
dir_first: c.get("dir-first").ok(),
|
dir_first: c.get("dir-first").ok(),
|
||||||
sensitive: c.get("sensitive").ok(),
|
sensitive: c.get("sensitive").ok(),
|
||||||
translit: c.get("translit").ok(),
|
translit: c.get("translit").ok(),
|
||||||
|
fallback: c.get("fallback").ok().map(str::parse).transpose()?,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ fn mgr() -> Composer<ComposerGet, ComposerSet> {
|
||||||
b"sort_reverse" => m.sort_reverse.get().into_lua(lua)?,
|
b"sort_reverse" => m.sort_reverse.get().into_lua(lua)?,
|
||||||
b"sort_dir_first" => m.sort_dir_first.get().into_lua(lua)?,
|
b"sort_dir_first" => m.sort_dir_first.get().into_lua(lua)?,
|
||||||
b"sort_translit" => m.sort_translit.get().into_lua(lua)?,
|
b"sort_translit" => m.sort_translit.get().into_lua(lua)?,
|
||||||
|
b"sort_fallback" => lua.to_value_with(&m.sort_fallback, SER_OPT)?,
|
||||||
|
|
||||||
b"linemode" => lua.create_string(&m.linemode)?.into_lua(lua)?,
|
b"linemode" => lua.create_string(&m.linemode)?.into_lua(lua)?,
|
||||||
b"show_hidden" => m.show_hidden.get().into_lua(lua)?,
|
b"show_hidden" => m.show_hidden.get().into_lua(lua)?,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue