Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sass #8

Merged
merged 27 commits into from
Aug 23, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0c799d9
Use async blocks instead of closures
therustmonk Aug 11, 2019
205edee
Add build script to ui
therustmonk Aug 11, 2019
07efd96
Replace less with sass embedded compiler
therustmonk Aug 11, 2019
41b2e97
Use Compact format for SASS
therustmonk Aug 11, 2019
86f0a4c
Add block rule
therustmonk Aug 12, 2019
cbbd51a
Remove current widgets system
therustmonk Aug 12, 2019
7ff30d6
Add Grid layout to the protocol
therustmonk Aug 12, 2019
e3a886c
Implement Scene widget
therustmonk Aug 12, 2019
7dfd51e
Add Layout widget implementation with classes
therustmonk Aug 12, 2019
6524f58
Add DSL for containers
therustmonk Aug 12, 2019
3e01ec0
Add view_flex method to layout
therustmonk Aug 12, 2019
c082e53
Add a minimal grid
therustmonk Aug 14, 2019
1add4fb
Add baseline example
therustmonk Aug 14, 2019
8bce60f
Add app widget (empty)
therustmonk Aug 15, 2019
df49273
Add List and Icon
therustmonk Aug 15, 2019
c2221a1
Render ListItem
therustmonk Aug 15, 2019
d1a4d48
Add application layout
therustmonk Aug 17, 2019
660ef66
Add navigation bar to App layout
therustmonk Aug 17, 2019
4401c45
Move NavigationDrawer to a separate module
therustmonk Aug 17, 2019
3543464
Add styles for AppBar
therustmonk Aug 17, 2019
5752d1f
Add Vuetify as a submodule
therustmonk Aug 17, 2019
daecfc7
Use vuetify styles for navigation drawer
therustmonk Aug 18, 2019
eb5c6f7
Add Material Icon font
therustmonk Aug 18, 2019
c4dec49
Move AppBar to a separate module
therustmonk Aug 18, 2019
8619680
Add footer block to App
therustmonk Aug 18, 2019
4a2912f
Move Footer to a separate widget module
therustmonk Aug 18, 2019
6c37203
Activate styles for Footer
therustmonk Aug 18, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Implement Scene widget
  • Loading branch information
therustmonk committed Aug 12, 2019
commit e3a886c2381a8b1f9f12480e24376291c98f41a3
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use futures::compat::Compat;
use futures::{join, TryFutureExt};
use settings::Settings;
use std::thread;
pub use protocol as dsl;

pub fn main() -> Result<Control, Error> {
let settings = Settings::parse()?;
Expand Down
2 changes: 1 addition & 1 deletion ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl Component for Model {
impl Renderable<Self> for Model {
fn view(&self) -> Html<Self> {
html! {
<widgets::Spinner: />
<widgets::Scene: />
}
}
}
21 changes: 3 additions & 18 deletions ui/src/widgets/container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,9 @@ impl Widget for Model {
}

fn main_view(&self) -> View<Self> {
match self.container {
Container::Blank => {
html! {
<p>{ "Blank" }</p>
}
}
Container::Tabs(_) => {
html! {
<p>{ "Tabs" }</p>
}
}
Container::Panel(ref panel) => {
html! {
<div class="container",>
<widgets::Panel: panel=panel.clone(), />
</div>
}
}
html! {
<div class="container">
</div>
}
}
}
12 changes: 6 additions & 6 deletions ui/src/widgets/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ pub use blank::BlankWidget as Blank;
mod button;
pub use button::ButtonWidget as Button;

mod container;
pub use container::ContainerWidget as Container;

mod control;
pub use control::ControlWidget as Control;

Expand All @@ -37,13 +34,16 @@ pub use page::PageWidget as Page;
mod panel;
pub use panel::PanelWidget as Panel;

mod scene;
pub use scene::SceneWidget as Scene;

mod welcome;
pub use welcome::WelcomeWidget as Welcome;
*/

mod container;
pub use container::ContainerWidget as Container;

mod scene;
pub use scene::SceneWidget as Scene;

mod spinner;
pub use spinner::SpinnerWidget as Spinner;

Expand Down
11 changes: 5 additions & 6 deletions ui/src/widgets/scene.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::live::{Requirement, ResponseEvt};
use crate::widgets::{self, Reqs, View, Widget, WidgetModel};
use protocol::{Reaction, Scene};
use protocol::{Container, Reaction, Scene};
use yew::{html, Properties, ShouldRender};

pub type SceneWidget = WidgetModel<Model>;
Expand Down Expand Up @@ -45,16 +45,15 @@ impl Widget for Model {
<widgets::Spinner: />
}
}
Scene::FullScreen(ref layout) => {
Scene::App => {
html! {
<div class="scene-fullscreen",>
<widgets::Layout: layout=layout.clone(), />
<div class="app">
</div>
}
}
Scene::Dashboard(ref dashboard) => {
Scene::Container(ref container) => {
html! {
<widgets::Dashboard: dashboard=dashboard.clone(), />
<widgets::Container: container=container.clone() />
}
}
}
Expand Down