Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actualizar #1

Draft
wants to merge 77 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
f7d9e08
docker-compose: tabs → spaces
jtagcat Sep 17, 2021
d62021b
greeter: add %isodate (2021-09-17)
jtagcat Sep 17, 2021
4f1d301
Bump tmpl from 1.0.4 to 1.0.5
dependabot[bot] Sep 21, 2021
9a7fdb6
Merge pull request #35 from jtagcat/patch-1
Sep 24, 2021
6593409
Merge pull request #39 from phntxx/dependabot/npm_and_yarn/tmpl-1.0.5
Sep 24, 2021
be52e10
Bump url-parse from 1.5.1 to 1.5.3
dependabot[bot] Oct 6, 2021
273cdaa
Merge pull request #40 from phntxx/dependabot/npm_and_yarn/url-parse-…
Oct 27, 2021
b5bed59
Fixing day extension and date string.
cinderblockgames Nov 18, 2021
e549c57
Expanding getExtension test to cover all cases.
cinderblockgames Nov 18, 2021
8385ac0
Placing Settings box at top of page rather than centered. Since the …
cinderblockgames Nov 18, 2021
8bf68f2
Merge pull request #36 from jtagcat/patch-2
Nov 18, 2021
be93940
Merge pull request #44 from cinderblockgames/master
Nov 18, 2021
f812b55
Merge pull request #1 from cinderblockgames/default-select
cinderblockgames Nov 18, 2021
8484d37
Increasing size of icon button.
cinderblockgames Nov 18, 2021
79ec7b2
Merge pull request #2 from cinderblockgames/default-select
cinderblockgames Nov 18, 2021
0d07f3a
Merge pull request #45 from cinderblockgames/master
Nov 18, 2021
6288a02
Update greeter.tsx
Nov 18, 2021
4ba1973
Switching from `select defaultValue` to `option selected`.
cinderblockgames Nov 19, 2021
0f49230
has to be returned
cinderblockgames Nov 19, 2021
cfbe492
Merge pull request #46 from cinderblockgames/master
Nov 20, 2021
c07c45a
Fix styling on select.tsx
Nov 20, 2021
e2ebb55
Update CONTRIBUTING, add Docker to Pipeline
Nov 22, 2021
eb5cb2d
Update Settings Page
Nov 23, 2021
add184d
Update Settings Modal
Nov 24, 2021
30657f0
Improve test coverage for select.tsx
Nov 26, 2021
a245794
Remove "selected" from select.tsx
Nov 26, 2021
fcd9943
Update tests for better coverage
Nov 26, 2021
9c76a43
Update formatting of useMediaQuery.tsx
Nov 26, 2021
9f446a4
Add multiarch
Nov 30, 2021
24d9e6f
Remove armv6, not supported by node:lts
Nov 30, 2021
44e98ef
Bump follow-redirects from 1.14.1 to 1.14.7
dependabot[bot] Jan 14, 2022
46d001e
Add "newTab" to bookmarks
Jan 14, 2022
47eb654
Merge pull request #53 from phntxx/dependabot/npm_and_yarn/follow-red…
phntxx Jan 30, 2022
3d0efe3
Merge branch 'master' into feature/bookmark-new-tab
Jan 30, 2022
2e26200
Bump nanoid from 3.1.23 to 3.2.0
dependabot[bot] Jan 30, 2022
55c32b3
Bump tar from 6.1.0 to 6.1.11
dependabot[bot] Jan 30, 2022
12f7ffd
Bump node-fetch from 2.6.1 to 2.6.7
dependabot[bot] Jan 30, 2022
420d95c
Add newTab to bookmarks
Jan 30, 2022
05cc998
Merge branch 'feature/bookmark-new-tab'
Jan 30, 2022
80669f6
Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/node-fet…
Jan 30, 2022
96b8a73
Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/tar-6.1.11'
Jan 30, 2022
b797a75
Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/nanoid-3…
Jan 30, 2022
a5ad616
Replace CircleCI with GitHub Actions
Jan 30, 2022
d4f593c
Update Dockerfile
Jan 30, 2022
942cba9
Replace useFetcher with useFetch.
Feb 13, 2022
6d059ce
Update tests
Feb 13, 2022
8c48666
Bump follow-redirects from 1.14.7 to 1.14.8
dependabot[bot] Feb 15, 2022
cfdf548
Bump url-parse from 1.5.3 to 1.5.10
dependabot[bot] Feb 28, 2022
e75e147
Add GHCR support
Mar 5, 2022
ea9363c
Merge pull request #60 from phntxx/dependabot/npm_and_yarn/url-parse-…
phntxx Mar 6, 2022
1dca316
Merge pull request #58 from phntxx/dependabot/npm_and_yarn/follow-red…
phntxx Mar 6, 2022
dfe1f42
Update search.json and README
Mar 8, 2022
a743902
Merge branch 'master' of https://github.com/phntxx/dashboard
Mar 8, 2022
cef0826
Add autoFocus functionality to search.json
Mar 8, 2022
0b2cff3
Remove serviceworker
Apr 6, 2022
6b6e390
Fix vulnerabilities
Apr 6, 2022
765ab6d
Merge pull request #65 from phntxx/fix/vulns
phntxx Apr 6, 2022
8eedb57
Fix snapshot tests
dkarter Apr 10, 2022
0c56a3e
Fix formatting
dkarter Apr 10, 2022
77e7ce3
Add `yarn format` for formatting files
dkarter Apr 10, 2022
9ee3bc6
Run yarn prettier
dkarter Apr 10, 2022
3131110
Make the build not fail
phntxx Apr 10, 2022
13ffb59
Update Dockerfile
phntxx Apr 10, 2022
ca36fef
Make "format" independent from "prettier"
phntxx Apr 11, 2022
3a17646
Merge pull request #67 from dkarter/fix-prettier-script
phntxx Apr 11, 2022
940da4d
Update snapshots
phntxx Apr 11, 2022
2e0f420
Merge pull request #66 from dkarter/fix-snapshots
phntxx Apr 11, 2022
cd24e2b
Update snapshots
Apr 20, 2022
78425f1
Remove greeter snapshot test
Apr 20, 2022
78f1757
Update README, fix tests
phntxx Apr 20, 2022
d590320
Update greeter.spec.tsx
Jun 6, 2022
f86add2
Merge branch 'master' of github:phntxx/dashboard
Jun 6, 2022
8253218
Fixed Docker CLI in README.md
XenioxYT Jun 11, 2022
e079171
Update main.yml
Jun 12, 2022
777acc2
Merge pull request #70 from XenioxYT/patch-1
phntxx Jun 12, 2022
8dfceca
Update Material Icons WOFF2
Jun 20, 2022
f4d4b04
Merge pull request #73 from ctrl-freak/master
phntxx Jun 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
58 changes: 0 additions & 58 deletions .circleci/config.yml

