Compare commits
110 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7618bc4e1f | ||
|
|
7937a16a9d | ||
|
|
f3de28642f | ||
|
|
664374e9cc | ||
|
|
d32c384232 | ||
|
|
81149369df | ||
|
|
5b453c829e | ||
|
|
efd564d6db | ||
|
|
35df8c6d26 | ||
|
|
a822e44b16 | ||
|
|
4a0a717d99 | ||
|
|
b95453b614 | ||
|
|
c587bd4bf1 | ||
|
|
770b19243d | ||
|
|
3cbc7683e8 | ||
|
|
7040760a84 | ||
|
|
ff2fd2febd | ||
|
|
84b7d4bbdc | ||
|
|
98e4da5a3b | ||
|
|
3ce9c98e03 | ||
|
|
91f636ca97 | ||
|
|
e61e986028 | ||
|
|
85a863e1eb | ||
|
|
fce9b297df | ||
|
|
e3af7629aa | ||
|
|
5dee33284d | ||
|
|
cc3e1ce848 | ||
|
|
74e735608f | ||
|
|
f2f2a3df39 | ||
|
|
bb61a19c16 | ||
|
|
2c225c308d | ||
|
|
153693b3e8 | ||
|
|
a1094be40b | ||
|
|
bcb9669e44 | ||
|
|
07c088507d | ||
|
|
d5377423b1 | ||
|
|
e38c4f6be0 | ||
|
|
8469d1c477 | ||
|
|
99a9aef4a3 | ||
|
|
8f3ba2a709 | ||
|
|
4c042ccb05 | ||
|
|
8ae8cb7d5a | ||
|
|
0b34abc7d5 | ||
|
|
07869ae3ed | ||
|
|
91a6b6972a | ||
|
|
9a6607f736 | ||
|
|
36e308d11d | ||
|
|
9597a8bb93 | ||
|
|
fac7dd1fae | ||
|
|
d7a052c1b1 | ||
|
|
bdb9711c19 | ||
|
|
1f6b2756c4 | ||
|
|
3db65dbb1f | ||
|
|
0c7606793a | ||
|
|
5d01fb353b | ||
|
|
49241f5614 | ||
|
|
9282ea5f0f | ||
|
|
92e4474269 | ||
|
|
d2ca47f761 | ||
|
|
7493d83147 | ||
|
|
86590e7279 | ||
|
|
c914b54a43 | ||
|
|
d05d9b6e81 | ||
|
|
161319ea4e | ||
|
|
22564e5593 | ||
|
|
a5b3ccc756 | ||
|
|
838fc3ae3a | ||
|
|
16ffd545a6 | ||
|
|
79311b794e | ||
|
|
7b6ecdf3fc | ||
|
|
a3d6d876a8 | ||
|
|
45cb417e76 | ||
|
|
c8cbb37247 | ||
|
|
4210a455c6 | ||
|
|
7ba85aeb4e | ||
|
|
49e454b6ce | ||
|
|
f526883544 | ||
|
|
a4163e0eb5 | ||
|
|
ef0d4fddce | ||
|
|
60cc1883ff | ||
|
|
47c7f46e28 | ||
|
|
80ab928c20 | ||
|
|
846f2c8670 | ||
|
|
d58465142c | ||
|
|
a7f4187a82 | ||
|
|
b92462d056 | ||
|
|
034ef3fd8f | ||
|
|
d5b17d5303 | ||
|
|
f03bcde983 | ||
|
|
f3478587b1 | ||
|
|
2c461a6695 | ||
|
|
1245f97e72 | ||
|
|
55fd4fff76 | ||
|
|
b52755c87f | ||
|
|
a0d86e2914 | ||
|
|
5d80d36be3 | ||
|
|
72f19d450c | ||
|
|
6024391414 | ||
|
|
905f445641 | ||
|
|
2462671700 | ||
|
|
0c0f8247d8 | ||
|
|
fa45eb3b3b | ||
|
|
b8ce86d783 | ||
|
|
cc58fbe263 | ||
|
|
524c143a60 | ||
|
|
50448c9fb6 | ||
|
|
0f1a948682 | ||
|
|
8f71c898a2 | ||
|
|
7be22833b0 | ||
|
|
43c0465e52 |
6
.dockerignore
Normal file
6
.dockerignore
Normal file
@@ -0,0 +1,6 @@
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
node_modules
|
||||
npm-debug.log
|
||||
README.md
|
||||
.git
|
||||
52
.github/ISSUE_TEMPLATE/bug.yml
vendored
Normal file
52
.github/ISSUE_TEMPLATE/bug.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
name: 🐛 Bug Report
|
||||
description: Report something that's broken, or not working like intented!
|
||||
title: '[🐛 Bug] <title>'
|
||||
labels: ['🐛 Bug']
|
||||
assignees:
|
||||
- ajnart
|
||||
body:
|
||||
- type: dropdown
|
||||
id: environment
|
||||
attributes:
|
||||
label: Environment
|
||||
description: How have you deployed Homarr?
|
||||
options:
|
||||
- Docker
|
||||
- NodeJS
|
||||
- Cloud Service (Static)
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: Version
|
||||
description: What version of Homarr are you running?
|
||||
placeholder: 0.1.0
|
||||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: repro
|
||||
attributes:
|
||||
label: Describe the problem
|
||||
description: Please describe the problem exactly, how to reproduce it, actual results, and expected results.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Additional info
|
||||
description: Logs? Screenshots? More info?
|
||||
validations:
|
||||
required: false
|
||||
- type: checkboxes
|
||||
id: idiot-check
|
||||
attributes:
|
||||
label: Please tick the boxes
|
||||
description: Before submitting, please ensure that
|
||||
options:
|
||||
- label: You've read the [docs](https://github.com/ajnart/homarr#readme)
|
||||
required: true
|
||||
- label: You've checked for [duplicate issues](https://github.com/ajnart/homarr/issues)
|
||||
required: true
|
||||
- label: You've tried to debug yourself
|
||||
required: true
|
||||
25
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
Normal file
25
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: ✨ Feature Request
|
||||
description: Request a feature to help improve Homarr!
|
||||
title: '[✨ Feature] <title>'
|
||||
labels: ['✨ Feature']
|
||||
assignees:
|
||||
- ajnart
|
||||
body:
|
||||
- type: textarea
|
||||
id: feature
|
||||
attributes:
|
||||
label: Describe the feature you would like to see
|
||||
placeholder: An outline of the feature you would like to see implemented, include as much detail as possible!
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: priority
|
||||
attributes:
|
||||
label: Priority
|
||||
description: How urgent is the development of this feature?
|
||||
options:
|
||||
- Low (Nice-to-have)
|
||||
- Medium (Would be very useful)
|
||||
- High (App breaking feature)
|
||||
validations:
|
||||
required: true
|
||||
115
.github/workflows/docker.yml
vendored
115
.github/workflows/docker.yml
vendored
@@ -1,12 +1,13 @@
|
||||
name: Demo Push
|
||||
name: Build and publish Docker image
|
||||
|
||||
on:
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
IMAGE_NAME: mhp
|
||||
IMAGE_NAME: homarr
|
||||
|
||||
jobs:
|
||||
# Push image to GitHub Packages.
|
||||
@@ -14,51 +15,93 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/setup-node@v3
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup
|
||||
uses: actions/setup-node@v3
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- name: Yarn cache
|
||||
uses: actions/cache@v3
|
||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: ${{ runner.os }}-yarn-
|
||||
- name: Nextjs cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
# See here for caching with `yarn` https://github.com/actions/cache/blob/main/examples.md#node---yarn or you can leverage caching with actions/setup-node https://github.com/actions/setup-node
|
||||
path: |
|
||||
~/.npm
|
||||
${{ github.workspace }}/.next/cache
|
||||
# Generate a new cache whenever packages or source files change.
|
||||
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
|
||||
# If source files changed but packages didn't, rebuild from a prior cache.
|
||||
restore-keys: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
|
||||
- run: yarn install --frozen-lockfile
|
||||
- run: yarn export
|
||||
- uses: actions/cache@v2
|
||||
- run: yarn build
|
||||
- name: Cache build output
|
||||
uses: actions/cache@v2
|
||||
id: restore-build
|
||||
with:
|
||||
path: ./out/
|
||||
path: |
|
||||
./next.config.js
|
||||
./pages/
|
||||
./public/
|
||||
./.next/static/
|
||||
./.next/standalone/
|
||||
./packages.jsan
|
||||
key: ${{ github.sha }}
|
||||
|
||||
push:
|
||||
runs-on: ubuntu-latest
|
||||
docker:
|
||||
needs: [build]
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
packages: write
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- uses: actions/cache@v2
|
||||
id: restore-build
|
||||
with:
|
||||
path: ./out/
|
||||
path: |
|
||||
./next.config.js
|
||||
./pages/
|
||||
./public/
|
||||
./.next/static/
|
||||
./.next/standalone/
|
||||
./packages.jsan
|
||||
key: ${{ github.sha }}
|
||||
- name: Build image
|
||||
run: docker build . --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
# list of Docker images to use as base name for tags
|
||||
images: ghcr.io/${{ github.repository }}
|
||||
# generate Docker tags based on the following events/attributes
|
||||
tags: |
|
||||
type=raw,value=latest
|
||||
type=pep440,pattern={{version}}
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Login to GHCR
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Log in to registry
|
||||
|
||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
|
||||
- name: Push image
|
||||
run: |
|
||||
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
|
||||
|
||||
# Change all uppercase to lowercase
|
||||
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
|
||||
# Strip git ref prefix from version
|
||||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
||||
# Strip "v" prefix from tag name
|
||||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
|
||||
# Use Docker `latest` tag convention
|
||||
[ "$VERSION" == "master" ] && VERSION=latest
|
||||
echo IMAGE_ID=$IMAGE_ID
|
||||
echo VERSION=$VERSION
|
||||
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
|
||||
docker push $IMAGE_ID:$VERSION
|
||||
docker tag $IMAGE_NAME $IMAGE_ID:latest
|
||||
docker push $IMAGE_ID:latest
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
9
.prettierrc
Normal file
9
.prettierrc
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"printWidth": 100,
|
||||
"tabWidth": 2,
|
||||
"parser": "typescript",
|
||||
"singleQuote": true,
|
||||
"trailingComma": "es5",
|
||||
"useTabs": false,
|
||||
"endOfLine": "lf"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
module.exports = require('eslint-config-mantine/.prettierrc.js');
|
||||
22
Dockerfile
22
Dockerfile
@@ -1,2 +1,20 @@
|
||||
FROM nginx:1.21.6
|
||||
COPY ./out /usr/share/nginx/html
|
||||
FROM node:16-alpine
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV production
|
||||
RUN addgroup --system --gid 1001 nodejs
|
||||
RUN adduser --system --uid 1001 nextjs
|
||||
|
||||
COPY /next.config.js ./
|
||||
COPY /public ./public
|
||||
COPY /package.json ./package.json
|
||||
|
||||
# Automatically leverage output traces to reduce image size
|
||||
# https://nextjs.org/docs/advanced-features/output-file-tracing
|
||||
COPY --chown=nextjs:nodejs /.next/standalone ./
|
||||
COPY --chown=nextjs:nodejs /.next/static ./.next/static
|
||||
|
||||
USER nextjs
|
||||
EXPOSE 7575
|
||||
ENV PORT 7575
|
||||
VOLUME /app/data/configs
|
||||
CMD ["node", "server.js"]
|
||||
|
||||
110
README.md
110
README.md
@@ -1,32 +1,86 @@
|
||||
# MyHomePage, a home page for your home server
|
||||
Join the discord ! : https://discord.gg/C2WTXkzkwK
|
||||
## What is MyHomePage ?
|
||||
<p align = "center">
|
||||
<h3 align = "center"> Homarr <h3>
|
||||
|
||||
HomePage is a web page for your home server, it provides a user friendly interface to access docker containers or other services.
|
||||
<p align = "center">
|
||||
A homepage for <i>your</i> server.
|
||||
<br/>
|
||||
<a href = "https://github.com/ajnart/homarr/deployments/activity_log?environment=Production" > <strong> Demo ↗️ </strong> </a> • <a href = "#install" > <strong> Install ➡️ </strong> </a>
|
||||
<br />
|
||||
<br />
|
||||
<a href = "https://discord.gg/aCsmEV5RgA" > <img src="https://discordapp.com/api/guilds/972958686051962910/widget.png?style=shield" > </a>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
## Install
|
||||
### Docker installation
|
||||
Required : Docker
|
||||
#### Standard docker install
|
||||
To install the MyHomePage docker image simply execute ``docker pull ajnart/mhp``
|
||||
To run the docker file ``docker run --name my-home-page -p 7575:80 -d ajnart/mhp``
|
||||
# 📃 Table of Contents
|
||||
- [📃 Table of Contents](#-table-of-contents)
|
||||
- [🚀 Getting Started](#-getting-started)
|
||||
- [ℹ️ About](#ℹ️-about)
|
||||
- [⚡ Installation](#-installation)
|
||||
- [Deploying from Docker Image 🐳](#deploying-from-docker-image-)
|
||||
- [Building from Source 🛠️](#building-from-source-️)
|
||||
- [💖 Contributing](#-contributing)
|
||||
|
||||
*Note: Currently the port used is 80 (Nginx default port) It will change to be 7575 by default*
|
||||
#### Docker compose
|
||||
Here's a docker compose example on how to integrate MHP into your container stack
|
||||
```docker
|
||||
services:
|
||||
mhp:
|
||||
image: ajnart/mhp
|
||||
ports:
|
||||
- '7575:80'
|
||||
restart: always
|
||||
<!-- Getting Started -->
|
||||
# 🚀 Getting Started
|
||||
|
||||
## ℹ️ About
|
||||
|
||||
Homarr is a simple and lightweight homepage for your server, that helps you easily access all of your services in one place.
|
||||
|
||||
**[⤴️ Back to Top](#-table-of-contents)**
|
||||
|
||||
## ⚡ Installation
|
||||
|
||||
### Deploying from Docker Image 🐳
|
||||
> Supported architectures: x86-64, ARM, ARM64
|
||||
|
||||
_Requirements_:
|
||||
- [Docker](https://docs.docker.com/get-docker/)
|
||||
|
||||
**Standard Docker Install**
|
||||
```sh
|
||||
docker run --name homarr -p 7575:7575 -d ghcr.io/ajnart/homarr
|
||||
```
|
||||
### Local installation
|
||||
Required: Node (LTS)
|
||||
#### Install using node
|
||||
To install MyHomePage locally:
|
||||
- Clone the source code or download it.
|
||||
- Execute ``npm install`` or ``yarn install`` *(prefered)* to install the dependencies
|
||||
- Execute ``yarn export`` to build the source code into the final HTML pages in the ``./out`` folder
|
||||
- Run a web server to serve the content of the ``./out`` folder. Example: ``python -m http.server 7575 --directory out``
|
||||
|
||||
**Docker Compose**
|
||||
```yml
|
||||
---
|
||||
version: '3'
|
||||
#--------------------------------------------------------------------------------------------#
|
||||
# Homarr - A homepage for your server. #
|
||||
#--------------------------------------------------------------------------------------------#
|
||||
services:
|
||||
homarr:
|
||||
container_name: homarr
|
||||
image: ghcr.io/ajnart/homarr
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- '7575:7575'
|
||||
```
|
||||
|
||||
### Building from Source 🛠️
|
||||
|
||||
_Requirements_:
|
||||
- [Git](https://git-scm.com/downloads)
|
||||
- [NodeJS](https://nodejs.org/en/) _(Latest or LTS)_
|
||||
- [Yarn](https://yarnpkg.com/)
|
||||
- Some web server
|
||||
|
||||
**Installing**
|
||||
|
||||
- Clone the GitHub repo: `git clone https://github.com/ajnart/homarr.git` & `cd homarr`
|
||||
- Install all dependencies: `yarn install`
|
||||
- Build the source: `yarn export`
|
||||
- Start a web server (Any web server will work):
|
||||
- _Examples:_
|
||||
- NodeJS serve: `npm i -g serve` or `yarn global add serve` & `serve ./out`
|
||||
- python http.server: `python -m http.server 7474 --directory out`
|
||||
|
||||
**[⤴️ Back to Top](#-table-of-contents)**
|
||||
|
||||
# 💖 Contributing
|
||||
You can contribute by [Starting a discussion](https://github.com/ajnart/homarr/discussions), [Submitting Bugs](https://github.com/ajnart/homarr/issues/new), [Requesting Features](https://github.com/ajnart/homarr/issues/new), or [Making a pull request](https://github.com/ajnart/homarr/compare)!
|
||||
|
||||
All contributions are highly appreciated.
|
||||
|
||||
**[⤴️ Back to Top](#-table-of-contents)**
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import {
|
||||
useMantineTheme,
|
||||
Modal,
|
||||
Center,
|
||||
Group,
|
||||
@@ -10,19 +9,18 @@ import {
|
||||
AspectRatio,
|
||||
Text,
|
||||
Card,
|
||||
LoadingOverlay,
|
||||
} from '@mantine/core';
|
||||
import { useForm } from '@mantine/hooks';
|
||||
import { UseForm } from '@mantine/hooks/lib/use-form/use-form';
|
||||
import { useForm } from '@mantine/form';
|
||||
import { motion } from 'framer-motion';
|
||||
import { useState } from 'react';
|
||||
import { Apps } from 'tabler-icons-react';
|
||||
import { useConfig } from '../../tools/state';
|
||||
import { ServiceTypeList } from '../../tools/types';
|
||||
import { AppShelfItemWrapper } from './AppShelfItemWrapper';
|
||||
|
||||
export default function AddItemShelfItem(props: any) {
|
||||
const { addService } = useConfig();
|
||||
const [opened, setOpened] = useState(false);
|
||||
const theme = useMantineTheme();
|
||||
return (
|
||||
<>
|
||||
<Modal
|
||||
@@ -34,55 +32,55 @@ export default function AddItemShelfItem(props: any) {
|
||||
>
|
||||
<AddAppShelfItemForm setOpened={setOpened} />
|
||||
</Modal>
|
||||
<AspectRatio
|
||||
style={{
|
||||
minHeight: 120,
|
||||
minWidth: 120,
|
||||
}}
|
||||
ratio={4 / 3}
|
||||
>
|
||||
<Card
|
||||
style={{
|
||||
backgroundColor:
|
||||
theme.colorScheme === 'dark' ? theme.colors.dark[5] : theme.colors.gray[1],
|
||||
width: 200,
|
||||
height: 180,
|
||||
}}
|
||||
radius="md"
|
||||
>
|
||||
<Group direction="column" position="center">
|
||||
<motion.div whileHover={{ scale: 1.2 }}>
|
||||
<Apps style={{ cursor: 'pointer' }} onClick={() => setOpened(true)} size={60} />
|
||||
</motion.div>
|
||||
<Text>Add Service</Text>
|
||||
<AppShelfItemWrapper>
|
||||
<Card.Section>
|
||||
<Group position="center" mx="lg">
|
||||
<Text
|
||||
// TODO: #1 Remove this hack to get the text to be centered.
|
||||
ml={15}
|
||||
style={{
|
||||
alignSelf: 'center',
|
||||
alignContent: 'center',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
justifyItems: 'center',
|
||||
}}
|
||||
mt="sm"
|
||||
weight={500}
|
||||
>
|
||||
Add a service
|
||||
</Text>
|
||||
</Group>
|
||||
</Card>
|
||||
</AspectRatio>
|
||||
</Card.Section>
|
||||
<Card.Section>
|
||||
<AspectRatio ratio={5 / 3} m="xl">
|
||||
<motion.i
|
||||
whileHover={{
|
||||
cursor: 'pointer',
|
||||
scale: 1.1,
|
||||
}}
|
||||
>
|
||||
<Apps style={{ cursor: 'pointer' }} onClick={() => setOpened(true)} size={60} />
|
||||
</motion.i>
|
||||
</AspectRatio>
|
||||
</Card.Section>
|
||||
</AppShelfItemWrapper>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function MatchIcon(
|
||||
name: string,
|
||||
form: UseForm<{
|
||||
type: any;
|
||||
name: any;
|
||||
icon: any;
|
||||
url: any;
|
||||
apiKey: any;
|
||||
}>
|
||||
) {
|
||||
// TODO: In order to avoid all the requests, we could fetch
|
||||
// https://data.jsdelivr.com/v1/package/gh/IceWhaleTech/AppIcon@main
|
||||
// and then iterate over the files -> files -> name and then remove the extension (.png)
|
||||
// Compare it to the input and then fetch the icon
|
||||
fetch(`https://cdn.jsdelivr.net/gh/IceWhaleTech/AppIcon@main/all/${name.toLowerCase()}.png`)
|
||||
function MatchIcon(name: string, form: any) {
|
||||
fetch(
|
||||
`https://cdn.jsdelivr.net/gh/walkxhub/dashboard-icons/png/${name
|
||||
.replace(/\s+/g, '-')
|
||||
.toLowerCase()}.png`
|
||||
)
|
||||
.then((res) => {
|
||||
if (res.status === 200) {
|
||||
form.setFieldValue('icon', res.url);
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
.catch(() => {
|
||||
// Do nothing
|
||||
});
|
||||
|
||||
@@ -91,7 +89,9 @@ function MatchIcon(
|
||||
|
||||
export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } & any) {
|
||||
const { setOpened } = props;
|
||||
const { addService, config, setConfig } = useConfig();
|
||||
const { config, setConfig } = useConfig();
|
||||
const [isLoading, setLoading] = useState(false);
|
||||
|
||||
const form = useForm({
|
||||
initialValues: {
|
||||
type: props.type ?? 'Other',
|
||||
@@ -100,6 +100,23 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } &
|
||||
url: props.url ?? '',
|
||||
apiKey: props.apiKey ?? (undefined as unknown as string),
|
||||
},
|
||||
validate: {
|
||||
apiKey: () => null,
|
||||
// Validate icon with a regex
|
||||
icon: (value: string) => {
|
||||
if (!value.match(/^https?:\/\/.+\.(png|jpg|jpeg|gif)$/)) {
|
||||
return 'Please enter a valid icon URL';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
// Validate url with a regex http/https
|
||||
url: (value: string) => {
|
||||
if (!value.match(/^https?:\/\/.+\/$/)) {
|
||||
return 'Please enter a valid URL (that ends with a /)';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
return (
|
||||
@@ -123,7 +140,10 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } &
|
||||
}),
|
||||
});
|
||||
} else {
|
||||
addService(form.values);
|
||||
setConfig({
|
||||
...config,
|
||||
services: [...config.services, form.values],
|
||||
});
|
||||
}
|
||||
setOpened(false);
|
||||
form.reset();
|
||||
@@ -142,44 +162,40 @@ export function AddAppShelfItemForm(props: { setOpened: (b: boolean) => void } &
|
||||
form.setFieldValue('icon', match);
|
||||
}
|
||||
}}
|
||||
error={form.errors.name && 'Invalid name'}
|
||||
error={form.errors.name && 'Invalid icon url'}
|
||||
/>
|
||||
|
||||
<TextInput
|
||||
required
|
||||
label="Icon url"
|
||||
placeholder="https://i.gifer.com/ANPC.gif"
|
||||
value={form.values.icon}
|
||||
onChange={(event) => {
|
||||
form.setFieldValue('icon', event.currentTarget.value);
|
||||
}}
|
||||
error={form.errors.icon && 'Icon url is invalid'}
|
||||
{...form.getInputProps('icon')}
|
||||
/>
|
||||
<TextInput
|
||||
required
|
||||
label="Service url"
|
||||
placeholder="http://localhost:8989"
|
||||
value={form.values.url}
|
||||
onChange={(event) => form.setFieldValue('url', event.currentTarget.value)}
|
||||
error={form.errors.url && 'Service url is invalid'}
|
||||
{...form.getInputProps('url')}
|
||||
/>
|
||||
<Select
|
||||
label="Select the type of service (used for API calls)"
|
||||
defaultValue="Other"
|
||||
placeholder="Pick one"
|
||||
value={form.values.type}
|
||||
required
|
||||
searchable
|
||||
onChange={(value) => form.setFieldValue('type', value ?? 'Other')}
|
||||
data={ServiceTypeList}
|
||||
{...form.getInputProps('type')}
|
||||
/>
|
||||
<LoadingOverlay visible={isLoading} />
|
||||
{(form.values.type === 'Sonarr' || form.values.type === 'Radarr') && (
|
||||
<TextInput
|
||||
required
|
||||
label="API key"
|
||||
placeholder="Your API key"
|
||||
value={form.values.apiKey}
|
||||
onChange={(event) => form.setFieldValue('apiKey', event.currentTarget.value)}
|
||||
onChange={(event) => {
|
||||
form.setFieldValue('apiKey', event.currentTarget.value);
|
||||
}}
|
||||
error={form.errors.apiKey && 'Invalid API key'}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -1,52 +1,18 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import React, { useState } from 'react';
|
||||
import { motion } from 'framer-motion';
|
||||
import {
|
||||
Text,
|
||||
AspectRatio,
|
||||
createStyles,
|
||||
SimpleGrid,
|
||||
Card,
|
||||
useMantineTheme,
|
||||
Image,
|
||||
Group,
|
||||
Space,
|
||||
} from '@mantine/core';
|
||||
import AppShelfMenu from './AppShelfMenu';
|
||||
import AddItemShelfItem from './AddAppShelfItem';
|
||||
import { Text, AspectRatio, SimpleGrid, Card, Image, Group, Space } from '@mantine/core';
|
||||
import { useConfig } from '../../tools/state';
|
||||
import { pingQbittorrent } from '../../tools/api';
|
||||
import { serviceItem } from '../../tools/types';
|
||||
import AddItemShelfItem from './AddAppShelfItem';
|
||||
import { AppShelfItemWrapper } from './AppShelfItemWrapper';
|
||||
import AppShelfMenu from './AppShelfMenu';
|
||||
|
||||
const useStyles = createStyles((theme) => ({
|
||||
main: {
|
||||
backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[5] : theme.colors.gray[1],
|
||||
//TODO: #3 Fix this temporary fix and make the width and height dynamic / responsive
|
||||
width: 200,
|
||||
height: 180,
|
||||
},
|
||||
}));
|
||||
|
||||
const AppShelf = (props: any) => {
|
||||
const { config, addService, removeService, setConfig } = useConfig();
|
||||
|
||||
/* A hook that is used to load the config from local storage. */
|
||||
useEffect(() => {
|
||||
const localConfig = localStorage.getItem('config');
|
||||
if (localConfig) {
|
||||
setConfig(JSON.parse(localConfig));
|
||||
}
|
||||
}, []);
|
||||
if (config.services && config.services.length === 0) {
|
||||
config.services.forEach((service) => {
|
||||
if (service.type === 'qBittorrent') {
|
||||
pingQbittorrent(service);
|
||||
}
|
||||
});
|
||||
}
|
||||
const AppShelf = () => {
|
||||
const { config } = useConfig();
|
||||
|
||||
return (
|
||||
<SimpleGrid m="xl" cols={5} spacing="xl">
|
||||
{config.services.map((service, i) => (
|
||||
{config.services.map((service) => (
|
||||
<AppShelfItem key={service.name} service={service} />
|
||||
))}
|
||||
<AddItemShelfItem />
|
||||
@@ -56,27 +22,18 @@ const AppShelf = (props: any) => {
|
||||
|
||||
export function AppShelfItem(props: any) {
|
||||
const { service }: { service: serviceItem } = props;
|
||||
const theme = useMantineTheme();
|
||||
const { removeService } = useConfig();
|
||||
const { classes } = useStyles();
|
||||
const [hovering, setHovering] = useState(false);
|
||||
return (
|
||||
<motion.div
|
||||
key={service.name}
|
||||
onHoverStart={(e) => {
|
||||
onHoverStart={() => {
|
||||
setHovering(true);
|
||||
}}
|
||||
onHoverEnd={(e) => {
|
||||
onHoverEnd={() => {
|
||||
setHovering(false);
|
||||
}}
|
||||
>
|
||||
<Card
|
||||
className={classes.main}
|
||||
style={{
|
||||
boxShadow: hovering ? '0px 0px 3px rgba(0, 0, 0, 0.5)' : '0px 0px 1px rgba(0, 0, 0, 0.5)',
|
||||
}}
|
||||
radius="md"
|
||||
>
|
||||
<AppShelfItemWrapper hovering={hovering}>
|
||||
<Card.Section>
|
||||
<Group position="apart" mx="lg">
|
||||
<Space />
|
||||
@@ -103,7 +60,7 @@ export function AppShelfItem(props: any) {
|
||||
opacity: hovering ? 1 : 0,
|
||||
}}
|
||||
>
|
||||
<AppShelfMenu service={service} removeitem={removeService} />
|
||||
<AppShelfMenu service={service} />
|
||||
</motion.div>
|
||||
</Group>
|
||||
</Card.Section>
|
||||
@@ -128,7 +85,7 @@ export function AppShelfItem(props: any) {
|
||||
</motion.i>
|
||||
</AspectRatio>
|
||||
</Card.Section>
|
||||
</Card>
|
||||
</AppShelfItemWrapper>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
|
||||
21
components/AppShelf/AppShelfItemWrapper.tsx
Normal file
21
components/AppShelf/AppShelfItemWrapper.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import { useMantineTheme, Card } from '@mantine/core';
|
||||
|
||||
export function AppShelfItemWrapper(props: any) {
|
||||
const { children, hovering } = props;
|
||||
const theme = useMantineTheme();
|
||||
return (
|
||||
<Card
|
||||
style={{
|
||||
boxShadow: hovering ? '0px 0px 3px rgba(0, 0, 0, 0.5)' : '0px 0px 1px rgba(0, 0, 0, 0.5)',
|
||||
backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[6] : theme.colors.gray[1],
|
||||
|
||||
//TODO: #3 Fix this temporary fix and make the width and height dynamic / responsive
|
||||
width: 200,
|
||||
height: 180,
|
||||
}}
|
||||
radius="md"
|
||||
>
|
||||
{children}
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
@@ -2,10 +2,12 @@ import { Menu, Modal, Text } from '@mantine/core';
|
||||
import { showNotification } from '@mantine/notifications';
|
||||
import { useState } from 'react';
|
||||
import { Check, Edit, Trash } from 'tabler-icons-react';
|
||||
import { useConfig } from '../../tools/state';
|
||||
import { AddAppShelfItemForm } from './AddAppShelfItem';
|
||||
|
||||
export default function AppShelfMenu(props: any) {
|
||||
const { service, removeitem: removeItem } = props;
|
||||
const { service } = props;
|
||||
const { config, setConfig } = useConfig();
|
||||
const [opened, setOpened] = useState(false);
|
||||
return (
|
||||
<>
|
||||
@@ -40,7 +42,10 @@ export default function AppShelfMenu(props: any) {
|
||||
<Menu.Item
|
||||
color="red"
|
||||
onClick={(e: any) => {
|
||||
removeItem(service.name);
|
||||
setConfig({
|
||||
...config,
|
||||
services: config.services.filter((s) => s.name !== service.name),
|
||||
});
|
||||
showNotification({
|
||||
autoClose: 5000,
|
||||
title: (
|
||||
|
||||
45
components/ColorSchemeToggle/ColorSchemeSwitch.tsx
Normal file
45
components/ColorSchemeToggle/ColorSchemeSwitch.tsx
Normal file
@@ -0,0 +1,45 @@
|
||||
import React from 'react';
|
||||
import { createStyles, Switch, Group, useMantineColorScheme } from '@mantine/core';
|
||||
import { Sun, MoonStars } from 'tabler-icons-react';
|
||||
|
||||
const useStyles = createStyles((theme) => ({
|
||||
root: {
|
||||
position: 'relative',
|
||||
'& *': {
|
||||
cursor: 'pointer',
|
||||
},
|
||||
},
|
||||
|
||||
icon: {
|
||||
pointerEvents: 'none',
|
||||
position: 'absolute',
|
||||
zIndex: 1,
|
||||
top: 3,
|
||||
},
|
||||
|
||||
iconLight: {
|
||||
left: 4,
|
||||
color: theme.white,
|
||||
},
|
||||
|
||||
iconDark: {
|
||||
right: 4,
|
||||
color: theme.colors.gray[6],
|
||||
},
|
||||
}));
|
||||
|
||||
export function ColorSchemeSwitch() {
|
||||
const { colorScheme, toggleColorScheme } = useMantineColorScheme();
|
||||
const { classes, cx } = useStyles();
|
||||
|
||||
return (
|
||||
<Group>
|
||||
<div className={classes.root}>
|
||||
<Sun className={cx(classes.icon, classes.iconLight)} size={18} />
|
||||
<MoonStars className={cx(classes.icon, classes.iconDark)} size={18} />
|
||||
<Switch checked={colorScheme === 'dark'} onChange={() => toggleColorScheme()} size="md" />
|
||||
</div>
|
||||
Switch to {colorScheme === 'dark' ? 'light' : 'dark'} mode
|
||||
</Group>
|
||||
);
|
||||
}
|
||||
37
components/Config/ConfigChanger.tsx
Normal file
37
components/Config/ConfigChanger.tsx
Normal file
@@ -0,0 +1,37 @@
|
||||
import { Center, Loader, Select, Tooltip } from '@mantine/core';
|
||||
import { setCookies } from 'cookies-next';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useConfig } from '../../tools/state';
|
||||
|
||||
export default function ConfigChanger() {
|
||||
const { config, loadConfig, setConfig, getConfigs } = useConfig();
|
||||
const [configList, setConfigList] = useState([] as string[]);
|
||||
useEffect(() => {
|
||||
getConfigs().then((configs) => setConfigList(configs));
|
||||
// setConfig(initialConfig);
|
||||
}, [config]);
|
||||
// If configlist is empty, return a loading indicator
|
||||
if (configList.length === 0) {
|
||||
return (
|
||||
<Center>
|
||||
<Tooltip label={"Loading your configs. This doesn't load in vercel."}>
|
||||
<Loader />
|
||||
</Tooltip>
|
||||
</Center>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<Select
|
||||
defaultValue={config.name}
|
||||
label="Config loader"
|
||||
onChange={(e) => {
|
||||
loadConfig(e ?? 'default');
|
||||
setCookies('config-name', e ?? 'default', { maxAge: 60 * 60 * 24 * 30 });
|
||||
}}
|
||||
data={
|
||||
// If config list is empty, return the current config
|
||||
configList.length === 0 ? [config.name] : configList
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import { DropzoneStatus, FullScreenDropzone } from '@mantine/dropzone';
|
||||
import { showNotification } from '@mantine/notifications';
|
||||
import { useRef } from 'react';
|
||||
import { useRouter } from 'next/router';
|
||||
import { setCookies } from 'cookies-next';
|
||||
import { useConfig } from '../../tools/state';
|
||||
import { Config } from '../../tools/types';
|
||||
|
||||
@@ -48,7 +49,7 @@ export const dropzoneChildren = (status: DropzoneStatus, theme: MantineTheme) =>
|
||||
);
|
||||
|
||||
export default function LoadConfigComponent(props: any) {
|
||||
const { saveConfig, setConfig } = useConfig();
|
||||
const { setConfig } = useConfig();
|
||||
const theme = useMantineTheme();
|
||||
const router = useRouter();
|
||||
const openRef = useRef<() => void>();
|
||||
@@ -69,15 +70,21 @@ export default function LoadConfigComponent(props: any) {
|
||||
});
|
||||
return;
|
||||
}
|
||||
const newConfig: Config = JSON.parse(e);
|
||||
showNotification({
|
||||
autoClose: 5000,
|
||||
radius: 'md',
|
||||
title: <Text>Config loaded successfully</Text>,
|
||||
title: (
|
||||
<Text>
|
||||
Config <b>{newConfig.name}</b> loaded successfully
|
||||
</Text>
|
||||
),
|
||||
color: 'green',
|
||||
icon: <Check />,
|
||||
message: undefined,
|
||||
});
|
||||
setConfig(JSON.parse(e));
|
||||
setCookies('config-name', newConfig.name, { maxAge: 60 * 60 * 24 * 30 });
|
||||
setConfig(newConfig);
|
||||
});
|
||||
}}
|
||||
accept={['application/json']}
|
||||
|
||||
@@ -7,7 +7,7 @@ export default function SaveConfigComponent(props: any) {
|
||||
const { config } = useConfig();
|
||||
function onClick(e: any) {
|
||||
if (config) {
|
||||
fileDownload(JSON.stringify(config, null, '\t'), 'config.json');
|
||||
fileDownload(JSON.stringify(config, null, '\t'), `${config.name}.json`);
|
||||
}
|
||||
}
|
||||
return (
|
||||
|
||||
16
components/Config/SelectConfig.tsx
Normal file
16
components/Config/SelectConfig.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import { Select } from '@mantine/core';
|
||||
import { useState } from 'react';
|
||||
|
||||
export default function SelectConfig(props: any) {
|
||||
const [value, setValue] = useState<string | null>('');
|
||||
return (
|
||||
<Select
|
||||
value={value}
|
||||
onChange={setValue}
|
||||
data={[
|
||||
{ value: 'default', label: 'Default' },
|
||||
{ value: 'yourmom', label: 'Your mom' },
|
||||
]}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -48,7 +48,7 @@ export default function SearchBar(props: any) {
|
||||
if (isYoutube) {
|
||||
window.open(`https://www.youtube.com/results?search_query=${querry.substring(3)}`);
|
||||
} else if (isTorrent) {
|
||||
window.open(`https://thepiratebay.org/search.php?q=${querry.substring(3)}`);
|
||||
window.open(`https://bitsearch.to/search?q=${querry.substring(3)}`);
|
||||
} else {
|
||||
window.open(`${querryUrl}${values.querry}`);
|
||||
}
|
||||
|
||||
41
components/Settings/ModuleEnabler.tsx
Normal file
41
components/Settings/ModuleEnabler.tsx
Normal file
@@ -0,0 +1,41 @@
|
||||
import { Group, Switch } from '@mantine/core';
|
||||
import * as Modules from '../modules';
|
||||
import { useConfig } from '../../tools/state';
|
||||
|
||||
export default function ModuleEnabler(props: any) {
|
||||
const { config, setConfig } = useConfig();
|
||||
const modules = Object.values(Modules).map((module) => module);
|
||||
const enabledModules = config.settings.enabledModules ?? [];
|
||||
modules.filter((module) => enabledModules.includes(module.title));
|
||||
return (
|
||||
<Group direction="column">
|
||||
{modules.map((module) => (
|
||||
<Switch
|
||||
key={module.title}
|
||||
size="md"
|
||||
checked={enabledModules.includes(module.title)}
|
||||
label={`Enable ${module.title} module`}
|
||||
onChange={(e) => {
|
||||
if (e.currentTarget.checked) {
|
||||
setConfig({
|
||||
...config,
|
||||
settings: {
|
||||
...config.settings,
|
||||
enabledModules: [...enabledModules, module.title],
|
||||
},
|
||||
});
|
||||
} else {
|
||||
setConfig({
|
||||
...config,
|
||||
settings: {
|
||||
...config.settings,
|
||||
enabledModules: enabledModules.filter((m) => m !== module.title),
|
||||
},
|
||||
});
|
||||
}
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
</Group>
|
||||
);
|
||||
}
|
||||
@@ -7,14 +7,23 @@ import {
|
||||
Text,
|
||||
Tooltip,
|
||||
SegmentedControl,
|
||||
Indicator,
|
||||
Alert,
|
||||
} from '@mantine/core';
|
||||
import { useState } from 'react';
|
||||
import { Settings as SettingsIcon } from 'tabler-icons-react';
|
||||
import { useColorScheme } from '@mantine/hooks';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { AlertCircle, Settings as SettingsIcon } from 'tabler-icons-react';
|
||||
import { CURRENT_VERSION, REPO_URL } from '../../data/constants';
|
||||
import { useConfig } from '../../tools/state';
|
||||
import { ColorSchemeSwitch } from '../ColorSchemeToggle/ColorSchemeSwitch';
|
||||
import ConfigChanger from '../Config/ConfigChanger';
|
||||
import SaveConfigComponent from '../Config/SaveConfig';
|
||||
import ModuleEnabler from './ModuleEnabler';
|
||||
|
||||
function SettingsMenu(props: any) {
|
||||
const { config, setConfig } = useConfig();
|
||||
const colorScheme = useColorScheme();
|
||||
const { current, latest } = props;
|
||||
const matches = [
|
||||
{ label: 'Google', value: 'https://google.com/search?q=' },
|
||||
{ label: 'DuckDuckGo', value: 'https://duckduckgo.com/?q=' },
|
||||
@@ -22,12 +31,20 @@ function SettingsMenu(props: any) {
|
||||
];
|
||||
return (
|
||||
<Group direction="column" grow>
|
||||
<Alert
|
||||
icon={<AlertCircle size={16} />}
|
||||
title="Update available"
|
||||
radius="lg"
|
||||
hidden={current === latest}
|
||||
>
|
||||
Version {latest} is available. Current : {current}
|
||||
</Alert>
|
||||
<Group>
|
||||
<SegmentedControl
|
||||
title="Search engine"
|
||||
defaultValue={
|
||||
value={
|
||||
// Match config.settings.searchUrl with a key in the matches array
|
||||
matches.find((match) => match.value === config.settings.searchUrl)?.value || 'Google'
|
||||
matches.find((match) => match.value === config.settings.searchUrl)?.value ?? 'Google'
|
||||
}
|
||||
onChange={
|
||||
// Set config.settings.searchUrl to the value of the selected item
|
||||
@@ -46,6 +63,7 @@ function SettingsMenu(props: any) {
|
||||
</Group>
|
||||
<Group direction="column">
|
||||
<Switch
|
||||
size="md"
|
||||
onChange={(e) =>
|
||||
setConfig({
|
||||
...config,
|
||||
@@ -59,6 +77,9 @@ function SettingsMenu(props: any) {
|
||||
label="Enable search bar"
|
||||
/>
|
||||
</Group>
|
||||
<ModuleEnabler />
|
||||
<ColorSchemeSwitch />
|
||||
<ConfigChanger />
|
||||
<SaveConfigComponent />
|
||||
<Text
|
||||
style={{
|
||||
@@ -75,7 +96,20 @@ function SettingsMenu(props: any) {
|
||||
}
|
||||
|
||||
export function SettingsMenuButton(props: any) {
|
||||
const [update, setUpdate] = useState(false);
|
||||
const [opened, setOpened] = useState(false);
|
||||
const [latestVersion, setLatestVersion] = useState(CURRENT_VERSION);
|
||||
useEffect(() => {
|
||||
// Fetch Data here when component first mounted
|
||||
fetch(`https://api.github.com/repos/${REPO_URL}/releases/latest`).then((res) => {
|
||||
res.json().then((data) => {
|
||||
setLatestVersion(data.tag_name);
|
||||
if (data.tag_name !== CURRENT_VERSION) {
|
||||
setUpdate(true);
|
||||
}
|
||||
});
|
||||
});
|
||||
}, []);
|
||||
return (
|
||||
<>
|
||||
<Modal
|
||||
@@ -84,7 +118,7 @@ export function SettingsMenuButton(props: any) {
|
||||
opened={props.opened || opened}
|
||||
onClose={() => setOpened(false)}
|
||||
>
|
||||
<SettingsMenu />
|
||||
<SettingsMenu current={CURRENT_VERSION} latest={latestVersion} />
|
||||
</Modal>
|
||||
<ActionIcon
|
||||
variant="default"
|
||||
@@ -95,7 +129,14 @@ export function SettingsMenuButton(props: any) {
|
||||
onClick={() => setOpened(true)}
|
||||
>
|
||||
<Tooltip label="Settings">
|
||||
<SettingsIcon />
|
||||
<Indicator
|
||||
size={12}
|
||||
disabled={CURRENT_VERSION === latestVersion}
|
||||
offset={-3}
|
||||
position="top-end"
|
||||
>
|
||||
<SettingsIcon />
|
||||
</Indicator>
|
||||
</Tooltip>
|
||||
</ActionIcon>
|
||||
</>
|
||||
|
||||
18
components/layout/Aside.tsx
Normal file
18
components/layout/Aside.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Aside as MantineAside } from '@mantine/core';
|
||||
import { CalendarModule } from '../modules/calendar/CalendarModule';
|
||||
import ModuleWrapper from '../modules/moduleWrapper';
|
||||
|
||||
export default function Aside() {
|
||||
return (
|
||||
<MantineAside
|
||||
height="100%"
|
||||
hiddenBreakpoint="md"
|
||||
hidden
|
||||
width={{
|
||||
base: 'auto',
|
||||
}}
|
||||
>
|
||||
<ModuleWrapper module={CalendarModule} />
|
||||
</MantineAside>
|
||||
);
|
||||
}
|
||||
@@ -60,7 +60,7 @@ export function Footer({ links }: FooterCenteredProps) {
|
||||
>
|
||||
<Group className={classes.links}>{items}</Group>
|
||||
<Group spacing="xs" position="right" noWrap>
|
||||
<ActionIcon<'a'> component="a" href="https://github.com/ajnart/myhomepage" size="lg">
|
||||
<ActionIcon<'a'> component="a" href="https://github.com/ajnart/homarr" size="lg">
|
||||
<BrandGithub size={18} />
|
||||
</ActionIcon>
|
||||
</Group>
|
||||
|
||||
@@ -11,7 +11,6 @@ import {
|
||||
import { useBooleanToggle } from '@mantine/hooks';
|
||||
import { NextLink } from '@mantine/next';
|
||||
import { Logo } from './Logo';
|
||||
import { ColorSchemeToggle } from '../ColorSchemeToggle/ColorSchemeToggle';
|
||||
import { SettingsMenuButton } from '../Settings/SettingsMenu';
|
||||
import CalendarComponent from '../modules/calendar/CalendarModule';
|
||||
|
||||
@@ -119,7 +118,6 @@ export function Header({ links }: HeaderResponsiveProps) {
|
||||
<Head height={HEADER_HEIGHT} mb={10} className={classes.root}>
|
||||
<Container className={classes.header}>
|
||||
<Group>
|
||||
<ColorSchemeToggle />
|
||||
<NextLink style={{ textDecoration: 'none' }} href="/">
|
||||
<Logo style={{ fontSize: 22 }} />
|
||||
</NextLink>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { AppShell, Aside, Center, createStyles } from '@mantine/core';
|
||||
import { AppShell, Center, createStyles } from '@mantine/core';
|
||||
import { Header } from './Header';
|
||||
import { Footer } from './Footer';
|
||||
import CalendarComponent from '../modules/calendar/CalendarModule';
|
||||
import Aside from './Aside';
|
||||
import Navbar from './Navbar';
|
||||
|
||||
const useStyles = createStyles((theme) => ({
|
||||
main: {
|
||||
@@ -15,18 +16,8 @@ export default function Layout({ children, style }: any) {
|
||||
const { classes, cx } = useStyles();
|
||||
return (
|
||||
<AppShell
|
||||
aside={
|
||||
<Aside
|
||||
height="auto"
|
||||
hiddenBreakpoint="md"
|
||||
hidden
|
||||
width={{
|
||||
base: 'auto',
|
||||
}}
|
||||
>
|
||||
<CalendarComponent />
|
||||
</Aside>
|
||||
}
|
||||
navbar={<Navbar />}
|
||||
aside={<Aside />}
|
||||
header={<Header links={[]} />}
|
||||
footer={<Footer links={[]} />}
|
||||
>
|
||||
|
||||
@@ -9,7 +9,7 @@ export function Logo({ style }: any) {
|
||||
variant="gradient"
|
||||
gradient={{ from: 'red', to: 'orange', deg: 145 }}
|
||||
>
|
||||
MyHomePage
|
||||
Homarr
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
18
components/layout/Navbar.tsx
Normal file
18
components/layout/Navbar.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Navbar as MantineNavbar } from '@mantine/core';
|
||||
import { DateModule } from '../modules/date/DateModule';
|
||||
import ModuleWrapper from '../modules/moduleWrapper';
|
||||
|
||||
export default function Navbar() {
|
||||
return (
|
||||
<MantineNavbar
|
||||
height="100%"
|
||||
hiddenBreakpoint="md"
|
||||
hidden
|
||||
width={{
|
||||
base: 'auto',
|
||||
}}
|
||||
>
|
||||
<ModuleWrapper module={DateModule} />
|
||||
</MantineNavbar>
|
||||
);
|
||||
}
|
||||
@@ -1,14 +1,15 @@
|
||||
/* eslint-disable react/no-children-prop */
|
||||
import { Popover, Box, ScrollArea, Divider, Indicator } from '@mantine/core';
|
||||
import { useEffect, useState } from 'react';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Calendar } from '@mantine/dates';
|
||||
import { CalendarIcon } from '@modulz/radix-icons';
|
||||
import { showNotification } from '@mantine/notifications';
|
||||
import { Check } from 'tabler-icons-react';
|
||||
import { RadarrMediaDisplay, SonarrMediaDisplay } from './MediaDisplay';
|
||||
import { useConfig } from '../../../tools/state';
|
||||
import { MHPModule } from '../modules';
|
||||
import React from 'react';
|
||||
import { IModule } from '../modules';
|
||||
|
||||
export const CalendarModule: MHPModule = {
|
||||
export const CalendarModule: IModule = {
|
||||
title: 'Calendar',
|
||||
description:
|
||||
'A calendar module for displaying upcoming releases. It interacts with the Sonarr and Radarr API.',
|
||||
@@ -35,14 +36,36 @@ export default function CalendarComponent(props: any) {
|
||||
fetch(
|
||||
`${sonarrService?.url}api/calendar?apikey=${sonarrService?.apiKey}&end=${nextMonth}`
|
||||
).then((response) => {
|
||||
response.ok && response.json().then((data) => setSonarrMedias(data));
|
||||
response.ok &&
|
||||
response.json().then((data) => {
|
||||
setSonarrMedias(data);
|
||||
showNotification({
|
||||
title: 'Sonarr',
|
||||
icon: <Check />,
|
||||
color: 'green',
|
||||
autoClose: 1500,
|
||||
radius: 'md',
|
||||
message: `Loaded ${data.length} releases`,
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
if (radarrService && radarrService.apiKey) {
|
||||
fetch(
|
||||
`${radarrService?.url}api/v3/calendar?apikey=${radarrService?.apiKey}&end=${nextMonth}`
|
||||
).then((response) => {
|
||||
response.ok && response.json().then((data) => setRadarrMedias(data));
|
||||
response.ok &&
|
||||
response.json().then((data) => {
|
||||
setRadarrMedias(data);
|
||||
showNotification({
|
||||
title: 'Radarr',
|
||||
icon: <Check />,
|
||||
color: 'green',
|
||||
autoClose: 1500,
|
||||
radius: 'md',
|
||||
message: `Loaded ${data.length} releases`,
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}, [config.services]);
|
||||
@@ -94,14 +117,13 @@ function DayComponent(props: any) {
|
||||
setOpened(true);
|
||||
}}
|
||||
>
|
||||
{radarrFiltered.length > 0 && (
|
||||
<Indicator size={7} color="yellow" children={null} />
|
||||
)}
|
||||
{sonarrFiltered.length > 0 && (
|
||||
<Indicator size={7} offset={8} color="blue" children={null} />
|
||||
)}
|
||||
{radarrFiltered.length > 0 && <Indicator size={7} color="yellow" children={null} />}
|
||||
{sonarrFiltered.length > 0 && <Indicator size={7} offset={8} color="blue" children={null} />}
|
||||
<Popover
|
||||
position="left"
|
||||
radius="lg"
|
||||
shadow="xl"
|
||||
transition="pop"
|
||||
width={700}
|
||||
onClose={() => setOpened(false)}
|
||||
opened={opened}
|
||||
@@ -109,25 +131,21 @@ function DayComponent(props: any) {
|
||||
target={` ${day}`}
|
||||
>
|
||||
<ScrollArea style={{ height: 400 }}>
|
||||
{sonarrFiltered.map((media: any, index: number) => {
|
||||
return (
|
||||
<React.Fragment key={index}>
|
||||
<SonarrMediaDisplay media={media} />
|
||||
{index < sonarrFiltered.length - 1 && <Divider variant="dashed" my="xl" />}
|
||||
</React.Fragment>
|
||||
);
|
||||
})}
|
||||
{sonarrFiltered.map((media: any, index: number) => (
|
||||
<React.Fragment key={index}>
|
||||
<SonarrMediaDisplay media={media} />
|
||||
{index < sonarrFiltered.length - 1 && <Divider variant="dashed" my="xl" />}
|
||||
</React.Fragment>
|
||||
))}
|
||||
{radarrFiltered.length > 0 && sonarrFiltered.length > 0 && (
|
||||
<Divider variant="dashed" my="xl" />
|
||||
)}
|
||||
{radarrFiltered.map((media: any, index: number) => {
|
||||
return (
|
||||
<React.Fragment key={index}>
|
||||
<RadarrMediaDisplay media={media} />
|
||||
{index < radarrFiltered.length - 1 && <Divider variant="dashed" my="xl" />}
|
||||
</React.Fragment>
|
||||
);
|
||||
})}
|
||||
{radarrFiltered.map((media: any, index: number) => (
|
||||
<React.Fragment key={index}>
|
||||
<RadarrMediaDisplay media={media} />
|
||||
{index < radarrFiltered.length - 1 && <Divider variant="dashed" my="xl" />}
|
||||
</React.Fragment>
|
||||
))}
|
||||
</ScrollArea>
|
||||
</Popover>
|
||||
</Box>
|
||||
|
||||
@@ -15,7 +15,14 @@ function MediaDisplay(props: { media: IMedia }) {
|
||||
const { media }: { media: IMedia } = props;
|
||||
return (
|
||||
<Group noWrap align="self-start" mr={15}>
|
||||
<Image fit="cover" src={media.poster} alt={media.title} width={300} height={400} />
|
||||
<Image
|
||||
radius="md"
|
||||
fit="cover"
|
||||
src={media.poster}
|
||||
alt={media.title}
|
||||
width={300}
|
||||
height={400}
|
||||
/>
|
||||
<Stack
|
||||
justify="space-between"
|
||||
sx={(theme) => ({
|
||||
|
||||
1
components/modules/calendar/index.ts
Normal file
1
components/modules/calendar/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { CalendarModule } from './CalendarModule';
|
||||
7
components/modules/date/DateModule.story.tsx
Normal file
7
components/modules/date/DateModule.story.tsx
Normal file
@@ -0,0 +1,7 @@
|
||||
import DateComponent from './DateModule';
|
||||
|
||||
export default {
|
||||
title: 'Date module',
|
||||
};
|
||||
|
||||
export const Default = (args: any) => <DateComponent {...args} />;
|
||||
41
components/modules/date/DateModule.tsx
Normal file
41
components/modules/date/DateModule.tsx
Normal file
@@ -0,0 +1,41 @@
|
||||
import { Group, Text, Title } from '@mantine/core';
|
||||
import dayjs from 'dayjs';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Clock } from 'tabler-icons-react';
|
||||
import { IModule } from '../modules';
|
||||
|
||||
export const DateModule: IModule = {
|
||||
title: 'Date',
|
||||
description: 'Show the current time and date in a card',
|
||||
icon: Clock,
|
||||
component: DateComponent,
|
||||
};
|
||||
|
||||
export default function DateComponent(props: any) {
|
||||
const [date, setDate] = useState(new Date());
|
||||
const hours = date.getHours();
|
||||
const minutes = date.getMinutes();
|
||||
|
||||
// Change date on minute change
|
||||
// Note: Using 10 000ms instead of 1000ms to chill a little :)
|
||||
useEffect(() => {
|
||||
setInterval(() => {
|
||||
setDate(new Date());
|
||||
}, 10000);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<Group p="sm" direction="column">
|
||||
<Title>
|
||||
{hours < 10 ? `0${hours}` : hours}:{minutes < 10 ? `0${minutes}` : minutes}
|
||||
</Title>
|
||||
<Text size="xl">
|
||||
{
|
||||
// Use dayjs to format the date
|
||||
// https://day.js.org/en/getting-started/installation/
|
||||
dayjs(date).format('dddd, MMMM D')
|
||||
}
|
||||
</Text>
|
||||
</Group>
|
||||
);
|
||||
}
|
||||
1
components/modules/date/index.ts
Normal file
1
components/modules/date/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { DateModule } from './DateModule';
|
||||
2
components/modules/index.ts
Normal file
2
components/modules/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './date';
|
||||
export * from './calendar';
|
||||
29
components/modules/moduleWrapper.tsx
Normal file
29
components/modules/moduleWrapper.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import { Card, useMantineTheme } from '@mantine/core';
|
||||
import { useConfig } from '../../tools/state';
|
||||
import { IModule } from './modules';
|
||||
|
||||
export default function ModuleWrapper(props: any) {
|
||||
const { module }: { module: IModule } = props;
|
||||
const { config } = useConfig();
|
||||
const enabledModules = config.settings.enabledModules ?? [];
|
||||
// Remove 'Module' from enabled modules titles
|
||||
const isShown = enabledModules.includes(module.title);
|
||||
const theme = useMantineTheme();
|
||||
if (!isShown) {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<Card
|
||||
hidden={!isShown}
|
||||
mx="sm"
|
||||
radius="lg"
|
||||
shadow="sm"
|
||||
style={{
|
||||
// Make background color of the card depend on the theme
|
||||
backgroundColor: theme.colorScheme === 'dark' ? theme.colors.dark[5] : 'white',
|
||||
}}
|
||||
>
|
||||
<module.component />
|
||||
</Card>
|
||||
);
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
// Each module should have its own interface and call the following function:
|
||||
// TODO: Add a function to register a module
|
||||
// Note: Maybe use context to keep track of the modules
|
||||
export interface MHPModule {
|
||||
export interface IModule {
|
||||
title: string;
|
||||
description: string;
|
||||
icon: React.ReactNode;
|
||||
|
||||
12
data/configs/config.json
Normal file
12
data/configs/config.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "config",
|
||||
"services": [],
|
||||
"settings": {
|
||||
"searchBar": true,
|
||||
"searchUrl": "https://duckduckgo.com/?q=",
|
||||
"enabledModules": [
|
||||
"Date",
|
||||
"Calendar"
|
||||
]
|
||||
}
|
||||
}
|
||||
16
data/configs/config_new.json
Normal file
16
data/configs/config_new.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"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://google.com/search?q=",
|
||||
"enabledModules": []
|
||||
}
|
||||
}
|
||||
16
data/configs/default.json
Normal file
16
data/configs/default.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "default",
|
||||
"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://bing.com/search?q=",
|
||||
"enabledModules": []
|
||||
}
|
||||
}
|
||||
2
data/constants.ts
Normal file
2
data/constants.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export const REPO_URL = 'ajnart/homarr';
|
||||
export const CURRENT_VERSION = 'v0.2.0';
|
||||
@@ -7,4 +7,7 @@ module.exports = withBundleAnalyzer({
|
||||
eslint: {
|
||||
ignoreDuringBuilds: true,
|
||||
},
|
||||
experimental: {
|
||||
outputStandalone: true,
|
||||
},
|
||||
});
|
||||
|
||||
47
package.json
47
package.json
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"name": "homarr",
|
||||
"version": "0.0.1",
|
||||
"private": "false",
|
||||
"description": "Customizable browser's home page to interact with your homeserver's Docker containers (i.e. Sonarr/Radarr)",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ajnart/myhomepage"
|
||||
},
|
||||
"name": "homarr",
|
||||
"version": "0.1.6",
|
||||
"private": "false",
|
||||
"description": "Homarr - A homepage for your server.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ajnart/homarr"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"analyze": "ANALYZE=true next build",
|
||||
"start": "next start",
|
||||
"start": "next start --port 7575",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"export": "next build && next export",
|
||||
"lint": "next lint",
|
||||
@@ -21,22 +21,25 @@
|
||||
"prettier:write": "prettier --write \"**/*.{ts,tsx}\"",
|
||||
"test": "npm run prettier:check && npm run lint && npm run typecheck && npm run jest",
|
||||
"storybook": "start-storybook -p 7001",
|
||||
"storybook:build": "build-storybook"
|
||||
"storybook:build": "build-storybook",
|
||||
"ci": "yarn test && yarn lint --fix && yarn typecheck && yarn prettier:write"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mantine/core": "^4.2.1",
|
||||
"@mantine/dates": "^4.2.1",
|
||||
"@mantine/dropzone": "^4.2.1",
|
||||
"@mantine/form": "^4.2.1",
|
||||
"@mantine/hooks": "^4.2.1",
|
||||
"@mantine/modals": "^4.2.1",
|
||||
"@mantine/next": "^4.2.1",
|
||||
"@mantine/notifications": "^4.2.1",
|
||||
"@mantine/prism": "^4.2.1",
|
||||
"@mantine/spotlight": "^4.2.1",
|
||||
"@mantine/core": "^4.2.4",
|
||||
"@mantine/dates": "^4.2.4",
|
||||
"@mantine/dropzone": "^4.2.4",
|
||||
"@mantine/form": "^4.2.4",
|
||||
"@mantine/hooks": "^4.2.4",
|
||||
"@mantine/modals": "^4.2.4",
|
||||
"@mantine/next": "^4.2.4",
|
||||
"@mantine/notifications": "^4.2.4",
|
||||
"@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",
|
||||
"cookies-next": "^2.0.4",
|
||||
"dayjs": "^1.11.1",
|
||||
"dayjs": "^1.11.2",
|
||||
"framer-motion": "^6.3.1",
|
||||
"js-file-download": "^0.4.12",
|
||||
"next": "12.1.5-canary.4",
|
||||
@@ -81,4 +84,4 @@
|
||||
"ts-jest": "^27.1.4",
|
||||
"typescript": "4.6.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import { MantineProvider, ColorScheme, ColorSchemeProvider } from '@mantine/core
|
||||
import { NotificationsProvider } from '@mantine/notifications';
|
||||
import Layout from '../components/layout/Layout';
|
||||
import { ConfigProvider } from '../tools/state';
|
||||
import { theme } from '../tools/theme';
|
||||
|
||||
export default function App(props: AppProps & { colorScheme: ColorScheme }) {
|
||||
const { Component, pageProps } = props;
|
||||
@@ -15,20 +16,27 @@ export default function App(props: AppProps & { colorScheme: ColorScheme }) {
|
||||
const toggleColorScheme = (value?: ColorScheme) => {
|
||||
const nextColorScheme = value || (colorScheme === 'dark' ? 'light' : 'dark');
|
||||
setColorScheme(nextColorScheme);
|
||||
setCookies('mantine-color-scheme', nextColorScheme, { maxAge: 60 * 60 * 24 * 30 });
|
||||
setCookies('color-scheme', nextColorScheme, { maxAge: 60 * 60 * 24 * 30 });
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>MyHomePage - Your new browser homepage!</title>
|
||||
<title>Homarr - A homepage for your server!</title>
|
||||
<meta name="viewport" content="minimum-scale=1, initial-scale=1, width=device-width" />
|
||||
<link rel="shortcut icon" href="/favicon.svg" />
|
||||
</Head>
|
||||
|
||||
<ColorSchemeProvider colorScheme={colorScheme} toggleColorScheme={toggleColorScheme}>
|
||||
<MantineProvider theme={{ colorScheme }} withGlobalStyles withNormalizeCSS>
|
||||
<NotificationsProvider position="top-right">
|
||||
<MantineProvider
|
||||
theme={{
|
||||
...theme,
|
||||
colorScheme,
|
||||
}}
|
||||
withGlobalStyles
|
||||
withNormalizeCSS
|
||||
>
|
||||
<NotificationsProvider limit={2} position="top-right">
|
||||
<ConfigProvider>
|
||||
<Layout>
|
||||
<Component {...pageProps} />
|
||||
@@ -42,5 +50,5 @@ export default function App(props: AppProps & { colorScheme: ColorScheme }) {
|
||||
}
|
||||
|
||||
App.getInitialProps = ({ ctx }: { ctx: GetServerSidePropsContext }) => ({
|
||||
colorScheme: getCookie('mantine-color-scheme', ctx) || 'light',
|
||||
colorScheme: getCookie('color-scheme', ctx) || 'light',
|
||||
});
|
||||
|
||||
61
pages/api/configs/[slug].ts
Normal file
61
pages/api/configs/[slug].ts
Normal file
@@ -0,0 +1,61 @@
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
function Put(req: NextApiRequest, res: NextApiResponse) {
|
||||
// Get the slug of the request
|
||||
const { slug } = req.query as { slug: string };
|
||||
// Get the body of the request
|
||||
const { body }: { body: string } = req;
|
||||
if (!slug || !body) {
|
||||
res.status(400).json({
|
||||
error: 'Wrong request',
|
||||
});
|
||||
}
|
||||
// Save the body in the /data/config folder with the slug as filename
|
||||
|
||||
fs.writeFileSync(
|
||||
path.join('data/configs', `${slug}.json`),
|
||||
JSON.stringify(body, null, 2),
|
||||
'utf8'
|
||||
);
|
||||
return res.status(200).json({
|
||||
message: 'Configuration saved with success',
|
||||
});
|
||||
}
|
||||
|
||||
function Get(req: NextApiRequest, res: NextApiResponse) {
|
||||
// Get the slug of the request
|
||||
const { slug } = req.query as { slug: string };
|
||||
if (!slug) {
|
||||
return res.status(400).json({
|
||||
message: 'Wrong request',
|
||||
});
|
||||
}
|
||||
// Loop over all the files in the /data/configs directory
|
||||
const files = fs.readdirSync('data/configs');
|
||||
// Strip the .json extension from the file name
|
||||
const configs = files.map((file) => file.replace('.json', ''));
|
||||
// If the target is not in the list of files, return an error
|
||||
if (!configs.includes(slug)) {
|
||||
return res.status(404).json({
|
||||
message: 'Target not found',
|
||||
});
|
||||
}
|
||||
// Return the content of the file
|
||||
return res.status(200).json(fs.readFileSync(path.join('data/configs', `${slug}.json`), 'utf8'));
|
||||
}
|
||||
|
||||
export default async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
// Filter out if the reuqest is a Put or a GET
|
||||
if (req.method === 'PUT') {
|
||||
return Put(req, res);
|
||||
}
|
||||
if (req.method === 'GET') {
|
||||
return Get(req, res);
|
||||
}
|
||||
return res.status(405).json({
|
||||
statusCode: 405,
|
||||
message: 'Method not allowed',
|
||||
});
|
||||
};
|
||||
28
pages/api/configs/index.ts
Normal file
28
pages/api/configs/index.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { NextApiRequest, NextApiResponse } from 'next';
|
||||
import fs from 'fs';
|
||||
|
||||
function Get(req: NextApiRequest, res: NextApiResponse) {
|
||||
// Loop over all the files in the /data/configs directory
|
||||
const files = fs.readdirSync('data/configs');
|
||||
// Strip the .json extension from the file name
|
||||
const configs = files.map((file) => file.replace('.json', ''));
|
||||
|
||||
return res.status(200).json(configs);
|
||||
}
|
||||
|
||||
export default async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
// Filter out if the reuqest is a POST or a GET
|
||||
if (req.method === 'POST') {
|
||||
return res.status(405).json({
|
||||
statusCode: 405,
|
||||
message: 'Method not allowed',
|
||||
});
|
||||
}
|
||||
if (req.method === 'GET') {
|
||||
return Get(req, res);
|
||||
}
|
||||
return res.status(405).json({
|
||||
statusCode: 405,
|
||||
message: 'Method not allowed',
|
||||
});
|
||||
};
|
||||
@@ -1,9 +1,57 @@
|
||||
import { Group } from '@mantine/core';
|
||||
import { getCookie, setCookies } from 'cookies-next';
|
||||
import { GetServerSidePropsContext } from 'next';
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import { useEffect } from 'react';
|
||||
import AppShelf from '../components/AppShelf/AppShelf';
|
||||
import LoadConfigComponent from '../components/Config/LoadConfig';
|
||||
import SearchBar from '../components/SearchBar/SearchBar';
|
||||
import { Config } from '../tools/types';
|
||||
import { useConfig } from '../tools/state';
|
||||
|
||||
export default function HomePage() {
|
||||
export async function getServerSideProps({
|
||||
req,
|
||||
res,
|
||||
}: GetServerSidePropsContext): Promise<{ props: { config: Config } }> {
|
||||
let cookie = getCookie('config-name', { req, res });
|
||||
if (!cookie) {
|
||||
setCookies('config-name', 'default', { req, res, maxAge: 60 * 60 * 24 * 30 });
|
||||
cookie = 'default';
|
||||
}
|
||||
// Check if the config file exists
|
||||
const configPath = path.join(process.cwd(), 'data/configs', `${cookie}.json`);
|
||||
if (!fs.existsSync(configPath)) {
|
||||
return {
|
||||
props: {
|
||||
config: {
|
||||
name: cookie.toString(),
|
||||
services: [],
|
||||
settings: {
|
||||
enabledModules: [],
|
||||
searchBar: true,
|
||||
searchUrl: 'https://www.google.com/search?q=',
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
const config = fs.readFileSync(configPath, 'utf8');
|
||||
// Print loaded config
|
||||
return {
|
||||
props: {
|
||||
config: JSON.parse(config),
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export default function HomePage(props: any) {
|
||||
const { config: initialConfig }: { config: Config } = props;
|
||||
const { config, loadConfig, setConfig, getConfigs } = useConfig();
|
||||
useEffect(() => {
|
||||
setConfig(initialConfig);
|
||||
}, [initialConfig]);
|
||||
return (
|
||||
<>
|
||||
<SearchBar />
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
import { serviceItem } from './types';
|
||||
|
||||
export function pingQbittorrent(service: serviceItem): any {
|
||||
console.log('Getting service.cookie for service: ', service);
|
||||
if (!service.cookie) service.cookie = 'Test';
|
||||
else console.log(service.cookie);
|
||||
}
|
||||
@@ -1,27 +1,30 @@
|
||||
// src/context/state.js
|
||||
import { showNotification } from '@mantine/notifications';
|
||||
import axios from 'axios';
|
||||
import { createContext, ReactNode, useContext, useState } from 'react';
|
||||
import { Config, serviceItem } from './types';
|
||||
import { Check, X } from 'tabler-icons-react';
|
||||
import { Config } from './types';
|
||||
|
||||
type configContextType = {
|
||||
config: Config;
|
||||
setConfig: (newconfig: Config) => void;
|
||||
addService: (service: serviceItem) => void;
|
||||
removeService: (name: string) => void;
|
||||
saveConfig: (newconfig: Config) => void;
|
||||
loadConfig: (name: string) => void;
|
||||
getConfigs: () => Promise<string[]>;
|
||||
};
|
||||
|
||||
const configContext = createContext<configContextType>({
|
||||
config: {
|
||||
name: 'default',
|
||||
services: [],
|
||||
settings: {
|
||||
searchBar: true,
|
||||
searchUrl: 'https://www.google.com/search?q=',
|
||||
enabledModules: [],
|
||||
},
|
||||
},
|
||||
setConfig: () => {},
|
||||
addService: () => {},
|
||||
removeService: () => {},
|
||||
saveConfig: () => {},
|
||||
loadConfig: async (name: string) => {},
|
||||
getConfigs: async () => [],
|
||||
});
|
||||
|
||||
export function useConfig() {
|
||||
@@ -38,63 +41,54 @@ type Props = {
|
||||
|
||||
export function ConfigProvider({ children }: Props) {
|
||||
const [config, setConfigInternal] = useState<Config>({
|
||||
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',
|
||||
},
|
||||
],
|
||||
name: 'default',
|
||||
services: [],
|
||||
settings: {
|
||||
searchBar: true,
|
||||
searchUrl: 'https://www.google.com/search?q=',
|
||||
enabledModules: [],
|
||||
},
|
||||
});
|
||||
|
||||
function setConfig(newConfig: Config) {
|
||||
setConfigInternal(newConfig);
|
||||
saveConfig(newConfig);
|
||||
async function loadConfig(configName: string) {
|
||||
try {
|
||||
const response = await axios.get(`/api/configs/${configName}`);
|
||||
setConfigInternal(response.data);
|
||||
showNotification({
|
||||
title: 'Config',
|
||||
icon: <Check />,
|
||||
color: 'green',
|
||||
autoClose: 1500,
|
||||
radius: 'md',
|
||||
message: `Loaded config : ${configName}`,
|
||||
});
|
||||
} catch (error) {
|
||||
showNotification({
|
||||
title: 'Config',
|
||||
icon: <X />,
|
||||
color: 'red',
|
||||
autoClose: 1500,
|
||||
radius: 'md',
|
||||
message: `Error loading config : ${configName}`,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function addService(item: serviceItem) {
|
||||
setConfigInternal({
|
||||
...config,
|
||||
services: [...config.services, item],
|
||||
});
|
||||
saveConfig({
|
||||
...config,
|
||||
services: [...config.services, item],
|
||||
});
|
||||
function setConfig(newconfig: Config) {
|
||||
axios.put(`/api/configs/${newconfig.name}`, newconfig);
|
||||
setConfigInternal(newconfig);
|
||||
}
|
||||
|
||||
function removeService(name: string) {
|
||||
// Remove the service with name in config item
|
||||
setConfigInternal({
|
||||
...config,
|
||||
services: config.services.filter((service) => service.name !== name),
|
||||
});
|
||||
saveConfig({
|
||||
...config,
|
||||
services: config.services.filter((service) => service.name !== name),
|
||||
});
|
||||
}
|
||||
|
||||
function saveConfig(newconfig: Config) {
|
||||
if (!newconfig) return;
|
||||
localStorage.setItem('config', JSON.stringify(newconfig));
|
||||
async function getConfigs(): Promise<string[]> {
|
||||
const response = await axios.get('/api/configs');
|
||||
return response.data;
|
||||
}
|
||||
|
||||
const value = {
|
||||
config,
|
||||
setConfig,
|
||||
addService,
|
||||
removeService,
|
||||
saveConfig,
|
||||
loadConfig,
|
||||
getConfigs,
|
||||
};
|
||||
return (
|
||||
<>
|
||||
<configContext.Provider value={value}>{children}</configContext.Provider>
|
||||
</>
|
||||
);
|
||||
return <configContext.Provider value={value}>{children}</configContext.Provider>;
|
||||
}
|
||||
|
||||
3
tools/theme.ts
Normal file
3
tools/theme.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import { MantineProviderProps } from '@mantine/core';
|
||||
|
||||
export const theme: MantineProviderProps['theme'] = {};
|
||||
@@ -1,10 +1,12 @@
|
||||
export interface Settings {
|
||||
searchUrl: string;
|
||||
searchBar: boolean;
|
||||
enabledModules: string[];
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export interface Config {
|
||||
name: string;
|
||||
services: serviceItem[];
|
||||
settings: Settings;
|
||||
}
|
||||
|
||||
337
yarn.lock
337
yarn.lock
@@ -1163,17 +1163,7 @@
|
||||
resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70"
|
||||
integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==
|
||||
|
||||
"@emotion/cache@^10.0.27":
|
||||
version "10.0.29"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-10.0.29.tgz#87e7e64f412c060102d589fe7c6dc042e6f9d1e0"
|
||||
integrity sha512-fU2VtSVlHiF27empSbxi1O2JFdNWZO+2NFHfwO0pxgTep6Xa3uGb+3pVKfLww2l/IBGLNEZl5Xf/++A4wAYDYQ==
|
||||
dependencies:
|
||||
"@emotion/sheet" "0.9.4"
|
||||
"@emotion/stylis" "0.8.5"
|
||||
"@emotion/utils" "0.11.3"
|
||||
"@emotion/weak-memoize" "0.2.5"
|
||||
|
||||
"@emotion/cache@^11.7.1":
|
||||
"@emotion/cache@11.7.1", "@emotion/cache@^11.7.1":
|
||||
version "11.7.1"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.7.1.tgz#08d080e396a42e0037848214e8aa7bf879065539"
|
||||
integrity sha512-r65Zy4Iljb8oyjtLeCuBH8Qjiy107dOYC6SJq7g7GV5UCQWMObY4SJDPGFjiiVpPrOJ2hmJOoBiYTC7hwx9E2A==
|
||||
@@ -1184,6 +1174,16 @@
|
||||
"@emotion/weak-memoize" "^0.2.5"
|
||||
stylis "4.0.13"
|
||||
|
||||
"@emotion/cache@^10.0.27":
|
||||
version "10.0.29"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-10.0.29.tgz#87e7e64f412c060102d589fe7c6dc042e6f9d1e0"
|
||||
integrity sha512-fU2VtSVlHiF27empSbxi1O2JFdNWZO+2NFHfwO0pxgTep6Xa3uGb+3pVKfLww2l/IBGLNEZl5Xf/++A4wAYDYQ==
|
||||
dependencies:
|
||||
"@emotion/sheet" "0.9.4"
|
||||
"@emotion/stylis" "0.8.5"
|
||||
"@emotion/utils" "0.11.3"
|
||||
"@emotion/weak-memoize" "0.2.5"
|
||||
|
||||
"@emotion/core@^10.1.1":
|
||||
version "10.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/core/-/core-10.3.1.tgz#4021b6d8b33b3304d48b0bb478485e7d7421c69d"
|
||||
@@ -1227,7 +1227,7 @@
|
||||
resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.5.tgz#2c40f81449a4e554e9fc6396910ed4843ec2be50"
|
||||
integrity sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ==
|
||||
|
||||
"@emotion/react@^11.7.1":
|
||||
"@emotion/react@11.7.1":
|
||||
version "11.7.1"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.7.1.tgz#3f800ce9b20317c13e77b8489ac4a0b922b2fe07"
|
||||
integrity sha512-DV2Xe3yhkF1yT4uAUoJcYL1AmrnO5SVsdfvu+fBuS7IbByDeTVx9+wFmvx9Idzv7/78+9Mgx2Hcmr7Fex3tIyw==
|
||||
@@ -1240,6 +1240,17 @@
|
||||
"@emotion/weak-memoize" "^0.2.5"
|
||||
hoist-non-react-statics "^3.3.1"
|
||||
|
||||
"@emotion/serialize@1.0.2", "@emotion/serialize@^1.0.2":
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.0.2.tgz#77cb21a0571c9f68eb66087754a65fa97bfcd965"
|
||||
integrity sha512-95MgNJ9+/ajxU7QIAruiOAdYNjxZX7G2mhgrtDWswA21VviYIRP1R5QilZ/bDY42xiKsaktP4egJb3QdYQZi1A==
|
||||
dependencies:
|
||||
"@emotion/hash" "^0.8.0"
|
||||
"@emotion/memoize" "^0.7.4"
|
||||
"@emotion/unitless" "^0.7.5"
|
||||
"@emotion/utils" "^1.0.0"
|
||||
csstype "^3.0.2"
|
||||
|
||||
"@emotion/serialize@^0.11.15", "@emotion/serialize@^0.11.16":
|
||||
version "0.11.16"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-0.11.16.tgz#dee05f9e96ad2fb25a5206b6d759b2d1ed3379ad"
|
||||
@@ -1251,18 +1262,7 @@
|
||||
"@emotion/utils" "0.11.3"
|
||||
csstype "^2.5.7"
|
||||
|
||||
"@emotion/serialize@^1.0.2":
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.0.2.tgz#77cb21a0571c9f68eb66087754a65fa97bfcd965"
|
||||
integrity sha512-95MgNJ9+/ajxU7QIAruiOAdYNjxZX7G2mhgrtDWswA21VviYIRP1R5QilZ/bDY42xiKsaktP4egJb3QdYQZi1A==
|
||||
dependencies:
|
||||
"@emotion/hash" "^0.8.0"
|
||||
"@emotion/memoize" "^0.7.4"
|
||||
"@emotion/unitless" "^0.7.5"
|
||||
"@emotion/utils" "^1.0.0"
|
||||
csstype "^3.0.2"
|
||||
|
||||
"@emotion/server@^11.4.0":
|
||||
"@emotion/server@11.4.0":
|
||||
version "11.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/server/-/server-11.4.0.tgz#3ae1d74cb31c7d013c3c76e88c0c4439076e9f66"
|
||||
integrity sha512-IHovdWA3V0DokzxLtUNDx4+hQI82zUXqQFcVz/om2t44O0YSc+NHB+qifnyAOoQwt3SXcBTgaSntobwUI9gnfA==
|
||||
@@ -1315,7 +1315,7 @@
|
||||
resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-0.11.3.tgz#a759863867befa7e583400d322652a3f44820924"
|
||||
integrity sha512-0o4l6pZC+hI88+bzuaX/6BgOvQVhbt2PfmxauVaYOGgbsAw14wdKyvMCZXnsnsHys94iadcF+RG/wZyx6+ZZBw==
|
||||
|
||||
"@emotion/utils@^1.0.0":
|
||||
"@emotion/utils@1.0.0", "@emotion/utils@^1.0.0":
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.0.0.tgz#abe06a83160b10570816c913990245813a2fd6af"
|
||||
integrity sha512-mQC2b3XLDs6QCW+pDQDiyO/EdGZYOygE8s5N5rrzjSI4M3IejPE/JPndCBwRT9z982aqQNi6beWs1UeayrQxxA==
|
||||
@@ -1594,95 +1594,104 @@
|
||||
"@jridgewell/resolve-uri" "^3.0.3"
|
||||
"@jridgewell/sourcemap-codec" "^1.4.10"
|
||||
|
||||
"@mantine/core@^4.2.1":
|
||||
version "4.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/core/-/core-4.2.1.tgz#cd93bc0c1c9ac8c25327867dec7d977790297f3c"
|
||||
integrity sha512-YEz0SG8HN+H1s/gpqEzSUUFPXdaMQnZgJPO8JTOgX/qlVvggw+Y8TaLby4A+4kgQdGiXTWxr1Njx1/u72Fa1KA==
|
||||
"@mantine/core@^4.2.4":
|
||||
version "4.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/core/-/core-4.2.4.tgz#9c36acbaaa4287f61e9dc85eb631c4e5a7e417de"
|
||||
integrity sha512-YeN8slz3bcb47NUUkSZ4UAedMZH7bWvqIx7OfRf2D0m2o4Fu1BLO73xUCpgj18R31fx3BcSopRujZC9x/8bqUg==
|
||||
dependencies:
|
||||
"@mantine/styles" "4.2.1"
|
||||
"@mantine/styles" "4.2.4"
|
||||
"@popperjs/core" "^2.9.3"
|
||||
"@radix-ui/react-scroll-area" "^0.1.1"
|
||||
react-popper "^2.2.5"
|
||||
react-textarea-autosize "^8.3.2"
|
||||
|
||||
"@mantine/dates@^4.2.1":
|
||||
version "4.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/dates/-/dates-4.2.1.tgz#0d92aa69f2dcb0c6244ed38f7c4e4bc9bf8d8a5a"
|
||||
integrity sha512-5zgDpm2xNWMBRKXANI8vo1W2wFyBDiTL5R/68elrfs01T1B60uS4tQ73voMvwIvjbM/oXZqWhFpD7dobdf5kNw==
|
||||
"@mantine/dates@^4.2.4":
|
||||
version "4.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/dates/-/dates-4.2.4.tgz#4018a56a0f58feb56cd7036f5489c0c76ee76921"
|
||||
integrity sha512-ullVkmiOhLBTk30zJgRraMggR8ZLPc4IEwM83dJbhx4mTiJ10CFvl8oz23j2yy00tInCw6vYglqK514ytlsItg==
|
||||
|
||||
"@mantine/dropzone@^4.2.1":
|
||||
version "4.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/dropzone/-/dropzone-4.2.1.tgz#42391f296a75b7448e28e4e09031257b1e585d08"
|
||||
integrity sha512-MT3BPfw+2MteGTIrm1EoAdKDhpQ5kE5POs87njNWhbav82grE4JHmtCCj8Na4U3+e6O6ic3uh+ofK048lY7aDg==
|
||||
"@mantine/dropzone@^4.2.4":
|
||||
version "4.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/dropzone/-/dropzone-4.2.4.tgz#3825bfb2c3f14a0c348efa29e0079df6bec67fa2"
|
||||
integrity sha512-Y4lzzkKEtfbW941BdEwFBaS87ZAXyXB080GJUxxpuP0KQ1xb9GG66l3l3zu/+UcwXOyT4m91W2E3okip9BcIew==
|
||||
dependencies:
|
||||
react-dropzone "^11.4.2"
|
||||
|
||||
"@mantine/form@^4.2.1":
|
||||
version "4.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/form/-/form-4.2.1.tgz#4b0ca3a500802b1a47ad402cd021c849c73a6099"
|
||||
integrity sha512-uB9v666mMCIxBJCdE+13KI5g2gNX25qevqwBwxVYnvwKVT/fuQE+lO2TRvfBQfk4PgEzmFgsm/YSG0q6bBE5cA==
|
||||
"@mantine/form@^4.2.4":
|
||||
version "4.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/form/-/form-4.2.4.tgz#37719262bf5dfe6ba5a6cce23b4b87b12a1a836d"
|
||||
integrity sha512-7exttJwSY0yRjzChL6L0NM5i5xxXuGiP4c8quGb7/mxP/hwfUSFMOua3Pme8svP7U8w3gxZL3HWvzGMQQfXqSw==
|
||||
|
||||
"@mantine/hooks@^4.2.1":
|
||||
version "4.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/hooks/-/hooks-4.2.1.tgz#60960c24debaf6c0bd2e51f84ac28abecec534b8"
|
||||
integrity sha512-+sg8aBK1IzCLGrtL2PEUp1q2/3blUvxJPoqIE6wwcvtIc7cFYfPWRdFFRtkwJjHQ+KlH6TvCO0Yl7F6FBq7+Rw==
|
||||
"@mantine/hooks@^4.2.4":
|
||||
version "4.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/hooks/-/hooks-4.2.4.tgz#81b049355404d1001a1267e80e1e1aaae4682083"
|
||||
integrity sha512-C4Mvm9suYFuM5dDJXKaZ2fRFvJ5JMXl5S7eSNsHvzkRmCy0GppKkDETwXi0uwS7QyjMllNRizGvoyU4CyHyvrA==
|
||||
|
||||
"@mantine/modals@^4.2.1":
|
||||
version "4.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/modals/-/modals-4.2.1.tgz#9529f10d3227cf0940dcecbc5a767531abc3230c"
|
||||
integrity sha512-YqFJcU1raFlLjO6T3PENdXQmiYqGfAqg27bYIhEYciuVIt+UR1eNSPrw0Yj2H2arCVVZ/RUF1CjiFG2lwvwTVw==
|
||||
"@mantine/modals@^4.2.4":
|
||||
version "4.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/modals/-/modals-4.2.4.tgz#2b168c5be869ee45b9be492e52d9978c5bd3ed53"
|
||||
integrity sha512-ce0shaBjAw5kzSCZ8cDgtct3ge1dtB0RQyYMvk+6y3na4gqXqUOsHJmQ8cUVAOb78Ge7ibEQA0rOW6dOSeAVRA==
|
||||
|
||||
"@mantine/next@^4.2.1":
|
||||
version "4.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/next/-/next-4.2.1.tgz#cb3616f26bdf786337333424c29ab4fd4774e98c"
|
||||
integrity sha512-AM7Hf9rtBlEv7zRpyVVisuQ0Dc+FuY2rW6y0m19AMZ65Jv/PYDmME35cACqhNHIjRYCzbljaepW2mAym/maapQ==
|
||||
"@mantine/next@^4.2.4":
|
||||
version "4.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/next/-/next-4.2.4.tgz#160dcf02e6fd20c34fbc63ac4f2baa050d605cc3"
|
||||
integrity sha512-YU/Hv4srckitt1n5nKf9FVSfvYLypQfevQX/rcy00Bjr4iFxZQdpGCCdfSw82XR/JaY6Bw/Soj9BdGhK0DPcRg==
|
||||
dependencies:
|
||||
"@mantine/ssr" "4.2.1"
|
||||
"@mantine/ssr" "4.2.4"
|
||||
|
||||
"@mantine/notifications@^4.2.1":
|
||||
version "4.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/notifications/-/notifications-4.2.1.tgz#2bff96858bc6357f017439df12165b31d4f395bd"
|
||||
integrity sha512-16jqAMwdANexOpVmBFwquP6nAJQPDBWmhEcf6Fm4mFhB8wpBX5nKepUsa+In49CvfPBHMEsROrJ4YqcwoP8Eig==
|
||||
"@mantine/notifications@^4.2.4":
|
||||
version "4.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/notifications/-/notifications-4.2.4.tgz#7f45dc2cd21e16f01c1eb2f9c5525b5688b80ead"
|
||||
integrity sha512-BgiG8jMW6WStgHuuj/BSX6g8camSUY1iP5SFw0hFkseWW4Y/6IPbcshejGQKS7stkjoJZQVZGaXkJQGkZcWcpA==
|
||||
dependencies:
|
||||
react-transition-group "^4.4.2"
|
||||
|
||||
"@mantine/prism@^4.2.1":
|
||||
version "4.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/prism/-/prism-4.2.1.tgz#fb7b5bf95a518d64ba389b952d4df2a4a2018eb7"
|
||||
integrity sha512-uVn3uzmiF6efylX1u4WtnCfSiHNTAuMsCi9gcuWS/rXCZtFkIqo6Qtk9I5YhHOG5K70lh3tNQ5C7NLDjL7Krxg==
|
||||
"@mantine/prism@^4.2.4":
|
||||
version "4.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/prism/-/prism-4.2.4.tgz#b687b6073e295bf7683bc4fccaa4addc955af594"
|
||||
integrity sha512-r/Q3XdpjCkrW+6Tsh4N94FlvsJ6jflg9JXv1UukAyoSvZpfyqTErb+FHK3J4eC26bVbaEj9hfq1fBDvkJNwMsQ==
|
||||
dependencies:
|
||||
prism-react-renderer "^1.2.1"
|
||||
|
||||
"@mantine/spotlight@^4.2.1":
|
||||
version "4.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/spotlight/-/spotlight-4.2.1.tgz#deb2c3b4e4a588c6c088287f0b1bf5bd6e4c79b3"
|
||||
integrity sha512-/eKup56TKmaTsLyNYzqx7SaLPoGB7cMGWni73M7TtY0sPBwc0tEnNA953fiBBpANJ5QtpGGSPSdRaXjanPJNiQ==
|
||||
|
||||
"@mantine/ssr@4.2.1":
|
||||
version "4.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/ssr/-/ssr-4.2.1.tgz#4d9fb3622188946ad37a91278d4209a1d6fca3a3"
|
||||
integrity sha512-OZTehqwV/YdI1fVoisrcOiHj7RJmTxQ969UTYnmavXVQ7S/UVS3xayHd38c+82vP9F61q5fWEy4YpCC0/9v2zw==
|
||||
"@mantine/rte@^4.2.4":
|
||||
version "4.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/rte/-/rte-4.2.4.tgz#99cec28f55159a0089cc30ac08b0980e07ffde67"
|
||||
integrity sha512-fkW8TTpOOCrDuHkxHGMjP/DiwriwagaHD5Ry5oKSKXVXB9NMl/McmIdpII9zgH3jpnSCLcSQjr2knRrMlx+YUg==
|
||||
dependencies:
|
||||
"@emotion/cache" "^11.7.1"
|
||||
"@emotion/react" "^11.7.1"
|
||||
"@emotion/serialize" "^1.0.2"
|
||||
"@emotion/server" "^11.4.0"
|
||||
"@emotion/utils" "^1.0.0"
|
||||
"@mantine/styles" "4.2.1"
|
||||
csstype "^3.0.9"
|
||||
html-react-parser "^1.3.0"
|
||||
"@modulz/radix-icons" "^4.0.0"
|
||||
quill-mention "^3.0.8"
|
||||
react-quill "2.0.0-beta.4"
|
||||
|
||||
"@mantine/styles@4.2.1":
|
||||
version "4.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/styles/-/styles-4.2.1.tgz#a4d1a8373c59c07fb1ec0e6d43d5b288a5abbbc7"
|
||||
integrity sha512-KHQDCFh4tOBYjKZ7Y5f7qhVXQDKDAhuQz2jJeSE9rUrUaXtJJaAvlrV884AD2vx58k2UUKpAAaBt8CaT1VAXgw==
|
||||
"@mantine/spotlight@^4.2.4":
|
||||
version "4.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/spotlight/-/spotlight-4.2.4.tgz#3de8bdce02cc4623f44d13a4b9f5e3a4448dbe17"
|
||||
integrity sha512-jxFqR5myZ0fD8URBF5eH1lisfSUPy2fW28IUHCOEn08oL6+zsHUxeAUuVDUbZXbuhjkoBGyUh7BXRln8YcYXfw==
|
||||
|
||||
"@mantine/ssr@4.2.4":
|
||||
version "4.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/ssr/-/ssr-4.2.4.tgz#3a32638e25531f400f725d8f95d8496efa818caa"
|
||||
integrity sha512-3hPSTTvkapuiMlUGLa3xDSOJpjlklMCOOMh01Yu4VRmj/n0Jd9KS9T9fOWnxF3q8wZDy3sV56mr9N4nc143B6A==
|
||||
dependencies:
|
||||
"@emotion/cache" "^11.7.1"
|
||||
"@emotion/react" "^11.7.1"
|
||||
"@emotion/serialize" "^1.0.2"
|
||||
"@emotion/utils" "^1.0.0"
|
||||
"@emotion/cache" "11.7.1"
|
||||
"@emotion/react" "11.7.1"
|
||||
"@emotion/serialize" "1.0.2"
|
||||
"@emotion/server" "11.4.0"
|
||||
"@emotion/utils" "1.0.0"
|
||||
"@mantine/styles" "4.2.4"
|
||||
csstype "3.0.9"
|
||||
html-react-parser "1.3.0"
|
||||
|
||||
"@mantine/styles@4.2.4":
|
||||
version "4.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@mantine/styles/-/styles-4.2.4.tgz#6e6e6f999cff1bc1600082714946b2c8ce5b4c49"
|
||||
integrity sha512-nG8qwE7uuZ7pJaY5jES9DLIkYxlLf3pK8Gn01gdbSfcyDC8hldvr83bMQOS9gLZ/3F/lrhtsu8u+31kxXIBIsw==
|
||||
dependencies:
|
||||
"@emotion/cache" "11.7.1"
|
||||
"@emotion/react" "11.7.1"
|
||||
"@emotion/serialize" "1.0.2"
|
||||
"@emotion/utils" "1.0.0"
|
||||
clsx "^1.1.1"
|
||||
csstype "^3.0.9"
|
||||
csstype "3.0.9"
|
||||
|
||||
"@mdx-js/loader@^1.6.22":
|
||||
version "1.6.22"
|
||||
@@ -3095,6 +3104,13 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb"
|
||||
integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==
|
||||
|
||||
"@types/quill@^1.3.10":
|
||||
version "1.3.10"
|
||||
resolved "https://registry.yarnpkg.com/@types/quill/-/quill-1.3.10.tgz#dc1f7b6587f7ee94bdf5291bc92289f6f0497613"
|
||||
integrity sha512-IhW3fPW+bkt9MLNlycw8u8fWb7oO7W5URC9MfZYHBlA24rex9rs23D5DETChu1zvgVdc5ka64ICjJOgQMr6Shw==
|
||||
dependencies:
|
||||
parchment "^1.1.2"
|
||||
|
||||
"@types/react-dom@*":
|
||||
version "17.0.14"
|
||||
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-17.0.14.tgz#c8f917156b652ddf807711f5becbd2ab018dea9f"
|
||||
@@ -3893,6 +3909,14 @@ axe-core@^4.3.5:
|
||||
resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.4.1.tgz#7dbdc25989298f9ad006645cd396782443757413"
|
||||
integrity sha512-gd1kmb21kwNuWr6BQz8fv6GNECPBnUasepcoLbekws23NVBLODdsClRZ+bQ8+9Uomf3Sm3+Vwn0oYG9NvwnJCw==
|
||||
|
||||
axios@^0.27.2:
|
||||
version "0.27.2"
|
||||
resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972"
|
||||
integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==
|
||||
dependencies:
|
||||
follow-redirects "^1.14.9"
|
||||
form-data "^4.0.0"
|
||||
|
||||
axobject-query@^2.2.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.2.0.tgz#943d47e10c0b704aa42275e20edf3722648989be"
|
||||
@@ -4681,6 +4705,11 @@ clone-deep@^4.0.1:
|
||||
kind-of "^6.0.2"
|
||||
shallow-clone "^3.0.0"
|
||||
|
||||
clone@^2.1.1:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f"
|
||||
integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=
|
||||
|
||||
clsx@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.1.1.tgz#98b3134f9abbdf23b2663491ace13c5c03a73188"
|
||||
@@ -5116,16 +5145,16 @@ cssstyle@^2.3.0:
|
||||
dependencies:
|
||||
cssom "~0.3.6"
|
||||
|
||||
csstype@3.0.9, csstype@^3.0.2:
|
||||
version "3.0.9"
|
||||
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.9.tgz#6410af31b26bd0520933d02cbc64fce9ce3fbf0b"
|
||||
integrity sha512-rpw6JPxK6Rfg1zLOYCSwle2GFOOsnjmDYDaBwEcwoOg4qlsIVCN789VkBZDJAGi4T07gI4YSutR43t9Zz4Lzuw==
|
||||
|
||||
csstype@^2.5.7:
|
||||
version "2.6.20"
|
||||
resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.20.tgz#9229c65ea0b260cf4d3d997cb06288e36a8d6dda"
|
||||
integrity sha512-/WwNkdXfckNgw6S5R125rrW8ez139lBHWouiBvX8dfMFtcn6V81REDqnH7+CRpRipfYlyU1CmOnOxrmGcFOjeA==
|
||||
|
||||
csstype@^3.0.2, csstype@^3.0.9:
|
||||
version "3.0.9"
|
||||
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.9.tgz#6410af31b26bd0520933d02cbc64fce9ce3fbf0b"
|
||||
integrity sha512-rpw6JPxK6Rfg1zLOYCSwle2GFOOsnjmDYDaBwEcwoOg4qlsIVCN789VkBZDJAGi4T07gI4YSutR43t9Zz4Lzuw==
|
||||
|
||||
cyclist@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9"
|
||||
@@ -5145,10 +5174,10 @@ data-urls@^2.0.0:
|
||||
whatwg-mimetype "^2.3.0"
|
||||
whatwg-url "^8.0.0"
|
||||
|
||||
dayjs@^1.11.1:
|
||||
version "1.11.1"
|
||||
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.1.tgz#90b33a3dda3417258d48ad2771b415def6545eb0"
|
||||
integrity sha512-ER7EjqVAMkRRsxNCC5YqJ9d9VQYuWdGt7aiH2qA5R5wt8ZmWaP2dLUSIK6y/kVzLMlmh1Tvu5xUf4M/wdGJ5KA==
|
||||
dayjs@^1.11.2:
|
||||
version "1.11.2"
|
||||
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.2.tgz#fa0f5223ef0d6724b3d8327134890cfe3d72fbe5"
|
||||
integrity sha512-F4LXf1OeU9hrSYRPTTj/6FbO4HTjPKXvEIC1P2kcnFurViINCVk3ZV0xAS3XVx9MkMsXbbqlK6hjseaYbgKEHw==
|
||||
|
||||
debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.9:
|
||||
version "2.6.9"
|
||||
@@ -5193,6 +5222,18 @@ dedent@^0.7.0:
|
||||
resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c"
|
||||
integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=
|
||||
|
||||
deep-equal@^1.0.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a"
|
||||
integrity sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==
|
||||
dependencies:
|
||||
is-arguments "^1.0.4"
|
||||
is-date-object "^1.0.1"
|
||||
is-regex "^1.0.4"
|
||||
object-is "^1.0.1"
|
||||
object-keys "^1.1.1"
|
||||
regexp.prototype.flags "^1.2.0"
|
||||
|
||||
deep-is@^0.1.3, deep-is@~0.1.3:
|
||||
version "0.1.4"
|
||||
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831"
|
||||
@@ -6089,6 +6130,11 @@ etag@~1.8.1:
|
||||
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
|
||||
integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
|
||||
|
||||
eventemitter3@^2.0.3:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-2.0.3.tgz#b5e1079b59fb5e1ba2771c0a993be060a58c99ba"
|
||||
integrity sha1-teEHm1n7XhuidxwKmTvgYKWMmbo=
|
||||
|
||||
events@^3.0.0:
|
||||
version "3.3.0"
|
||||
resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400"
|
||||
@@ -6214,7 +6260,7 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2:
|
||||
assign-symbols "^1.0.0"
|
||||
is-extendable "^1.0.1"
|
||||
|
||||
extend@^3.0.0:
|
||||
extend@^3.0.0, extend@^3.0.2:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
|
||||
integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==
|
||||
@@ -6238,6 +6284,11 @@ fast-deep-equal@^3.0.0, fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
|
||||
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
|
||||
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
|
||||
|
||||
fast-diff@1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.1.2.tgz#4b62c42b8e03de3f848460b639079920695d0154"
|
||||
integrity sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig==
|
||||
|
||||
fast-glob@^2.2.6:
|
||||
version "2.2.7"
|
||||
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d"
|
||||
@@ -6442,6 +6493,11 @@ flush-write-stream@^1.0.0:
|
||||
inherits "^2.0.3"
|
||||
readable-stream "^2.3.6"
|
||||
|
||||
follow-redirects@^1.14.9:
|
||||
version "1.15.0"
|
||||
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.0.tgz#06441868281c86d0dda4ad8bdaead2d02dca89d4"
|
||||
integrity sha512-aExlJShTV4qOUOL7yF1U5tvLCB0xQuudbf6toyYA0E/acBNw71mvjFTnLaRp50aQaYocMR0a/RMMBIHeZnGyjQ==
|
||||
|
||||
for-in@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
|
||||
@@ -6496,6 +6552,15 @@ form-data@^3.0.0:
|
||||
combined-stream "^1.0.8"
|
||||
mime-types "^2.1.12"
|
||||
|
||||
form-data@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452"
|
||||
integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==
|
||||
dependencies:
|
||||
asynckit "^0.4.0"
|
||||
combined-stream "^1.0.8"
|
||||
mime-types "^2.1.12"
|
||||
|
||||
format@^0.2.0:
|
||||
version "0.2.2"
|
||||
resolved "https://registry.yarnpkg.com/format/-/format-0.2.2.tgz#d6170107e9efdc4ed30c9dc39016df942b5cb58b"
|
||||
@@ -7106,7 +7171,7 @@ html-minifier-terser@^5.0.1:
|
||||
relateurl "^0.2.7"
|
||||
terser "^4.6.3"
|
||||
|
||||
html-react-parser@^1.3.0:
|
||||
html-react-parser@1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/html-react-parser/-/html-react-parser-1.3.0.tgz#81eff0558f34183ac1d372aa9218b8fb47bb3d6d"
|
||||
integrity sha512-lhpkOFH8pwqEjlNUYCWvjT43/JVCZO9MAZuCS6afT1/VP+bZcNxNUs4AUqiMzH0QPSDHwM/GFNXZNok1KTA4BQ==
|
||||
@@ -7356,7 +7421,7 @@ is-alphanumerical@^1.0.0:
|
||||
is-alphabetical "^1.0.0"
|
||||
is-decimal "^1.0.0"
|
||||
|
||||
is-arguments@^1.1.0:
|
||||
is-arguments@^1.0.4, is-arguments@^1.1.0:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b"
|
||||
integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==
|
||||
@@ -7598,7 +7663,7 @@ is-potential-custom-element-name@^1.0.1:
|
||||
resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5"
|
||||
integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==
|
||||
|
||||
is-regex@^1.1.2, is-regex@^1.1.4:
|
||||
is-regex@^1.0.4, is-regex@^1.1.2, is-regex@^1.1.4:
|
||||
version "1.1.4"
|
||||
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958"
|
||||
integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==
|
||||
@@ -8547,7 +8612,7 @@ lodash.uniq@4.5.0:
|
||||
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
|
||||
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
|
||||
|
||||
lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.7.0:
|
||||
lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.7.0:
|
||||
version "4.17.21"
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
|
||||
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
|
||||
@@ -8853,16 +8918,11 @@ minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.1.2:
|
||||
dependencies:
|
||||
brace-expansion "^1.1.7"
|
||||
|
||||
minimist@^1.1.1, minimist@^1.2.5, minimist@^1.2.6:
|
||||
minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6, minimist@~1.2.5:
|
||||
version "1.2.6"
|
||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44"
|
||||
integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==
|
||||
|
||||
minimist@^1.2.0, minimist@~1.2.5:
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
|
||||
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
|
||||
|
||||
minipass-collect@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617"
|
||||
@@ -9208,6 +9268,14 @@ object-inspect@^1.11.0, object-inspect@^1.9.0:
|
||||
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1"
|
||||
integrity sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==
|
||||
|
||||
object-is@^1.0.1:
|
||||
version "1.1.5"
|
||||
resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac"
|
||||
integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==
|
||||
dependencies:
|
||||
call-bind "^1.0.2"
|
||||
define-properties "^1.1.3"
|
||||
|
||||
object-keys@^1.0.12, object-keys@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e"
|
||||
@@ -9497,6 +9565,11 @@ param-case@^3.0.3:
|
||||
dot-case "^3.0.4"
|
||||
tslib "^2.0.3"
|
||||
|
||||
parchment@^1.1.2, parchment@^1.1.4:
|
||||
version "1.1.4"
|
||||
resolved "https://registry.yarnpkg.com/parchment/-/parchment-1.1.4.tgz#aeded7ab938fe921d4c34bc339ce1168bc2ffde5"
|
||||
integrity sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg==
|
||||
|
||||
parent-module@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2"
|
||||
@@ -10017,6 +10090,34 @@ queue-microtask@^1.2.2:
|
||||
resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"
|
||||
integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==
|
||||
|
||||
quill-delta@^3.6.2:
|
||||
version "3.6.3"
|
||||
resolved "https://registry.yarnpkg.com/quill-delta/-/quill-delta-3.6.3.tgz#b19fd2b89412301c60e1ff213d8d860eac0f1032"
|
||||
integrity sha512-wdIGBlcX13tCHOXGMVnnTVFtGRLoP0imqxM696fIPwIf5ODIYUHIvHbZcyvGlZFiFhK5XzDC2lpjbxRhnM05Tg==
|
||||
dependencies:
|
||||
deep-equal "^1.0.1"
|
||||
extend "^3.0.2"
|
||||
fast-diff "1.1.2"
|
||||
|
||||
quill-mention@^3.0.8:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/quill-mention/-/quill-mention-3.1.0.tgz#acf0bf21524b627e9304f63534e6d2b8c59ab4fd"
|
||||
integrity sha512-uyjGK8QPJHEcjvNc3wUJy6a05Oiu+6JJ0N9SFAwjYHYThgMzlKucyD975fq28Mr1it8ZFRNiRMPa0sCiVOAEwA==
|
||||
dependencies:
|
||||
quill "^1.3.7"
|
||||
|
||||
quill@^1.3.7:
|
||||
version "1.3.7"
|
||||
resolved "https://registry.yarnpkg.com/quill/-/quill-1.3.7.tgz#da5b2f3a2c470e932340cdbf3668c9f21f9286e8"
|
||||
integrity sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==
|
||||
dependencies:
|
||||
clone "^2.1.1"
|
||||
deep-equal "^1.0.1"
|
||||
eventemitter3 "^2.0.3"
|
||||
extend "^3.0.2"
|
||||
parchment "^1.1.4"
|
||||
quill-delta "^3.6.2"
|
||||
|
||||
ramda@^0.21.0:
|
||||
version "0.21.0"
|
||||
resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.21.0.tgz#a001abedb3ff61077d4ff1d577d44de77e8d0a35"
|
||||
@@ -10177,6 +10278,15 @@ react-property@2.0.0:
|
||||
resolved "https://registry.yarnpkg.com/react-property/-/react-property-2.0.0.tgz#2156ba9d85fa4741faf1918b38efc1eae3c6a136"
|
||||
integrity sha512-kzmNjIgU32mO4mmH5+iUyrqlpFQhF8K2k7eZ4fdLSOPFrD1XgEuSBv9LDEgxRXTMBqMd8ppT0x6TIzqE5pdGdw==
|
||||
|
||||
react-quill@2.0.0-beta.4:
|
||||
version "2.0.0-beta.4"
|
||||
resolved "https://registry.yarnpkg.com/react-quill/-/react-quill-2.0.0-beta.4.tgz#522bd2680dc55713068c6cac12f2bf2ccfebcd28"
|
||||
integrity sha512-KyAHvAlPjP4xLElKZJefMth91Z6FbbXRvq9OSu6xN3KBaoasLP9p+3dcxg4Ywr4tBlpMGXcPszYSAgd5CpJ45Q==
|
||||
dependencies:
|
||||
"@types/quill" "^1.3.10"
|
||||
lodash "^4.17.4"
|
||||
quill "^1.3.7"
|
||||
|
||||
react-refresh@^0.11.0:
|
||||
version "0.11.0"
|
||||
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.11.0.tgz#77198b944733f0f1f1a90e791de4541f9f074046"
|
||||
@@ -10360,6 +10470,15 @@ regex-not@^1.0.0, regex-not@^1.0.2:
|
||||
extend-shallow "^3.0.2"
|
||||
safe-regex "^1.1.0"
|
||||
|
||||
regexp.prototype.flags@^1.2.0:
|
||||
version "1.4.3"
|
||||
resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac"
|
||||
integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==
|
||||
dependencies:
|
||||
call-bind "^1.0.2"
|
||||
define-properties "^1.1.3"
|
||||
functions-have-names "^1.2.2"
|
||||
|
||||
regexp.prototype.flags@^1.3.1, regexp.prototype.flags@^1.4.1:
|
||||
version "1.4.1"
|
||||
resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.1.tgz#b3f4c0059af9e47eca9f3f660e51d81307e72307"
|
||||
|
||||
Reference in New Issue
Block a user