daydream

A small matrix web client written in rust
git clone git://archive.git.mtrnord.blog/daydream-mx/daydream.git
Log | Files | Refs | README | LICENSE

commit 5e2bef5f4e79bcb020acc9b57f14f603279d605d
parent b7553c1e3ab0993f5f779e96131c49334b943cb6
Author: Marcel <mtrnord1@gmail.com>
Date:   Wed, 17 Jun 2020 19:54:32 +0200

Small UI optimizing

Took 11 minutes

Diffstat:
MCargo.toml | 2+-
Msrc/app/components/event_list.rs | 2+-
Msrc/app/matrix/mod.rs | 4----
Msrc/app/views/main_view.rs | 2+-
Mstatic/custom-css.scss | 6++++++
5 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml @@ -27,7 +27,7 @@ yew-router = { git = "https://github.com/yewstack/yew" } yewtil = { git = "https://github.com/yewstack/yew" } # Matrix -matrix-sdk = { version = "0.1.0", git = "https://github.com/MTRNord/matrix-rust-sdk", branch = "expose-send-rebased", default-features = false, rev = "9a67e62002398974c5b73349081ad00686f57b7f"}# features = ["encryption"]} +matrix-sdk = { version = "0.1.0", git = "https://github.com/MTRNord/matrix-rust-sdk", branch = "daydream", default-features = false}# features = ["encryption"]} url = "2.1.1" thiserror = "1.0" futures-locks = { git = "https://github.com/asomers/futures-locks", default-features = false } diff --git a/src/app/components/event_list.rs b/src/app/components/event_list.rs @@ -140,7 +140,7 @@ impl Component for EventList { fn view(&self) -> Html { return html! { <div class="container uk-flex uk-flex-column uk-width-5-6 uk-padding uk-padding-remove-bottom" style="height: 100%"> - <h1>{ self.props.current_room.as_ref().unwrap().display_name() }</h1> + <div class="room-title"><h1>{ self.props.current_room.as_ref().unwrap().display_name() }</h1></div> <div class="scrollable" style="height: 100%"> { if self.state.events.contains_key(&self.props.current_room.as_ref().unwrap().room_id) { diff --git a/src/app/matrix/mod.rs b/src/app/matrix/mod.rs @@ -66,7 +66,6 @@ pub enum Request { SetPassword(String), Login, GetLoggedIn, - GetUserdata, GetOldMessages((RoomId, Option<String>)), StartSync, GetJoinedRooms, @@ -284,9 +283,6 @@ impl Agent for MatrixAgent { } }); } - Request::GetUserdata => { - // Noop - } Request::GetOldMessages((room_id, from)) => { let agent = self.clone(); spawn_local(async move { diff --git a/src/app/views/main_view.rs b/src/app/views/main_view.rs @@ -72,7 +72,7 @@ impl Component for MainView { <div class="uk-flex auto-scrollable-container" style="height: 100%"> <RoomList change_room_callback=self.link.callback(Msg::ChangeRoom)/> <div class="container uk-flex uk-flex-column uk-width-5-6 uk-padding uk-padding-remove-bottom" style="height: 100%"> - <h1>{ self.state.current_room.as_ref().unwrap().display_name() }</h1> + <div class="room-title"><h1>{ self.state.current_room.as_ref().unwrap().display_name() }</h1></div> <h4> { tr!( diff --git a/static/custom-css.scss b/static/custom-css.scss @@ -342,3 +342,9 @@ body { height: 100vh; width: 100vw; } + +.room-title { + margin-bottom: 1.5rem; + + box-shadow: 0 1px 10px -10px rgba(0, 0, 0, 0.2), 0 4px 5px -5px rgba(0, 0, 0, 0.12), 0 2px 4px -4px rgba(0, 0, 0, 0.14); +}