mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-13 08:55:48 +01:00
Merge branch 'dev' into dnd
This commit is contained in:
@@ -1,14 +1,9 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
stories: ['../src/components/**/*.story.mdx', '../src/components/**/*.story.*'],
|
stories: ['../src/components/**/*.story.mdx', '../src/components/**/*.story.*'],
|
||||||
addons: [
|
addons: [
|
||||||
'storybook-dark-mode',
|
|
||||||
'@storybook/addon-links',
|
'@storybook/addon-links',
|
||||||
'storybook-addon-mock/register',
|
'storybook-addon-mock/register',
|
||||||
'@storybook/addon-essentials',
|
'@storybook/addon-essentials',
|
||||||
{
|
|
||||||
name: 'storybook-addon-turbo-build',
|
|
||||||
options: { optimizationLevel: 2 },
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
typescript: {
|
typescript: {
|
||||||
check: false,
|
check: false,
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { useDarkMode } from 'storybook-dark-mode';
|
|
||||||
import { MantineProvider, ColorSchemeProvider } from '@mantine/core';
|
import { MantineProvider, ColorSchemeProvider } from '@mantine/core';
|
||||||
import { NotificationsProvider } from '@mantine/notifications';
|
import { NotificationsProvider } from '@mantine/notifications';
|
||||||
|
|
||||||
@@ -7,11 +6,7 @@ export const parameters = { layout: 'fullscreen' };
|
|||||||
function ThemeWrapper(props: { children: React.ReactNode }) {
|
function ThemeWrapper(props: { children: React.ReactNode }) {
|
||||||
return (
|
return (
|
||||||
<ColorSchemeProvider colorScheme="light" toggleColorScheme={() => {}}>
|
<ColorSchemeProvider colorScheme="light" toggleColorScheme={() => {}}>
|
||||||
<MantineProvider
|
<MantineProvider withGlobalStyles withNormalizeCSS>
|
||||||
theme={{ colorScheme: useDarkMode() ? 'dark' : 'light' }}
|
|
||||||
withGlobalStyles
|
|
||||||
withNormalizeCSS
|
|
||||||
>
|
|
||||||
<NotificationsProvider>{props.children}</NotificationsProvider>
|
<NotificationsProvider>{props.children}</NotificationsProvider>
|
||||||
</MantineProvider>
|
</MantineProvider>
|
||||||
</ColorSchemeProvider>
|
</ColorSchemeProvider>
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "config",
|
|
||||||
"services": [
|
|
||||||
{
|
|
||||||
"type": "Other",
|
|
||||||
"name": "YouTube",
|
|
||||||
"icon": "https://cdn.jsdelivr.net/gh/walkxhub/dashboard-icons/png/youtube.png",
|
|
||||||
"url": "https://youtube.com/"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Other",
|
|
||||||
"name": "YouTube ",
|
|
||||||
"icon": "https://cdn.jsdelivr.net/gh/walkxhub/dashboard-icons/png/youtube.png",
|
|
||||||
"url": "https://youtube.com/"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"settings": {
|
|
||||||
"searchBar": true,
|
|
||||||
"searchUrl": "Custom",
|
|
||||||
"enabledModules": [
|
|
||||||
"Date",
|
|
||||||
"Calendar",
|
|
||||||
"Weather"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "config_new",
|
|
||||||
"services": [
|
|
||||||
{
|
|
||||||
"type": "Other",
|
|
||||||
"name": "example",
|
|
||||||
"icon": "https://c.tenor.com/o656qFKDzeUAAAAC/rick-astley-never-gonna-give-you-up.gif",
|
|
||||||
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"settings": {
|
|
||||||
"searchBar": true,
|
|
||||||
"searchUrl": "https://duckduckgo.com/?q=",
|
|
||||||
"enabledModules": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -2,15 +2,14 @@
|
|||||||
"name": "default",
|
"name": "default",
|
||||||
"services": [
|
"services": [
|
||||||
{
|
{
|
||||||
"type": "Other",
|
|
||||||
"name": "example",
|
"name": "example",
|
||||||
|
"id": "09c45847-8afc-4c1a-9697-f03192de948a",
|
||||||
|
"type": "Other",
|
||||||
"icon": "https://c.tenor.com/o656qFKDzeUAAAAC/rick-astley-never-gonna-give-you-up.gif",
|
"icon": "https://c.tenor.com/o656qFKDzeUAAAAC/rick-astley-never-gonna-give-you-up.gif",
|
||||||
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
|
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"searchBar": true,
|
"searchUrl": "https://bing.com/search?q="
|
||||||
"searchUrl": "https://bing.com/search?q=",
|
|
||||||
"enabledModules": []
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
49
package.json
49
package.json
@@ -27,27 +27,23 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dnd-kit/core": "^6.0.1",
|
"@dnd-kit/core": "^6.0.1",
|
||||||
"@dnd-kit/sortable": "^7.0.0",
|
"@dnd-kit/sortable": "^7.0.0",
|
||||||
"@mantine/core": "^4.2.4",
|
"@mantine/core": "^4.2.6",
|
||||||
"@mantine/dates": "^4.2.4",
|
"@mantine/dates": "^4.2.6",
|
||||||
"@mantine/dropzone": "^4.2.4",
|
"@mantine/dropzone": "^4.2.6",
|
||||||
"@mantine/form": "^4.2.4",
|
"@mantine/form": "^4.2.6",
|
||||||
"@mantine/hooks": "^4.2.4",
|
"@mantine/hooks": "^4.2.6",
|
||||||
"@mantine/modals": "^4.2.4",
|
"@mantine/next": "^4.2.6",
|
||||||
"@mantine/next": "^4.2.4",
|
"@mantine/notifications": "^4.2.6",
|
||||||
"@mantine/notifications": "^4.2.4",
|
"@mantine/prism": "^4.2.6",
|
||||||
"@mantine/prism": "^4.2.4",
|
|
||||||
"@mantine/rte": "^4.2.4",
|
|
||||||
"@mantine/spotlight": "^4.2.4",
|
|
||||||
"@modulz/radix-icons": "^4.0.0",
|
|
||||||
"axios": "^0.27.2",
|
"axios": "^0.27.2",
|
||||||
"cookies-next": "^2.0.4",
|
"cookies-next": "^2.0.4",
|
||||||
"dayjs": "^1.11.2",
|
"dayjs": "^1.11.2",
|
||||||
"framer-motion": "^6.3.1",
|
"framer-motion": "^6.3.1",
|
||||||
"js-file-download": "^0.4.12",
|
"js-file-download": "^0.4.12",
|
||||||
"next": "12.1.5-canary.4",
|
"next": "12.1.6",
|
||||||
"prism-react-renderer": "^1.3.1",
|
"prism-react-renderer": "^1.3.1",
|
||||||
"react": "18.0.0",
|
"react": "^17.0.1",
|
||||||
"react-dom": "18.0.0",
|
"react-dom": "^17.0.1",
|
||||||
"tabler-icons-react": "^1.46.0",
|
"tabler-icons-react": "^1.46.0",
|
||||||
"uuid": "^8.3.2"
|
"uuid": "^8.3.2"
|
||||||
},
|
},
|
||||||
@@ -55,23 +51,15 @@
|
|||||||
"@babel/core": "^7.17.8",
|
"@babel/core": "^7.17.8",
|
||||||
"@next/bundle-analyzer": "^12.1.4",
|
"@next/bundle-analyzer": "^12.1.4",
|
||||||
"@next/eslint-plugin-next": "^12.1.4",
|
"@next/eslint-plugin-next": "^12.1.4",
|
||||||
"@storybook/addon-essentials": "^6.4.22",
|
"@storybook/react": "^6.5.4",
|
||||||
"@storybook/addon-links": "^6.4.22",
|
|
||||||
"@storybook/react": "^6.4.22",
|
|
||||||
"@testing-library/dom": "^8.12.0",
|
|
||||||
"@testing-library/jest-dom": "^5.16.3",
|
|
||||||
"@testing-library/react": "^13.0.0",
|
|
||||||
"@testing-library/user-event": "^14.0.4",
|
|
||||||
"@types/jest": "^27.4.1",
|
|
||||||
"@types/node": "^17.0.23",
|
"@types/node": "^17.0.23",
|
||||||
"@types/react": "17.0.43",
|
"@types/react": "17.0.43",
|
||||||
"@types/uuid": "^8.3.4",
|
"@types/uuid": "^8.3.4",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.16.0",
|
"@typescript-eslint/eslint-plugin": "^5.16.0",
|
||||||
"@typescript-eslint/parser": "^5.16.0",
|
"@typescript-eslint/parser": "^5.16.0",
|
||||||
"babel-loader": "^8.2.4",
|
|
||||||
"eslint": "^8.11.0",
|
"eslint": "^8.11.0",
|
||||||
"eslint-config-airbnb": "19.0.4",
|
"eslint-config-airbnb": "^19.0.4",
|
||||||
"eslint-config-airbnb-typescript": "^16.1.4",
|
"eslint-config-airbnb-typescript": "^16.1.0",
|
||||||
"eslint-config-mantine": "1.1.0",
|
"eslint-config-mantine": "1.1.0",
|
||||||
"eslint-plugin-import": "^2.25.4",
|
"eslint-plugin-import": "^2.25.4",
|
||||||
"eslint-plugin-jest": "^26.1.3",
|
"eslint-plugin-jest": "^26.1.3",
|
||||||
@@ -81,13 +69,10 @@
|
|||||||
"eslint-plugin-storybook": "^0.5.11",
|
"eslint-plugin-storybook": "^0.5.11",
|
||||||
"eslint-plugin-testing-library": "^5.2.0",
|
"eslint-plugin-testing-library": "^5.2.0",
|
||||||
"eslint-plugin-unused-imports": "^2.0.0",
|
"eslint-plugin-unused-imports": "^2.0.0",
|
||||||
"jest": "^27.5.1",
|
"jest": "^28.1.0",
|
||||||
"prettier": "^2.6.2",
|
"prettier": "^2.6.2",
|
||||||
"storybook-addon-mock": "^2.3.2",
|
"require-from-string": "^2.0.2",
|
||||||
"storybook-addon-turbo-build": "^1.1.0",
|
"typescript": "4.6.4"
|
||||||
"storybook-dark-mode": "^1.0.9",
|
|
||||||
"ts-jest": "^27.1.4",
|
|
||||||
"typescript": "4.6.3"
|
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"@types/react": "17.0.30"
|
"@types/react": "17.0.30"
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ function MediaDisplay(props: { media: IMedia }) {
|
|||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<Group direction="column">
|
<Group direction="column">
|
||||||
<Group>
|
<Group noWrap>
|
||||||
<Title order={3}>{media.title}</Title>
|
<Title order={3}>{media.title}</Title>
|
||||||
<Anchor href={`https://www.imdb.com/title/${media.imdbId}`} target="_blank">
|
<Anchor href={`https://www.imdb.com/title/${media.imdbId}`} target="_blank">
|
||||||
<ActionIcon>
|
<ActionIcon>
|
||||||
@@ -48,7 +48,9 @@ function MediaDisplay(props: { media: IMedia }) {
|
|||||||
Season {media.seasonNumber} episode {media.episodeNumber}
|
Season {media.seasonNumber} episode {media.episodeNumber}
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
<Text align="justify">{media.overview}</Text>
|
<Text lineClamp={12} align="justify">
|
||||||
|
{media.overview}
|
||||||
|
</Text>
|
||||||
</Group>
|
</Group>
|
||||||
{/*Add the genres at the bottom of the poster*/}
|
{/*Add the genres at the bottom of the poster*/}
|
||||||
<Group>
|
<Group>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export default function SearchBar(props: any) {
|
|||||||
const { config, setConfig } = useConfig();
|
const { config, setConfig } = useConfig();
|
||||||
const [opened, setOpened] = useState(false);
|
const [opened, setOpened] = useState(false);
|
||||||
const [icon, setIcon] = useState(<Search />);
|
const [icon, setIcon] = useState(<Search />);
|
||||||
const queryUrl = config.settings.searchUrl || 'https://www.google.com/search?q=';
|
const queryUrl = config.settings.searchUrl ?? 'https://www.google.com/search?q=';
|
||||||
const textInput = useRef<HTMLInputElement>();
|
const textInput = useRef<HTMLInputElement>();
|
||||||
useHotkeys([['ctrl+K', () => textInput.current && textInput.current.focus()]]);
|
useHotkeys([['ctrl+K', () => textInput.current && textInput.current.focus()]]);
|
||||||
|
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
import { Button } from '@mantine/core';
|
|
||||||
import { Prism } from '@mantine/prism';
|
|
||||||
import { useState } from 'react';
|
|
||||||
import { DateModule } from '../components/modules';
|
|
||||||
import { useConfig } from '../tools/state';
|
|
||||||
|
|
||||||
export default function TryConfig(props: any) {
|
|
||||||
const { config } = useConfig();
|
|
||||||
const [tempConfig, setTempConfig] = useState(config);
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Prism language="json">{JSON.stringify(tempConfig, null, 2)}</Prism>
|
|
||||||
<Button
|
|
||||||
onClick={() => {
|
|
||||||
setTempConfig({
|
|
||||||
...tempConfig,
|
|
||||||
modules: {
|
|
||||||
[DateModule.title]: {
|
|
||||||
enabled: true,
|
|
||||||
title: DateModule.title,
|
|
||||||
options: {
|
|
||||||
...DateModule.options,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Add a module to the modules thingy
|
|
||||||
</Button>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user