diff --git a/.umirc.ts b/.umirc.ts index 3b26d3b..d1308de 100644 --- a/.umirc.ts +++ b/.umirc.ts @@ -5,7 +5,11 @@ import packageJson from './package.json'; const DYN_API_ADDR = 'outb-demo.agolos.ru' const DEF_API_PORT = '80' -const apiAddr = process.env['BACKEND_API'] || `http://${DYN_API_ADDR}:${DEF_API_PORT}` +const apiAddr = + process.env['BACKEND_API'] && process.env['BACKEND_API'] != '' + ? `http://${process.env['BACKEND_API']}` + : `http://${DYN_API_ADDR}:${DEF_API_PORT}` + // tslint:disable-next-line: no-console console.log('Using following back-end API URL: %s. You can change setting env BACKEND_API var.', apiAddr) // ref: https://umijs.org/config/ diff --git a/src/containers/bootstrap/breadcrumb.tsx b/src/containers/bootstrap/breadcrumb.tsx new file mode 100644 index 0000000..8504543 --- /dev/null +++ b/src/containers/bootstrap/breadcrumb.tsx @@ -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> + ) +} diff --git a/src/containers/bootstrap/default-layout.tsx b/src/containers/bootstrap/default-layout.tsx index 50ce01a..7319bac 100755 --- a/src/containers/bootstrap/default-layout.tsx +++ b/src/containers/bootstrap/default-layout.tsx @@ -39,11 +39,25 @@ export const breadcrumb: React.FC = () => { } export interface BootstrapLayoutProps extends RouteComponentProps { - appVersion?: string; - breadcrumb?: ReactNode; + appVersion?: { + number: string, + extraLabel?: string + }, + breadcrumb?: ReactNode } const layoutContainer: React.FC<BootstrapLayoutProps> = props => { + const appVerExtra = props.appVersion && props.appVersion.extraLabel || null + const appVersion = props.appVersion + ? ( + <small className="text-muted"> + v{props.appVersion.number} + {` `} + {appVerExtra && <small className="text-lowercase">{appVerExtra}</small>} + </small> + ) + : null + return ( <div> <nav @@ -212,10 +226,8 @@ const layoutContainer: React.FC<BootstrapLayoutProps> = props => { <div className="col pt-3" style={{ background: '#e9ecef' }}> <p className="text-center"> _[MsgCurrencyExchangeService] «OutBirds» - <small className="text-muted"> - v{props.appVersion} - <small className="text-lowercase">_[MsgVerPublicBeta]</small> - </small> + {` `} + {appVersion} </p> </div> </div> diff --git a/src/containers/bootstrap/layout/nav.tsx b/src/containers/bootstrap/layout/nav.tsx new file mode 100755 index 0000000..36e2165 --- /dev/null +++ b/src/containers/bootstrap/layout/nav.tsx @@ -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; diff --git a/src/containers/desktop/client/deposit/request/amount/Deposit.tsx b/src/containers/desktop/client/deposit/request/amount/Deposit.tsx new file mode 100644 index 0000000..129c4a9 --- /dev/null +++ b/src/containers/desktop/client/deposit/request/amount/Deposit.tsx @@ -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> + ) +} \ No newline at end of file diff --git a/src/containers/desktop/client/order/list/row/Orders.tsx b/src/containers/desktop/client/order/list/row/Orders.tsx new file mode 100644 index 0000000..462f477 --- /dev/null +++ b/src/containers/desktop/client/order/list/row/Orders.tsx @@ -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> + ) +} \ No newline at end of file diff --git a/src/containers/desktop/client/order/operation/row/Orders.tsx b/src/containers/desktop/client/order/operation/row/Orders.tsx new file mode 100644 index 0000000..94c4ab7 --- /dev/null +++ b/src/containers/desktop/client/order/operation/row/Orders.tsx @@ -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> + ) +} \ No newline at end of file diff --git a/src/containers/desktop/client/withdrawal/layout/Withdrawal.tsx b/src/containers/desktop/client/withdrawal/layout/Withdrawal.tsx new file mode 100644 index 0000000..5590c02 --- /dev/null +++ b/src/containers/desktop/client/withdrawal/layout/Withdrawal.tsx @@ -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] + </div> + ) +} \ No newline at end of file diff --git a/src/containers/desktop/client/withdrawal/list/row/Withdrawal.tsx b/src/containers/desktop/client/withdrawal/list/row/Withdrawal.tsx new file mode 100644 index 0000000..3efb60e --- /dev/null +++ b/src/containers/desktop/client/withdrawal/list/row/Withdrawal.tsx @@ -0,0 +1,43 @@ +import React from 'react'; + + +export default function () { + return ( + <div> + <tr + className="data-row" + id="data-row-#{fromSqlKey ident}" + > + <td>^[dateTimeRowW withdrawalRequestCreated\</td> + <td className="align-middle"> + <s>^[valueW]</s> + <b>^[valueW]</b> + <span>^[valueW]</span> + <br/> + <small className="text-muted"> + _[transferMethodMsg withdrawalRequestMethod] + </small> + </td> + <td className="align-middle">^[expected]</td> + <td className="align-middle">^[status]</td> + <td className="controls align-middle"> + <i + className="request-cancel-button control fas fa-times-circle" + title="_{MsgCancelRequest}" + /> + <form + className="request-cancel-form d-none" + method="post" + action="@{ClientCancelWithdrawalR}" + > + <input + type="hidden" + name="request-id" + value="#{fromSqlKey ident}" + /> + </form> + </td> + </tr> + </div> + ) +} \ No newline at end of file diff --git a/src/containers/desktop/profile/desc/deposit/Profile.tsx b/src/containers/desktop/profile/desc/deposit/Profile.tsx new file mode 100644 index 0000000..193e67b --- /dev/null +++ b/src/containers/desktop/profile/desc/deposit/Profile.tsx @@ -0,0 +1,19 @@ +import React from 'react'; + + +export default function () { + return ( + <div> + <td>#[renderAmount cents c]</td> + <td> + <span>_[MsgBalanceDeposit]#</span> + <span>: #</span> + <a + href="@{DepositR}/#data-row-#{requestIdStr eRequest}" + title="_{MsgViewRequestDetails}" + >\_[MsgRequest] ##[requestIdStr eRequest] + </a> + </td> + </div> + ) +} \ No newline at end of file diff --git a/src/containers/desktop/profile/desc/order/cancellation/Profile.tsx b/src/containers/desktop/profile/desc/order/cancellation/Profile.tsx new file mode 100644 index 0000000..5730a23 --- /dev/null +++ b/src/containers/desktop/profile/desc/order/cancellation/Profile.tsx @@ -0,0 +1,19 @@ +import React from 'react'; + + +export default function () { + return ( + <div> + <td>#[renderAmount cents c]#</td> + <td> + <span>_[MsgOrderCancellation]#</span> + <span>: #</span> + <a + href="@{ClientOrderViewR (exchangeOrderCancellationOrderId ec)}" + title="_{MsgViewOrderDetails}" + >\_[MsgOrder] ##[requestIdStr eRequest] + </a> + </td> + </div> + ) +} \ No newline at end of file diff --git a/src/containers/desktop/profile/desc/order/creation/Profile.tsx b/src/containers/desktop/profile/desc/order/creation/Profile.tsx new file mode 100644 index 0000000..84acfe6 --- /dev/null +++ b/src/containers/desktop/profile/desc/order/creation/Profile.tsx @@ -0,0 +1,19 @@ +import React from 'react'; + + +export default function () { + return ( + <div> + <td>#[renderAmount cents c]#</td> + <td> + <span>_[MsgOrderCreated]#</span> + <span>: #</span> + <a + href="@{ClientOrderViewR eid}" + title="_{MsgViewOrderDetails}" + >\_[MsgOrder] ##[requestIdStr eRequest] + </a> + </td> + </div> + ) +} \ No newline at end of file diff --git a/src/containers/desktop/profile/desc/order/execution/Profile.tsx b/src/containers/desktop/profile/desc/order/execution/Profile.tsx new file mode 100644 index 0000000..1a73857 --- /dev/null +++ b/src/containers/desktop/profile/desc/order/execution/Profile.tsx @@ -0,0 +1,19 @@ +import React from 'react'; + + +export default function () { + return ( + <div> + <td>#[renderAmount cents c]#</td> + <td> + <span>_[MsgOrderExecution]#</span> + <span>: #</span> + <a + href="@{ClientOrderViewR (exchangeOrderExecutionOrderId e)}" + title="_{MsgViewOrderDetails}" + >\_[MsgOrder] ##[requestIdStr eRequest] + </a> + </td> + </div> + ) +} \ No newline at end of file diff --git a/src/containers/desktop/profile/desc/withdrawal/Profile.tsx b/src/containers/desktop/profile/desc/withdrawal/Profile.tsx new file mode 100644 index 0000000..cbb40f1 --- /dev/null +++ b/src/containers/desktop/profile/desc/withdrawal/Profile.tsx @@ -0,0 +1,19 @@ +import React from 'react'; + + +export default function () { + return ( + <div> + <td>#[renderAmount cents c]#</td> + <td> + <span>_[MsgBalanceWithdrawal]#</span> + <span>: #</span> + <a + href="@{WithdrawalR}/#data-row-#{requestIdStr eRequest}" + title="_{MsgViewRequestDetails}" + >\_[MsgRequest] ##[requestIdStr eRequest] + </a> + </td> + </div> + ) +} \ No newline at end of file diff --git a/src/containers/desktop/profile/desc/withdrawal/cancel/Profile.tsx b/src/containers/desktop/profile/desc/withdrawal/cancel/Profile.tsx new file mode 100644 index 0000000..c3a69bf --- /dev/null +++ b/src/containers/desktop/profile/desc/withdrawal/cancel/Profile.tsx @@ -0,0 +1,19 @@ +import React from 'react'; + + +export default function () { + return ( + <div> + <td>#[renderAmount cents c]#</td> + <td> + <span>_[MsgBalanceReturn]#</span> + <span>: #</span> + <a + href="@{WithdrawalR}/#data-row-#{requestIdStr eRequest}" + title="_{MsgViewRequestDetails}" + >\_[MsgRequest] ##[requestIdStr eRequest] + </a> + </td> + </div> + ) +} \ No newline at end of file diff --git a/src/containers/desktop/profile/desc/withdrawal/reject/Profile.tsx b/src/containers/desktop/profile/desc/withdrawal/reject/Profile.tsx new file mode 100644 index 0000000..c3a69bf --- /dev/null +++ b/src/containers/desktop/profile/desc/withdrawal/reject/Profile.tsx @@ -0,0 +1,19 @@ +import React from 'react'; + + +export default function () { + return ( + <div> + <td>#[renderAmount cents c]#</td> + <td> + <span>_[MsgBalanceReturn]#</span> + <span>: #</span> + <a + href="@{WithdrawalR}/#data-row-#{requestIdStr eRequest}" + title="_{MsgViewRequestDetails}" + >\_[MsgRequest] ##[requestIdStr eRequest] + </a> + </td> + </div> + ) +} \ No newline at end of file diff --git a/src/containers/desktop/profile/list/amount/Profile.tsx b/src/containers/desktop/profile/list/amount/Profile.tsx new file mode 100644 index 0000000..35cfcc7 --- /dev/null +++ b/src/containers/desktop/profile/list/amount/Profile.tsx @@ -0,0 +1,15 @@ +import React from 'react'; + + +export default function () { + return ( + <div> + <span> + <big> + #[centsT]# + <small className="text-muted">\#[sign]</small> + </big> + </span> + </div> + ) +} \ No newline at end of file diff --git a/src/containers/form/auth/signup/widget/SignUp.tsx b/src/containers/form/auth/signup/widget/SignUp.tsx new file mode 100644 index 0000000..3978635 --- /dev/null +++ b/src/containers/form/auth/signup/widget/SignUp.tsx @@ -0,0 +1,26 @@ +import React from 'react'; + + +export default function () { + return ( + <div>#[extra] + <div className="form-group row"> + <label htmlFor="#{eid}">_[MsgEmailAddress] ^[fvInput emailV]</label> + </div> + <div className="form-group row"> + <label htmlFor="#{pid}">_[MsgPassword] ^[fvInput passwV]</label> + </div> + <div className="form-group row"> + <label htmlFor="#{cid}">_[MsgPasswordConfirmation] ^[fvInput confiV]</label> + </div> + <div className="form-check">^[fvInput termsV] + <label + className="form-check-label" + htmlFor="terms-check" + > + <small>_[MsgIAcceptTemrsOfUseText]</small> + </label> + </div> + </div> + ) +} diff --git a/src/pages/form/create-order.tsx b/src/containers/form/exchange/bootstrap/create.tsx similarity index 100% rename from src/pages/form/create-order.tsx rename to src/containers/form/exchange/bootstrap/create.tsx diff --git a/src/containers/info/list/list/info.tsx b/src/containers/info/list/list/info.tsx new file mode 100644 index 0000000..558ffe1 --- /dev/null +++ b/src/containers/info/list/list/info.tsx @@ -0,0 +1,22 @@ +import React from 'react'; + + +export default function () { + return ( + <div> + <div + className="info-item" + id="info-item#{fromSqlKey iid}" + > + <a + title="_{MsgDetails}" + href="@{InfoViewR (infoAlias info)}" + >#[infoTitle info] + <small className="text-muted"> + (#[renderDateTimeRow l tzo (infoCreated info)]) + </small> + </a> + </div> + </div> + ) +} diff --git a/src/containers/info/view/info.tsx b/src/containers/info/view/info.tsx new file mode 100644 index 0000000..5495bd3 --- /dev/null +++ b/src/containers/info/view/info.tsx @@ -0,0 +1,44 @@ +import React from 'react'; + + +export default function () { + return ( + <div> + <form + method="post" + action="@{ManageInfoUpdateR}" + > + Дата создания:<br/> + ^[dateRow l tzo (infoCreated info)] + <input + type="hidden" + name="info-id" + value="#{fromSqlKey infoId}" + />^[form] + <button + id="save-button" + className="btn btn-outline-primary mt-2" + >_[MsgSave] + </button> + </form> + <div id="#{titleIdent}"> + <h1>#[infoTitle info] ^[dateRow l tzo (infoCreated info)]</h1> + </div> + <div + id="#{thumbIdent}" + className="info-thumb text-center mb-5" + > + <img + src="#{t}" + alt="Обложка" + style={ { maxWidth: '100%' } } + /> + </div> + <div + id="#{contentIdent}" + className="info-content" + >#[preEscapedToMarkup (infoContentHtml info)] + </div> + </div> + ) +} diff --git a/src/containers/manage/info/index/Index.tsx b/src/containers/manage/info/index/Index.tsx new file mode 100644 index 0000000..d88576a --- /dev/null +++ b/src/containers/manage/info/index/Index.tsx @@ -0,0 +1,29 @@ +import React from 'react'; + + +export default function () { + return ( + <div> + <div className="row mb-5"> + <ul className="nav nav-pills"> + <li className="nav-item"> + <a className="nav-link active" href="@{ManageInfoAddR}"> + _[MsgAdd] + </a> + </li> + </ul> + </div> + <div className="row"> + <div className="col"> + <h5> + _[MsgNoPublicationsYet] + </h5> + <h5> + _[MsgInfoListTitle] + </h5> + ^[renderList list] + </div> + </div> + </div> + ) +} \ No newline at end of file diff --git a/src/containers/manage/info/index/item/Index.tsx b/src/containers/manage/info/index/item/Index.tsx new file mode 100644 index 0000000..e01ccac --- /dev/null +++ b/src/containers/manage/info/index/item/Index.tsx @@ -0,0 +1,17 @@ +import React from 'react'; + + +export default function () { + return ( + <div> + <div className="info-item" id="info-item#{fromSqlKey iid}"> + <a title="_{MsgDetails}" href="@{InfoViewR (infoAlias info)}"> + #[infoTitle info] + <small className="text-muted"> + (#[renderDateTimeRow l tzo (infoCreated info)]) + </small> + </a> + </div> + </div> + ) +} \ No newline at end of file diff --git a/src/containers/mobile/client/order/list/card/Orders.tsx b/src/containers/mobile/client/order/list/card/Orders.tsx new file mode 100644 index 0000000..177d19a --- /dev/null +++ b/src/containers/mobile/client/order/list/card/Orders.tsx @@ -0,0 +1,35 @@ +import React from 'react'; + + +export default function () { + return ( + <div> + <div + className="order-card mobile container-fluid my-1" + data-order="#{fromSqlKey oid}" + > + <div className="row"> + <div className="col-3 text-right"> + <small>#[dbl2MoneyT exchangeOrderNormalizedRatio]</small> + </div> + <div className="col-5 text-right"> + <a href="@{ClientOrderViewR oid}"> + <small> + #[cents2dblT exchangeOrderAmountCents] + <small className="text-muted">#[currSign outCurrency]</small> + </small> + </a> + </div> + <div className="col-4 text-right"> + <a href="@{ClientOrderViewR oid}"> + <small> + #[cents2dblT inAmountCents] # + <small className="text-muted">#[currSign inCurrency]</small> + </small> + </a> + </div> + </div> + </div> + </div> + ) +} \ No newline at end of file diff --git a/src/containers/mobile/client/order/list/list/Orders.tsx b/src/containers/mobile/client/order/list/list/Orders.tsx new file mode 100644 index 0000000..37f3646 --- /dev/null +++ b/src/containers/mobile/client/order/list/list/Orders.tsx @@ -0,0 +1,19 @@ +import React from 'react'; + + +export default function () { + return ( + <div> + <div className="container-fluid d-md-none order-list mobile active"> + <div className="row group-date"> + <div + className="col date text-center text-lowercase text-muted mb-2 mt-4" + > + <small>#[renderDateRow locale tzo (dateFromDay d)]</small> + </div> + <div className="row order-list group-view client mobile">^[children g]</div> + </div> + </div> + </div> + ) +} \ No newline at end of file diff --git a/src/containers/news/featured/modal/Home.tsx b/src/containers/news/featured/modal/Home.tsx new file mode 100644 index 0000000..4f57cb7 --- /dev/null +++ b/src/containers/news/featured/modal/Home.tsx @@ -0,0 +1,56 @@ +import React from 'react'; + + +export default function () { + return ( + <div> + <div + id="featured-modal" + className="modal fade" + tabIndex={-1} + role="dialog" + data-newsid="#{fromSqlKey iid}" + > + <div + className="modal-dialog modal-dialog-centered" + role="document" + > + <div + className="modal-content text-white" + style={ { backgroundColor: '#0e0e0e' } } + > + <div className="container-fluid"> + <div className="row"> + <div className="col-12"> + <img + style={ { maxWidth: '100%' } } + src="#{thumb}" + alt="Иконка новости" + /> + </div> + </div> + </div> + <div className="row"> + <div className="col-10 mx-auto py-3">#[preEscapedToMarkup desc] + <div + style={ { float: 'left', cursor: 'pointer', userSelect: 'none' } } + > + <span className="checkmark">✓</span> + <span + id="#{wrapId}-remember-trigger" + className="text-muted" + > + _[MsgDoNotShowAgain] + </span> + <div style={{ float: 'right' }}> + <a href="@{InfoViewR (infoAlias info)}">_[MsgReadMore]</a> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + ) +} diff --git a/src/containers/template.tsx b/src/containers/template.tsx new file mode 100644 index 0000000..06c440d --- /dev/null +++ b/src/containers/template.tsx @@ -0,0 +1,19 @@ +import React, { ReactNode } from 'react'; + + +type Props = { + id: number, + name: ReactNode, +} + +const ContainerName: React.FC<Props> = (props) => { + return ( + <div> + CONTAINER #{props.id} "{props.name}" + <br /> + INSERT YOUR CODE HERE + </div> + ) +} + +export default ContainerName diff --git a/src/containers/widgets/form/info/article/Widgets.tsx b/src/containers/widgets/form/info/article/Widgets.tsx new file mode 100644 index 0000000..f3b12cc --- /dev/null +++ b/src/containers/widgets/form/info/article/Widgets.tsx @@ -0,0 +1,50 @@ +import React from 'react'; + + +export default function () { + return ( + <div> + <div className="form-group">^[titleInput]</div> + <div className="form-group">^[aliasInput]</div> + <div className="form-group mb-3"> + <label htmlFor="#{thumbIdent'}">Обложка ^[thumbInput]</label> + </div> + <div className="form-check mb-3"> + <input + id="#{featuredIdent'}" + name="featured" + className="form-check-input" + type="checkbox" + /> + <label + className="form-check-label" + htmlFor="#{featuredIdent'}" + > + Продивигать новость + </label> + </div> + <div className="form-group mb-3"> + <label htmlFor="#{descIdent'}-editor">Короткое описание</label> + <div id="#{descIdent'}-editor">#[preEscapedToMarkup desc]</div> + </div> + <div className="form-group"> + <label htmlFor="#{contentIdent'}-editor">Текст новости</label> + <div id="#{contentIdent'}-editor">#[preEscapedToMarkup content]</div> + </div> + <div className="form-group"> + <input + id="#{contentIdent'}-data" + name="content" + type="hidden" + value="#{content}" + /> + <input + id="#{descIdent'}-data" + name="desc" + value="#{desc}" + type="hidden" + /> + </div> + </div> + ) +} \ No newline at end of file diff --git a/src/containers/widgets/info/article/Widgets.tsx b/src/containers/widgets/info/article/Widgets.tsx new file mode 100644 index 0000000..47bc9b0 --- /dev/null +++ b/src/containers/widgets/info/article/Widgets.tsx @@ -0,0 +1,62 @@ +import React from 'react'; + + +export default function () { + return ( + <div> + <div className="form-group"> + ^[titleInput] + </div> + <div className="form-group"> + ^[aliasInput] + </div> + <div className="form-group mb-3"> + <label htmlFor="#{thumbIdent'}"> + Обложка + </label> + ^[thumbInput] + </div> + <div className="form-check mb-3"> + <input + id="#{featuredIdent'}" + name="featured" + className="form-check-input" + type="checkbox" + /> + <label className="form-check-label" htmlFor="#{featuredIdent'}"> + Продивигать новость + </label> + </div> + <div className="form-group mb-3"> + <label htmlFor="#{descIdent'}-editor"> + Короткое описание + </label> + <div id="#{descIdent'}-editor"> + #[preEscapedToMarkup desc] + </div> + </div> + <div className="form-group"> + <label htmlFor="#{contentIdent'}-editor"> + Текст новости + </label> + <div id="#{contentIdent'}-editor"> + #[preEscapedToMarkup content] + </div> + </div> + <div className="form-group"> + <input + id="#{contentIdent'}-data" + name="content" + type="hidden" + value="#{content}" + /> + <input + id="#{descIdent'}-data" + name="desc" + value="#{desc}" + type="hidden" + /> + </div> + </div> + ) +} \ No newline at end of file diff --git a/src/containers/widgets/input/text/Widgets.tsx b/src/containers/widgets/input/text/Widgets.tsx new file mode 100644 index 0000000..85f38a7 --- /dev/null +++ b/src/containers/widgets/input/text/Widgets.tsx @@ -0,0 +1,17 @@ +import React from 'react'; + + +export default function () { + return ( + <div> + <input + id="#{id'}" + name="#{name}" + className="form-control form-control-lg" + type="text" + value="#{value}" + placeholder="_{placeholder}" + /> + </div> + ) +} \ No newline at end of file diff --git a/src/locales/ru-RU.ts b/src/locales/ru-RU.ts index 470f81d..f516308 100644 --- a/src/locales/ru-RU.ts +++ b/src/locales/ru-RU.ts @@ -2,6 +2,15 @@ import { makeMessages } from '@/utils/locales'; export default { 'exchange': 'Обмен {from} на {to}', + ...makeMessages('currency', { + ...makeMessages('label', { + 'rub': '₽', + 'rur': '₽', + 'pzm': 'Prizm', + 'our': 'Ouroboros', + 'ouro': 'Ouroboros', + }) + }), ...makeMessages('form', { }) } diff --git a/src/models/app.ts b/src/models/app.ts index 621773c..5fa55f1 100644 --- a/src/models/app.ts +++ b/src/models/app.ts @@ -13,7 +13,10 @@ export interface AppAuth { export interface AppConfig { auth: AppAuth, app: { - version: string + version: { + number: string, + extraLabel?: string + } } } @@ -24,7 +27,7 @@ export interface AppModel { const initialState: AppModel = { config: { auth: { guest: true }, - app: { version: '0.0.0' } + app: { version: { number: '0.0.0' } } } }