Skip to content

Commit

Permalink
Merge pull request #3 from protofire/harmony
Browse files Browse the repository at this point in the history
Harmony
  • Loading branch information
DenSmolonski authored Jan 13, 2025
2 parents 4912b49 + d117f7a commit 4d66358
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/elm/DappInterface/CommonViews.elm
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,13 @@ pageHeader userLanguage page connectedWallet account _ governanceState _ =
v2MarketsExternalLink = "https://app.compound.finance/markets?market=v2"
v3VoteExternalLink = "https://app.compound.finance/vote"
swapLink = "https://swap.harmony.one"
getOneLink = "/#getone"
in
[ a (class homeClass :: href PageNavigation (getHrefUrl Home)) [ text (Translations.dashboard userLanguage) ]
-- , a (href External (v2MarketsExternalLink)) [ text (Translations.markets userLanguage) ]
-- , a (href External (v3VoteExternalLink)) [ text (Translations.vote userLanguage) ]
, a ([target "_blank"] ++ href External swapLink) [text ("Swap")]
, a ([target "_self"] ++ href External getOneLink) [text ("Get ONE")]
]
in
header [ class "dapp" ]
Expand Down Expand Up @@ -240,7 +242,8 @@ pageFooter userLanguage maybeBlockNumber preferences model =
-- , a (target "_blank" :: href External "https://compound.finance/governance/comp") [ text (Translations.comp userLanguage) ]
-- , a (target "_blank" :: href External "https://medium.com/compound-finance/the-compound-guide-to-supplying-borrowing-crypto-assets-94821f2950a0") [ text (Translations.support userLanguage) ]
-- , a (href PageNavigation (getHrefUrl TermsOfService)) [ text (Translations.terms userLanguage) ]
, a (target "_blank" :: href External "https://docs.lend.country/") [ text (Translations.terms userLanguage) ]
, a (target "_blank" :: href External "https://docs.lend.harmony.one/") [ text (Translations.terms userLanguage) ]
, a (target "_blank" :: href External "https://stats.lend.harmony.one/") [ text (Translations.markets userLanguage) ]
]
]
, div [ class "social" ]
Expand Down
21 changes: 21 additions & 0 deletions src/elm/DappInterface/GetOne.elm
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module DappInterface.GetOne exposing (view)

import CompoundComponents.Utils.CompoundHtmlAttributes exposing (HrefLinkType(..), class, href, id, type_)
import Html exposing (Html, a, b, div, h2, h4, label, li, ol, p, section, span, text, u, iframe)
import Html.Attributes exposing (name, width, height, src)
import Strings.Terms as Terms
import Strings.Translations as Translations


view : Translations.Lang -> Html msg
view userLanguage =
div [ id "getone", class "exchange-container" ]
[
iframe [
id "simpleswap-frame"
,name "SimpleSwap Widget"
,width 528
,height 600
,src "https://simpleswap.io/widget/62d3bc7d-58e0-4815-87da-36fa3bd878ac"
] []
]
10 changes: 10 additions & 0 deletions src/elm/DappInterface/Page.elm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type Page
| CrowdPropose
| TermsOfService
| Vote
| GetOne


buildTitle : Translations.Lang -> Maybe String -> String
Expand Down Expand Up @@ -49,6 +50,9 @@ getPageTitle userLanguage page =
Vote ->
buildTitle userLanguage (Just (Translations.site_title_vote userLanguage))

GetOne ->
buildTitle userLanguage (Just (Translations.site_title_v2 userLanguage))


getHrefUrl : Page -> String
getHrefUrl page =
Expand All @@ -74,6 +78,9 @@ getHrefUrl page =
Vote ->
"#vote"

GetOne ->
"#getone"


getPage : Url.Url -> Page
getPage location =
Expand All @@ -85,6 +92,9 @@ getPage location =
Just [ "admin" ] ->
Admin

Just [ "getone" ] ->
GetOne

Just [ "liquidate" ] ->
Home

Expand Down
8 changes: 8 additions & 0 deletions src/elm/Main.elm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import DappInterface.Page exposing (Page(..), getPage, getPageTitle)
import DappInterface.PrimaryActionModal
import DappInterface.Propose as Propose
import DappInterface.Terms as DappTerms
import DappInterface.GetOne as GetOne
import DappInterface.Vote as Vote
import Decimal exposing (Decimal)
import Dict exposing (Dict)
Expand Down Expand Up @@ -1195,6 +1196,13 @@ viewFull ({ page, liquidateModel, transactionState, compoundState, tokenState, o
, replFooter
]

GetOne ->
[ header
, GetOne.view userLanguage
, footer
, replFooter
]

Vote ->
[ alertView model
, header
Expand Down
16 changes: 16 additions & 0 deletions src/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,22 @@ body {
margin: 0 0;
}

.exchange-container {
width: 100%;
height: 100%;
border: none !important;
display: flex;
justify-content: center;
align-items: center;

iframe {
margin-top: 100px;
border: none !important;
width: 528px;
height: 600px;
}
}

@media (max-width: $device-sm) {
.mobile-hide {
display: none;
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4266,9 +4266,9 @@ component-emitter@^1.2.1:
resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0"
integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==

compound-components@protofire/compound-components#lend-v1.0.6:
compound-components@harmony-one/compound-components#lend-v1.0.6:
version "1.0.2"
resolved "https://codeload.github.com/protofire/compound-components/tar.gz/7b89b53363f94a6b70fda1f61a834327f7cf2af2"
resolved "https://codeload.github.com/harmony-one/compound-components/tar.gz/7b89b53363f94a6b70fda1f61a834327f7cf2af2"
dependencies:
"@babel/core" "^7.0.0"
"@babel/preset-env" "^7.0.0"
Expand Down Expand Up @@ -4308,9 +4308,9 @@ compound-components@protofire/compound-components#lend-v1.0.6:
webpack-dev-server "^3.7.2"
yargs "^16.2.0"

compound-config@protofire/compound-config#lend-v1.0.1:
compound-config@harmony-one/compound-config#lend-v1.0.1:
version "0.0.0"
resolved "https://codeload.github.com/protofire/compound-config/tar.gz/2e6b5d6924a12401640716a1e1a03a31079e8c77"
resolved "https://codeload.github.com/harmony-one/compound-config/tar.gz/2e6b5d6924a12401640716a1e1a03a31079e8c77"

compressible@~2.0.16:
version "2.0.18"
Expand Down

0 comments on commit 4d66358

Please sign in to comment.