Skip to content

Commit

Permalink
fix: title bar centre alignment, beta notice, closes #439
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranjamie committed Jan 6, 2021
1 parent b5ddedf commit c0d81d7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
22 changes: 14 additions & 8 deletions app/components/beta-notice.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React, { FC } from 'react';
import { Flex, Text } from '@blockstack/ui';
import { openExternalLink } from '@utils/external-links';

import { openExternalLink } from '@utils/external-links';
import { NETWORK } from '@constants/index';
import packageJson from '../../package.json';

const sha = process.env.SHA;
Expand All @@ -12,12 +13,12 @@ const version = packageJson.version;

const issueParams = new URLSearchParams();
const issueTitle = `[${String(packageJson.version)}] Bug: <describe issue>`;
const issueLabels = 'bug,reported-from-ui';
const issueLabels = `bug,reported-from-ui,4.x,${NETWORK}`;
const issueBody = `
<!--
Thanks for creating an issue. Please include as much detail as possible,
including screenshots, operating system, and steps to recreate.
including screenshots, operating system, and steps to recreate the problem.
If you have any questions, ask @kyranjamie on Github, Discord and Twitter.
Expand All @@ -43,13 +44,18 @@ export const BetaNotice: FC = () => {
return (
<Flex
textStyle="caption.medium"
fontSize="11px"
color="ink.400"
position="fixed"
right={0}
bottom="base"
flexDirection={['column', 'row']}
right="8px"
bottom="8px"
border="1px solid #F0F0F0"
borderRadius="24px"
bg="white"
py="4px"
px="base-tight"
>
<Text mr="base-tight" onClick={openIssueLink} textDecoration="underline" cursor="pointer">
<Text mr="tight" onClick={openIssueLink} textDecoration="underline" cursor="pointer">
Found a bug? Open an issue
</Text>
{pullRequest && branchName && (
Expand All @@ -76,7 +82,7 @@ export const BetaNotice: FC = () => {
</Text>
</Text>
)}
<Text mr="base">[{packageJson.version}]</Text>
<Text>[{packageJson.version}]</Text>
</Flex>
);
};
10 changes: 9 additions & 1 deletion app/components/title-bar/title-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,15 @@ export const TitleBar: FC = () => {
backgroundColor={winState === 'focused' ? 'white' : '#FAFAFC'}
>
<BackButton backUrl={backUrl} hasFocus={winState === 'focused'} onClick={handleHistoryBack} />
<Flex justifyContent="space-around" flex={1}>
<Flex
justifyContent="space-around"
flex={1}
// Manages absolute centre alignment of content
position={['relative', 'absolute']}
width={[null, '100%']}
left={[null, 0]}
height="100%"
>
<Flex>
{isNewerReleaseAvailable && latestRelease && (
<UpdateAvailableButton
Expand Down

0 comments on commit c0d81d7

Please sign in to comment.