mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-04-14 13:48:37 +00:00
add content in downloads table for mac
This commit is contained in:
parent
1b9ad9ae2b
commit
fdec8b81bb
2 changed files with 17 additions and 6 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
import { Stack, Tabs, TabList, Tab, Text, TabPanel, TabPanels } from '@chakra-ui/react';
|
import { Link, Stack, Tabs, TabList, Tab, Text, TabPanel, TabPanels } from '@chakra-ui/react';
|
||||||
import { FC, useMemo } from 'react';
|
import { FC, useMemo } from 'react';
|
||||||
|
|
||||||
import { DataTable } from '../../UI';
|
import { DataTable } from '../../UI';
|
||||||
|
|
@ -38,9 +38,9 @@ export const DownloadsTable: FC<Props> = ({
|
||||||
const getDefaultIndex = useMemo<number>(() => {
|
const getDefaultIndex = useMemo<number>(() => {
|
||||||
const OS: string = typeof window !== 'undefined' ? window.navigator.platform : '';
|
const OS: string = typeof window !== 'undefined' ? window.navigator.platform : '';
|
||||||
const userAgent = typeof window !== 'undefined' ? window.navigator.userAgent : '';
|
const userAgent = typeof window !== 'undefined' ? window.navigator.userAgent : '';
|
||||||
if (/Win/i.test(OS)) return 1;
|
if (/Win/i.test(OS)) return 2;
|
||||||
if (/iPhone/i.test(OS)) return 2;
|
if (/iPhone/i.test(OS)) return 3;
|
||||||
if (/Android/i.test(userAgent)) return 3;
|
if (/Android/i.test(userAgent)) return 4;
|
||||||
return 0;
|
return 0;
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|
@ -63,7 +63,7 @@ export const DownloadsTable: FC<Props> = ({
|
||||||
return (
|
return (
|
||||||
<Tab
|
<Tab
|
||||||
key={tab}
|
key={tab}
|
||||||
w={'25%'}
|
w={'20%'}
|
||||||
p={4}
|
p={4}
|
||||||
_selected={{
|
_selected={{
|
||||||
bg: 'primary',
|
bg: 'primary',
|
||||||
|
|
@ -86,6 +86,17 @@ export const DownloadsTable: FC<Props> = ({
|
||||||
data={linuxData.slice(0, LAST_2_LINUX_RELEASES)}
|
data={linuxData.slice(0, LAST_2_LINUX_RELEASES)}
|
||||||
/>
|
/>
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
|
<TabPanel p={0}>
|
||||||
|
<Stack p={4}>
|
||||||
|
<Text textAlign='center' bg='code-bg' p={3}>
|
||||||
|
Mac users should get their builds from{' '}
|
||||||
|
<Link href='https://formulae.brew.sh/formula/ethereum' variant='light'>
|
||||||
|
Homebrew
|
||||||
|
</Link>{' '}
|
||||||
|
or compile themselves.
|
||||||
|
</Text>
|
||||||
|
</Stack>
|
||||||
|
</TabPanel>
|
||||||
<TabPanel p={0}>
|
<TabPanel p={0}>
|
||||||
<DataTable
|
<DataTable
|
||||||
columnHeaders={DOWNLOADS_TABLE_TAB_COLUMN_HEADERS}
|
columnHeaders={DOWNLOADS_TABLE_TAB_COLUMN_HEADERS}
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ export const DOWNLOAD_HEADER_BUTTONS: {
|
||||||
buildURL: ''
|
buildURL: ''
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
export const DOWNLOADS_TABLE_TABS = ['Linux', 'Windows', 'iOS', 'Android'];
|
export const DOWNLOADS_TABLE_TABS = ['Linux', 'macOS', 'Windows', 'iOS', 'Android'];
|
||||||
export const DOWNLOADS_TABLE_TAB_COLUMN_HEADERS = [
|
export const DOWNLOADS_TABLE_TAB_COLUMN_HEADERS = [
|
||||||
'Release',
|
'Release',
|
||||||
'Commit',
|
'Commit',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue