Skip to content

Commit 7a9ca1d

Browse files
authored
Merge pull request #25 from ealmloff/fullstack-liveview-lowercase
make fullstack and liveview lowercase everywhere
2 parents a787958 + 1d520cc commit 7a9ca1d

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2021"
77
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
88

99
[dependencies]
10-
{% if platform == "Liveview" %}
10+
{% if platform == "liveview" %}
1111
dioxus = { version = "0.4" }
1212
tokio = { version = "1.27.0", features = ["full"] }
1313
{% if backend == "Axum" %}
@@ -35,7 +35,7 @@ dioxus = { version = "0.4" }
3535
dioxus-tui = { version = "0.4" }
3636
dioxus = { version = "0.4" }
3737
{% endif %}
38-
{% if platform == "Fullstack" %}
38+
{% if platform == "fullstack" %}
3939
{% if router %}
4040
dioxus-fullstack = { version = "0.4", features = ["router"] }
4141
{% else %}
@@ -59,7 +59,7 @@ dioxus-logger = "0.4.1"
5959
console_error_panic_hook = "0.1.7"
6060
{% endif %}
6161

62-
{% if platform == "Fullstack" %}
62+
{% if platform == "fullstack" %}
6363
[features]
6464
default = []
6565
{% if backend == "Axum" %}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ dx serve --hot-reload
3737

3838
- Open the browser to http://localhost:8080
3939
{% else %}
40-
{% if platform == "Fullstack" %}
40+
{% if platform == "fullstack" %}
4141
Launch the Dioxus Fullstack app:
4242

4343
```bash

cargo-generate.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ prompt = "What platform are you targeting?"
1212
choices = ["web", "fullstack", "desktop", "liveview", "TUI"]
1313
default = "web"
1414

15-
[conditional.'platform == "Liveview"'.placeholders.backend]
15+
[conditional.'platform == "liveview"'.placeholders.backend]
1616
type = "string"
1717
prompt = "What backend framework are you using?"
1818
choices = ["Axum", "Warp", "Salvo"]
1919
default = "Axum"
2020

21-
[conditional.'platform == "Fullstack"'.placeholders.backend]
21+
[conditional.'platform == "fullstack"'.placeholders.backend]
2222
type = "string"
2323
prompt = "What backend framework are you using?"
2424
choices = ["Axum", "Warp", "Salvo"]
@@ -34,15 +34,15 @@ type = "string"
3434
prompt = "How do you want to create CSS?"
3535
choices = ["Tailwind", "Vanilla"]
3636
default = "Vanilla"
37-
[conditional.'platform == "Fullstack"'.placeholders.styling]
37+
[conditional.'platform == "fullstack"'.placeholders.styling]
3838
type = "string"
3939
prompt = "How do you want to create CSS?"
4040
choices = ["Tailwind", "Vanilla"]
4141
default = "Vanilla"
4242

4343
[conditional.'platform == "TUI"']
4444
ignore = [ "tailwind.config.js", "input.css", "public" ]
45-
[conditional.'platform == "Liveview"']
45+
[conditional.'platform == "liveview"']
4646
ignore = [ "tailwind.config.js", "input.css", "public" ]
4747
[conditional.'platform == "desktop"']
4848
ignore = [ "public" ]

src/main.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![allow(non_snake_case)]
2-
{% if platform == "Fullstack" %}
2+
{% if platform == "fullstack" %}
33
#![allow(unused)]
44
use dioxus_fullstack::prelude::*;
55
{% endif %}
@@ -9,7 +9,7 @@ use dioxus_router::prelude::*;
99
use dioxus::prelude::*;
1010
use log::LevelFilter;
1111

12-
{% if platform == "Liveview" %}
12+
{% if platform == "liveview" %}
1313
{% if backend == "Axum" %}
1414
#[tokio::main]
1515
async fn main() {
@@ -179,7 +179,7 @@ fn main() {
179179
dioxus_tui::launch(app);
180180
}
181181
{% endif %}
182-
{% if platform == "Fullstack" %}
182+
{% if platform == "fullstack" %}
183183
fn main() {
184184
// Init debug
185185
dioxus_logger::init(LevelFilter::Info).expect("failed to init logger");
@@ -192,15 +192,15 @@ fn main() {
192192
{% endif %}
193193

194194
{% if router %}
195-
{% if platform != "Fullstack" %}
195+
{% if platform != "fullstack" %}
196196
fn app(cx: Scope) -> Element {
197197
render!{
198198
Router::<Route> {}
199199
}
200200
}
201201
{% endif %}
202202

203-
{% if platform != "Fullstack" %}
203+
{% if platform != "fullstack" %}
204204
#[derive(Clone, Routable, Debug, PartialEq)]
205205
enum Route {
206206
#[route("/")]
@@ -209,7 +209,7 @@ enum Route {
209209
Blog { id: i32 },
210210
}
211211
{% endif %}
212-
{% if platform == "Fullstack" %}
212+
{% if platform == "fullstack" %}
213213
#[derive(Clone, Routable, Debug, PartialEq, serde::Serialize, serde::Deserialize)]
214214
enum Route {
215215
#[route("/")]
@@ -230,7 +230,7 @@ fn Blog(cx: Scope, id: i32) -> Element {
230230
#[component]
231231
fn Home(cx: Scope) -> Element {
232232
let mut count = use_state(cx, || 0);
233-
{% if platform == "Fullstack" %}
233+
{% if platform == "fullstack" %}
234234
let text = use_state(cx, || "...".to_string());
235235
{% endif %}
236236

@@ -245,7 +245,7 @@ fn Home(cx: Scope) -> Element {
245245
h1 { "High-Five counter: {count}" }
246246
button { onclick: move |_| count += 1, "Up high!" }
247247
button { onclick: move |_| count -= 1, "Down low!" }
248-
{% if platform == "Fullstack" %}
248+
{% if platform == "fullstack" %}
249249
button {
250250
onclick: move |_| {
251251
to_owned![text];
@@ -277,7 +277,7 @@ fn app(cx: Scope) -> Element {
277277
}
278278
{% endif %}
279279

280-
{% if platform == "Fullstack" %}
280+
{% if platform == "fullstack" %}
281281
#[server(PostServerData)]
282282
async fn post_server_data(data: String) -> Result<(), ServerFnError> {
283283
println!("Server received: {}", data);

0 commit comments

Comments
 (0)