Skip to content
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

extension pop up ui bugs #129

Merged
merged 2 commits into from
Dec 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "xverse-web-extension",
"description": "A Bitcoin wallet for Web3",
"version": "0.0.1",
"version": "0.1.0",
"private": true,
"dependencies": {
"@secretkeylabs/xverse-core": "github:secretkeylabs/xverse-core",
Expand Down
9 changes: 9 additions & 0 deletions src/app/screens/landing/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ const CreateButton = styled.button((props) => ({
height: 44,
}));

const AppVersion = styled.p((props) => ({
...props.theme.body_xs,
color: props.theme.colors.white['0'],
textAlign: 'right',
marginRight: props.theme.spacing(9),
marginTop: props.theme.spacing(8),
}));

const RestoreButton = styled.button((props) => ({
display: 'flex',
...props.theme.body_xs,
Expand Down Expand Up @@ -94,6 +102,7 @@ function Landing(): JSX.Element {
};
return (
<>
<AppVersion>Beta version</AppVersion>
<TopSectionContainer>
<img src={logo} width={100} alt="logo" />
<LandingTitle>{t('SCREEN_TITLE')}</LandingTitle>
Expand Down
4 changes: 2 additions & 2 deletions src/app/screens/login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function Login(): JSX.Element {
try {
await unlockWallet(password);
setIsVerifying(false);
navigate('/');
navigate(-1);
} catch (err) {
setIsVerifying(false);
setError(t('VERIFY_PASSWORD_ERROR'));
Expand All @@ -138,7 +138,7 @@ function Login(): JSX.Element {

return (
<ScreenContainer>
<AppVersion>{VERSION}</AppVersion>
<AppVersion>Beta version</AppVersion>
<TopSectionContainer>
<img src={logo} width={100} alt="logo" />
<LandingTitle>{t('WELCOME_MESSAGE_FIRST_LOGIN')}</LandingTitle>
Expand Down
2 changes: 1 addition & 1 deletion src/app/screens/settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ function Setting() {
icon={ArrowSquareOut}
showDivider
/>
<SettingComponent text={t('VERSION')} textDetail={VERSION} />
<SettingComponent text={`${t('VERSION')}`} textDetail={`${VERSION} (Beta)`} />
<ResetWalletPrompt showResetWalletPrompt={showResetWalletPrompt} onResetWalletPromptClose={onResetWalletPromptClose} openResetWalletScreen={openResetWalletScreen} />
</Container>
<BottomBar tab="settings" />
Expand Down
4 changes: 2 additions & 2 deletions src/background/legacy-external-message-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ function listenForOriginTabClose({ tabId }: ListenForOriginTabCloseArgs) {

async function triggerRequstWindowOpen(path: RequestsRoutes, urlParams: URLSearchParams) {
// if (IS_TEST_ENV) return openRequestInFullPage(path, urlParams);
console.log(`/options.html#${path}?${urlParams.toString()}`);
return popupCenter({ url: `/options.html#${path}?${urlParams.toString()}` });
console.log(`/popup.html#${path}?${urlParams.toString()}`);
return popupCenter({ url: `/popup.html#${path}?${urlParams.toString()}` });
}

export async function handleLegacyExternalMethodFormat(
Expand Down
2 changes: 1 addition & 1 deletion src/background/popup-center.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface PopupOptions {
skipPopupFallback?: boolean;
}
export default function popupCenter(options: PopupOptions): Promise<Windows.Window> {
const { url, w = 400, h = 690 } = options;
const { url, w = 360, h = 600 } = options;
return new Promise((resolve) => {
chrome.windows.getCurrent(async (win) => {
// the farthest left/top sides of all displays
Expand Down
4 changes: 4 additions & 0 deletions src/pages/Popup/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ body {
#app {
width: 360px;
height: 600px;
}

::-webkit-scrollbar {
display: none;
}