chore: clean files using pre-commit

environments/review-docs-pre-c-zs4ui8/deployments/15563
jo 2022-11-18 22:12:21 +01:00 zatwierdzone przez Marge Me
rodzic f4dbc584e1
commit 0061e82ecd
81 zmienionych plików z 137 dodań i 128 usunięć

Wyświetl plik

@ -7,15 +7,15 @@ Before you begin, here are some helpful tips for submitting an issue:
* If you need help setting up or using Funkwhale, try asking in our * If you need help setting up or using Funkwhale, try asking in our
[forum's support board](https://forum.funkwhale.audio/support) or our [support [forum's support board](https://forum.funkwhale.audio/support) or our [support
chat room](https://riot.im/app/#/room/#funkwhale-support:tchncs.de). chat room](https://riot.im/app/#/room/#funkwhale-support:tchncs.de).
* If you think you've found a bug but aren't sure, you can ask in one of the above channels * If you think you've found a bug but aren't sure, you can ask in one of the above channels
first. Once you're confident it's a bug, go ahead and create an issue for us to investigate. first. Once you're confident it's a bug, go ahead and create an issue for us to investigate.
Select the **Bug** template in the **Description** dropdown menu. This template contains Select the **Bug** template in the **Description** dropdown menu. This template contains
helpful tips for creating your report. helpful tips for creating your report.
* For smaller additions and enhancements, please file a feature request. * For smaller additions and enhancements, please file a feature request.
Select the **Feature Request** template in the **Description** dropdown Select the **Feature Request** template in the **Description** dropdown
menu. This template contains helpful tips for creating your request. menu. This template contains helpful tips for creating your request.
* If you have ideas for new features or use cases, consider opening a thread in our * If you have ideas for new features or use cases, consider opening a thread in our
[forum](https://forum.funkwhale.audio/t/development). This enables us to [forum](https://forum.funkwhale.audio/t/development). This enables us to
discuss the feature, its use cases, and the development effort it requires. discuss the feature, its use cases, and the development effort it requires.
We always like hearing ideas from our community. If you're still not sure, click We always like hearing ideas from our community. If you're still not sure, click
@ -24,4 +24,3 @@ the **Create issue** button and we'll work with you to sort out the issue.
Happy listening! :whale: Happy listening! :whale:
--> -->

Wyświetl plik

@ -1,4 +1,4 @@
Please avoid merging the base branch into your feature branch. We are working with rebases and those merged tend to cause trouble. Please avoid merging the base branch into your feature branch. We are working with rebases and those merged tend to cause trouble.
For further questions, join us at Matrix: https://matrix.to/#/#funkwhale-dev:matrix.org For further questions, join us at Matrix: https://matrix.to/#/#funkwhale-dev:matrix.org
If your contribution is fixing an issue by a small change, please consider a merge into `stable` by using it as target branch. If your contribution is fixing an issue by a small change, please consider a merge into `stable` by using it as target branch.

Wyświetl plik

@ -51,7 +51,7 @@
}, },
{ {
"matchPackageNames": ["node"], "matchPackageNames": ["node"],
"allowedVersions": "/\d+[02468]$/" "allowedVersions": "/\\d+[02468]$/"
}, },
{ {
"matchFiles": ["deploy/docker-compose.yml"], "matchFiles": ["deploy/docker-compose.yml"],

Wyświetl plik

@ -6,4 +6,4 @@ RUN sudo apt update -y \
RUN pip install poetry \ RUN pip install poetry \
&& poetry config virtualenvs.create true \ && poetry config virtualenvs.create true \
&& poetry config virtualenvs.in-project true && poetry config virtualenvs.in-project true

Wyświetl plik

@ -40,4 +40,4 @@ services:
- ../deploy/funkwhale_proxy.conf:/etc/nginx/funkwhale_proxy.conf:ro - ../deploy/funkwhale_proxy.conf:/etc/nginx/funkwhale_proxy.conf:ro
- ../docker/nginx/conf.dev:/etc/nginx/nginx.conf.template:ro - ../docker/nginx/conf.dev:/etc/nginx/nginx.conf.template:ro
- ../docker/nginx/entrypoint.sh:/entrypoint.sh:ro - ../docker/nginx/entrypoint.sh:/entrypoint.sh:ro
- ../front:/frontend:ro - ../front:/frontend:ro

Wyświetl plik

@ -20,5 +20,6 @@ repos:
- id: check-vcs-permalinks - id: check-vcs-permalinks
- id: check-merge-conflict - id: check-merge-conflict
- id: end-of-file-fixer - id: end-of-file-fixer
exclude: ^(docs/locales/.*/LC_MESSAGES)
- id: mixed-line-ending - id: mixed-line-ending
- id: trailing-whitespace - id: trailing-whitespace

5
.vscode/launch.json vendored
Wyświetl plik

@ -1,7 +1,4 @@
{ {
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
@ -31,4 +28,4 @@
"django": true "django": true
} }
] ]
} }

Wyświetl plik

@ -1,5 +1,5 @@
[MASTER] [MASTER]
load-plugins=pylint_common, pylint_django, pylint_celery load-plugins=pylint_common, pylint_django, pylint_celery
[FORMAT] [FORMAT]
max-line-length=120 max-line-length=120
@ -8,4 +8,4 @@ max-line-length=120
disable=missing-docstring,invalid-name disable=missing-docstring,invalid-name
[DESIGN] [DESIGN]
max-parents=13 max-parents=13

Wyświetl plik

