mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
feat: reload button
This commit is contained in:
parent
cf1aaf331e
commit
c29eec43e4
3 changed files with 20 additions and 10 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { GearIcon } from '@primer/octicons-react'
|
||||
import { GearIcon, SyncIcon } from '@primer/octicons-react'
|
||||
import { Link } from '@primer/react'
|
||||
import { ReloadContext } from 'containers/ReloadContext'
|
||||
import { VERSION } from 'env'
|
||||
import * as React from 'react'
|
||||
import { RoundIconButton } from './RoundIconButton'
|
||||
|
|
@ -11,13 +12,14 @@ type Props = {
|
|||
|
||||
export function Footer(props: Props) {
|
||||
const { toggleShowSettings } = props
|
||||
const reload = React.useContext(ReloadContext)
|
||||
return (
|
||||
<div className={'gitako-footer'}>
|
||||
<div className="gitako-footer-section">
|
||||
<Link
|
||||
className={'version'}
|
||||
href={wikiLinks.changeLog}
|
||||
title={'Check out new features!'}
|
||||
title={'Gitako changelog'}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
|
|
@ -32,12 +34,20 @@ export function Footer(props: Props) {
|
|||
👋
|
||||
</Link>
|
||||
</div>
|
||||
<RoundIconButton
|
||||
aria-label={'settings'}
|
||||
icon={GearIcon}
|
||||
iconColor="fg.muted"
|
||||
onClick={toggleShowSettings}
|
||||
/>
|
||||
<div>
|
||||
<RoundIconButton
|
||||
aria-label={'Reload'}
|
||||
icon={SyncIcon}
|
||||
iconColor="fg.muted"
|
||||
onClick={() => reload()}
|
||||
/>
|
||||
<RoundIconButton
|
||||
aria-label={'Settings'}
|
||||
icon={GearIcon}
|
||||
iconColor="fg.muted"
|
||||
onClick={toggleShowSettings}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export function SearchBar({ onSearch, onFocus, value }: Props) {
|
|||
block
|
||||
sx={{ borderRadius: 0 }}
|
||||
className={'search-input'}
|
||||
aria-label="search files"
|
||||
aria-label="Search files"
|
||||
placeholder={formatWithShortcut(`Search files`, focusSearchInputShortcut)}
|
||||
onChange={({ target: { value } }) => onSearch(value, searchMode)}
|
||||
value={value}
|
||||
|
|
|
|||
|
|
@ -589,7 +589,7 @@ html[data-with-gitako-spacing='true'] {
|
|||
|
||||
&-section {
|
||||
display: inline-flex;
|
||||
gap: 6px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.version {
|
||||
|
|
|
|||
Loading…
Reference in a new issue