Skip to content

Commit 1f03a04

Browse files
philip-petersonsiku2voidpumpkin
authored
Replace crm example with password strength to show controlled components (yewstack#1706)
* Remove crm example * Add password_strength example * Update README * Remove .DS_Store * Update README * Cargo fmt * Apply suggestions from code review * Update list of examples * update the pr to work with latest master * fix readme * add newline Co-authored-by: Simon <[email protected]> Co-authored-by: Julius Lungys <[email protected]>
1 parent 068a20a commit 1f03a04

File tree

15 files changed

+283
-311
lines changed

15 files changed

+283
-311
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ members = [
1212
# Examples
1313
"examples/boids",
1414
"examples/counter",
15-
"examples/crm",
1615
"examples/dyn_create_destroy_apps",
1716
"examples/file_upload",
1817
"examples/function_todomvc",
@@ -25,6 +24,7 @@ members = [
2524
"examples/multi_thread",
2625
"examples/nested_list",
2726
"examples/node_refs",
27+
"examples/password_strength",
2828
"examples/portals",
2929
"examples/pub_sub",
3030
"examples/router",

examples/README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -26,34 +26,34 @@ As an example, check out the TodoMVC example here: <https://examples.yew.rs/todo
2626

2727
## List of examples
2828

29-
| Example | Description |
30-
| --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
31-
| [boids](boids) | Yew port of [Boids](https://en.wikipedia.org/wiki/Boids) |
32-
| [counter](counter) | Simple counter which can be incremented and decremented |
33-
| [crm](crm) | Shallow customer relationship management tool |
34-
| [dyn_create_destroy_apps](dyn_create_destroy_apps) | Uses the function `start_app_in_element` and the `AppHandle` struct to dynamically create and delete Yew apps |
35-
| [file_upload](file_upload) | Uses the `gloo::file` to read the content of user uploaded files |
36-
| [function_todomvc](function_todomvc) | Implementation of [TodoMVC](http://todomvc.com/) using function components and hooks. |
37-
| [futures](futures) | Demonstrates how you can use futures and async code with Yew. Features a Markdown renderer. |
38-
| [game_of_life](game_of_life) | Implementation of [Conway's Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life) |
39-
| [inner_html](inner_html) | Embeds an external document as raw HTML by manually managing the element |
40-
| [js_callback](js_callback) | Interacts with JavaScript code |
41-
| [keyed_list](keyed_list) | Demonstrates how to use keys to improve the performance of lists |
42-
| [mount_point](mount_point) | Shows how to mount the root component to a custom element |
43-
| [multi_thread](multi_thread) | Demonstrates the use of Web Workers to offload computation to the background |
44-
| [nested_list](nested_list) | Renders a styled list which tracks hover events |
45-
| [node_refs](node_refs) | Uses a [`NodeRef`](https://yew.rs/concepts/components/refs) to focus the input element under the cursor |
46-
| [pub_sub](pub_sub) | Cross-component communication using [Agents](https://yew.rs/concepts/agents) |
47-
| [router](router) | The best yew blog built with `yew-router` |
48-
| [store](store) | Showcases the `yewtil::store` API |
49-
| [timer](timer) | Demonstrates the use of the interval and timeout services |
50-
| [todomvc](todomvc) | Implementation of [TodoMVC](http://todomvc.com/) |
51-
| [two_apps](two_apps) | Runs two separate Yew apps which can communicate with each other |
52-
| [webgl](webgl) | Controls a [WebGL canvas](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Tutorial/Getting_started_with_WebGL) from Yew |
29+
| Example | Description |
30+
| -------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
31+
| [boids](boids) | Yew port of [Boids](https://en.wikipedia.org/wiki/Boids) |
32+
| [counter](counter) | Simple counter which can be incremented and decremented |
33+
| [dyn_create_destroy_apps](dyn_create_destroy_apps) | Uses the function `start_app_in_element` and the `AppHandle` struct to dynamically create and delete Yew apps |
34+
| [file_upload](file_upload) | Uses the `gloo::file` to read the content of user uploaded files |
35+
| [function_todomvc](function_todomvc) | Implementation of [TodoMVC](http://todomvc.com/) using function components and hooks. |
36+
| [futures](futures) | Demonstrates how you can use futures and async code with Yew. Features a Markdown renderer. |
37+
| [game_of_life](game_of_life) | Implementation of [Conway's Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life) |
38+
| [inner_html](inner_html) | Embeds an external document as raw HTML by manually managing the element |
39+
| [js_callback](js_callback) | Interacts with JavaScript code |
40+
| [keyed_list](keyed_list) | Demonstrates how to use keys to improve the performance of lists |
41+
| [mount_point](mount_point) | Shows how to mount the root component to a custom element |
42+
| [multi_thread](multi_thread) | Demonstrates the use of Web Workers to offload computation to the background |
43+
| [nested_list](nested_list) | Renders a styled list which tracks hover events |
44+
| [node_refs](node_refs) | Uses a [`NodeRef`](https://yew.rs/concepts/components/refs) to focus the input element under the cursor |
45+
| [password_strength](password_strength) | A password strength estimator implemented in Yew |
46+
| [pub_sub](pub_sub) | Cross-component communication using [Agents](https://yew.rs/concepts/agents) |
47+
| [router](router) | The best yew blog built with `yew-router` |
48+
| [store](store) | Showcases the `yewtil::store` API |
49+
| [timer](timer) | Demonstrates the use of the interval and timeout services |
50+
| [todomvc](todomvc) | Implementation of [TodoMVC](http://todomvc.com/) |
51+
| [two_apps](two_apps) | Runs two separate Yew apps which can communicate with each other |
52+
| [webgl](webgl) | Controls a [WebGL canvas](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Tutorial/Getting_started_with_WebGL) from Yew |
5353

5454
## Next steps
5555

56-
Have a look at Yew's [starter templates](https://yew.rs/getting-started/starter-templates) when starting a project using Yew – they can significantly simplify things.
56+
Have a look at Yew's [starter templates](https://yew.rs/getting-started/starter-templates) when starting a project using Yew – they can significantly simplify things.
5757

5858
## Help out
5959

examples/crm/Cargo.toml

Lines changed: 0 additions & 19 deletions
This file was deleted.

examples/crm/README.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

examples/crm/index.html

Lines changed: 0 additions & 9 deletions
This file was deleted.

examples/crm/src/add_client.rs

Lines changed: 0 additions & 109 deletions
This file was deleted.

examples/crm/src/main.rs

Lines changed: 0 additions & 120 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[package]
2+
name = "password_strength"
3+
version = "0.1.0"
4+
authors = ["Philip Peterson <[email protected]>"]
5+
edition = "2018"
6+
7+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8+
[dependencies]
9+
yew = { path = "../../packages/yew" }
10+
zxcvbn = "2.1.2"
11+
js-sys = "0.3.46"
12+
web-sys = { version = "0.3", features = ["Event","EventTarget","InputEvent"] }
13+
wasm-bindgen = "0.2"
14+
chrono = { version = "0.4", features = ["wasmbind"] }

0 commit comments

Comments
 (0)