-
Notifications
You must be signed in to change notification settings - Fork 0
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
Hamlet template rewrite #3
Open
geraldus
wants to merge
12
commits into
master
Choose a base branch
from
issue-2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
97f8e42
Better env var handling
geraldus bc0ddd2
Update version render to match latest API
geraldus 78f8c5d
Add main nav container
geraldus 0f3d35f
Add breadcrumbs container
geraldus c63c489
Add messages
geraldus e52789a
20 templates processed
hekt45 886f14d
Convert form/create-order page to container
geraldus 74a7e89
Removed extra hyphenation in 20 templates
hekt45 6962d79
Add container's template
geraldus 79f8b35
Merge branch 'issue-2' of github.com:geraldus/birds-exchanger-ui into…
geraldus 031268d
Correction in 7 templates
hekt45 26fbe12
4 templates processed
hekt45 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react'; | ||
|
||
|
||
export const breadcrumb: React.FC = () => { | ||
return ( | ||
<div className="container-fluid my-3"> | ||
<div className="row"> | ||
<div className="col-11 mx-auto"> | ||
<ul className="breadcrumb"> | ||
<li className="breadcrumb-item"> | ||
<a href="@{fst bc}">#[snd bc]</a> | ||
</li> | ||
<li className="breadcrumb-item active">#[title]</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
import React, { ReactNode, ReactNodeArray } from 'react'; | ||
import { RouteComponentProps } from 'react-router'; | ||
import navbarLogo from '@/assets/logo/logo-header.png'; | ||
import { NavLink, Link } from 'react-router-dom'; | ||
|
||
|
||
export type GroupItemProps = { | ||
label?: ReactNode, | ||
route: string | ||
} | ||
|
||
const menuLeftGroupItem: React.FC<GroupItemProps> = (props) => { | ||
return ( | ||
<li className="nav-item mx-2"> | ||
<NavLink className="nav-link" to={props.route}> | ||
{props.label || props.children} | ||
</NavLink> | ||
</li> | ||
) | ||
} | ||
|
||
type Props = { | ||
left?: ReactNode | ReactNodeArray | ||
} | ||
|
||
const layoutNavContainer: React.FC<Props> = props => { | ||
return ( | ||
<nav | ||
className="navbar sticky-top navbar-dark navbar-expand-lg" | ||
style={{ backgroundColor: 'black' }} | ||
> | ||
<button | ||
className="navbar-toggler" | ||
type="button" | ||
data-toggle="collapse" | ||
data-target="#main-nav-menu" | ||
aria-controls="main-nav-menu" | ||
aria-expanded="false" | ||
aria-label="Показать меню" | ||
> | ||
<span className="navbar-toggler-icon" /> | ||
</button> | ||
<NavLink className="navbar-brand" to="/"> | ||
<img src={navbarLogo} style={{ maxHeight: '20px' }} alt="OutBirds" /> | ||
</NavLink> | ||
<div | ||
id="main-nav-menu" | ||
className="collapse navbar-collapse justify-content-between" | ||
> | ||
<ul className="navbar-nav"> | ||
{props.left} | ||
</ul> | ||
<span className="navbar-text d-flex d-lg-none"> | ||
<i className="fas fa-wallet align-self-center" /> | ||
<span className="d-block ml-2"> _[MsgBalance]</span> | ||
</span> | ||
<span className="navbar-text font-weight-bold d-flex d-lg-none wallet-balance-val"> | ||
#[cents2dblT cents] | ||
<span className="font-weight-normal">#[currSign cur]</span> | ||
</span> | ||
<span className="navbar-text d-block d-lg-none">#[userName]</span> | ||
<ul className="navbar-nav d-flex d-lg-none"> | ||
<li className="nav-item"> | ||
<a className="nav-link" href="@{route}"> | ||
#[label] | ||
</a> | ||
</li> | ||
</ul> | ||
<ul className="navbar-nav"> | ||
<li className="nav-item mx-2"> | ||
<a className="nav-link" href="@{route}"> | ||
#[label] | ||
</a> | ||
</li> | ||
</ul> | ||
<ul className="navbar-nav d-flex"> | ||
<li id="#navWalletDropdownId" className="nav-item dropdown"> | ||
<a | ||
id="#navWalletDropdownId-toggle" | ||
className="nav-link dropdown-toggle" | ||
data-toggle="dropdown" | ||
href="#" | ||
role="button" | ||
aria-expanded="false" | ||
aria-haspopup="true" | ||
> | ||
<i className="fas fa-wallet" /> | ||
</a> | ||
<div | ||
className="dropdown-menu" | ||
aria-labelledby="#navWalletDropdownId-toggle" | ||
> | ||
<a | ||
className="dropdown-item font-weight-bold wallet-balance-val" | ||
href="#" | ||
> | ||
#[cents2dblT cents] | ||
<span className="font-weight-normal">#[currSign cur]</span> | ||
</a> | ||
</div> | ||
</li> | ||
<li id="#navManageDropdownId" className="nav-item dropdown"> | ||
<a | ||
id="#navManageDropdownId-toggle" | ||
className="nav-link dropdown-toggle" | ||
data-toggle="dropdown" | ||
href="#" | ||
role="button" | ||
aria-expanded="false" | ||
aria-haspopup="true" | ||
> | ||
_[MsgManage] | ||
</a> | ||
<div | ||
className="dropdown-menu" | ||
aria-labelledby="#navManageDropdownId-toggle" | ||
> | ||
<span className="navbar-text d-flex px-3 text-uppercase"> | ||
<i className="fas fa-pen-nib align-self-center" /> | ||
<span className="d-block ml-2">_[MsgEditMenuTitle]</span> | ||
</span> | ||
|
||
<a className="dropdown-item" href="@{route}"> | ||
#[label] | ||
</a> | ||
<span className="navbar-text d-flex px-3 text-uppercase"> | ||
<i className="fas fa-donate align-self-center" /> | ||
<span className="d-block ml-2">_[MsgRequestsMenuTitle]</span> | ||
</span> | ||
<a className="dropdown-item" href="@{route}"> | ||
#[label] | ||
</a> | ||
<a className="dropdown-item" href="@{route}"> | ||
#[label] | ||
</a> | ||
</div> | ||
</li> | ||
<li id="#navUserDropdownId" className="nav-item dropdown mr-5"> | ||
<a | ||
id="#navUserDropdownId-toggle" | ||
className="nav-link dropdown-toggle" | ||
data-toggle="dropdown" | ||
href="#" | ||
role="button" | ||
aria-expanded="false" | ||
aria-haspopup="true" | ||
> | ||
#[userName] | ||
</a> | ||
<div | ||
className="dropdown-menu" | ||
aria-labelledby="#navUserDropdownId-toggle" | ||
> | ||
<a className="dropdown-item" href="@{route}"> | ||
#[label] | ||
</a> | ||
</div> | ||
</li> | ||
</ul> | ||
</div> | ||
</nav> | ||
) | ||
} | ||
|
||
export default layoutNavContainer; |
19 changes: 19 additions & 0 deletions
19
src/containers/desktop/client/deposit/request/amount/Deposit.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react'; | ||
|
||
|
||
export default function () { | ||
return ( | ||
<div> | ||
<big> | ||
<s>#[ac]#</s> | ||
<b>#[ac]#</b> | ||
<small className="text-muted">#[currSign c]</small> | ||
</big> | ||
<br/> | ||
<small className="text-muted"> | ||
#[sign]#[cents2dblT f]# | ||
<small>#[currSign c] ^[d]</small> | ||
</small> | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React from 'react'; | ||
|
||
|
||
export default function () { | ||
return ( | ||
<div> | ||
<tr | ||
id="order-data-#{fromSqlKey orderId}" | ||
className="data-row" | ||
> | ||
<td className="text-muted text-center"> | ||
<small> | ||
#[renderDateTimeRow l tzo (exchangeOrderCreated order)] | ||
</small> | ||
</td> | ||
<td className="text-center"> | ||
<big>#[renderOrderExchange order]</big> | ||
</td> | ||
<td className="text-center"> | ||
<small className="text-muted">x# \#[renderOrderRate order] #</small> | ||
<small className="text-muted">#[renderOrderNRatioSign order]</small> | ||
</td> | ||
<td>#[renderOrderRemainderExecuted l tzo order]</td> | ||
<td className="controls"> | ||
<a href="#{urlRender (ClientOrderViewR orderId)}"> | ||
<i | ||
className="control fas fa-info-circle" | ||
title="#{messageRender MsgViewOrderHistory}" | ||
/> | ||
<i | ||
className="order-cancel-button control fas fa-times-circle" | ||
title="#{messageRender MsgCancelOrder}" | ||
/> | ||
<form | ||
method="post" | ||
action="#{urlRender ClientOrderCancelR}" | ||
> | ||
<input | ||
type="hidden" | ||
name="order-id" | ||
value="#{fromSqlKey orderId}" | ||
/> | ||
</form> | ||
</a> | ||
</td> | ||
</tr> | ||
</div> | ||
) | ||
} |
43 changes: 43 additions & 0 deletions
43
src/containers/desktop/client/order/operation/row/Orders.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import React from 'react'; | ||
|
||
|
||
export default function () { | ||
return ( | ||
<div> | ||
<tr className="data-row"> | ||
<td className="text-center"> | ||
<small> | ||
#[renderDateTimeRow l tzo (exchangeOrderExecutionTime op)] | ||
</small> | ||
</td> | ||
<td> | ||
<small>_[MsgExchange] #</small> | ||
<span> | ||
<b>#[cents2dblT transfered]#</b> | ||
<small className="text-muted">#[renderPairOut pair]</small> | ||
<small>_[MsgOrderWasExecuted] #</small> | ||
</span> | ||
</td> | ||
<td className="text-center align-middle">+# | ||
<span> | ||
<b>#[cents2dblT (income - fee)]#</b> | ||
<small className="text-muted">#[renderPairIn pair]</small> | ||
</span> | ||
<br className="d-md-none"/> | ||
<small className="d-md-none">-# | ||
<span> | ||
#[cents2dblT fee] | ||
<small className="text-muted">#[renderPairIn pair]</small> | ||
</span> | ||
</small> | ||
</td> | ||
<td className="d-none d-md-table-cell text-center align-middle">-# | ||
<span> | ||
#[cents2dblT fee] | ||
<small className="text-muted">#[renderPairIn pair]</small> | ||
</span> | ||
</td> | ||
</tr> | ||
</div> | ||
) | ||
} |
32 changes: 32 additions & 0 deletions
32
src/containers/desktop/client/withdrawal/layout/Withdrawal.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import React from 'react'; | ||
|
||
|
||
export default function () { | ||
return ( | ||
<div> | ||
<div className="row"> | ||
<div className="col-10 mx-auto"> | ||
<div className="alert alert-warning"> | ||
<div className="error">#[e]</div> | ||
</div> | ||
</div> | ||
</div> | ||
<form | ||
id="#{formId}" | ||
method="post" | ||
encType="#{enctype}" | ||
action="@{WithdrawalCreateR}" | ||
className="col-12 col-sm-10 col-md-8 mx-auto" | ||
> | ||
^[widget] | ||
<div className="form-group row justify-content-center"> | ||
<button | ||
className="btn btn-lg btn-outline-primary mt-2" | ||
type="submit" | ||
>вывод | ||
</button> | ||
</div> | ||
</form>^[withdrawalHistory] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Move |
||
</div> | ||
) | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move tag contents to new line