Skip to content

Commit

Permalink
chore: misc changes in UI
Browse files Browse the repository at this point in the history
  • Loading branch information
siddhart1o1 committed Feb 24, 2024
1 parent 7563c17 commit 80a7ed8
Show file tree
Hide file tree
Showing 17 changed files with 30 additions and 113 deletions.
7 changes: 3 additions & 4 deletions apps/pay/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,12 @@ body {
.print-paycode-button {
padding: 9px 32px;
border-radius: 10em;
background: var(--primary);
background: var(--primaryColor);
border: none;
color: #fff;
font-weight: 600;
}


:root {
--transparent: rgba(0, 0, 0, 0);
--white: #ffffff;
Expand All @@ -186,7 +185,7 @@ body {
--blue: #3050c4;
--orange: #ff7e1c;
--sky: #c3ccff;
--primary: #fc5805;
--primaryColor: #fc5805;
--primaryColorDisabled: #c54404;
--primary3: #010101;
--primary4: #fe990d;
Expand All @@ -205,4 +204,4 @@ body {
--error: #dc2626;
--error9: #fee2e2;
--warning: #f59e0b;
}
}
4 changes: 2 additions & 2 deletions apps/pay/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import type { Metadata } from "next"
import { Inter_Tight } from "next/font/google"

// eslint-disable-next-line import/no-unassigned-import
import "bootstrap/dist/css/bootstrap.css"
import "./globals.css"

// eslint-disable-next-line import/no-unassigned-import
import "./globals.css"
import "bootstrap/dist/css/bootstrap.css"

import Head from "next/head"
import Script from "next/script"
Expand Down
1 change: 1 addition & 0 deletions apps/pay/app/ssr-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const { getClient } = registerApolloClient(() => {
uri: getClientSideGqlConfig().coreGqlUrl,
fetchOptions: { cache: "no-store" },

// TODO uncomment this we start using otel
// fetch: (uri, options) => {
// const headersWithTrace = options?.headers || {}
// propagation.inject(context.active(), headersWithTrace)
Expand Down
34 changes: 0 additions & 34 deletions apps/pay/components/input/index.tsx

This file was deleted.

6 changes: 3 additions & 3 deletions apps/pay/components/layouts/app-layout.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
top: 0;
left: 0;
width: 100%;
border-bottom: 1.5px solid var(--primary);
border-bottom: 1.5px solid var(--lightGrey);
display: flex;
justify-content: space-between;
align-items: center;
z-index: 1;
z-index: 1;
}

.nav_home_content {
Expand All @@ -41,7 +41,7 @@
box-sizing: border-box;
}

@media (max-width: 768px) {
@media (max-width: 768px), (max-height: 720px) {
.nav_bar {
border-bottom: none;
}
Expand Down
39 changes: 3 additions & 36 deletions apps/pay/components/memo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { Modal } from "react-bootstrap"

import { useSearchParams } from "next/navigation"

import Image from "next/image"

import { ACTIONS, ACTION_TYPE } from "../../app/reducer"

import styles from "./memo.module.css"
Expand Down Expand Up @@ -53,42 +55,7 @@ const Memo = ({ state, dispatch }: Props) => {
disabled={state.createdInvoice}
>
{!state.createdInvoice && !state.memo ? "Add note" : null}
<svg
width="19"
height="19"
viewBox="0 0 19 19"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<g clipPath="url(#clip0_1220_19217)">
<path
d="M17.08 2.29526C16.8245 2.04087 16.5212 1.83961 16.1875 1.70313C15.8538 1.56664 15.4963 1.49762 15.1358 1.50006C14.7752 1.5025 14.4188 1.57635 14.0869 1.71735C13.7551 1.85834 13.4545 2.06368 13.2025 2.32151L2.3275 13.1965L1 18.3753L6.17875 17.047L17.0538 6.17201C17.3116 5.92011 17.5171 5.61959 17.6581 5.28782C17.7991 4.95605 17.873 4.59961 17.8755 4.23911C17.8779 3.87861 17.8089 3.52121 17.6723 3.18756C17.5358 2.85391 17.3345 2.55063 17.08 2.29526V2.29526Z"
stroke={"#232222"}
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M13 2.5L17 6.5"
stroke={"#232222"}
strokeWidth="1.125"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M3 13.5L6 16.5"
stroke={"#232222"}
strokeWidth="1.125"
strokeLinecap="round"
strokeLinejoin="round"
/>
</g>
<defs>
<clipPath id="clip0_1220_19217">
<rect width="19" height="19" fill="white" />
</clipPath>
</defs>
</svg>
<Image src="/icons/pencil.svg" alt="Add note" width={20} height={20}></Image>
</button>
</div>
{openModal && (
Expand Down
2 changes: 1 addition & 1 deletion apps/pay/components/memo/memo.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
width: 100%;
padding: 0.5rem 1.5rem;
font-weight: 500;
background: var(--primary);
background: var(--primaryColor);
color: #fff;
}

Expand Down
9 changes: 1 addition & 8 deletions apps/pay/components/parse-pos-payment/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,7 @@ function ParsePayment({

// Update Params From Current Amount
const handleAmountChange = (skipRouterPush?: boolean) => {
let amount = state.currentAmount
if (currencyMetadata.fractionDigits === 0) {
const safeAmt = safeAmount(amount)
amount =
currencyMetadata.fractionDigits === 0
? safeAmt.toFixed()
: safeAmt.toFixed(currencyMetadata.fractionDigits)
}
const amount = state.currentAmount
if (isNaN(Number(amount))) return

const formattedValue = formatValue({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@

.pay_btn,
.pay_new_btn {
background: var(--primary);
background: var(--primaryColor);
color: #fff;
font-weight: 600;
width: 220px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
display: flex;
justify-content: center;
align-items: center;
background: var(--primary);
background: var(--primaryColor);
border-radius: 10em;
border: none;
outline: none;
Expand Down
18 changes: 2 additions & 16 deletions apps/pay/components/share/share-pop-up.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import copy from "copy-to-clipboard"
import React, { type FC, useState } from "react"
import Image from "next/image"

import styles from "./share.module.css"

Expand Down Expand Up @@ -88,22 +89,7 @@ const SharePopup: FC<Props> = ({
) : (
<div className={styles.select_share_type}>
<button onClick={onClose} className={styles.close_btn}>
<div aria-hidden="true">
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="currentColor"
>
<g id="close">
<path
id="x"
d="M18.717 6.697l-1.414-1.414-5.303 5.303-5.303-5.303-1.414 1.414 5.303 5.303-5.303 5.303 1.414 1.414 5.303-5.303 5.303 5.303 1.414-1.414-5.303-5.303z"
/>
</g>
</svg>
</div>
<Image src="/icons/close.svg" alt="close icon" width="24" height="24" />
</button>
<button onClick={copyUrlToClipboard}>Link</button>
<button onClick={copyImageToClipboard}>QR code</button>
Expand Down
2 changes: 1 addition & 1 deletion apps/pay/components/sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export function SideBar({ username }: { username: string }) {
<div className="flex flex-col items-center justify-center gap-3 mt-2">
<button
onClick={shareCurrentUrl}
className="bg-[var(--primary)] rounded-full p-2 text-white w-40 flex justify-center align-content-center gap-2"
className="bg-[var(--primaryColor)] rounded-full p-2 text-white w-40 flex justify-center align-content-center gap-2"
>
<Image
src="/icons/share-icon-white.svg"
Expand Down
1 change: 0 additions & 1 deletion apps/pay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"@apollo/experimental-nextjs-app-support": "^0.8.0",
"@galoymoney/client": "^0.2.2",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-slot": "^1.0.2",
"@t3-oss/env-nextjs": "^0.6.1",
"bech32": "^2.0.0",
"bitcoinjs-lib": "5.0.5",
Expand Down
4 changes: 4 additions & 0 deletions apps/pay/public/icons/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions apps/pay/public/icons/pencil.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions apps/pay/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ export function parseQueryAmount(query: ParsedUrlQuery) {
export function parseDisplayCurrency(searchParams: ReadonlyURLSearchParams) {
// to support display search Param using `display`
const display =
searchParams?.get("display") ??
searchParams?.get("displayCurrency") ??
localStorage.getItem("display") ??
searchParams?.get("display") ??
localStorage.getItem("displayCurrency") ??
localStorage.getItem("display") ??
"USD"

return display
Expand Down
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 80a7ed8

Please sign in to comment.