Skip to content

Commit

Permalink
Replace crm example with password strength to show controlled com…
Browse files Browse the repository at this point in the history
…ponents (#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 <simon@siku2.io>
Co-authored-by: Julius Lungys <32368314+voidpumpkin@users.noreply.github.com>
  • Loading branch information
3 people committed Nov 20, 2021
1 parent 068a20a commit 1f03a04
Show file tree
Hide file tree
Showing 15 changed files with 283 additions and 311 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -12,7 +12,6 @@ members = [
# Examples
"examples/boids",
"examples/counter",
"examples/crm",
"examples/dyn_create_destroy_apps",
"examples/file_upload",
"examples/function_todomvc",
Expand All @@ -25,6 +24,7 @@ members = [
"examples/multi_thread",
"examples/nested_list",
"examples/node_refs",
"examples/password_strength",
"examples/portals",
"examples/pub_sub",
"examples/router",
Expand Down
50 changes: 25 additions & 25 deletions examples/README.md
Expand Up @@ -26,34 +26,34 @@ As an example, check out the TodoMVC example here: <https://examples.yew.rs/todo

## List of examples

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

## Next steps

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.
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.

## Help out

Expand Down
19 changes: 0 additions & 19 deletions examples/crm/Cargo.toml

This file was deleted.

28 changes: 0 additions & 28 deletions examples/crm/README.md

This file was deleted.

9 changes: 0 additions & 9 deletions examples/crm/index.html

This file was deleted.

109 changes: 0 additions & 109 deletions examples/crm/src/add_client.rs

This file was deleted.

120 changes: 0 additions & 120 deletions examples/crm/src/main.rs

This file was deleted.

14 changes: 14 additions & 0 deletions examples/password_strength/Cargo.toml
@@ -0,0 +1,14 @@
[package]
name = "password_strength"
version = "0.1.0"
authors = ["Philip Peterson <pc.peterso@gmail.com>"]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
yew = { path = "../../packages/yew" }
zxcvbn = "2.1.2"
js-sys = "0.3.46"
web-sys = { version = "0.3", features = ["Event","EventTarget","InputEvent"] }
wasm-bindgen = "0.2"
chrono = { version = "0.4", features = ["wasmbind"] }

0 comments on commit 1f03a04

Please sign in to comment.