@ -46,7 +46,7 @@ urlpatterns = [
# with proper key. # with proper key.
# If you don't want to use API on that step, then just use ConfirmEmailView # If you don't want to use API on that step, then just use ConfirmEmailView
# view from: # view from:
# djang-allauth https://github.com/pennersr/django-allauth/blob/master/allauth/account/views.py#L190 # https://github.com/pennersr/django-allauth/blob/a62a370681/allauth/account/views.py#L291
url( url(
r"^registration/account-confirm-email/(?P<key>\w+)/?$", r"^registration/account-confirm-email/(?P<key>\w+)/?$",
TemplateView.as_view(), TemplateView.as_view(),

Wyświetl plik

@ -1,4 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python3
import django import django
import os import os
import sys import sys

Wyświetl plik

@ -4549,4 +4549,4 @@
"http://creativecommons.org/publicdomain/zero/1.0/" "http://creativecommons.org/publicdomain/zero/1.0/"
] ]
} }
] ]

Wyświetl plik

@ -1 +1 @@
Adding support for play all radio in search result page (#1563) Adding support for play all radio in search result page (#1563)

Wyświetl plik

@ -1 +1 @@
New task checking if remote instance is reachable to avoid playback latence (#1711) New task checking if remote instance is reachable to avoid playback latence (#1711)

Wyświetl plik

@ -1 +1 @@
Hide create custom radio to un-authenticated users (#1720) Hide create custom radio to un-authenticated users (#1720)

Wyświetl plik

@ -1 +1 @@
Update migration after django update (#1815) Update migration after django update (#1815)

Wyświetl plik

@ -1 +1 @@
Add Gitpod configuration and guide Add Gitpod configuration and guide

Wyświetl plik

@ -1 +1 @@
Add playable tracks to gitpod instance Add playable tracks to gitpod instance

Wyświetl plik

@ -1 +1 @@
Add python debug and test support for gitpod Add python debug and test support for gitpod

Wyświetl plik

@ -1 +1 @@
Add playlists radio to search page (#1968) Add playlists radio to search page (#1968)

Wyświetl plik

@ -1 +1 @@
Allow using default browser dark mode and update UI dynamically on change Allow using default browser dark mode and update UI dynamically on change

Wyświetl plik

@ -1 +1 @@
Updated the installation guides to make installation steps clearer. Updated the installation guides to make installation steps clearer.

Wyświetl plik

@ -1 +1 @@
Refactor node info endpoint to use proper serializers Refactor node info endpoint to use proper serializers

Wyświetl plik

@ -1 +1 @@
Add a celery task to scan remote library (#1712) Add a celery task to scan remote library (#1712)

Wyświetl plik

@ -52,4 +52,4 @@ API breaking change in ``/api/v1/albums``
To increase performance, querying ``/api/v1/albums`` doesn't return album tracks anymore. This caused To increase performance, querying ``/api/v1/albums`` doesn't return album tracks anymore. This caused
some performance issues, especially as some albums and series have dozens or even hundreds of tracks. some performance issues, especially as some albums and series have dozens or even hundreds of tracks.
If you want to retrieve tracks for an album, you can query ``/api/v1/tracks/?album=<albumid>``. If you want to retrieve tracks for an album, you can query ``/api/v1/tracks/?album=<albumid>``.

Wyświetl plik

@ -1,4 +1,4 @@
### Gentoo init scripts ### Gentoo init scripts
Copy the files to `/etc/init.d/` Copy the files to `/etc/init.d/`
@ -16,4 +16,4 @@ Starting funkwhale_server will automatically start the other two, as well as ngi
``` ```
# rc-service funkwhale_server start # rc-service funkwhale_server start
``` ```

8
deploy/Gentoo/funkwhale_beat 100644 → 100755
Wyświetl plik

@ -2,18 +2,18 @@
NAME=funkwhalebeat NAME=funkwhalebeat
PIDFILE=/var/run/$NAME.pid PIDFILE=/var/run/$NAME.pid
USER=funkwhale USER=funkwhale
WORKDIR=/srv/funkwhale/api WORKDIR=/srv/funkwhale/api
Celery=/srv/funkwhale/virtualenv/bin/celery Celery=/srv/funkwhale/virtualenv/bin/celery
BEAT_ARGS="-A funkwhale_api.taskapp beat -l INFO" BEAT_ARGS="-A funkwhale_api.taskapp beat -l INFO"
depend() { depend() {
need net need net
} }
start() { start() {
ebegin "Starting Funkwhale Beat" ebegin "Starting Funkwhale Beat"
cd /srv/funkwhale/api cd /srv/funkwhale/api
set -a && source /srv/funkwhale/config/.env && set +a set -a && source /srv/funkwhale/config/.env && set +a
echo ' start beat' echo ' start beat'
start-stop-daemon --start --user $USER --make-pidfile --pidfile $PIDFILE -d $WORKDIR --exec $Celery -- $BEAT_ARGS >> /var/log/funk/worker.log 2>&1& start-stop-daemon --start --user $USER --make-pidfile --pidfile $PIDFILE -d $WORKDIR --exec $Celery -- $BEAT_ARGS >> /var/log/funk/worker.log 2>&1&
echo 'Started Beat' echo 'Started Beat'
echo echo

0
deploy/Gentoo/funkwhale_server 100644 → 100755
Wyświetl plik

8
deploy/Gentoo/funkwhale_worker 100644 → 100755
Wyświetl plik

@ -2,19 +2,19 @@
NAME=funkwhaleworker NAME=funkwhaleworker
PIDFILE=/var/run/$NAME.pid PIDFILE=/var/run/$NAME.pid
USER=funkwhale USER=funkwhale
WORKDIR=/srv/funkwhale/api WORKDIR=/srv/funkwhale/api
Celery=/srv/funkwhale/virtualenv/bin/celery Celery=/srv/funkwhale/virtualenv/bin/celery
WORKER_ARGS=" -A funkwhale_api.taskapp worker -l INFO" WORKER_ARGS=" -A funkwhale_api.taskapp worker -l INFO"
depend() { depend() {
need net need net
} }
start() { start() {
ebegin "Starting Funkwhale Worker" ebegin "Starting Funkwhale Worker"
cd /srv/funkwhale/api cd /srv/funkwhale/api
set -a && source /srv/funkwhale/config/.env && set +a set -a && source /srv/funkwhale/config/.env && set +a
echo ' start beat' echo ' start beat'
start-stop-daemon --start --user $USER --make-pidfile --pidfile $PIDFILE -d $WORKDIR --exec $Celery -- $WORKER_ARGS >> /var/log/funk/worker.log 2>&1& start-stop-daemon --start --user $USER --make-pidfile --pidfile $PIDFILE -d $WORKDIR --exec $Celery -- $WORKER_ARGS >> /var/log/funk/worker.log 2>&1&
echo 'Started Worker' echo 'Started Worker'
echo echo

Wyświetl plik

@ -17,4 +17,4 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new # Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile %: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

Wyświetl plik

@ -148,7 +148,7 @@ Publish your allowed-domains list
Whether to make your list of allowed domains public. Enable this if you want users to check who you are federating with. Whether to make your list of allowed domains public. Enable this if you want users to check who you are federating with.
Accountless report categories Accountless report categories
A list of {term}`categories <Report categories>` that {term}`anonymous` users can submit. A list of {term}`categories <Report categories>` that {term}`anonymous` users can submit.
``` ```

Wyświetl plik

@ -131,7 +131,7 @@ Serving files from an object store requires some changes to the reverse proxy.
4. Add your S3 store URL to the `img-src` and `media-src` headers. 4. Add your S3 store URL to the `img-src` and `media-src` headers.
```{code-block} text ```{code-block} text
add_header Content-Security-Policy "...img-src 'self' https://<your-s3-URL> data:;...media-src https://<your-s3-URL> 'self' data:"; add_header Content-Security-Policy "...img-src 'self' https://<your-s3-URL> data:;...media-src https://<your-s3-URL> 'self' data:";
``` ```
5. Test your Nginx configuration. 5. Test your Nginx configuration.

Wyświetl plik

@ -260,7 +260,7 @@ docker-compose run --rm api python manage.py import_files $LIBRARY_ID "/srv/funk
Funkwhale doesn't delete track metadata when you delete a track. This is useful if you want to delete a file but keep a record of a track for created playlists or favorites. Funkwhale doesn't delete track metadata when you delete a track. This is useful if you want to delete a file but keep a record of a track for created playlists or favorites.
If you want to remove the file's metadata when you delete the file, run `import_files` with the `--prune` flag. This flag removes the metadata of any If you want to remove the file's metadata when you delete the file, run `import_files` with the `--prune` flag. This flag removes the metadata of any
```{note} ```{note}
You can use the `--prune` flag with the `--watch` flag. This means Funkwhale removes the metadata of referenced files you delete from your storage. You can use the `--prune` flag with the `--watch` flag. This means Funkwhale removes the metadata of referenced files you delete from your storage.

Wyświetl plik

@ -86,7 +86,7 @@ That's it! Your directory structure should look like this:
├── data # files served by the API ├── data # files served by the API
└── static # storage location for persistent data └── static # storage location for persistent data
└── media # storage location for media files └── media # storage location for media files
└── music # storage location for audio files └── music # storage location for audio files
└── front # frontend files for the user interface └── front # frontend files for the user interface
``` ```
@ -98,17 +98,17 @@ Once you've created the directory structure you can download Funkwhale. Funkwhal
```{code-block} sh ```{code-block} sh
curl -L -o "api-$FUNKWHALE_VERSION.zip" "https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/$FUNKWHALE_VERSION/download?job=build_api" curl -L -o "api-$FUNKWHALE_VERSION.zip" "https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/$FUNKWHALE_VERSION/download?job=build_api"
unzip "api-$FUNKWHALE_VERSION.zip" -d extracted unzip "api-$FUNKWHALE_VERSION.zip" -d extracted
mv extracted/api/* api/ mv extracted/api/* api/
rm -rf extracted api-$FUNKWHALE_VERSION.zip rm -rf extracted api-$FUNKWHALE_VERSION.zip
``` ```
2. Download the frontend 2. Download the frontend
```{code-block} sh ```{code-block} sh
curl -L -o "front-$FUNKWHALE_VERSION.zip" "https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/$FUNKWHALE_VERSION/download?job=build_front" curl -L -o "front-$FUNKWHALE_VERSION.zip" "https://dev.funkwhale.audio/funkwhale/funkwhale/-/jobs/artifacts/$FUNKWHALE_VERSION/download?job=build_front"
unzip "front-$FUNKWHALE_VERSION.zip" -d extracted unzip "front-$FUNKWHALE_VERSION.zip" -d extracted
mv extracted/front . mv extracted/front .
rm -rf extracted front-$FUNKWHALE_VERSION.zip rm -rf extracted front-$FUNKWHALE_VERSION.zip
``` ```
@ -332,7 +332,7 @@ Funkwhale uses a reverse proxy to serve content to users. We use [Nginx](https:/
# Log in to a root shell. # Log in to a root shell.
sudo su sudo su
# Create an Nginx configuration using the Funkwhale template with details from your `.env` file. # Create an Nginx configuration using the Funkwhale template with details from your `.env` file.
set -a && source /srv/funkwhale/config/.env && set +a set -a && source /srv/funkwhale/config/.env && set +a

Wyświetl plik

@ -161,7 +161,7 @@ Funkwhale uses a reverse proxy to serve content to users. We use [Nginx](https:/
# Log in to a root shell. # Log in to a root shell.
sudo su sudo su
# Create an Nginx configuration using the Funkwhale template with details from your `.env` file. # Create an Nginx configuration using the Funkwhale template with details from your `.env` file.
set -a && source /srv/funkwhale/.env && set +a set -a && source /srv/funkwhale/.env && set +a

Wyświetl plik

@ -157,7 +157,7 @@ You need to initialize the postgres container on your {term}`destination server`
CREATE USER funkwhale; \ CREATE USER funkwhale; \
GRANT ALL PRIVILEGES ON DATABASE funkwhale TO funkwhale;" > init.sql # Create an init.sql file with the correct permissions GRANT ALL PRIVILEGES ON DATABASE funkwhale TO funkwhale;" > init.sql # Create an init.sql file with the correct permissions
docker-compose run --rm postgres psql -U postgres -d postgres < "init.sql" # Import the init.sql file docker-compose run --rm postgres psql -U postgres -d postgres < "init.sql" # Import the init.sql file
``` ```
2. Import your database backup. 2. Import your database backup.

Wyświetl plik

@ -19,7 +19,7 @@ Use the `create_library` command to create new libraries for a given user.
* - `--privacy-level` * - `--privacy-level`
- Enum (String) - Enum (String)
- The [privacy level](../../user_documentation/libraries/create_library.md) of the library - The [privacy level](../../user_documentation/libraries/create_library.md) of the library
- `"me"` (default) - `"me"` (default)
- `"instance"` - `"instance"`
- `"everyone"` - `"everyone"`

Wyświetl plik

@ -856,7 +856,7 @@ RadioSessionCreate:
description: | description: |
The type of radio to start. Depending of the type, the `related_object_id` field The type of radio to start. Depending of the type, the `related_object_id` field
will need to be set to a non null value: will need to be set to a non null value:
- tag: tag `name` - tag: tag `name`
- artist: artist `id` - artist: artist `id`
- library: library `uuid` - library: library `uuid`
@ -870,9 +870,9 @@ RadioSessionCreate:
- less-listened - less-listened
- actor-content - actor-content
- library - library
related_object_id: related_object_id:
type: string type: string
default: null default: null
description: description:
Value may be an integer depending of the `radio_type`. Value may be an integer depending of the `radio_type`.

Wyświetl plik

@ -78,7 +78,7 @@ Library:
schema: schema:
type: string type: string
format: uuid format: uuid
ObjectId: ObjectId:
name: id name: id
in: path in: path
@ -145,7 +145,7 @@ Related:
type: integer type: integer
format: int64 format: int64
Scope: Scope:
name: "scope" name: "scope"
in: "query" in: "query"
@ -175,7 +175,7 @@ ContentCategory:
in: "query" in: "query"
description: | description: |
Limits the results to those whose artist content type matches the query. Limits the results to those whose artist content type matches the query.
required: false required: false
schema: schema:
type: "string" type: "string"

0
docs/conf.py 100644 → 100755
Wyświetl plik

Wyświetl plik

@ -15,4 +15,4 @@ authentication
rate_limit rate_limit
subsonic subsonic
``` ```

Wyświetl plik

@ -147,4 +147,4 @@ You can check the full list of options by passing the `-h` flag:
```sh ```sh
docker-compose -f dev.yml run --rm api pytest -h docker-compose -f dev.yml run --rm api pytest -h
``` ```

Wyświetl plik

@ -210,7 +210,7 @@ In this example, **Alice** notifies **Bob** that she's undoing her follow.
See [the `Audio` object reference](#audio) for details on the object's structure. See [the `Audio` object reference](#audio) for details on the object's structure.
``` ```
When Funkwhale receives a `Create` activity with an [`Audio` object](#audio), it persists a local upload in the database. It then associates the upload to related library and track information. If no track matches the audio metadata, Funkwhale creates on using the `metadata` attribute in the object. When Funkwhale receives a `Create` activity with an [`Audio` object](#audio), it persists a local upload in the database. It then associates the upload to related library and track information. If no track matches the audio metadata, Funkwhale creates on using the `metadata` attribute in the object.
#### Checks #### Checks
@ -363,7 +363,7 @@ In this example, **Bob** deletes three audio objects in a library and notifies t
### Artist ### Artist
An `Artist` is a custom object used to store musical artist and podcast creator information. An `Artist` is a custom object used to store musical artist and podcast creator information.
#### Properties #### Properties
@ -404,7 +404,7 @@ An `Artist` is a custom object used to store musical artist and podcast creator
### Album ### Album
An `Album` is a custom object used to store album and podcast series information. An `Album` is a custom object used to store album and podcast series information.
#### Properties #### Properties

Wyświetl plik

@ -100,16 +100,16 @@ Your `plugins` should include the following information:
* - `name` * - `name`
- String - String
- The name of your plugin, used in the `.env` file - The name of your plugin, used in the `.env` file
* - `label` * - `label`
- String - String
- The readable label that appears in the Funkwhale frontend - The readable label that appears in the Funkwhale frontend
* - `description` * - `description`
- String - String
- A meaningful description of your plugin and what it does - A meaningful description of your plugin and what it does
* - `version` * - `version`
- String - String
- The version number of your plugin - The version number of your plugin
* - `user` * - `user`
- Boolean - Boolean
- Whether the plugin is a **user-level** plugin or a **pod-level** plugin. See [scopes](#scopes) for more information - Whether the plugin is a **user-level** plugin or a **pod-level** plugin. See [scopes](#scopes) for more information
* - `conf` * - `conf`
@ -197,4 +197,4 @@ Here is an example of how the above plugin works:
1. User "Harry" enables the plugin 1. User "Harry" enables the plugin
2. "Harry" changes the greeting to "You're a wizard" 2. "Harry" changes the greeting to "You're a wizard"
3. "Harry" visits the `/greeting` endpoint in their browser 3. "Harry" visits the `/greeting` endpoint in their browser
4. The browser returns the message "You're a wizard Harry" 4. The browser returns the message "You're a wizard Harry"

Wyświetl plik

@ -17,7 +17,7 @@ Permissions
Additional rights that an administrator/moderator can grant to a user. Permissions grant access to menus and actions in Funkwhale. Additional rights that an administrator/moderator can grant to a user. Permissions grant access to menus and actions in Funkwhale.
Available permissions: Available permissions:
- {guilabel}`Moderation` – Grants access to the {guilabel}`Moderation` menu. Enables the user to moderate users, domains, and the allow-list. - {guilabel}`Moderation` – Grants access to the {guilabel}`Moderation` menu. Enables the user to moderate users, domains, and the allow-list.
- {guilabel}`Manage library` – Grants access to the {guilabel}`Library` menu. Enables the user to make changes to library content. This includes deleting local objects and handling edit suggestions. - {guilabel}`Manage library` – Grants access to the {guilabel}`Library` menu. Enables the user to make changes to library content. This includes deleting local objects and handling edit suggestions.
- {guilabel}`Manage instance-level settings` – Grants access to the {guilabel}`Settings` menu. Enables the user to make changes to pod-level settings such as security settings and API behavior. - {guilabel}`Manage instance-level settings` – Grants access to the {guilabel}`Settings` menu. Enables the user to make changes to pod-level settings such as security settings and API behavior.

Wyświetl plik

@ -1,7 +1,7 @@
# Handle edits # Handle edits
```{note} ```{note}
Users can edit content in their own libraries. Moderators don't need to approve these edits. The edits appear in the __Edits__ queue to give admins and moderators a full timeline of changes. Users can edit content in their own libraries. Moderators don't need to approve these edits. The edits appear in the __Edits__ queue to give admins and moderators a full timeline of changes.
``` ```
Users can suggest metadata edits on objects they can access. When a user suggests an edit, it's sent to the __Edits__ queue for review. Moderators and pod admins can accept or reject these edits. Users can suggest metadata edits on objects they can access. When a user suggests an edit, it's sent to the __Edits__ queue for review. Moderators and pod admins can accept or reject these edits.

Wyświetl plik

@ -35,7 +35,7 @@ To approve a sign-up request:
2. Select the wrench icon ({fa}`wrench`) at the top of the sidebar to open the {guilabel}`Administration` menu. 2. Select the wrench icon ({fa}`wrench`) at the top of the sidebar to open the {guilabel}`Administration` menu.
3. Select {guilabel}`Moderation`. The {guilabel}`Reports` page opens. 3. Select {guilabel}`Moderation`. The {guilabel}`Reports` page opens.
4. Select {guilabel}`User Requests` at the top of the screen. A list of pending requests appears. 4. Select {guilabel}`User Requests` at the top of the screen. A list of pending requests appears.
5. Read through the details of the request. 5. Read through the details of the request.
6. Select {guilabel}`Approve` in the {guilabel}`Actions` section. 6. Select {guilabel}`Approve` in the {guilabel}`Actions` section.
::: :::
@ -47,7 +47,7 @@ To approve a sign-up request:
2. Select the wrench icon ({fa}`wrench`) at the top of the screen to open the {guilabel}`Administration` menu. 2. Select the wrench icon ({fa}`wrench`) at the top of the screen to open the {guilabel}`Administration` menu.
3. Select {guilabel}`Moderation`. The {guilabel}`Reports` page opens. 3. Select {guilabel}`Moderation`. The {guilabel}`Reports` page opens.
4. Select {guilabel}`User Requests` at the top of the screen. A list of pending requests appears. 4. Select {guilabel}`User Requests` at the top of the screen. A list of pending requests appears.
5. Read through the details of the request. 5. Read through the details of the request.
6. Select {guilabel}`Approve` in the {guilabel}`Actions` section. 6. Select {guilabel}`Approve` in the {guilabel}`Actions` section.
::: :::
@ -68,7 +68,7 @@ To refuse a sign-up request:
2. Select the wrench icon ({fa}`wrench`) at the top of the sidebar to open the {guilabel}`Administration` menu. 2. Select the wrench icon ({fa}`wrench`) at the top of the sidebar to open the {guilabel}`Administration` menu.
3. Select {guilabel}`Moderation`. The {guilabel}`Reports` page opens. 3. Select {guilabel}`Moderation`. The {guilabel}`Reports` page opens.
4. Select {guilabel}`User Requests` at the top of the screen. A list of pending requests appears. 4. Select {guilabel}`User Requests` at the top of the screen. A list of pending requests appears.
5. Read through the details of the request. 5. Read through the details of the request.
6. Select {guilabel}`Refuse` in the {guilabel}`Actions` section. 6. Select {guilabel}`Refuse` in the {guilabel}`Actions` section.
::: :::
@ -80,7 +80,7 @@ To refuse a sign-up request:
2. Select the wrench icon ({fa}`wrench`) at the top of the screen to open the {guilabel}`Administration` menu. 2. Select the wrench icon ({fa}`wrench`) at the top of the screen to open the {guilabel}`Administration` menu.
3. Select {guilabel}`Moderation`. The {guilabel}`Reports` page opens. 3. Select {guilabel}`Moderation`. The {guilabel}`Reports` page opens.
4. Select {guilabel}`User Requests` at the top of the screen. A list of pending requests appears. 4. Select {guilabel}`User Requests` at the top of the screen. A list of pending requests appears.
5. Read through the details of the request. 5. Read through the details of the request.
6. Select {guilabel}`Refuse` in the {guilabel}`Actions` section. 6. Select {guilabel}`Refuse` in the {guilabel}`Actions` section.
::: :::

Wyświetl plik

@ -18,7 +18,7 @@ You can add notes to __Unresolved__ and __Resolved__ reports. To add an internal
:sync: desktop :sync: desktop
1. Log in to your {term}`pod`. 1. Log in to your {term}`pod`.
2. Select the wrench icon ({fa}`wrench`) at the top of the sidebar to open the {guilabel}`Administration` menu. 2. Select the wrench icon ({fa}`wrench`) at the top of the sidebar to open the {guilabel}`Administration` menu.
3. Select {guilabel}`Moderation`. The {guilabel}`Reports` page opens. 3. Select {guilabel}`Moderation`. The {guilabel}`Reports` page opens.
4. [Search for the report](search_reports.md). 4. [Search for the report](search_reports.md).
5. {guilabel}`Write` your note in the {guilabel}`Internal notes` section. This input field supports Markdown syntax. You can {guilabel}`Preview` how the note will look to other users. 5. {guilabel}`Write` your note in the {guilabel}`Internal notes` section. This input field supports Markdown syntax. You can {guilabel}`Preview` how the note will look to other users.
@ -29,8 +29,8 @@ You can add notes to __Unresolved__ and __Resolved__ reports. To add an internal
:::{tab-item} Mobile :::{tab-item} Mobile
:sync: mobile :sync: mobile
1. Log in to your {term}`pod`. 1. Log in to your {term}`pod`.
2. Select the wrench icon ({fa}`wrench`) at the top of the screen to open the {guilabel}`Administration` menu. 2. Select the wrench icon ({fa}`wrench`) at the top of the screen to open the {guilabel}`Administration` menu.
3. Select {guilabel}`Moderation`. The {guilabel}`Reports` page opens. 3. Select {guilabel}`Moderation`. The {guilabel}`Reports` page opens.
4. [Search for the report](search_reports.md). 4. [Search for the report](search_reports.md).
5. {guilabel}`Write` your note in the {guilabel}`Internal notes` section. This input field supports Markdown syntax. You can {guilabel}`Preview` how the note will look to other users. 5. {guilabel}`Write` your note in the {guilabel}`Internal notes` section. This input field supports Markdown syntax. You can {guilabel}`Preview` how the note will look to other users.
@ -52,8 +52,8 @@ You can delete your own notes and the notes of other moderators. You can do this
:::{tab-item} Desktop :::{tab-item} Desktop
:sync: desktop :sync: desktop
1. Log in to your {term}`pod`. 1. Log in to your {term}`pod`.
2. Select the wrench icon ({fa}`wrench`) at the top of the sidebar to open the {guilabel}`Administration` menu. 2. Select the wrench icon ({fa}`wrench`) at the top of the sidebar to open the {guilabel}`Administration` menu.
3. Select {guilabel}`Moderation`. The {guilabel}`Reports` page opens. 3. Select {guilabel}`Moderation`. The {guilabel}`Reports` page opens.
4. [Search for the report](search_reports.md). 4. [Search for the report](search_reports.md).
5. Find the note you want to delete in the {guilabel}`Internal notes` section. 5. Find the note you want to delete in the {guilabel}`Internal notes` section.
@ -65,7 +65,7 @@ You can delete your own notes and the notes of other moderators. You can do this
:sync: mobile :sync: mobile
1. Log in to your {term}`pod`. 1. Log in to your {term}`pod`.
2. Select the wrench icon ({fa}`wrench`) at the top of the screen to open the {guilabel}`Administration` menu. 2. Select the wrench icon ({fa}`wrench`) at the top of the screen to open the {guilabel}`Administration` menu.
3. Select {guilabel}`Moderation`. The {guilabel}`Reports` page opens. 3. Select {guilabel}`Moderation`. The {guilabel}`Reports` page opens.
4. [Search for the report](search_reports.md). 4. [Search for the report](search_reports.md).
5. Find the note you want to delete in the {guilabel}`Internal notes` section. 5. Find the note you want to delete in the {guilabel}`Internal notes` section.

0
docs/serve.py 100644 → 100755
Wyświetl plik

Wyświetl plik

@ -66,7 +66,7 @@ To get the help of a specific namespace and list all its available commands, sim
Authentication Authentication
-------------- --------------
The CLI uses Oauth tokens to interact with the API. The CLI uses Oauth tokens to interact with the API.
To get started, you need to create an application for the CLI. To do this: To get started, you need to create an application for the CLI. To do this:
@ -76,7 +76,7 @@ To get started, you need to create an application for the CLI. To do this:
4. Scroll down to the :guilabel:`Your applications` section. 4. Scroll down to the :guilabel:`Your applications` section.
5. Select :guilabel:`Register a new application` to create a new application. 5. Select :guilabel:`Register a new application` to create a new application.
6. Give your application an appropriate name (e.g. "Funkwhale CLI"). 6. Give your application an appropriate name (e.g. "Funkwhale CLI").
7. Give your application the permissions you require. 7. Give your application the permissions you require.
8. Select :guilabel:`Create application`. A screen appears showing :guilabel:`Application details`. 8. Select :guilabel:`Create application`. A screen appears showing :guilabel:`Application details`.
9. Copy the app's :guilabel:`Access token`. 9. Copy the app's :guilabel:`Access token`.

Wyświetl plik

@ -32,7 +32,7 @@ This guide shows you how to tag your content with MusicBrainz Picard.
- The album artist name (can be different than the track artist). - The album artist name (can be different than the track artist).
- `Trent Reznor` - `Trent Reznor`
* - `Genre` * - `Genre`
- A comma separated list of tags to associate with the track. - A comma separated list of tags to associate with the track.
Other supported separators: `;` and `/`. Other supported separators: `;` and `/`.
- `Industrial, Metal` - `Industrial, Metal`
* - `Track number` * - `Track number`
@ -45,16 +45,16 @@ This guide shows you how to tag your content with MusicBrainz Picard.
- The release date of the track or album. - The release date of the track or album.
- `2019` - `2019`
* - `License` * - `License`
- The license associated with this work. - The license associated with this work.
The first URL found is checked against our list of supported licenses. The first URL found is checked against our list of supported licenses.
- `CC-BY 3.0: http://creativecommons.org/licenses/cc-by/3.0/` - `CC-BY 3.0: http://creativecommons.org/licenses/cc-by/3.0/`
* - `Copyright` * - `Copyright`
- The license associated with this work. The first URL found is checked against our list of supported licenses. - The license associated with this work. The first URL found is checked against our list of supported licenses.
Used if no license found in the `License` tag. Used if no license found in the `License` tag.
- `CC-BY 3.0: http://creativecommons.org/licenses/cc-by/3.0/` - `CC-BY 3.0: http://creativecommons.org/licenses/cc-by/3.0/`
* - `Pictures` * - `Pictures`
- The first embeded picture found is used as the album cover. - The first embeded picture found is used as the album cover.
- -
* - `MusicBrainz Recording ID` * - `MusicBrainz Recording ID`
- The MusicBrainz ID for the recording. - The MusicBrainz ID for the recording.
- `99244237-850b-4a93-904d-57305bcadb4e` - `99244237-850b-4a93-904d-57305bcadb4e`

Wyświetl plik

@ -69,7 +69,7 @@ That's it! You've added the contents from your queue to a playlist.
You can add a track to a playlist from the track details page. To do this: You can add a track to a playlist from the track details page. To do this:
1. Go to the track details page of the track you want to add. 1. Go to the track details page of the track you want to add.
2. Select the playlist icon ({fa}`list`) at the top of the screen. The {guilabel}`Manage playlists` screen appears. 2. Select the playlist icon ({fa}`list`) at the top of the screen. The {guilabel}`Manage playlists` screen appears.
3. Select {guilabel}`+ Add track` next to the playlist you want to add the track to. 3. Select {guilabel}`+ Add track` next to the playlist you want to add the track to.
That's it! The track is available in your playlist. That's it! The track is available in your playlist.
@ -80,7 +80,7 @@ You can add tracks from any page with a track table. This includes artist pages,
1. Find your track in a track table. 1. Find your track in a track table.
2. Select the kebab menu ({fa}`ellipsis-v`) next to the track to open the track options menu. 2. Select the kebab menu ({fa}`ellipsis-v`) next to the track to open the track options menu.
3. Select {guilabel}`Add to playlist…`. The {guilabel}`Manage playlists` screen appears. 3. Select {guilabel}`Add to playlist…`. The {guilabel}`Manage playlists` screen appears.
4. Select {guilabel}`+ Add track` next to the playlist you want to add the track to. 4. Select {guilabel}`+ Add track` next to the playlist you want to add the track to.
Well done! You've added the track to your playlist. Well done! You've added the track to your playlist.

Wyświetl plik

@ -22,7 +22,7 @@ To create a new radio:
7. Select {guilabel}`Add filter` to add the filter to your radio. 7. Select {guilabel}`Add filter` to add the filter to your radio.
8. Configure your filter: 8. Configure your filter:
1. Enable the {guilabel}`Exclude` switch to exclude results from your selection in the radio. Disable this switch to include results from your selection in the radio. 1. Enable the {guilabel}`Exclude` switch to exclude results from your selection in the radio. Disable this switch to include results from your selection in the radio.
2. Choose your __Artists__ or __Tags__ in the {guilabel}`Config` dropdown menu. 2. Choose your __Artists__ or __Tags__ in the {guilabel}`Config` dropdown menu.
3. The {guilabel}`Candidates` column shows the number of tracks included. Select the {guilabel}`{count} tracks matching filter` option to view some of these tracks. 3. The {guilabel}`Candidates` column shows the number of tracks included. Select the {guilabel}`{count} tracks matching filter` option to view some of these tracks.
9. Check the tracks under the {guilabel}`{count} tracks matching combined filters` section. 9. Check the tracks under the {guilabel}`{count} tracks matching combined filters` section.
10. Select {guilabel}`Save` to save your radio. 10. Select {guilabel}`Save` to save your radio.
@ -42,7 +42,7 @@ To create a new radio:
8. Select {guilabel}`Add filter` to add the filter to your radio. 8. Select {guilabel}`Add filter` to add the filter to your radio.
9. Configure your filter: 9. Configure your filter:
1. Enable the {guilabel}`Exclude` switch to exclude results from your selection in the radio. Disable this switch to include results from your selection in the radio. 1. Enable the {guilabel}`Exclude` switch to exclude results from your selection in the radio. Disable this switch to include results from your selection in the radio.
2. Choose your __Artists__ or __Tags__ in the {guilabel}`Config` dropdown menu. 2. Choose your __Artists__ or __Tags__ in the {guilabel}`Config` dropdown menu.
3. The {guilabel}`Candidates` column shows the number of tracks included. Select the {guilabel}`{count} tracks matching filter` option to view some of these tracks. 3. The {guilabel}`Candidates` column shows the number of tracks included. Select the {guilabel}`{count} tracks matching filter` option to view some of these tracks.
10. Check the tracks under the {guilabel}`{count} tracks matching combined filters` section. 10. Check the tracks under the {guilabel}`{count} tracks matching combined filters` section.
11. Select {guilabel}`Save` to save your radio. 11. Select {guilabel}`Save` to save your radio.

2
front/scripts/contextualize.py 100644 → 100755
Wyświetl plik

@ -1,3 +1,5 @@
#!/usr/bin/env python3
import argparse import argparse
import polib import polib

Wyświetl plik

@ -1,4 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
""" """
This scripts handles all the heavy-lifting of parsing CSS files from ``fomantic-ui-css`` and: This scripts handles all the heavy-lifting of parsing CSS files from ``fomantic-ui-css`` and:

Wyświetl plik

@ -9,4 +9,4 @@ sed -i '/@import url(/d' node_modules/fomantic-ui-css/components/site.css
echo "Replacing hardcoded values by CSS vars…" echo "Replacing hardcoded values by CSS vars…"
scripts/fix-fomantic-css.py node_modules/fomantic-ui-css node_modules/fomantic-ui-css/tweaked scripts/fix-fomantic-css.py node_modules/fomantic-ui-css node_modules/fomantic-ui-css/tweaked
echo 'Fixing jQuery import…' echo 'Fixing jQuery import…'
sed -i '1s/^/import jQuery from "jquery"\n/' `find node_modules/fomantic-ui-css/ -name '*.js'` sed -i '1s/^/import jQuery from "jquery"\n/' `find node_modules/fomantic-ui-css/ -name '*.js'`

Wyświetl plik

@ -1,3 +1,5 @@
#!/usr/bin/env python3
import argparse import argparse
import collections import collections
import polib import polib

2
front/scripts/utils.sh 100644 → 100755
Wyświetl plik

@ -1,4 +1,4 @@
#!/usr/bin/env bash -S -eux #!/usr/bin/env -S bash -eux
npm_binaries () { npm_binaries () {
command -v yarn > /dev/null && yarn bin || npm bin command -v yarn > /dev/null && yarn bin || npm bin

Wyświetl plik

@ -88,4 +88,4 @@
style="fill:#3c3c3b" /> style="fill:#3c3c3b" />
</g> </g>
</g> </g>
</svg> </svg>

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 3.5 KiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 3.5 KiB

Wyświetl plik

@ -18,15 +18,15 @@
sodipodi:docname="with-text.svg"> sodipodi:docname="with-text.svg">
<defs <defs
id="defs4594"> id="defs4594">
</defs> </defs>
<sodipodi:namedview <sodipodi:namedview
id="base" id="base"

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 10 KiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 10 KiB

Wyświetl plik

@ -5,4 +5,4 @@
font-size: 0.92857143em; font-size: 0.92857143em;
font-weight: bold; font-weight: bold;
text-transform: none; text-transform: none;
} }

Wyświetl plik

@ -6,4 +6,4 @@
#addFilter { #addFilter {
margin: 0 0 0 .85714286em; margin: 0 0 0 .85714286em;
} }

Wyświetl plik

@ -1,7 +1,7 @@
.ui.cards > .card, .ui.cards > .card,
.ui.card { .ui.card {
color: var(--card-text-color); color: var(--card-text-color);
background: var(--card-background); background: var(--card-background);
&:not(.flat) { &:not(.flat) {
box-shadow: var(--card-box-shadow); box-shadow: var(--card-box-shadow);
} }

Wyświetl plik

@ -45,4 +45,4 @@ input + .help {
.ui.toggle.checkbox label::before { .ui.toggle.checkbox label::before {
background-color: var(--input-selection-background); background-color: var(--input-selection-background);
} }

Wyświetl plik

@ -1,4 +1,4 @@
.component-fs-browser { .component-fs-browser {
max-height: 400px; max-height: 400px;
overflow-y: auto; overflow-y: auto;
} }

Wyświetl plik

@ -3,4 +3,4 @@
overflow-y: auto; overflow-y: auto;
background-color: rgba(25, 25, 25) !important; background-color: rgba(25, 25, 25) !important;
color: white !important; color: white !important;
} }

Wyświetl plik

@ -13,4 +13,4 @@
background-color: var(--accent-color); background-color: var(--accent-color);
border-color: var(--accent-color); border-color: var(--accent-color);
color: #fff; color: #fff;
} }

Wyświetl plik

@ -15,11 +15,11 @@
@keyframes sound { @keyframes sound {
0% { 0% {
opacity: .35; opacity: .35;
height: .1em; height: .1em;
} }
100% { 100% {
opacity: 1; opacity: 1;
height: 1em; height: 1em;
} }
} }

Wyświetl plik

@ -5,4 +5,4 @@
text-align: right; text-align: right;
} }
} }
} }

Wyświetl plik

@ -235,7 +235,7 @@
margin-left: 26px; margin-left: 26px;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
overflow: hidden; overflow: hidden;
.podcast-episode-title { .podcast-episode-title {
@ -248,4 +248,4 @@
margin-inline-end: 0px; margin-inline-end: 0px;
} }
} }
} }

Wyświetl plik

@ -28,4 +28,4 @@
width: 0px; width: 0px;
background: transparent; background: transparent;
} }
} }

Wyświetl plik

@ -10,4 +10,4 @@ html {
input[type=search]::-webkit-search-cancel-button { input[type=search]::-webkit-search-cancel-button {
appearance: none; appearance: none;
} }

Wyświetl plik

@ -12,5 +12,3 @@ body {
text-decoration: var(--link-hover-text-decoration); text-decoration: var(--link-hover-text-decoration);
} }
} }

Wyświetl plik

@ -115,4 +115,4 @@ span.diff.removed {
> .ui.dimmer { > .ui.dimmer {
color: var(--dimmer-color); color: var(--dimmer-color);
} }
} }

Wyświetl plik

@ -191,11 +191,11 @@
} }
.pod-description { .pod-description {
flex-direction: column; flex-direction: column;
display: flex; display: flex;
p { p {
margin: auto; margin: auto;
padding: 1.2em; padding: 1.2em;
} }
} }
} }
} }

Wyświetl plik

@ -17,4 +17,4 @@
.ui.multiple.search.dropdown>input.search { .ui.multiple.search.dropdown>input.search {
width: auto; width: auto;
} }

Wyświetl plik

@ -5,7 +5,7 @@
.ui.card { .ui.card {
min-height: 200px; min-height: 200px;
} }
} }
.ui.segment.head { .ui.segment.head {
background-size: cover; background-size: cover;
background-position: center; background-position: center;

Wyświetl plik

@ -0,0 +1 @@
{}

Wyświetl plik

@ -1,3 +1,5 @@
#!/usr/bin/env bash
outdated=$(pip list -o) outdated=$(pip list -o)
echo -n "$outdated" echo -n "$outdated"
return_code=$(echo -n "$outdated" | wc -l) return_code=$(echo -n "$outdated" | wc -l)

2
scripts/clean-unused-artifacts.py 100644 → 100755
Wyświetl plik

@ -1,3 +1,5 @@
#!/usr/bin/env python3
import gitlab import gitlab
TOKEN = "CHANGEME" TOKEN = "CHANGEME"

Wyświetl plik

@ -1,3 +1,5 @@
#!/usr/bin/env python3
import argparse import argparse
import requests import requests
import os import os

Wyświetl plik

@ -1,4 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import argparse import argparse
import json import json
import sys import sys