Skip to content

Commit

Permalink
v0.10.7
Browse files Browse the repository at this point in the history
Add grid grow and service search in search bar
  • Loading branch information
ajnart authored Nov 30, 2022
2 parents 37ae8e2 + 2bf0199 commit ba6a3df
Show file tree
Hide file tree
Showing 28 changed files with 139 additions and 48 deletions.
2 changes: 1 addition & 1 deletion data/constants.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const REPO_URL = 'ajnart/homarr';
export const CURRENT_VERSION = 'v0.10.6';
export const CURRENT_VERSION = 'v0.10.7';
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "homarr",
"version": "0.10.6",
"version": "0.10.7",
"description": "Homarr - A homepage for your server.",
"license": "MIT",
"repository": {
Expand Down
3 changes: 2 additions & 1 deletion public/locales/da/settings/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
},
"credits": {
"madeWithLove": "Lavet med ❤️ af @"
}
},
"grow": ""
}
3 changes: 2 additions & 1 deletion public/locales/de/settings/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
},
"credits": {
"madeWithLove": "Gemacht mit ❤️ von @"
}
},
"grow": ""
}
3 changes: 2 additions & 1 deletion public/locales/en/settings/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
},
"credits": {
"madeWithLove": "Made with ❤️ by @"
}
},
"grow": "Grow grid (take all space)"
}
3 changes: 2 additions & 1 deletion public/locales/es/settings/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
},
"credits": {
"madeWithLove": "Hecho con ❤️ por @"
}
},
"grow": "Aumentar cuadrícula (toma todo el espacio)"
}
3 changes: 2 additions & 1 deletion public/locales/fr/settings/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
},
"credits": {
"madeWithLove": "Fait avec ❤️ par @"
}
},
"grow": ""
}
3 changes: 2 additions & 1 deletion public/locales/he/settings/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
},
"credits": {
"madeWithLove": "נעשה ב- ❤️ ע״י @"
}
},
"grow": ""
}
3 changes: 2 additions & 1 deletion public/locales/it/settings/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
},
"credits": {
"madeWithLove": "Realizzato con ❤️ da @"
}
},
"grow": ""
}
3 changes: 2 additions & 1 deletion public/locales/ja/settings/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
},
"credits": {
"madeWithLove": "で作った❤️ by @さん"
}
},
"grow": ""
}
3 changes: 2 additions & 1 deletion public/locales/ko/settings/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
},
"credits": {
"madeWithLove": "Made with ❤️ by @"
}
},
"grow": ""
}
3 changes: 2 additions & 1 deletion public/locales/lol/settings/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
},
"credits": {
"madeWithLove": "Maded wif ❤️ by @"
}
},
"grow": ""
}
3 changes: 2 additions & 1 deletion public/locales/nl/settings/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
},
"credits": {
"madeWithLove": "Gemaakt met ❤️ door @"
}
},
"grow": ""
}
3 changes: 2 additions & 1 deletion public/locales/pl/settings/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
},
"credits": {
"madeWithLove": "Wykonane z ❤️ przez @"
}
},
"grow": ""
}
3 changes: 2 additions & 1 deletion public/locales/pt/settings/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
},
"credits": {
"madeWithLove": "Feito com ❤️ por @"
}
},
"grow": ""
}
3 changes: 2 additions & 1 deletion public/locales/ru/settings/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
},
"credits": {
"madeWithLove": "Сделано с ❤️ по @."
}
},
"grow": ""
}
3 changes: 2 additions & 1 deletion public/locales/sl/settings/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
},
"credits": {
"madeWithLove": "Narejeno s ❤️ od @"
}
},
"grow": ""
}
20 changes: 10 additions & 10 deletions public/locales/sv/modules/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@
"input": {
"placeholder": "Sök på webben..."
},
"switched-to": "",
"switched-to": "Växlade till",
"searchEngines": {
"search": {
"name": "",
"description": ""
"name": "Webb",
"description": "Sök med din sökmotor (definierad i inställningar)"
},
"youtube": {
"name": "",
"description": ""
"name": "YouTube",
"description": "Sök på YouTube"
},
"torrents": {
"name": "",
"description": ""
"name": "Torrents",
"description": "Sök torrents"
},
"overseerr": {
"name": "Overseerr",
"description": ""
"description": "Sök efter filmer och TV-program med Overseerr (modulen måste vara aktiverad)"
}
},
"tip": "",
"switchedSearchEngine": ""
"tip": "Du kan välja sökfältet med kortkommandot ",
"switchedSearchEngine": "Växlade till att söka med {{searchEngine}}"
}
3 changes: 2 additions & 1 deletion public/locales/sv/settings/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
},
"credits": {
"madeWithLove": "Gjort med ❤️ av @"
}
},
"grow": "Växande rutnät (ta allt utrymme)"
}
3 changes: 2 additions & 1 deletion public/locales/uk/settings/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
},
"credits": {
"madeWithLove": "Зроблено з ❤️ by @"
}
},
"grow": ""
}
3 changes: 2 additions & 1 deletion public/locales/vi/settings/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
},
"credits": {
"madeWithLove": "From @ with ❤️"
}
},
"grow": ""
}
3 changes: 2 additions & 1 deletion public/locales/zh/settings/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
},
"credits": {
"madeWithLove": "用❤️创造,出品于"
}
},
"grow": ""
}
11 changes: 9 additions & 2 deletions src/components/AppShelf/AppShelf.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const AppShelf = (props: any) => {
onDragEnd={handleDragEnd}
>
<SortableContext items={config.services}>
<Grid gutter="lg" align="center">
<Grid gutter="lg" grow={config.settings.grow}>
{filtered.map((service) => (
<Grid.Col key={service.id} span="content">
<SortableItem service={service} key={service.id} id={service.id}>
Expand Down Expand Up @@ -143,7 +143,14 @@ const AppShelf = (props: any) => {
value={idx.toString()}
>
<Accordion.Control>
<Title order={5}>{category}</Title>
<Title
order={5}
style={{
minWidth: 0,
}}
>
{category}
</Title>
</Accordion.Control>
<Accordion.Panel>{getItems(category)}</Accordion.Panel>
</Accordion.Item>
Expand Down
2 changes: 2 additions & 0 deletions src/components/Settings/AdvancedSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { ColorSelector } from './ColorSelector';
import { OpacitySelector } from './OpacitySelector';
import { AppCardWidthSelector } from './AppCardWidthSelector';
import { ShadeSelector } from './ShadeSelector';
import { GrowthSelector } from './GrowthSelector';

export default function TitleChanger() {
const { config, setConfig } = useConfig();
Expand Down Expand Up @@ -74,6 +75,7 @@ export default function TitleChanger() {
<Button type="submit">{t('buttons.submit')}</Button>
</Stack>
</form>
<GrowthSelector />
<ColorSelector type="primary" />
<ColorSelector type="secondary" />
<ShadeSelector />
Expand Down
30 changes: 30 additions & 0 deletions src/components/Settings/GrowthSelector.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { Switch } from '@mantine/core';
import { useTranslation } from 'next-i18next';
import { useState } from 'react';
import { useConfig } from '../../tools/state';

export function GrowthSelector() {
const { config, setConfig } = useConfig();
const defaultPosition = config?.settings?.grow || false;
const [growState, setGrowState] = useState(defaultPosition);
const { t } = useTranslation('settings/common.json');
const toggleGrowState = () => {
setGrowState(!growState);
setConfig({
...config,
settings: {
...config.settings,
grow: !growState,
},
});
};

return (
<Switch
label={t('settings/common:grow')}
checked={growState === true}
onChange={() => toggleGrowState()}
size="md"
/>
);
}
16 changes: 6 additions & 10 deletions src/components/WidgetsPositionSwitch/WidgetsPositionSwitch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,11 @@ export function WidgetsPositionSwitch() {
};

return (
<Group>
<div className={classes.root}>
<Switch
checked={widgetPosition === 'left'}
onChange={() => toggleWidgetPosition()}
size="md"
/>
</div>
{t('label')}
</Group>
<Switch
label={t('label')}
checked={widgetPosition === 'left'}
onChange={() => toggleWidgetPosition()}
size="md"
/>
);
}
Loading

0 comments on commit ba6a3df

Please sign in to comment.