on master help sign in
feat: mobile-related fixes, primarily styling
d27f157Matt Condon (shrugs)
package.json+1−1
@@ -72,7 +72,7 @@
72 "checksum": "cd build && find . -exec shasum -a256 {} ';' > ../checksums.txt && cd ..",
72 "checksum": "cd build && find . -exec shasum -a256 {} ';' > ../checksums.txt && cd ..",
73 "zip": "zip -ur bridge-$npm_package_version.zip README.md bridge-https.py checksums.txt && cd build && zip -ur ../bridge-$npm_package_version.zip ./* && cd ..",
73 "zip": "zip -ur bridge-$npm_package_version.zip README.md bridge-https.py checksums.txt && cd build && zip -ur ../bridge-$npm_package_version.zip ./* && cd ..",
74 "release": "npm install && npm run build && npm run checksum && npm run zip",
74 "release": "npm install && npm run build && npm run checksum && npm run zip",
75− "pilot:ganache": "ganache-cli --blockTime 1 --networkId 1 -m 'benefit crew supreme gesture quantum web media hazard theory mercy wing kitten' > /dev/null &",
75+ "pilot:ganache": "ganache-cli --blockTime 1 --networkId 1 --host '0.0.0.0' -m 'benefit crew supreme gesture quantum web media hazard theory mercy wing kitten' > /dev/null &",
76 "pilot:deploy": "cd node_modules/azimuth-solidity && truffle deploy",
76 "pilot:deploy": "cd node_modules/azimuth-solidity && truffle deploy",
77 "pilot:setup": "npm run pilot:ganache && npm run pilot:deploy",
77 "pilot:setup": "npm run pilot:ganache && npm run pilot:deploy",
78 "pilot": "HTTPS=true npm-run-all pilot:setup start pilot:cleanup --continue-on-error",
78 "pilot": "HTTPS=true npm-run-all pilot:setup start pilot:cleanup --continue-on-error",
src/components/InputSigil.js−1
@@ -42,7 +42,6 @@ export default function InputSigil({
42 patp={Just(lastValidPatp)}
42 patp={Just(lastValidPatp)}
43 size={size}
43 size={size}
44 colors={selectColorway(pass, error, focused)}
44 colors={selectColorway(pass, error, focused)}
45− margin={0}
46 {...rest}
45 {...rest}
47 />
46 />
48 );
47 );
src/components/MaybeSigil.js+1−1
@@ -14,7 +14,7 @@ export default function MaybeSigil({ className, patp, size, ...rest }) {
14 });
14 });
15
15
16 return validPatp ? (
16 return validPatp ? (
17− <Sigil patp={validPatp} size={size} margin={0} {...rest} />
17+ <Sigil patp={validPatp} size={size} {...rest} />
18 ) : (
18 ) : (
19 <AspectRatio aspectRatio={1} />
19 <AspectRatio aspectRatio={1} />
20 );
20 );
src/components/Passport.js+2−3
@@ -75,10 +75,10 @@ function Passport({ point, className, ticket = null, address = Nothing() }) {
75 return (
75 return (
76 <Grid gap={4} className={cn('bg-black r8 p7', className)}>
76 <Grid gap={4} className={cn('bg-black r8 p7', className)}>
77 <Grid.Item cols={[1, 4]}>
77 <Grid.Item cols={[1, 4]}>
78− <MaybeSigil patp={name} size={64} margin={0} />
78+ <MaybeSigil patp={name} size={64} />
79 </Grid.Item>
79 </Grid.Item>
80 <Grid.Item as={Flex} cols={[4, 13]} col justify="between">
80 <Grid.Item as={Flex} cols={[4, 13]} col justify="between">
81− <Flex.Item className="mono white f5">{visualName}</Flex.Item>
81+ <Flex.Item className="mono white f5 pb2">{visualName}</Flex.Item>
82 <Flex.Item as={Flex} col>
82 <Flex.Item as={Flex} col>
83 <Flex.Item as={Text} className="mono f6 f5-ns gray4 uppercase">
83 <Flex.Item as={Text} className="mono f6 f5-ns gray4 uppercase">
84 Birth Time
84 Birth Time
@@ -141,7 +141,6 @@ Passport.Mini = function MiniPassport({ point, className, inverted, ...rest }) {
141 <Sigil
141 <Sigil
142 patp={name}
142 patp={name}
143 size={64}
143 size={64}
144− margin={0}
145 colors={inverted ? INVERTED_COLORWAY : undefined}
144 colors={inverted ? INVERTED_COLORWAY : undefined}
146 />
145 />
147 </Grid.Item>
146 </Grid.Item>
src/components/Sigil.js+2−1
@@ -4,8 +4,9 @@ export default function Sigil({ patp, size, colors, ...rest }) {
4 return sigil({
4 return sigil({
5 patp,
5 patp,
6 renderer: reactRenderer,
6 renderer: reactRenderer,
7− style: { width: '100%', height: '100%' }, //NOTE scale to container
7+ style: { width: '100%', height: '100%' }, // NOTE: scale to container
8 size,
8 size,
9+ margin: size / 8,
9 colors,
10 colors,
10 ...rest,
11 ...rest,
11 });
12 });
src/components/View.js+1−1
@@ -62,7 +62,7 @@ function View({
62 <Flex.Item as={Footer.Target} />
62 <Flex.Item as={Footer.Target} />
63 </Flex.Item>
63 </Flex.Item>
64
64
65− <Flex.Item style={{ width: '48px' }} className={cn(insetPadding)} />
65+ <Flex.Item style={{ width: '48px' }} />
66 </Flex>
66 </Flex>
67 );
67 );
68}
68}
src/indigo-react/components/Input.js+5−3
@@ -73,8 +73,10 @@ export default React.memo(function Input({
73 as={type === 'textarea' ? 'textarea' : 'input'}
73 as={type === 'textarea' ? 'textarea' : 'input'}
74 type={type === 'textarea' ? undefined : type}
74 type={type === 'textarea' ? undefined : type}
75 {...rest}
75 {...rest}
76− // NOTE: 24px = 12px * 2 (from p3 styling)
76+ // NOTE: 1.15 from input line-height, 24px = 12px * 2 (from p3 styling)
77+ style={
77− style={type === 'textarea' ? { minHeight: 'calc(1rem + 24px)' } : {}}
78+ type === 'textarea' ? { minHeight: 'calc(1.15rem * 2 + 24px)' } : {}
79+ }
78 className={cn(
80 className={cn(
79 'b b1 p3 outline-none',
81 'b b1 p3 outline-none',
80 { mono },
82 { mono },
@@ -107,7 +109,7 @@ export default React.memo(function Input({
107 top: 0,
109 top: 0,
108 right: 0,
110 right: 0,
109 height: '100%',
111 height: '100%',
110− width: '44px',
112+ width: 'calc(1.5em + 24px)',
111 overflow: 'hidden',
113 overflow: 'hidden',
112 }}>
114 }}>
113 {accessory}
115 {accessory}
src/lib/useInputs.js−1
@@ -178,7 +178,6 @@ export function usePointInput({ size = 4, validators = [], ...rest }) {
178 <InputSigil
178 <InputSigil
179 patp={value}
179 patp={value}
180 size={44}
180 size={44}
181− margin={8}
182 pass={pass}
181 pass={pass}
183 focused={focused}
182 focused={focused}
184 error={error}
183 error={error}
src/store/network.js+1−1
@@ -41,7 +41,7 @@ function _useNetwork(initialNetworkType = null) {
41 switch (networkType) {
41 switch (networkType) {
42 case NETWORK_TYPES.LOCAL: {
42 case NETWORK_TYPES.LOCAL: {
43 const protocol = isDevelopment ? 'ws' : 'wss';
43 const protocol = isDevelopment ? 'ws' : 'wss';
44− const endpoint = `${protocol}://localhost:8545`;
44+ const endpoint = `${protocol}://${document.location.hostname}:8545`;
45
45
46 return initWeb3(
46 return initWeb3(
47 new Web3.providers.WebsocketProvider(endpoint),
47 new Web3.providers.WebsocketProvider(endpoint),
src/style/bridge.scss+5−3
@@ -1,3 +1,5 @@
1+$handle-extent: 24px;
2+
1@keyframes autofill {
3@keyframes autofill {
2 to {
4 to {
3 color: #000;
5 color: #000;
@@ -36,7 +38,7 @@ input[type='range'] {
36
38
37 /* Chrome */
39 /* Chrome */
38 &::-webkit-slider-runnable-track {
40 &::-webkit-slider-runnable-track {
39− height: 24px;
41+ height: $handle-extent;
40 -webkit-appearance: none;
42 -webkit-appearance: none;
41 background-color: #e6e6e6;
43 background-color: #e6e6e6;
42 margin-top: -1px;
44 margin-top: -1px;
@@ -44,7 +46,7 @@ input[type='range'] {
44
46
45 &::-webkit-slider-thumb {
47 &::-webkit-slider-thumb {
46 -webkit-appearance: none;
48 -webkit-appearance: none;
47− width: 24px;
49+ width: $handle-extent;
48 height: 100%;
50 height: 100%;
49 background-color: #000;
51 background-color: #000;
50 border: none;
52 border: none;
@@ -63,7 +65,7 @@ input[type='range'] {
63 }
65 }
64
66
65 &::-moz-range-thumb {
67 &::-moz-range-thumb {
66− width: 24px;
68+ width: $handle-extent;
67 height: 100%;
69 height: 100%;
68 background-color: #000;
70 background-color: #000;
69 border: none;
71 border: none;
src/style/form-reset.scssnew file+51
@@ -0,0 +1,51 @@
1+$form-padding: 24px; // indigo pv3
2+$form-line-height: 1.5rem;
3+
4+// inspired by: https://gist.github.com/anthonyshort/552543
5+
6+input,
7+button,
8+textarea,
9+select {
10+ padding: 0;
11+ margin: 0;
12+ border-radius: 0;
13+ -webkit-appearance: none;
14+
15+ &:focus,
16+ &:hover,
17+ &:active {
18+ outline: 0;
19+ }
20+
21+ &::-moz-focus-inner {
22+ border: 0;
23+ }
24+}
25+
26+input {
27+ box-sizing: border-box;
28+ -webkit-box-sizing: border-box;
29+
30+ height: calc(#{$form-line-height} + #{$form-padding});
31+ line-height: $form-line-height;
32+}
33+
34+textarea {
35+ /* Move the label to the top */
36+ vertical-align: top;
37+
38+ /* Turn off scroll bars in IE unless needed */
39+ overflow: auto;
40+}
41+
42+::-webkit-file-upload-button {
43+ padding: 0;
44+ border: 0;
45+ background: none;
46+}
47+
48+/* Turn off the recent search for webkit. It adds about 15px padding on the left */
49+::-webkit-search-decoration {
50+ display: none;
51+}
src/style/index.scss+3
@@ -1,3 +1,6 @@
1+/* Form Reset */
2+@import './form-reset.scss';
3+
1/* Indigo */
4/* Indigo */
2@import '../indigo-react/indigo.css';
5@import '../indigo-react/indigo.css';
3@import './indigo-proposals.scss';
6@import './indigo-proposals.scss';
src/views/AcceptTransfer.js+1−1
@@ -73,7 +73,7 @@ export default function AcceptTransfer() {
73 <Grid.Item
73 <Grid.Item
74 full
74 full
75 as={Text}
75 as={Text}
76− className={cn('f5', {
76+ className={cn('f5 wrap', {
77 green3: completed,
77 green3: completed,
78 })}>
78 })}>
79 {completed
79 {completed
src/views/Admin/AdminCancelTransfer.js+1−1
@@ -65,7 +65,7 @@ export default function AdminCancelTransfer() {
65 <Grid.Item
65 <Grid.Item
66 full
66 full
67 as={Text}
67 as={Text}
68− className={cn('f5', {
68+ className={cn('f5 wrap', {
69 green3: completed,
69 green3: completed,
70 })}>
70 })}>
71 {completed
71 {completed
src/views/Admin/AdminTransfer.js+1−1
@@ -69,7 +69,7 @@ export default function AdminTransfer() {
69 <Grid.Item
69 <Grid.Item
70 full
70 full
71 as={Text}
71 as={Text}
72− className={cn('f5', {
72+ className={cn('f5 wrap', {
73 green3: completed,
73 green3: completed,
74 })}>
74 })}>
75 {completed
75 {completed
src/views/CreateGalaxy.js+1−1
@@ -137,7 +137,7 @@ export default function CreateGalaxy() {
137 <Grid.Item
137 <Grid.Item
138 full
138 full
139 as={Text}
139 as={Text}
140− className={cn('f5', {
140+ className={cn('f5 wrap', {
141 green3: completed,
141 green3: completed,
142 })}>
142 })}>
143 {galaxyName} has been created and can be claimed by {owner}.
143 {galaxyName} has been created and can be claimed by {owner}.
src/views/IssueChild.js+1−1
@@ -147,7 +147,7 @@ export default function IssueChild() {
147 <Grid.Item
147 <Grid.Item
148 full
148 full
149 as={Text}
149 as={Text}
150− className={cn('f5', {
150+ className={cn('f5 wrap', {
151 green3: completed,
151 green3: completed,
152 })}>
152 })}>
153 {pointName} has been spawned and can be claimed by {owner}.
153 {pointName} has been spawned and can be claimed by {owner}.
src/views/Party/PartySetPoolSize.js+1−1
@@ -104,7 +104,7 @@ export default function PartySetPoolSize() {
104 <Grid.Item
104 <Grid.Item
105 full
105 full
106 as={Text}
106 as={Text}
107− className={cn('f5', {
107+ className={cn('f5 wrap', {
108 green3: completed,
108 green3: completed,
109 })}>
109 })}>
110 {completed
110 {completed
src/views/Points.js+1−1
@@ -40,7 +40,7 @@ const PointList = function({ points, className, actions, ...rest }) {
40 return (
40 return (
41 <Grid gap={3} className={className}>
41 <Grid gap={3} className={className}>
42 {points.map((point, i) => (
42 {points.map((point, i) => (
43− <Grid.Item half={(i % 2) + 1} key={point}>
43+ <Grid.Item key={point} className={`full half-${(i % 2) + 1}-md`}>
44 <Flex col>
44 <Flex col>
45 <Passport.Mini
45 <Passport.Mini
46 point={point}
46 point={point}