feat: Chat Folders (#14)

* add room kinds

* add folders

* adjust design

* update

* refactor

* cache

* update
This commit is contained in:
reya
2025-04-06 15:29:36 +07:00
committed by GitHub
parent 16530a3804
commit f7610cc9c9
18 changed files with 1052 additions and 504 deletions

View File

@@ -20,6 +20,7 @@ pub enum IconName {
Bell,
BookOpen,
Bot,
BubbleFill,
Calendar,
ChartPie,
Check,
@@ -42,6 +43,9 @@ pub enum IconName {
Eye,
EyeOff,
Frame,
Folder,
FolderFill,
FolderOpenFill,
GalleryVerticalEnd,
GitHub,
Globe,
@@ -104,6 +108,7 @@ impl IconName {
Self::Bell => "icons/bell.svg",
Self::BookOpen => "icons/book-open.svg",
Self::Bot => "icons/bot.svg",
Self::BubbleFill => "icons/bubble-fill.svg",
Self::Calendar => "icons/calendar.svg",
Self::ChartPie => "icons/chart-pie.svg",
Self::Check => "icons/check.svg",
@@ -126,6 +131,9 @@ impl IconName {
Self::Eye => "icons/eye.svg",
Self::EyeOff => "icons/eye-off.svg",
Self::Frame => "icons/frame.svg",
Self::Folder => "icons/folder.svg",
Self::FolderFill => "icons/folder-fill.svg",
Self::FolderOpenFill => "icons/folder-open-fill.svg",
Self::GalleryVerticalEnd => "icons/gallery-vertical-end.svg",
Self::GitHub => "icons/github.svg",
Self::Globe => "icons/globe.svg",

View File

@@ -209,8 +209,8 @@ where
),
)
.into_any_element();
let element_id = element.request_layout(window, cx);
let element_id = element.request_layout(window, cx);
let layout_id = window.request_layout(style, vec![element_id], cx);
(layout_id, element)

View File

@@ -36,8 +36,8 @@ pub(crate) const WIDTH: Pixels = px(12.);
const MIN_THUMB_SIZE: f32 = 80.;
const THUMB_RADIUS: Pixels = Pixels(4.0);
const THUMB_INSET: Pixels = Pixels(3.);
const FADE_OUT_DURATION: f32 = 3.0;
const FADE_OUT_DELAY: f32 = 2.0;
const FADE_OUT_DURATION: f32 = 2.0;
const FADE_OUT_DELAY: f32 = 1.2;
pub trait ScrollHandleOffsetable {
fn offset(&self) -> Point<Pixels>;