From ac9ebe4160286c190a88f6dfd6a1cd8c8174c817 Mon Sep 17 00:00:00 2001 From: Aj - Thomas Date: Fri, 13 May 2022 18:14:08 +0200 Subject: [PATCH 01/40] Fix docker image volume mounting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #62 [๐Ÿ› Bug] Permission denied when writing configs --- Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5d13c04aa..95fbce619 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,11 +10,10 @@ 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 +COPY /.next/standalone ./ +COPY /.next/static ./.next/static -USER nextjs EXPOSE 7575 ENV PORT 7575 VOLUME /app/data/configs -CMD ["node", "server.js"] +CMD ["node", "server.js"] \ No newline at end of file From 527eb373a9ef80e6b12b6606d198cbfa706264df Mon Sep 17 00:00:00 2001 From: Chris <15677803+c00ldude1oo@users.noreply.github.com> Date: Fri, 13 May 2022 12:40:02 -0400 Subject: [PATCH 02/40] :construction_worker: Add dev builder New workflow to build dev branch on push/pulls and upload to ghcr.io with dev tag --- .github/workflows/docker.yml | 24 ++++--- .github/workflows/docker_dev.yml | 118 +++++++++++++++++++++++++++++++ 2 files changed, 134 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/docker_dev.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 0270806fe..e3479e1f2 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,4 +1,5 @@ -name: Build and publish Docker image +name: Docker Build +# Workflow to build and publish docker image on: push: @@ -7,12 +8,16 @@ on: workflow_dispatch: env: - IMAGE_NAME: homarr + # Use docker.io for Docker Hub if empty + REGISTRY: ghcr.io + # github.repository as / + IMAGE_NAME: ${{ github.repository }} jobs: # Push image to GitHub Packages. # See also https://docs.docker.com/docker-hub/builds/ - build: + yarn_install_and_build: + # Will run yarn install && yarn build runs-on: ubuntu-latest steps: - name: Setup @@ -20,9 +25,11 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Get yarn cache directory path + # to help speed up build times id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - name: Yarn cache + # to help speed up build times uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: @@ -43,6 +50,7 @@ jobs: - run: yarn install --frozen-lockfile - run: yarn build - name: Cache build output + # to copy needed files to docker build job uses: actions/cache@v2 id: restore-build with: @@ -52,11 +60,11 @@ jobs: ./public/ ./.next/static/ ./.next/standalone/ - ./packages.jsan + ./packages.json key: ${{ github.sha }} - docker: - needs: [build] + docker_image_build_and_push: + needs: [yarn_install_and_build] runs-on: ubuntu-latest permissions: packages: write @@ -73,14 +81,14 @@ jobs: ./public/ ./.next/static/ ./.next/standalone/ - ./packages.jsan + ./packages.json key: ${{ github.sha }} - 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 }} + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} # generate Docker tags based on the following events/attributes tags: | type=raw,value=latest diff --git a/.github/workflows/docker_dev.yml b/.github/workflows/docker_dev.yml new file mode 100644 index 000000000..cf2131438 --- /dev/null +++ b/.github/workflows/docker_dev.yml @@ -0,0 +1,118 @@ +name: Docker Dev Build +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +on: + push: + branches: [ dev ] + # Publish semver tags as releases. + tags: [ 'v*.*.*' ] + pull_request: + branches: [ dev ] + # to manually run build + workflow_dispatch: + +env: + # Use docker.io for Docker Hub if empty + REGISTRY: ghcr.io + # github.repository as / + IMAGE_NAME: ${{ github.repository }} + +jobs: + # Push image to GitHub Packages. + # See also https://docs.docker.com/docker-hub/builds/ + yarn_install_and_build: + runs-on: ubuntu-latest + steps: + - 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 build + - name: Cache build output + uses: actions/cache@v2 + id: restore-build + with: + path: | + ./next.config.js + ./pages/ + ./public/ + ./.next/static/ + ./.next/standalone/ + ./packages.json + key: ${{ github.sha }} + + docker_image_build_and_push: + needs: [yarn_install_and_build] + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: actions/cache@v2 + id: restore-build + with: + path: | + ./next.config.js + ./pages/ + ./public/ + ./.next/static/ + ./.next/standalone/ + ./packages.json + key: ${{ github.sha }} + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + # list of Docker images to use as base name for tags + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + # generate Docker tags based on the following events/attributes + tags: | + tpye=raw,value=dev,priority=1 + type=sha + type=edge,branch=dev + - 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: 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 }} From 7a3ac58e4d156db53484509e706df43d82434205 Mon Sep 17 00:00:00 2001 From: Aj - Thomas <49837342+ajnart@users.noreply.github.com> Date: Fri, 13 May 2022 22:13:57 +0200 Subject: [PATCH 03/40] =?UTF-8?q?=F0=9F=94=A5=20Remove=20labels=20from=20i?= =?UTF-8?q?ssue=20templates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/feature-request.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml index 95cbbc888..b02b79780 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -1,9 +1,6 @@ name: โœจ Feature Request description: Request a feature to help improve Homarr! title: '' -labels: ['โœจ Feature'] -assignees: - - ajnart body: - type: textarea id: feature From 79dd1f32965abd81c66ac362d56e6fde84fde877 Mon Sep 17 00:00:00 2001 From: Aj - Thomas <49837342+ajnart@users.noreply.github.com> Date: Fri, 13 May 2022 22:14:12 +0200 Subject: [PATCH 04/40] =?UTF-8?q?=F0=9F=94=A5=20Remove=20labels=20from=20i?= =?UTF-8?q?ssue=20templates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/module.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/module.yml b/.github/ISSUE_TEMPLATE/module.yml index 620cade1c..214c59dc4 100644 --- a/.github/ISSUE_TEMPLATE/module.yml +++ b/.github/ISSUE_TEMPLATE/module.yml @@ -1,7 +1,6 @@ name: ๐Ÿ—๏ธ Module request description: Request for a module to be added / an integration with you favourite service ! title: '<title>' -labels: ['๐Ÿ—๏ธ Module'] body: - type: textarea id: name From 5159edbea1b70a0b7bca5ccc8dd36392eee7b9ed Mon Sep 17 00:00:00 2001 From: Walkx <walkxnl@gmail.com> Date: Fri, 13 May 2022 18:58:06 +0200 Subject: [PATCH 05/40] =?UTF-8?q?=F0=9F=93=9D=20Adds=20documentation=20for?= =?UTF-8?q?=20volume=20mounting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6f90f23a1..995b137ce 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ _Requirements_: **Standard Docker Install** ```sh -docker run --name homarr -p 7575:7575 -d ghcr.io/ajnart/homarr +docker run --name homarr -p 7575:7575 -v /data/docker/homarr:/app/data/configs -d ghcr.io/ajnart/homarr:latest ``` **Docker Compose** @@ -56,12 +56,16 @@ version: '3' services: homarr: container_name: homarr - image: ghcr.io/ajnart/homarr + image: ghcr.io/ajnart/homarr:latest restart: unless-stopped + volumes: + - /data/docker/homarr:/app/data/configs ports: - '7575:7575' ``` +***Getting EACCESS errors in the logs? Try running `sudo chmod 775 /directory-you-mounted-to`!*** + ### Building from Source ๐Ÿ› ๏ธ _Requirements_: From 43ee6899ae734a24160492b2097a9d255d2e1048 Mon Sep 17 00:00:00 2001 From: Walkx <walkxnl@gmail.com> Date: Fri, 13 May 2022 20:56:34 +0200 Subject: [PATCH 06/40] =?UTF-8?q?=F0=9F=93=9D=20Adds=20known=20issues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 995b137ce..c7493542e 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ - [๐Ÿ“ƒ Table of Contents](#-table-of-contents) - [๐Ÿš€ Getting Started](#-getting-started) - [โ„น๏ธ About](#โ„น๏ธ-about) + - [๐Ÿ› Known Issues](#-known-issues) - [โšก Installation](#-installation) - [Deploying from Docker Image ๐Ÿณ](#deploying-from-docker-image-) - [Building from Source ๐Ÿ› ๏ธ](#building-from-source-๏ธ) @@ -33,6 +34,12 @@ Homarr is a simple and lightweight homepage for your server, that helps you easi **[โคด๏ธ Back to Top](#-table-of-contents)** +## ๐Ÿ› Known Issues + +- Used search engine not properly selected https://github.com/ajnart/homarr/issues/35 +- Application cards not responsive https://github.com/ajnart/homarr/issues/47 +- Icon alignment out for specific icons https://github.com/ajnart/homarr/issues/82 + ## โšก Installation ### Deploying from Docker Image ๐Ÿณ From 0a6346b383b37c8f77072ff1082cd413a84cc2cb Mon Sep 17 00:00:00 2001 From: Aj - Thomas <49837342+ajnart@users.noreply.github.com> Date: Fri, 13 May 2022 23:29:30 +0200 Subject: [PATCH 07/40] :memo: Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index c7493542e..f0c01a4ca 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,6 @@ Homarr is a simple and lightweight homepage for your server, that helps you easi ## ๐Ÿ› Known Issues -- Used search engine not properly selected https://github.com/ajnart/homarr/issues/35 - Application cards not responsive https://github.com/ajnart/homarr/issues/47 - Icon alignment out for specific icons https://github.com/ajnart/homarr/issues/82 From 32f81cefe7a74e5bfd8e419fad747a847bf787b9 Mon Sep 17 00:00:00 2001 From: Aj - Thomas <thomascamlong@gmail.com> Date: Sat, 14 May 2022 01:14:56 +0200 Subject: [PATCH 08/40] =?UTF-8?q?=F0=9F=8F=97=EF=B8=8F=20=F0=9F=92=A5=20Ch?= =?UTF-8?q?ange=20the=20whole=20folder=20structure.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now using src as a subfolder to the source files --- data/configs/config_new.json | 2 +- package.json | 4 ++-- {components => src/components}/AppShelf/AddAppShelfItem.tsx | 0 {components => src/components}/AppShelf/AppShelf.story.tsx | 0 {components => src/components}/AppShelf/AppShelf.tsx | 0 .../components}/AppShelf/AppShelfItemWrapper.tsx | 0 {components => src/components}/AppShelf/AppShelfMenu.tsx | 0 .../components}/ColorSchemeToggle/ColorSchemeSwitch.tsx | 0 .../components}/ColorSchemeToggle/ColorSchemeToggle.tsx | 0 {components => src/components}/Config/ConfigChanger.tsx | 0 {components => src/components}/Config/LoadConfig.tsx | 0 {components => src/components}/Config/SaveConfig.tsx | 0 {components => src/components}/Config/SelectConfig.tsx | 0 {components => src/components}/SearchBar/SearchBar.story.tsx | 0 {components => src/components}/SearchBar/SearchBar.tsx | 0 {components => src/components}/Settings/ModuleEnabler.tsx | 0 .../components}/Settings/SettingsMenu.story.tsx | 0 {components => src/components}/Settings/SettingsMenu.tsx | 2 +- {components => src/components}/Welcome/Welcome.story.tsx | 0 {components => src/components}/Welcome/Welcome.styles.ts | 0 {components => src/components}/Welcome/Welcome.test.tsx | 0 {components => src/components}/Welcome/Welcome.tsx | 0 {components => src/components}/layout/Aside.tsx | 0 {components => src/components}/layout/Footer.tsx | 0 {components => src/components}/layout/Header.tsx | 0 {components => src/components}/layout/Layout.tsx | 0 {components => src/components}/layout/Logo.tsx | 0 {components => src/components}/layout/Navbar.tsx | 0 .../components}/modules/calendar/CalendarComponent.story.tsx | 0 .../components}/modules/calendar/CalendarModule.tsx | 3 +-- .../components}/modules/calendar/MediaDisplay.story.tsx | 0 .../components}/modules/calendar/MediaDisplay.tsx | 0 {components => src/components}/modules/calendar/index.ts | 0 .../components}/modules/calendar/mediaExample.ts | 0 .../components}/modules/date/DateModule.story.tsx | 0 {components => src/components}/modules/date/DateModule.tsx | 0 {components => src/components}/modules/date/index.ts | 0 {components => src/components}/modules/index.ts | 0 {components => src/components}/modules/moduleWrapper.tsx | 0 {components => src/components}/modules/modules.tsx | 0 {components => src/components}/modules/readme.md | 0 {pages => src/pages}/_app.tsx | 0 {pages => src/pages}/_document.tsx | 0 {pages => src/pages}/api/configs/[slug].ts | 0 {pages => src/pages}/api/configs/index.ts | 0 {pages => src/pages}/index.tsx | 0 {public => src/public}/favicon.svg | 0 {tools => src/tools}/state.tsx | 0 {tools => src/tools}/theme.ts | 0 {tools => src/tools}/types.ts | 0 50 files changed, 5 insertions(+), 6 deletions(-) rename {components => src/components}/AppShelf/AddAppShelfItem.tsx (100%) rename {components => src/components}/AppShelf/AppShelf.story.tsx (100%) rename {components => src/components}/AppShelf/AppShelf.tsx (100%) rename {components => src/components}/AppShelf/AppShelfItemWrapper.tsx (100%) rename {components => src/components}/AppShelf/AppShelfMenu.tsx (100%) rename {components => src/components}/ColorSchemeToggle/ColorSchemeSwitch.tsx (100%) rename {components => src/components}/ColorSchemeToggle/ColorSchemeToggle.tsx (100%) rename {components => src/components}/Config/ConfigChanger.tsx (100%) rename {components => src/components}/Config/LoadConfig.tsx (100%) rename {components => src/components}/Config/SaveConfig.tsx (100%) rename {components => src/components}/Config/SelectConfig.tsx (100%) rename {components => src/components}/SearchBar/SearchBar.story.tsx (100%) rename {components => src/components}/SearchBar/SearchBar.tsx (100%) rename {components => src/components}/Settings/ModuleEnabler.tsx (100%) rename {components => src/components}/Settings/SettingsMenu.story.tsx (100%) rename {components => src/components}/Settings/SettingsMenu.tsx (98%) rename {components => src/components}/Welcome/Welcome.story.tsx (100%) rename {components => src/components}/Welcome/Welcome.styles.ts (100%) rename {components => src/components}/Welcome/Welcome.test.tsx (100%) rename {components => src/components}/Welcome/Welcome.tsx (100%) rename {components => src/components}/layout/Aside.tsx (100%) rename {components => src/components}/layout/Footer.tsx (100%) rename {components => src/components}/layout/Header.tsx (100%) rename {components => src/components}/layout/Layout.tsx (100%) rename {components => src/components}/layout/Logo.tsx (100%) rename {components => src/components}/layout/Navbar.tsx (100%) rename {components => src/components}/modules/calendar/CalendarComponent.story.tsx (100%) rename {components => src/components}/modules/calendar/CalendarModule.tsx (98%) rename {components => src/components}/modules/calendar/MediaDisplay.story.tsx (100%) rename {components => src/components}/modules/calendar/MediaDisplay.tsx (100%) rename {components => src/components}/modules/calendar/index.ts (100%) rename {components => src/components}/modules/calendar/mediaExample.ts (100%) rename {components => src/components}/modules/date/DateModule.story.tsx (100%) rename {components => src/components}/modules/date/DateModule.tsx (100%) rename {components => src/components}/modules/date/index.ts (100%) rename {components => src/components}/modules/index.ts (100%) rename {components => src/components}/modules/moduleWrapper.tsx (100%) rename {components => src/components}/modules/modules.tsx (100%) rename {components => src/components}/modules/readme.md (100%) rename {pages => src/pages}/_app.tsx (100%) rename {pages => src/pages}/_document.tsx (100%) rename {pages => src/pages}/api/configs/[slug].ts (100%) rename {pages => src/pages}/api/configs/index.ts (100%) rename {pages => src/pages}/index.tsx (100%) rename {public => src/public}/favicon.svg (100%) rename {tools => src/tools}/state.tsx (100%) rename {tools => src/tools}/theme.ts (100%) rename {tools => src/tools}/types.ts (100%) diff --git a/data/configs/config_new.json b/data/configs/config_new.json index a938826f0..283a8b971 100644 --- a/data/configs/config_new.json +++ b/data/configs/config_new.json @@ -10,7 +10,7 @@ ], "settings": { "searchBar": true, - "searchUrl": "https://google.com/search?q=", + "searchUrl": "https://duckduckgo.com/?q=", "enabledModules": [] } } \ No newline at end of file diff --git a/package.json b/package.json index 961298b49..3a73c40e8 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "homarr", - "version": "0.1.6", + "version": "0.2.0", "private": "false", - "description": "Homarr - A homepage for your server.", + "description": "Homarr - A homepage for your server.", "repository": { "type": "git", "url": "https://github.com/ajnart/homarr" diff --git a/components/AppShelf/AddAppShelfItem.tsx b/src/components/AppShelf/AddAppShelfItem.tsx similarity index 100% rename from components/AppShelf/AddAppShelfItem.tsx rename to src/components/AppShelf/AddAppShelfItem.tsx diff --git a/components/AppShelf/AppShelf.story.tsx b/src/components/AppShelf/AppShelf.story.tsx similarity index 100% rename from components/AppShelf/AppShelf.story.tsx rename to src/components/AppShelf/AppShelf.story.tsx diff --git a/components/AppShelf/AppShelf.tsx b/src/components/AppShelf/AppShelf.tsx similarity index 100% rename from components/AppShelf/AppShelf.tsx rename to src/components/AppShelf/AppShelf.tsx diff --git a/components/AppShelf/AppShelfItemWrapper.tsx b/src/components/AppShelf/AppShelfItemWrapper.tsx similarity index 100% rename from components/AppShelf/AppShelfItemWrapper.tsx rename to src/components/AppShelf/AppShelfItemWrapper.tsx diff --git a/components/AppShelf/AppShelfMenu.tsx b/src/components/AppShelf/AppShelfMenu.tsx similarity index 100% rename from components/AppShelf/AppShelfMenu.tsx rename to src/components/AppShelf/AppShelfMenu.tsx diff --git a/components/ColorSchemeToggle/ColorSchemeSwitch.tsx b/src/components/ColorSchemeToggle/ColorSchemeSwitch.tsx similarity index 100% rename from components/ColorSchemeToggle/ColorSchemeSwitch.tsx rename to src/components/ColorSchemeToggle/ColorSchemeSwitch.tsx diff --git a/components/ColorSchemeToggle/ColorSchemeToggle.tsx b/src/components/ColorSchemeToggle/ColorSchemeToggle.tsx similarity index 100% rename from components/ColorSchemeToggle/ColorSchemeToggle.tsx rename to src/components/ColorSchemeToggle/ColorSchemeToggle.tsx diff --git a/components/Config/ConfigChanger.tsx b/src/components/Config/ConfigChanger.tsx similarity index 100% rename from components/Config/ConfigChanger.tsx rename to src/components/Config/ConfigChanger.tsx diff --git a/components/Config/LoadConfig.tsx b/src/components/Config/LoadConfig.tsx similarity index 100% rename from components/Config/LoadConfig.tsx rename to src/components/Config/LoadConfig.tsx diff --git a/components/Config/SaveConfig.tsx b/src/components/Config/SaveConfig.tsx similarity index 100% rename from components/Config/SaveConfig.tsx rename to src/components/Config/SaveConfig.tsx diff --git a/components/Config/SelectConfig.tsx b/src/components/Config/SelectConfig.tsx similarity index 100% rename from components/Config/SelectConfig.tsx rename to src/components/Config/SelectConfig.tsx diff --git a/components/SearchBar/SearchBar.story.tsx b/src/components/SearchBar/SearchBar.story.tsx similarity index 100% rename from components/SearchBar/SearchBar.story.tsx rename to src/components/SearchBar/SearchBar.story.tsx diff --git a/components/SearchBar/SearchBar.tsx b/src/components/SearchBar/SearchBar.tsx similarity index 100% rename from components/SearchBar/SearchBar.tsx rename to src/components/SearchBar/SearchBar.tsx diff --git a/components/Settings/ModuleEnabler.tsx b/src/components/Settings/ModuleEnabler.tsx similarity index 100% rename from components/Settings/ModuleEnabler.tsx rename to src/components/Settings/ModuleEnabler.tsx diff --git a/components/Settings/SettingsMenu.story.tsx b/src/components/Settings/SettingsMenu.story.tsx similarity index 100% rename from components/Settings/SettingsMenu.story.tsx rename to src/components/Settings/SettingsMenu.story.tsx diff --git a/components/Settings/SettingsMenu.tsx b/src/components/Settings/SettingsMenu.tsx similarity index 98% rename from components/Settings/SettingsMenu.tsx rename to src/components/Settings/SettingsMenu.tsx index b8fed02eb..bce50fd0b 100644 --- a/components/Settings/SettingsMenu.tsx +++ b/src/components/Settings/SettingsMenu.tsx @@ -13,7 +13,7 @@ import { 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 { CURRENT_VERSION, REPO_URL } from '../../../data/constants'; import { useConfig } from '../../tools/state'; import { ColorSchemeSwitch } from '../ColorSchemeToggle/ColorSchemeSwitch'; import ConfigChanger from '../Config/ConfigChanger'; diff --git a/components/Welcome/Welcome.story.tsx b/src/components/Welcome/Welcome.story.tsx similarity index 100% rename from components/Welcome/Welcome.story.tsx rename to src/components/Welcome/Welcome.story.tsx diff --git a/components/Welcome/Welcome.styles.ts b/src/components/Welcome/Welcome.styles.ts similarity index 100% rename from components/Welcome/Welcome.styles.ts rename to src/components/Welcome/Welcome.styles.ts diff --git a/components/Welcome/Welcome.test.tsx b/src/components/Welcome/Welcome.test.tsx similarity index 100% rename from components/Welcome/Welcome.test.tsx rename to src/components/Welcome/Welcome.test.tsx diff --git a/components/Welcome/Welcome.tsx b/src/components/Welcome/Welcome.tsx similarity index 100% rename from components/Welcome/Welcome.tsx rename to src/components/Welcome/Welcome.tsx diff --git a/components/layout/Aside.tsx b/src/components/layout/Aside.tsx similarity index 100% rename from components/layout/Aside.tsx rename to src/components/layout/Aside.tsx diff --git a/components/layout/Footer.tsx b/src/components/layout/Footer.tsx similarity index 100% rename from components/layout/Footer.tsx rename to src/components/layout/Footer.tsx diff --git a/components/layout/Header.tsx b/src/components/layout/Header.tsx similarity index 100% rename from components/layout/Header.tsx rename to src/components/layout/Header.tsx diff --git a/components/layout/Layout.tsx b/src/components/layout/Layout.tsx similarity index 100% rename from components/layout/Layout.tsx rename to src/components/layout/Layout.tsx diff --git a/components/layout/Logo.tsx b/src/components/layout/Logo.tsx similarity index 100% rename from components/layout/Logo.tsx rename to src/components/layout/Logo.tsx diff --git a/components/layout/Navbar.tsx b/src/components/layout/Navbar.tsx similarity index 100% rename from components/layout/Navbar.tsx rename to src/components/layout/Navbar.tsx diff --git a/components/modules/calendar/CalendarComponent.story.tsx b/src/components/modules/calendar/CalendarComponent.story.tsx similarity index 100% rename from components/modules/calendar/CalendarComponent.story.tsx rename to src/components/modules/calendar/CalendarComponent.story.tsx diff --git a/components/modules/calendar/CalendarModule.tsx b/src/components/modules/calendar/CalendarModule.tsx similarity index 98% rename from components/modules/calendar/CalendarModule.tsx rename to src/components/modules/calendar/CalendarModule.tsx index 0af7a9a92..dd84050fa 100644 --- a/components/modules/calendar/CalendarModule.tsx +++ b/src/components/modules/calendar/CalendarModule.tsx @@ -2,9 +2,8 @@ import { Popover, Box, ScrollArea, Divider, Indicator } from '@mantine/core'; 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 { Calendar as CalendarIcon, Check } from 'tabler-icons-react'; import { RadarrMediaDisplay, SonarrMediaDisplay } from './MediaDisplay'; import { useConfig } from '../../../tools/state'; import { IModule } from '../modules'; diff --git a/components/modules/calendar/MediaDisplay.story.tsx b/src/components/modules/calendar/MediaDisplay.story.tsx similarity index 100% rename from components/modules/calendar/MediaDisplay.story.tsx rename to src/components/modules/calendar/MediaDisplay.story.tsx diff --git a/components/modules/calendar/MediaDisplay.tsx b/src/components/modules/calendar/MediaDisplay.tsx similarity index 100% rename from components/modules/calendar/MediaDisplay.tsx rename to src/components/modules/calendar/MediaDisplay.tsx diff --git a/components/modules/calendar/index.ts b/src/components/modules/calendar/index.ts similarity index 100% rename from components/modules/calendar/index.ts rename to src/components/modules/calendar/index.ts diff --git a/components/modules/calendar/mediaExample.ts b/src/components/modules/calendar/mediaExample.ts similarity index 100% rename from components/modules/calendar/mediaExample.ts rename to src/components/modules/calendar/mediaExample.ts diff --git a/components/modules/date/DateModule.story.tsx b/src/components/modules/date/DateModule.story.tsx similarity index 100% rename from components/modules/date/DateModule.story.tsx rename to src/components/modules/date/DateModule.story.tsx diff --git a/components/modules/date/DateModule.tsx b/src/components/modules/date/DateModule.tsx similarity index 100% rename from components/modules/date/DateModule.tsx rename to src/components/modules/date/DateModule.tsx diff --git a/components/modules/date/index.ts b/src/components/modules/date/index.ts similarity index 100% rename from components/modules/date/index.ts rename to src/components/modules/date/index.ts diff --git a/components/modules/index.ts b/src/components/modules/index.ts similarity index 100% rename from components/modules/index.ts rename to src/components/modules/index.ts diff --git a/components/modules/moduleWrapper.tsx b/src/components/modules/moduleWrapper.tsx similarity index 100% rename from components/modules/moduleWrapper.tsx rename to src/components/modules/moduleWrapper.tsx diff --git a/components/modules/modules.tsx b/src/components/modules/modules.tsx similarity index 100% rename from components/modules/modules.tsx rename to src/components/modules/modules.tsx diff --git a/components/modules/readme.md b/src/components/modules/readme.md similarity index 100% rename from components/modules/readme.md rename to src/components/modules/readme.md diff --git a/pages/_app.tsx b/src/pages/_app.tsx similarity index 100% rename from pages/_app.tsx rename to src/pages/_app.tsx diff --git a/pages/_document.tsx b/src/pages/_document.tsx similarity index 100% rename from pages/_document.tsx rename to src/pages/_document.tsx diff --git a/pages/api/configs/[slug].ts b/src/pages/api/configs/[slug].ts similarity index 100% rename from pages/api/configs/[slug].ts rename to src/pages/api/configs/[slug].ts diff --git a/pages/api/configs/index.ts b/src/pages/api/configs/index.ts similarity index 100% rename from pages/api/configs/index.ts rename to src/pages/api/configs/index.ts diff --git a/pages/index.tsx b/src/pages/index.tsx similarity index 100% rename from pages/index.tsx rename to src/pages/index.tsx diff --git a/public/favicon.svg b/src/public/favicon.svg similarity index 100% rename from public/favicon.svg rename to src/public/favicon.svg diff --git a/tools/state.tsx b/src/tools/state.tsx similarity index 100% rename from tools/state.tsx rename to src/tools/state.tsx diff --git a/tools/theme.ts b/src/tools/theme.ts similarity index 100% rename from tools/theme.ts rename to src/tools/theme.ts diff --git a/tools/types.ts b/src/tools/types.ts similarity index 100% rename from tools/types.ts rename to src/tools/types.ts From cf17aa61ccdab972756a343275c2dc9274a58773 Mon Sep 17 00:00:00 2001 From: Aj - Thomas <thomascamlong@gmail.com> Date: Sat, 14 May 2022 01:19:12 +0200 Subject: [PATCH 09/40] Update basic layout --- src/components/layout/Layout.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/layout/Layout.tsx b/src/components/layout/Layout.tsx index bfb1a2dc3..d486766af 100644 --- a/src/components/layout/Layout.tsx +++ b/src/components/layout/Layout.tsx @@ -7,7 +7,7 @@ import Navbar from './Navbar'; const useStyles = createStyles((theme) => ({ main: { [theme.fn.largerThan('md')]: { - width: 1200, + maxWidth: 1200, }, }, })); From 534cf3571ac9d1f202f37ad20f65d406b3cd50d2 Mon Sep 17 00:00:00 2001 From: Aj - Thomas <thomascamlong@gmail.com> Date: Sat, 14 May 2022 01:29:50 +0200 Subject: [PATCH 10/40] =?UTF-8?q?=F0=9F=90=B3=20Fix=20docker=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- {src/public => public}/favicon.svg | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {src/public => public}/favicon.svg (100%) diff --git a/src/public/favicon.svg b/public/favicon.svg similarity index 100% rename from src/public/favicon.svg rename to public/favicon.svg From 1c560f9a5b951891610c752f43f6bf167ba19111 Mon Sep 17 00:00:00 2001 From: Chris <15677803+c00ldude1oo@users.noreply.github.com> Date: Sat, 14 May 2022 02:56:39 -0400 Subject: [PATCH 11/40] :memo: Add build status badges Added build status badges made image bit bigger --- README.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f0c01a4ca..a038ee135 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ - <h3 align="center">Homarr</h3> <p align="center"> -<img align="end" width=500 src="https://user-images.githubusercontent.com/49837342/168315259-b778c816-10fe-44db-bd25-3eea6f31b233.png" /> + <a href=""> +<img align="end" width=600 src="https://user-images.githubusercontent.com/49837342/168315259-b778c816-10fe-44db-bd25-3eea6f31b233.png" /> + <a/> </p> <p align = "center"> A homepage for <i>your</i> server. @@ -11,10 +12,18 @@ <br /> <i>Join the discord!</i> <br /> - <a href = "https://discord.gg/aCsmEV5RgA" > <img src="https://discordapp.com/api/guilds/972958686051962910/widget.png?style=shield" > </a> + <a href = "https://discord.gg/aCsmEV5RgA" > <img title="Discord" src="https://discordapp.com/api/guilds/972958686051962910/widget.png?style=shield" > </a> + <br/> + <br/> + <a href="https://github.com/ajnart/homarr/actions/workflows/docker.yml"> + <img title="Docker CI Status" src="https://github.com/ajnart/homarr/actions/workflows/docker.yml/badge.svg" alt="CI Status"> + </a> + <a href="https://github.com/ajnart/homarr/actions/workflows/docker_dev.yml"> + <img title="Docker Dev CI Status" src="https://github.com/ajnart/homarr/actions/workflows/docker_dev.yml/badge.svg" alt="Dev CI Status"> + </a> + <br/> </p> - # ๐Ÿ“ƒ Table of Contents - [๐Ÿ“ƒ Table of Contents](#-table-of-contents) - [๐Ÿš€ Getting Started](#-getting-started) From 3287752e450f442c124715eee5ee73f4084ff61b Mon Sep 17 00:00:00 2001 From: "Thomas \"ajnart\" Camlong" <thomascamlong@gmail.com> Date: Sat, 14 May 2022 10:08:26 +0200 Subject: [PATCH 12/40] =?UTF-8?q?=E2=9A=B0=EF=B8=8F=20Remove=20dead=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Welcome/Welcome.story.tsx | 7 ------- src/components/Welcome/Welcome.styles.ts | 14 ------------- src/components/Welcome/Welcome.test.tsx | 12 ------------ src/components/Welcome/Welcome.tsx | 25 ------------------------ 4 files changed, 58 deletions(-) delete mode 100644 src/components/Welcome/Welcome.story.tsx delete mode 100644 src/components/Welcome/Welcome.styles.ts delete mode 100644 src/components/Welcome/Welcome.test.tsx delete mode 100644 src/components/Welcome/Welcome.tsx diff --git a/src/components/Welcome/Welcome.story.tsx b/src/components/Welcome/Welcome.story.tsx deleted file mode 100644 index 9c4600005..000000000 --- a/src/components/Welcome/Welcome.story.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import { Welcome } from './Welcome'; - -export default { - title: 'Welcome', -}; - -export const Usage = () => <Welcome />; diff --git a/src/components/Welcome/Welcome.styles.ts b/src/components/Welcome/Welcome.styles.ts deleted file mode 100644 index d1b99469f..000000000 --- a/src/components/Welcome/Welcome.styles.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { createStyles } from '@mantine/core'; - -export default createStyles((theme) => ({ - title: { - color: theme.colorScheme === 'dark' ? theme.white : theme.black, - fontSize: 100, - fontWeight: 900, - letterSpacing: -2, - - [theme.fn.smallerThan('md')]: { - fontSize: 50, - }, - }, -})); diff --git a/src/components/Welcome/Welcome.test.tsx b/src/components/Welcome/Welcome.test.tsx deleted file mode 100644 index c3b94254e..000000000 --- a/src/components/Welcome/Welcome.test.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import { render, screen } from '@testing-library/react'; -import { Welcome } from './Welcome'; - -describe('Welcome component', () => { - it('has correct Next.js theming section link', () => { - render(<Welcome />); - expect(screen.getByText('this guide')).toHaveAttribute( - 'href', - 'https://mantine.dev/theming/next/' - ); - }); -}); diff --git a/src/components/Welcome/Welcome.tsx b/src/components/Welcome/Welcome.tsx deleted file mode 100644 index 8ade7ec0b..000000000 --- a/src/components/Welcome/Welcome.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { Title, Text, Anchor } from '@mantine/core'; -import useStyles from './Welcome.styles'; - -export function Welcome() { - const { classes } = useStyles(); - - return ( - <> - <Title className={classes.title} align="center" mt={100}> - Welcome to{' '} - <Text inherit variant="gradient" component="span"> - Mantine - </Text> - - - This starter Next.js project includes a minimal setup for server side rendering, if you want - to learn more on Mantine + Next.js integration follow{' '} - - this guide - - . To get started edit index.tsx file. - - - ); -} From 9a3ef24619b4125e9628345d1e39d92f17f1e1ea Mon Sep 17 00:00:00 2001 From: "Thomas \"ajnart\" Camlong" Date: Sat, 14 May 2022 10:09:22 +0200 Subject: [PATCH 13/40] :lipstick: SearchBar styling --- src/components/SearchBar/SearchBar.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/SearchBar/SearchBar.tsx b/src/components/SearchBar/SearchBar.tsx index fec0dffe4..c78589ad5 100644 --- a/src/components/SearchBar/SearchBar.tsx +++ b/src/components/SearchBar/SearchBar.tsx @@ -22,6 +22,7 @@ export default function SearchBar(props: any) { return ( Date: Sat, 14 May 2022 10:10:18 +0200 Subject: [PATCH 14/40] :bug: Fix storybook and remove Jest --- .storybook/main.js | 2 +- jest.config.js | 16 ---------------- jest.setup.js | 1 - tsconfig.json | 2 +- 4 files changed, 2 insertions(+), 19 deletions(-) delete mode 100644 jest.config.js delete mode 100644 jest.setup.js diff --git a/.storybook/main.js b/.storybook/main.js index d1506f5e8..6449361d8 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -1,5 +1,5 @@ module.exports = { - stories: ['../components/**/*.story.mdx', '../components/**/*.story.*'], + stories: ['../src/components/**/*.story.mdx', '../src/components/**/*.story.*'], addons: [ 'storybook-dark-mode', '@storybook/addon-links', diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index 7365fc753..000000000 --- a/jest.config.js +++ /dev/null @@ -1,16 +0,0 @@ -const nextJest = require('next/jest'); - -const createJestConfig = nextJest({ - dir: './', -}); - -const customJestConfig = { - setupFilesAfterEnv: ['/jest.setup.js'], - moduleNameMapper: { - '^@/components/(.*)$': '/components/$1', - '^@/pages/(.*)$': '/pages/$1', - }, - testEnvironment: 'jest-environment-jsdom', -}; - -module.exports = createJestConfig(customJestConfig); diff --git a/jest.setup.js b/jest.setup.js deleted file mode 100644 index 666127af3..000000000 --- a/jest.setup.js +++ /dev/null @@ -1 +0,0 @@ -import '@testing-library/jest-dom/extend-expect'; diff --git a/tsconfig.json b/tsconfig.json index 99710e857..3ff0501fd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,6 +15,6 @@ "jsx": "preserve", "incremental": true }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "next.config.js"], "exclude": ["node_modules"] } From af7d0782935294bee599d54406b525953d7fa279 Mon Sep 17 00:00:00 2001 From: "Thomas \"ajnart\" Camlong" Date: Sat, 14 May 2022 10:28:24 +0200 Subject: [PATCH 15/40] :construction_worker: Fix CI --- .github/workflows/docker.yml | 2 +- .github/workflows/docker_dev.yml | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index e3479e1f2..51abcae19 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,4 +1,4 @@ -name: Docker Build +name: Master docker CI # Workflow to build and publish docker image on: diff --git a/.github/workflows/docker_dev.yml b/.github/workflows/docker_dev.yml index cf2131438..fae34345a 100644 --- a/.github/workflows/docker_dev.yml +++ b/.github/workflows/docker_dev.yml @@ -1,17 +1,18 @@ -name: Docker Dev Build +name: Development CI # This workflow uses actions that are not certified by GitHub. # They are provided by a third-party and are governed by # separate terms of service, privacy policy, and support # documentation. on: push: - branches: [ dev ] - # Publish semver tags as releases. - tags: [ 'v*.*.*' ] + tags: + - v* pull_request: - branches: [ dev ] - # to manually run build workflow_dispatch: + inputs: + tags: + requierd: true + description: 'Tags to deploy to' env: # Use docker.io for Docker Hub if empty @@ -93,9 +94,7 @@ jobs: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} # generate Docker tags based on the following events/attributes tags: | - tpye=raw,value=dev,priority=1 - type=sha - type=edge,branch=dev + type=ref,event=pr - name: Set up QEMU uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx From c593334be8a712741f88634513ec06239f22f3e3 Mon Sep 17 00:00:00 2001 From: "Thomas \"ajnart\" Camlong" Date: Sat, 14 May 2022 10:52:12 +0200 Subject: [PATCH 16/40] :construction_worker: Update CI image name for easier deployment --- .github/workflows/docker.yml | 2 +- .github/workflows/docker_dev.yml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 51abcae19..4bd399d2a 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -3,6 +3,7 @@ name: Master docker CI on: push: + branches: [master] tags: - v* workflow_dispatch: @@ -98,7 +99,6 @@ jobs: - 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 diff --git a/.github/workflows/docker_dev.yml b/.github/workflows/docker_dev.yml index fae34345a..79d714183 100644 --- a/.github/workflows/docker_dev.yml +++ b/.github/workflows/docker_dev.yml @@ -100,7 +100,6 @@ jobs: - 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 @@ -112,6 +111,6 @@ jobs: with: platforms: linux/amd64,linux/arm64,linux/arm/v7 context: . - push: ${{ github.event_name != 'pull_request' }} + push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From 09483ada010386ef832b0e1f5c8bb597cb93cf88 Mon Sep 17 00:00:00 2001 From: "Thomas \"ajnart\" Camlong" Date: Sat, 14 May 2022 10:52:12 +0200 Subject: [PATCH 17/40] :construction_worker: Update CI image name for easier deployment --- .github/workflows/docker_dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker_dev.yml b/.github/workflows/docker_dev.yml index 79d714183..c8a2a33fa 100644 --- a/.github/workflows/docker_dev.yml +++ b/.github/workflows/docker_dev.yml @@ -18,7 +18,7 @@ env: # Use docker.io for Docker Hub if empty REGISTRY: ghcr.io # github.repository as / - IMAGE_NAME: ${{ github.repository }} + IMAGE_NAME: ${{ github.repository }}-test jobs: # Push image to GitHub Packages. From 2139f48df3d22a1e9558a278f35fcaccbcbe30fd Mon Sep 17 00:00:00 2001 From: "Thomas \"ajnart\" Camlong" Date: Sat, 14 May 2022 10:10:58 +0200 Subject: [PATCH 18/40] Work on responsiveness for the AppShelf --- src/components/AppShelf/AddAppShelfItem.tsx | 2 +- src/components/AppShelf/AppShelf.story.tsx | 8 +++ src/components/AppShelf/AppShelf.tsx | 71 +++++++++---------- .../AppShelf/AppShelfItemWrapper.tsx | 4 -- src/components/layout/Navbar.tsx | 2 +- 5 files changed, 45 insertions(+), 42 deletions(-) diff --git a/src/components/AppShelf/AddAppShelfItem.tsx b/src/components/AppShelf/AddAppShelfItem.tsx index 5f42d2af2..c47287dd4 100644 --- a/src/components/AppShelf/AddAppShelfItem.tsx +++ b/src/components/AppShelf/AddAppShelfItem.tsx @@ -25,7 +25,7 @@ export default function AddItemShelfItem(props: any) { <> setOpened(false)} title="Add a service" diff --git a/src/components/AppShelf/AppShelf.story.tsx b/src/components/AppShelf/AppShelf.story.tsx index 610f1370c..928510aac 100644 --- a/src/components/AppShelf/AppShelf.story.tsx +++ b/src/components/AppShelf/AppShelf.story.tsx @@ -1,3 +1,4 @@ +import { SimpleGrid } from '@mantine/core'; import AppShelf, { AppShelfItem } from './AppShelf'; export default { @@ -16,3 +17,10 @@ export default { export const Default = (args: any) => ; export const One = (args: any) => ; +export const Ten = (args: any) => ( + + {Array.from(Array(10)).map((_, i) => ( + + ))} + +); diff --git a/src/components/AppShelf/AppShelf.tsx b/src/components/AppShelf/AppShelf.tsx index af5f85340..4f8032cf4 100644 --- a/src/components/AppShelf/AppShelf.tsx +++ b/src/components/AppShelf/AppShelf.tsx @@ -1,9 +1,8 @@ import React, { useState } from 'react'; import { motion } from 'framer-motion'; -import { Text, AspectRatio, SimpleGrid, Card, Image, Group, Space } from '@mantine/core'; +import { Text, AspectRatio, SimpleGrid, Card, Center, Image, useMantineTheme } from '@mantine/core'; import { useConfig } from '../../tools/state'; import { serviceItem } from '../../tools/types'; -import AddItemShelfItem from './AddAppShelfItem'; import { AppShelfItemWrapper } from './AppShelfItemWrapper'; import AppShelfMenu from './AppShelfMenu'; @@ -11,11 +10,19 @@ const AppShelf = () => { const { config } = useConfig(); return ( - + {config.services.map((service) => ( ))} - ); }; @@ -23,6 +30,7 @@ const AppShelf = () => { export function AppShelfItem(props: any) { const { service }: { service: serviceItem } = props; const [hovering, setHovering] = useState(false); + const theme = useMantineTheme(); return ( - + - - - + {service.name} - - - - + + + @@ -76,16 +79,12 @@ export function AppShelfItem(props: any) { onClick={() => { window.open(service.url); }} - style={{ - maxWidth: '50%', - marginBottom: 10, - }} src={service.icon} /> - + ); } diff --git a/src/components/AppShelf/AppShelfItemWrapper.tsx b/src/components/AppShelf/AppShelfItemWrapper.tsx index a305661e6..ffe409062 100644 --- a/src/components/AppShelf/AppShelfItemWrapper.tsx +++ b/src/components/AppShelf/AppShelfItemWrapper.tsx @@ -8,10 +8,6 @@ export function AppShelfItemWrapper(props: any) { 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" > diff --git a/src/components/layout/Navbar.tsx b/src/components/layout/Navbar.tsx index 2f9b26f0b..a8ff679a0 100644 --- a/src/components/layout/Navbar.tsx +++ b/src/components/layout/Navbar.tsx @@ -6,7 +6,7 @@ export default function Navbar() { return ( ); } From c243256180a5fa5a4f0f928a56aa934db2aeb542 Mon Sep 17 00:00:00 2001 From: "Thomas \"ajnart\" Camlong" Date: Sun, 15 May 2022 19:32:02 +0200 Subject: [PATCH 38/40] =?UTF-8?q?=F0=9F=92=84=20Improve=20layout=20styling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/layout/Aside.tsx | 4 +- src/components/layout/Footer.tsx | 68 +++++++++++++++++++------------- src/components/layout/Navbar.tsx | 4 +- 3 files changed, 46 insertions(+), 30 deletions(-) diff --git a/src/components/layout/Aside.tsx b/src/components/layout/Aside.tsx index b2372fdb8..d51055c0b 100644 --- a/src/components/layout/Aside.tsx +++ b/src/components/layout/Aside.tsx @@ -5,9 +5,11 @@ import ModuleWrapper from '../modules/moduleWrapper'; export default function Aside() { return (