This file was deleted.

9 changes: 8 additions & 1 deletion .eslintrc.js
@@ -1,5 +1,12 @@
module.exports = {
extends: ["eslint:recommended", "plugin:react-hooks/recommended"],
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
extends: [
"eslint:recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended",
],
rules: {
maxClassesPerFile: 0,
maxLineLength: 0,
Expand Down
106 changes: 106 additions & 0 deletions .github/workflows/main.yml
@@ -0,0 +1,106 @@
name: Tests and push apps

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:

style:
runs-on: ubuntu-latest
steps:

- name: Checkout repository
uses: actions/checkout@master

- name: Setup node.js
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Install dependencies
uses: borales/actions-yarn@v3.0.0
with:
cmd: install

- name: Check code formatting
uses: borales/actions-yarn@v3.0.0
with:
cmd: prettier --check

- name: Check code linting
uses: borales/actions-yarn@v3.0.0
with:
cmd: lint

dashboard:
runs-on: ubuntu-latest
steps:

- name: Checkout repository
uses: actions/checkout@master

- name: Setup node.js
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Install dependencies
uses: borales/actions-yarn@v3.0.0
with:
cmd: install

- name: Check code typing
uses: borales/actions-yarn@v3.0.0
with:
cmd: typecheck

- name: Run unit tests
uses: borales/actions-yarn@v3.0.0
with:
cmd: test --coverage

- name: Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true

build:
runs-on: ubuntu-latest
needs: [style, dashboard]
steps:

- name: Checkout repository
uses: actions/checkout@master

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v2
with:
push: true
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
tags: |
phntxx/dashboard:latest
ghcr.io/phntxx/dashboard:latest
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
@@ -1,6 +1,15 @@
# Contributing to this repository

Thank you for wanting to contribute to dashboard!

There are a few things to keep in mind when contributing:

- We're using Prettier, so make sure to either format your code using `yarn prettier --write`, or by installing an extension for your editor to auto-format everything.
- We're using the React testing library for testing and CircleCI for CI/CD. Please ensure that the tests pass with your contribution, either by adding sufficient test coverage to your contribution or by modifying existing tests for sufficient coverage (that is if your contribution modifies existing code).

In summary, please make sure the following two commands run without issue before creating your PR:

```sh
yarn prettier
yarn test
```
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Bastian Meissner
Copyright (c) 2022 Bastian Meissner

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
34 changes: 22 additions & 12 deletions README.md
@@ -1,10 +1,8 @@
# Dashboard

[![CircleCI][shield-circleci]][circleci]
[![Docker Cloud Build Status][shield-docker]][docker]
[![Docker Image Size (latest)][shield-docker-image]][docker]
[![codecov][shield-codecov]][codecov]
[![Dependencies][shield-deps]][repo]
[![GitHub license][shield-license]][license]

![Alt text](/screenshot.png?raw=true "screenshot")
Expand All @@ -28,15 +26,17 @@ The recommended way of installation is using [Docker](https://docker.com). You c

The Docker image is built on top of [this image](https://github.com/ratisbona-coding/nginx-cloudflare-cache), as it's based on Nginx and also provides functionality to purge the Cloudflare cache every time the container restarts (though this functionality is entirely optional).

The Docker image is available on both [DockerHub](docker) and the GitHub Container Repository (GHCR, see "packages").

1. Using the Docker CLI:

```sh
$ docker run -d \
-e CLOUDFLARE_ZONE_ID=[OPTIONAL CLOUDFLARE V4 ZONE ID] \
-e CLOUDFLARE_PURGE_TOKEN=[OPTIONAL CLOUDFLARE PURGE TOKEN] \
-v $(pwd)/data:/app/data
-v $(pwd)/data:/app/data \
-p 8080:8080 \
--name dashboard \
--name=dashboard \
phntxx/dashboard
```

Expand Down Expand Up @@ -71,6 +71,7 @@ $ yarn serve:production
```

### Manual install

```bash
$ git clone https://github.com/phntxx/dashboard.git
$ cd dashboard/
Expand All @@ -80,6 +81,7 @@ $ cp -R build/* .
```

#### `/etc/nginx/conf.d/dashboard.conf`

```
server {
server_name localhost;
Expand All @@ -101,8 +103,6 @@ $ chown -R www-data:www-data
$ systemctl nginx reload
```



## Configuration

There's a couple of things you can / need to configure to get Dashboard to look and behave just as you want it to.
Expand All @@ -125,7 +125,8 @@ To show the apps you want to show, change `apps.json` to resemble the following:
"name": "[Name of the app]",
"displayURL": "[URL you want to show]",
"url": "[URL to redirect to]",
"icon": "[Icon code]"
"icon": "[Icon code]",
"newTab": true
},
...
]
Expand All @@ -137,14 +138,16 @@ To show the apps you want to show, change `apps.json` to resemble the following:
"name": "[Name of the app]",
"displayURL": "[URL you want to show]",
"url": "[URL to redirect to]",
"icon": "[Icon code]"
"icon": "[Icon code]",
"newTab": false
},
...
]
}
```

Wherein either `apps` or `categories` can be omitted as needed.
`newTab` is optional and defaults to `false`.

To find icons, simply go to the [Material Design Icon Library](https://material.io/icons/) and copy one of the codes for an icon there.

Expand All @@ -160,7 +163,8 @@ To show bookmarks, `bookmarks.json` needs to resemble the following:
"items": [
{
"name": "[Bookmark Name]",
"url": "[Bookmark URL]"
"url": "[Bookmark URL]",
"newTab": true
},
...
]
Expand All @@ -170,6 +174,8 @@ To show bookmarks, `bookmarks.json` needs to resemble the following:
}
```

`newTab` is optional and defaults to `false`.

### Themes

In order to customize theming, `themes.json` needs to resemble this:
Expand Down Expand Up @@ -206,6 +212,13 @@ For search providers to work, make sure your `search.json` resembles the followi
}
```

You can also customize whether or not the search bar automatically focusses on render by adding
the following to `search.json`, on the same level where properties like `providers` are located:

```json
"autoFocus": true,
```

### Imprint

In order for the imprint-modal to show up, make sure your `imprint.json` resembles the following:
Expand Down Expand Up @@ -244,10 +257,7 @@ In order for the imprint-modal to show up, make sure your `imprint.json` resembl
[codecov]: https://codecov.io/gh/phntxx/dashboard
[repo]: https://github.com/phntxx/dashboard
[license]: https://github.com/phntxx/dashboard/LICENSE
[circleci]: https://circleci.com/gh/phntxx/dashboard
[shield-docker]: https://img.shields.io/docker/cloud/build/phntxx/dashboard
[shield-docker-image]: https://img.shields.io/docker/image-size/phntxx/dashboard/latest
[shield-circleci]: https://circleci.com/gh/phntxx/dashboard.svg?style=shield
[shield-codecov]: https://codecov.io/gh/phntxx/dashboard/branch/master/graph/badge.svg
[shield-license]: https://img.shields.io/github/license/phntxx/dashboard.svg
[shield-deps]: https://img.shields.io/david/phntxx/dashboard