Skip to content

Commit

Permalink
Merge pull request #834 from progzone122/master
Browse files Browse the repository at this point in the history
add russian language and  fix "NavbarComponent"
  • Loading branch information
oguzkaganeren authored Aug 19, 2023
2 parents 5dfc4f4 + 5d8f99b commit 8fa37e4
Show file tree
Hide file tree
Showing 4 changed files with 248 additions and 47 deletions.
97 changes: 51 additions & 46 deletions src/components/NavbarComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
IconButton,
ButtonGroup,
Spacer,
SimpleGrid,
} from '@chakra-ui/react';
import React from 'react';
import { appWindow } from '@tauri-apps/api/window';
Expand All @@ -27,52 +26,58 @@ const NavbarComponent: React.FC = () => (
bg="#edf3f8"
_dark={{ bg: '#1A202C' }}
>
<div data-tauri-drag-region className="titlebar" />
<SimpleGrid columns={3} spacing={10}>
<Spacer />
<Flex alignItems="center">
<StepButtons />
</Flex>
<div data-tauri-drag-region="" className="titlebar" />
<Spacer />
<Flex
w="full"
justifyContent="center"
alignItems="center"
marginLeft={{
base: '-3em',
md: '12em',
}}
>
<StepButtons />
</Flex>

<Flex
justify="flex-end"
h={16}
mr={5}
alignItems="center"
justifyContent="space-between"
>
<Stack direction="row" spacing={2}>
<ThemeComponent />
<AppSettings />
<ButtonGroup>
<IconButton
aria-label="Minimize"
onClick={() => {
appWindow.minimize();
}}
size="sm"
icon={<MdOutlineMinimize />}
/>
<IconButton
aria-label="Window"
onClick={() => {
appWindow.toggleMaximize();
}}
size="sm"
icon={<BiWindow />}
/>
<IconButton
aria-label="Close"
onClick={async () => {
invoke('hide_window');
}}
size="sm"
icon={<CloseIcon />}
/>
</ButtonGroup>
</Stack>
</Flex>
</SimpleGrid>
<Flex
justify="flex-end"
h={16}
mr={5}
alignItems="center"
justifyContent="space-between"
>
<Stack direction="row" spacing={2}>
<ThemeComponent />
<AppSettings />
<ButtonGroup>
<IconButton
aria-label="Minimize"
onClick={() => {
appWindow.minimize();
}}
size="sm"
icon={<MdOutlineMinimize />}
/>
<IconButton
aria-label="Window"
onClick={() => {
appWindow.toggleMaximize();
}}
size="sm"
icon={<BiWindow />}
/>
<IconButton
aria-label="Close"
onClick={async () => {
invoke('hide_window');
}}
size="sm"
icon={<CloseIcon />}
/>
</ButtonGroup>
</Stack>
</Flex>
</Flex>
);
export default NavbarComponent;
2 changes: 1 addition & 1 deletion src/components/StepButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const StepButtons = (): JSX.Element => {
const prevDisabled = activeStep === 0;
const isLast = activeStep === count;
return (
<Flex width="100%" justify="flex-end">
<Flex justify="flex-end">
<IconButton
mr={4}
size="sm"
Expand Down
2 changes: 2 additions & 0 deletions src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ import Francais from './translations/fr.json';
import German from './translations/de.json';
import English from './translations/en.json';
import Polish from './translations/pl.json';
import Russian from './translations/ru.json';

const resources = {
Danish,
Francais,
German,
English,
Polish,
Russian,
};

const availableLanguages = Object.keys(resources);
Expand Down
Loading

0 comments on commit 8fa37e4

Please sign in to comment.