Skip to content

Commit

Permalink
feat: improve app bar UI
Browse files Browse the repository at this point in the history
  • Loading branch information
pwltr committed Nov 22, 2023
1 parent 7d7cb6e commit 199635e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
6 changes: 5 additions & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@
"width": 380,
"height": 700,
"resizable": false,
"fullscreen": false
"fullscreen": false,
"center": true,
"contentProtected": true,
"hiddenTitle": true,
"acceptFirstMouse": true
}
],
"security": {
Expand Down
30 changes: 15 additions & 15 deletions src/components/AppBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,21 +169,21 @@ const AppBar = () => {
</IconButton>
)}

{isSearching && location.pathname === '/' ? (
<Search
autoFocus
placeholder={t('appBar.search')}
inputProps={{ 'aria-label': t('appBar.search') }}
value={searchTerm}
onChange={(event: ChangeEvent<HTMLInputElement>) => setSearch(event.target.value)}
/>
) : (
<PageTitle variant="h6" noWrap>
{location.pathname === '/' ? <b>Tauthy</b> : appBarTitle}
</PageTitle>
)}

<Box sx={{ flexGrow: 1 }} />
<Box sx={{ flexGrow: 1 }} onClick={() => setIsSearching(true)}>
{isSearching && location.pathname === '/' ? (
<Search
autoFocus
placeholder={t('appBar.search')}
inputProps={{ 'aria-label': t('appBar.search') }}
value={searchTerm}
onChange={(event: ChangeEvent<HTMLInputElement>) => setSearch(event.target.value)}
/>
) : (
<PageTitle variant="h6" noWrap>
{location.pathname === '/' ? <b>Tauthy</b> : appBarTitle}
</PageTitle>
)}
</Box>

{location.pathname === '/' && (
<>
Expand Down

0 comments on commit 199635e

Please sign in to comment.