Skip to content

Commit

Permalink
🔥💄 removed unused stuff from frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
chriamue committed Jan 28, 2024
1 parent 7b273eb commit 250a99b
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 24 deletions.
2 changes: 1 addition & 1 deletion frontend/src/frontend/components/chain_select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub fn chain_select(props: &Props) -> Html {

html! {
<div class="chain-select">
<select onchange={on_change}>
<select class="form-select" aria-label="Select chain" onchange={on_change}>
<option value="Azero" selected=true>{ "Azero" }</option>
<option value="AzeroTest">{ "AzeroTest" }</option>
</select>
Expand Down
4 changes: 0 additions & 4 deletions frontend/src/frontend/components/config_form.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ pub fn config_form(props: &Props) -> Html {
html! {
<div class="config-form">
<form>
<div class="mb-3">
<label for="authorize_uri" class="form-label">{"Authorize Uri"}</label>
<input type="text" class="form-control" id="authorize_uri" value={props.params.client_id.clone()} oninput={oninput.clone()} />
</div>
<div class="mb-3">
<label for="client_id" class="form-label">{"Client ID"}</label>
<input type="text" class="form-control" id="client_id" value={props.params.client_id.clone()} oninput={oninput.clone()} />
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/frontend/components/login_url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub fn login_url(props: &Props) -> Html {
};
html! {
<div class="login-url">
<p> { format!("Login to: {}", url) }</p>
{"Login to: "}<input type="text" readonly={true} value={ format!("{}", url) } />
</div>
}
}
4 changes: 1 addition & 3 deletions frontend/src/frontend/pages/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ pub fn configuration() -> Html {
<h1>{ "Config for your Webpage" }</h1>
</div>
<div id="configuration-content" class="row card justify-content-center d-grid gap-3">
<p>{ "You need an NFT? Get one from " }<a href="https://azero.id/">{"AZERO.ID"}</a> {"."}</p>
<p>{ "This is the configuration page" }</p>
<ConfigForm params = {(*params).clone()} on_change = {update_params} />
<ConfigForm params = {(*params).clone()} on_change = {update_params} />
<UrlText url={url.clone()} />
<br/>
<CopyUrlClipboard url={url} />
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/frontend/pages/example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub fn example() -> Html {
<div id="example">
<Navigation />
<div class="jumbotron mt-4 p-3 mb-5 bg-light rounded shadow">
<h1>{ "Example App" }</h1>
<h1>{ "Play 2048" }</h1>
<OAuth2 {config}>
<MyApplicationMain/>
</OAuth2>
Expand Down Expand Up @@ -43,6 +43,7 @@ fn my_app_main() -> Html {
</Authenticated>
<NotAuthenticated>
<button onclick={login}>{ "Login" }</button>
<p>{ "You need an NFT? Get one from " }<a href="https://azero.id/">{"AZERO.ID"}</a> {"."}</p>
</NotAuthenticated>
</>
)
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/frontend/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ pub struct Params {
impl Default for Params {
fn default() -> Self {
Params {
authorize_uri: Some("http://localhost:8081".to_string()),
authorize_uri: Some("https://azero.web3-login.net".to_string()),
redirect_uri: Some("https%3A%2F%2Foidcdebugger.com%2Fdebug".to_string()),
state: Some(uuid::Uuid::new_v4().to_string()),
nonce: Some("random".to_string()),
response_type: Some("code+id_token".to_string()),
response_mode: Some("code+id_token".to_string()),
response_type: Some("code".to_string()),
response_mode: Some("form_post".to_string()),
realm: Some("AzeroTest".to_string()),
client_id: Some("none".to_string()),
signature: None,
Expand Down
21 changes: 10 additions & 11 deletions frontend/static/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ body {
}

#home input {
width: 40%;
padding: 12px 20px;
width: 60%;
margin: 8px 0;
box-sizing: border-box;
border: 1px solid #3498db;
Expand All @@ -32,17 +31,9 @@ body {
transition: width 0.4s ease-in-out;
}

#home input[type=text] {
background-image: url('icon--primary-on-transparent.svg');
background-size: 24px;
background-position: 10px 10px;
background-repeat: no-repeat;
padding-left: 40px;
}

#home input[type=text]:focus {
width: 90%;
}
}

#configuration {
display: flex;
Expand Down Expand Up @@ -94,6 +85,14 @@ body {
margin-top: 1rem;
}

.nft-input input[type=text] {
padding: 12px 60px;
background-image: url('icon--primary-on-transparent.svg');
background-size: 24px;
background-position: 10px 10px;
background-repeat: no-repeat;
}

.url-text {
margin-top: 1rem;
}
Expand Down

0 comments on commit 250a99b

Please sign in to comment.