Skip to content

Commit

Permalink
Merge pull request #392 from arconnectio/staging
Browse files Browse the repository at this point in the history
ArConnect 1.14.0
  • Loading branch information
pawanpaudel93 authored Jun 18, 2024
2 parents 1ed4e80 + 3a3fec6 commit fca6a7d
Show file tree
Hide file tree
Showing 32 changed files with 1,480 additions and 373 deletions.
43 changes: 39 additions & 4 deletions assets/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@
"description": "Notification about bad password strength"
},
"password_strength_1": {
"message": "Too weak password",
"message": "Weak password",
"description": "Level 1 strength password text"
},
"password_strength_2": {
Expand Down Expand Up @@ -800,8 +800,18 @@
"description": "Password strength checklist symbol element"
},
"password_strength_checklist_length": {
"message": "Is at least 10 characters long",
"description": "Password strength checklist length element"
"message": "Is at least $NUMBER$ characters long",
"description": "Password strength checklist length element",
"placeholders": {
"number": {
"content": "$1",
"example": "10"
}
}
},
"password_change": {
"message": "Don't want to change your password? Continue using your wallet without changing it",
"description": "Skip password change"
},
"no_wallets_added": {
"message": "No wallets added",
Expand Down Expand Up @@ -900,7 +910,7 @@
"description": "Unlock wallet explanation"
},
"reset_wallet_password_to_use": {
"message": "You'll need to reset your password to continue using ArConnect securely.",
"message": "It's recommended to reset your password for enhanced security.",
"description": "Reset wallet password explanation"
},
"receive": {
Expand Down Expand Up @@ -1137,6 +1147,10 @@
"message": "Transaction ID",
"description": "Transaction ID label"
},
"process_id": {
"message": "Process ID",
"description": "Process ID label"
},
"transaction_from": {
"message": "From",
"description": "Transaction \"from\" label"
Expand Down Expand Up @@ -1919,6 +1933,11 @@
"description": "confirm subscription"
},

"continue": {
"message": "Continue",
"description": "Continue"
},

"end": {
"message": "End",
"description": "end"
Expand Down Expand Up @@ -1962,5 +1981,21 @@
"received": {
"message": "Received",
"description": "received"
},
"password_warning_title": {
"message": "Password Strength Warning",
"description": "Weak password warning title"
},
"password_warning_description": {
"message": "Your password is currently weak. You can continue, but we recommend using a mix of:",
"description": "Password warning description"
},
"required": {
"message": "Required",
"description": "required"
},
"recommended": {
"message": "Recommended",
"description": "required"
}
}
41 changes: 36 additions & 5 deletions assets/_locales/zh_CN/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@
"description": "Notification about bad password strength"
},
"password_strength_1": {
"message": "密码太弱",
"message": "弱密码",
"description": "Level 1 strength password text"
},
"password_strength_2": {
Expand Down Expand Up @@ -800,8 +800,14 @@
"description": "Password strength checklist symbol element"
},
"password_strength_checklist_length": {
"message": "至少 10 个字符长",
"description": "Password strength checklist length element"
"message": "至少 $NUMBER$ 个字符长",
"description": "Password strength checklist length element",
"placeholders": {
"number": {
"content": "$1",
"example": "10"
}
}
},
"no_wallets_added": {
"message": "未添加钱包",
Expand Down Expand Up @@ -900,8 +906,8 @@
"description": "Unlock wallet explanation"
},
"reset_wallet_password_to_use": {
"message": "您需要重置密码才能安全使用 ArConnect。",
"description": "Reset wallet password explanation"
"message": "建议重置密码以增强安全性",
"description": "Reset wallet password explanation"
},
"receive": {
"message": "接收",
Expand Down Expand Up @@ -1137,6 +1143,10 @@
"message": "交易 ID",
"description": "Transaction ID label"
},
"process_id": {
"message": "过程 ID",
"description": "Process ID label"
},
"transaction_from": {
"message": "",
"description": "Transaction \"from\" label"
Expand Down Expand Up @@ -1917,6 +1927,11 @@
"message": "确认订阅",
"description": "confirm subscription"
},
"continue": {
"message": "继续",
"description": "Continue"
},

"end": {
"message": "结束",
"description": "end"
Expand Down Expand Up @@ -1960,5 +1975,21 @@
"received": {
"message": "已收到",
"description": "received"
},
"password_warning_title": {
"message": "密码强度警告",
"description": "Weak password warning title"
},
"password_warning_description": {
"message": "您的密码目前较弱。您可以继续,但我们建议使用以下组合:",
"description": "Password warning description"
},
"required": {
"message": "必需",
"description": "required"
},
"recommended": {
"message": "推荐",
"description": "recommended"
}
}
2 changes: 2 additions & 0 deletions shim.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ declare module "styled-components" {
primary: string;
cardBorder: string;
fail: string;
secondaryDelete: string;
delete: string;
cardBackground: string;
primaryBtnHover: string;
primaryTextv2: string;
Expand Down
23 changes: 5 additions & 18 deletions src/api/modules/sign_data_item/sign_data_item.background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,11 @@ const background: ModuleFunction<number[]> = async (
throw new Error(err);
}

if (
dataItem.tags.some(
(tag) => tag.name === "Action" && tag.value === "Transfer"
) &&
dataItem.tags.some(
(tag) => tag.name === "Data-Protocol" && tag.value === "ao"
)
) {
try {
await authenticate({
type: "signDataItem",
data: dataItem,
appData
});
} catch {
throw new Error("User rejected the sign data item request");
}
}
await authenticate({
type: "signDataItem",
data: dataItem,
appData
});

// grab the user's keyfile
const decryptedWallet = await getActiveKeyfile().catch((e) => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/dashboard/Reset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ const Warning = styled(Text)`
color: #ff0000;
`;

const ResetButton = styled(ButtonV2).attrs({
export const ResetButton = styled(ButtonV2).attrs({
secondary: true,
fullWidth: true
})<{ displayTheme: DisplayTheme }>`
})<{ displayTheme?: DisplayTheme }>`
background-color: ${(props) => props.theme.delete};
border: 1.5px solid ${(props) => props.theme.fail};
color: #ffffff;
Expand Down
2 changes: 1 addition & 1 deletion src/components/popup/HeadV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const HeadWrapper = styled(Section)<{
top: 0;
left: 0;
right: 0;
z-index: 11;
z-index: 21;
display: flex;
flex-direction: row;
width: full;
Expand Down
12 changes: 5 additions & 7 deletions src/components/popup/Title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ export const ViewAll = styled(Title).attrs({
})`
display: flex;
align-items: center;
font-size: 1.25rem;
gap: 0.45rem;
color: rgb(${(props) => props.theme.secondaryText});
font-size: 1rem;
gap: 0.2rem;
color: ${(props) => props.theme.secondaryTextv2};
cursor: pointer;
transition: all 0.23s ease-in-out;
Expand All @@ -30,12 +30,10 @@ export const ViewAll = styled(Title).attrs({
`;

export const TokenCount = styled.span`
font-size: 0.7rem;
font-size: 1rem;
font-weight: 500;
color: rgb(${(props) => props.theme.secondaryText});
background-color: rgb(${(props) => props.theme.secondaryText}, 0.3);
color: rgb(${(props) => props.theme.primaryText});
border-radius: 5px;
padding: 0.1rem 0.3rem;
`;

export default Title;
23 changes: 7 additions & 16 deletions src/components/popup/WalletHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,13 @@ export default function WalletHeader() {
url: `https://viewblock.io/arweave/address/${activeAddress}`
})
},
{
icon: <CreditCard01 style={{ width: "18px", height: "17px" }} />,
title: "subscriptions",
route: () => {
push("/subscriptions");
}
},
{
icon: <Settings01 style={{ width: "18px", height: "18px" }} />,
title: "Settings",
Expand All @@ -444,22 +451,6 @@ export default function WalletHeader() {
window.location.href.split("#")[0] + "?expanded=true"
);
}
},
{
icon: <CreditCard01 style={{ width: "18px", height: "17px" }} />,
title: "subscriptions",
route: () => {
push("/subscriptions");
}
},
{
icon: (
<ArrowUpRightIcon style={{ width: "18px", height: "17px" }} />
),
title: "transactions",
route: () => {
push("/transactions");
}
}
]}
/>
Expand Down
13 changes: 6 additions & 7 deletions src/components/popup/home/Collectibles.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Title, { Heading, TokenCount, ViewAll } from "../Title";
import { Section, Spacer, Text } from "@arconnect/components";
import { Heading, TokenCount, ViewAll } from "../Title";
import { Spacer, Text } from "@arconnect/components";
import { useHistory } from "~utils/hash_router";
import { useTokens } from "~tokens";
import { useMemo } from "react";
Expand All @@ -21,20 +21,19 @@ export default function Collectibles() {
const [push] = useHistory();

return (
<Section>
<>
<Heading>
<Title noMargin>{browser.i18n.getMessage("collectibles")}</Title>
<ViewAll
onClick={() => {
if (collectibles.length === 0) return;
push("/collectibles");
}}
>
{browser.i18n.getMessage("view_all")}
<TokenCount>{collectibles.length}</TokenCount>
<TokenCount>({collectibles.length})</TokenCount>
</ViewAll>
</Heading>
<Spacer y={0.8} />
<Spacer y={1} />
{collectibles.length === 0 && (
<NoAssets>{browser.i18n.getMessage("no_collectibles")}</NoAssets>
)}
Expand All @@ -51,7 +50,7 @@ export default function Collectibles() {
/>
))}
</CollectiblesList>
</Section>
</>
);
}

Expand Down
Loading

0 comments on commit fca6a7d

Please sign in to comment.