Refactor: rename front/ to app/
|
@ -47,7 +47,7 @@ htmlcov
|
|||
*.swo
|
||||
|
||||
# npm
|
||||
front/node_modules/
|
||||
app/node_modules/
|
||||
|
||||
# Compass
|
||||
.sass-cache
|
||||
|
|
|
@ -50,8 +50,8 @@ NGINX_MAX_BODY_SIZE=10G
|
|||
FUNKWHALE_API_HOST=api
|
||||
FUNKWHALE_API_PORT=5000
|
||||
|
||||
FUNKWHALE_FRONT_HOST=app
|
||||
FUNKWHALE_FRONT_PORT=${VUE_PORT}
|
||||
FUNKWHALE_APP_HOST=app
|
||||
FUNKWHALE_APP_PORT=${VUE_PORT}
|
||||
|
||||
# postgres
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ report.xml
|
|||
*.swo
|
||||
|
||||
# npm
|
||||
front/node_modules/
|
||||
app/node_modules/
|
||||
|
||||
# Compass
|
||||
.sass-cache
|
||||
|
@ -80,30 +80,30 @@ api/celerybeat-*
|
|||
|
||||
# Front
|
||||
oldfront/node_modules/
|
||||
front/static/translations
|
||||
front/node_modules/
|
||||
front/dist/
|
||||
front/dev-dist/
|
||||
front/npm-debug.log*
|
||||
front/yarn-debug.log*
|
||||
front/yarn-error.log*
|
||||
front/tests/unit/coverage
|
||||
front/tests/e2e/reports
|
||||
front/test_results.xml
|
||||
front/coverage/
|
||||
front/selenium-debug.log
|
||||
app/static/translations
|
||||
app/node_modules/
|
||||
app/dist/
|
||||
app/dev-dist/
|
||||
app/npm-debug.log*
|
||||
app/yarn-debug.log*
|
||||
app/yarn-error.log*
|
||||
app/tests/unit/coverage
|
||||
app/tests/e2e/reports
|
||||
app/test_results.xml
|
||||
app/coverage/
|
||||
app/selenium-debug.log
|
||||
|
||||
# Vitepress
|
||||
front/ui-docs/.vitepress/.vite
|
||||
front/ui-docs/.vitepress/cache
|
||||
front/ui-docs/.vitepress/dist
|
||||
front/ui-docs/public
|
||||
app/ui-docs/.vitepress/.vite
|
||||
app/ui-docs/.vitepress/cache
|
||||
app/ui-docs/.vitepress/dist
|
||||
app/ui-docs/public
|
||||
|
||||
# Docs
|
||||
docs/_build
|
||||
|
||||
#Tauri
|
||||
front/tauri/gen
|
||||
app/tauri/gen
|
||||
|
||||
/data/
|
||||
.state
|
||||
|
|
|
@ -22,21 +22,21 @@ variables:
|
|||
FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: 'true'
|
||||
|
||||
.shared_caches:
|
||||
# Cache for front related jobs
|
||||
# Cache for app related jobs
|
||||
yarn_cache: &yarn_cache
|
||||
key: front-yarn-$CI_COMMIT_REF_SLUG
|
||||
key: app-yarn-$CI_COMMIT_REF_SLUG
|
||||
paths: [$YARN_CACHE_FOLDER]
|
||||
node_cache: &node_cache
|
||||
key:
|
||||
prefix: front-node_modules-$CI_COMMIT_REF_SLUG
|
||||
files: [front/yarn.lock]
|
||||
paths: [front/node_modules]
|
||||
prefix: app-node_modules-$CI_COMMIT_REF_SLUG
|
||||
files: [app/yarn.lock]
|
||||
paths: [app/node_modules]
|
||||
lint_cache: &lint_cache
|
||||
key:
|
||||
prefix: front-lint-$CI_COMMIT_REF_SLUG
|
||||
prefix: app-lint-$CI_COMMIT_REF_SLUG
|
||||
files:
|
||||
- front/.eslintcache
|
||||
- front/tsconfig.tsbuildinfo
|
||||
- app/.eslintcache
|
||||
- app/tsconfig.tsbuildinfo
|
||||
cypress_cache: &cypress_cache
|
||||
key: cypress-cache-$CI_COMMIT_REF_SLUG
|
||||
paths:
|
||||
|
@ -85,7 +85,7 @@ stages:
|
|||
- build
|
||||
- publish
|
||||
|
||||
review_front:
|
||||
review_app:
|
||||
allow_failure: true
|
||||
stage: review
|
||||
needs: []
|
||||
|
@ -95,29 +95,29 @@ review_front:
|
|||
|
||||
image: $CI_REGISTRY/funkwhale/ci/node-python:18
|
||||
variables:
|
||||
BASE_URL: /-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/front-review/
|
||||
VUE_APP_ROUTER_BASE_URL: /-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/front-review/
|
||||
BASE_URL: /-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/app-review/
|
||||
VUE_APP_ROUTER_BASE_URL: /-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/app-review/
|
||||
VUE_APP_INSTANCE_URL: https://demo.funkwhale.audio
|
||||
NODE_ENV: review
|
||||
NODE_OPTIONS: --max-old-space-size=4096
|
||||
environment:
|
||||
name: review/front/$CI_COMMIT_REF_NAME
|
||||
url: http://$CI_PROJECT_NAMESPACE.pages.funkwhale.audio/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/front-review/index.html
|
||||
name: review/app/$CI_COMMIT_REF_NAME
|
||||
url: http://$CI_PROJECT_NAMESPACE.pages.funkwhale.audio/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/app-review/index.html
|
||||
cache:
|
||||
- *yarn_cache
|
||||
- *node_cache
|
||||
- *lint_cache
|
||||
before_script:
|
||||
- mkdir front-review
|
||||
- cd front
|
||||
- mkdir app-review
|
||||
- cd app
|
||||
- yarn install --frozen-lockfile
|
||||
script:
|
||||
- yarn run build --base ./
|
||||
- cp -r dist/* ../front-review
|
||||
- cp -r dist/* ../app-review
|
||||
artifacts:
|
||||
expire_in: 2 weeks
|
||||
paths:
|
||||
- front-review
|
||||
- app-review
|
||||
|
||||
review_docs:
|
||||
allow_failure: true
|
||||
|
@ -193,12 +193,12 @@ lint_api:
|
|||
script:
|
||||
- make lint
|
||||
|
||||
lint_front:
|
||||
lint_app:
|
||||
stage: lint
|
||||
needs: []
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
|
||||
- changes: [front/**/*]
|
||||
- changes: [app/**/*]
|
||||
|
||||
image: $CI_REGISTRY/funkwhale/ci/node-python:18
|
||||
cache:
|
||||
|
@ -206,7 +206,7 @@ lint_front:
|
|||
- *node_cache
|
||||
- *lint_cache
|
||||
before_script:
|
||||
- cd front
|
||||
- cd app
|
||||
- yarn install --frozen-lockfile
|
||||
script:
|
||||
- yarn lint
|
||||
|
@ -280,13 +280,13 @@ test_api:
|
|||
path: api/coverage.xml
|
||||
coverage: '/TOTAL\s*\d*\s*\d*\s*(\d*%)/'
|
||||
|
||||
test_front:
|
||||
test_app:
|
||||
stage: test
|
||||
needs:
|
||||
- job: lint_front
|
||||
- job: lint_app
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
|
||||
- changes: [front/**/*]
|
||||
- changes: [app/**/*]
|
||||
|
||||
image: $CI_REGISTRY/funkwhale/ci/node-python:18
|
||||
cache:
|
||||
|
@ -294,16 +294,16 @@ test_front:
|
|||
- *node_cache
|
||||
- *lint_cache
|
||||
before_script:
|
||||
- cd front
|
||||
- cd app
|
||||
- yarn install --frozen-lockfile
|
||||
script:
|
||||
- yarn test:unit
|
||||
artifacts:
|
||||
reports:
|
||||
junit: front/test_results.xml
|
||||
junit: app/test_results.xml
|
||||
coverage_report:
|
||||
coverage_format: cobertura
|
||||
path: front/coverage/cobertura-coverage.xml
|
||||
path: app/coverage/cobertura-coverage.xml
|
||||
coverage: '/All files\s+(?:\|\s+((?:\d+\.)?\d+)\s+){4}.*/'
|
||||
|
||||
build_metadata:
|
||||
|
@ -321,7 +321,7 @@ build_metadata:
|
|||
paths:
|
||||
- docker-bake.json
|
||||
- docker-bake.api.json
|
||||
- docker-bake.front.json
|
||||
- docker-bake.app.json
|
||||
|
||||
test_integration:
|
||||
stage: test
|
||||
|
@ -339,7 +339,7 @@ test_integration:
|
|||
- *cypress_cache
|
||||
|
||||
before_script:
|
||||
- cd front
|
||||
- cd app
|
||||
- yarn install
|
||||
script:
|
||||
- yarn run cypress run
|
||||
|
@ -404,16 +404,16 @@ build_docs:
|
|||
paths:
|
||||
- public
|
||||
|
||||
build_front:
|
||||
build_app:
|
||||
stage: build
|
||||
needs:
|
||||
# The test_front job is currently disabled
|
||||
# - job: test_front
|
||||
- job: lint_front
|
||||
# The test_app job is currently disabled
|
||||
# - job: test_app
|
||||
- job: lint_app
|
||||
optional: true
|
||||
rules:
|
||||
- if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
|
||||
- changes: [front/**/*]
|
||||
- changes: [app/**/*]
|
||||
|
||||
image: $CI_REGISTRY/funkwhale/ci/node-python:18
|
||||
variables:
|
||||
|
@ -424,14 +424,14 @@ build_front:
|
|||
- *node_cache
|
||||
- *lint_cache
|
||||
before_script:
|
||||
- cd front
|
||||
- cd app
|
||||
- yarn install --frozen-lockfile
|
||||
script:
|
||||
- yarn run build:deployment
|
||||
artifacts:
|
||||
name: front_${CI_COMMIT_REF_NAME}
|
||||
name: app_${CI_COMMIT_REF_NAME}
|
||||
paths:
|
||||
- front/dist
|
||||
- app/dist
|
||||
|
||||
build_api:
|
||||
stage: build
|
||||
|
@ -460,7 +460,7 @@ build_api:
|
|||
# stage: build
|
||||
# rules:
|
||||
# - if: $CI_COMMIT_BRANCH =~ /(stable|develop)/
|
||||
# - changes: [front/**/*]
|
||||
# - changes: [app/**/*]
|
||||
|
||||
# image: $CI_REGISTRY/funkwhale/ci/node-tauri:18
|
||||
# variables:
|
||||
|
@ -473,7 +473,7 @@ build_api:
|
|||
# artifacts:
|
||||
# name: desktop_${CI_COMMIT_REF_NAME}
|
||||
# paths:
|
||||
# - front/tauri/target/release/bundle/appimage/*.AppImage
|
||||
# - app/tauri/target/release/bundle/appimage/*.AppImage
|
||||
|
||||
deploy_docs:
|
||||
interruptible: false
|
||||
|
@ -500,7 +500,7 @@ docker:
|
|||
artifacts: true
|
||||
- job: test_api
|
||||
optional: true
|
||||
- job: test_front
|
||||
- job: test_app
|
||||
optional: true
|
||||
rules:
|
||||
- if: $CI_COMMIT_TAG
|
||||
|
@ -562,7 +562,7 @@ package:
|
|||
artifacts: true
|
||||
- job: build_api
|
||||
artifacts: true
|
||||
- job: build_front
|
||||
- job: build_app
|
||||
artifacts: true
|
||||
# - job: build_tauri
|
||||
# artifacts: true
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"ignoreDeps": ["$CI_REGISTRY/funkwhale/backend-test-docker"],
|
||||
"packageRules": [
|
||||
{
|
||||
"matchFileNames": ["api/*", "front/*", "docs/*"],
|
||||
"matchFileNames": ["api/*", "app/*", "docs/*"],
|
||||
"additionalBranchPrefix": "{{parentDir}}-",
|
||||
"semanticCommitScope": "{{parentDir}}"
|
||||
},
|
||||
|
|
|
@ -40,10 +40,10 @@ tasks:
|
|||
gp ports await 5000
|
||||
poetry run celery -A funkwhale_api.taskapp worker -l debug -B --concurrency=0
|
||||
|
||||
- name: Frontend
|
||||
- name: App
|
||||
env:
|
||||
VUE_EDITOR: code
|
||||
before: cd front
|
||||
before: cd app
|
||||
init: |
|
||||
yarn install
|
||||
command: yarn dev --host 0.0.0.0 --base ./
|
||||
|
@ -98,7 +98,7 @@ ports:
|
|||
visibility: private
|
||||
onOpen: ignore
|
||||
|
||||
- name: Frontend
|
||||
- name: App
|
||||
port: 8080
|
||||
visibility: private
|
||||
onOpen: ignore
|
||||
|
|
|
@ -30,8 +30,8 @@ services:
|
|||
- 'FUNKWHALE_API_IP=host.docker.internal'
|
||||
- 'FUNKWHALE_API_HOST=host.docker.internal'
|
||||
- 'FUNKWHALE_API_PORT=5000'
|
||||
- 'FUNKWHALE_FRONT_IP=host.docker.internal'
|
||||
- 'FUNKWHALE_FRONT_PORT=8080'
|
||||
- 'FUNKWHALE_APP_HOST=host.docker.internal'
|
||||
- 'FUNKWHALE_APP_PORT=8080'
|
||||
- 'FUNKWHALE_HOSTNAME=${FUNKWHALE_HOSTNAME-host.docker.internal}'
|
||||
- 'FUNKWHALE_PROTOCOL=https'
|
||||
volumes:
|
||||
|
@ -40,4 +40,4 @@ services:
|
|||
- ../data/staticfiles:/usr/share/nginx/html/staticfiles/:ro
|
||||
- ../deploy/funkwhale_proxy.conf:/etc/nginx/funkwhale_proxy.conf:ro
|
||||
- ../docker/nginx/conf.dev:/etc/nginx/templates/default.conf.template:ro
|
||||
- ../front:/frontend:ro
|
||||
- ../app:/funkwhale-app:ro
|
||||
|
|
|
@ -10,7 +10,7 @@ repos:
|
|||
(?x)(
|
||||
^api/funkwhale_api/common/schema.yml|
|
||||
^api/tests/music/test_coverart.ogg|
|
||||
^front/src/generated/types.ts
|
||||
^app/src/generated/types.ts
|
||||
)
|
||||
|
||||
- id: check-case-conflict
|
||||
|
|
16
Makefile
|
@ -4,7 +4,7 @@ CPU_CORES := $(shell N=$$(nproc); echo $$(( $$N > 4 ? 4 : $$N )))
|
|||
BAKE_FILES = \
|
||||
docker-bake.json \
|
||||
docker-bake.api.json \
|
||||
docker-bake.front.json
|
||||
docker-bake.app.json
|
||||
|
||||
docker-bake.%.json:
|
||||
./scripts/build_metadata.py --format bake --bake-target $* --bake-image docker.io/funkwhale/$* > $@
|
||||
|
@ -39,19 +39,19 @@ package:
|
|||
zip -q 'funkwhale-api.zip' -r api && \
|
||||
rm -Rf api
|
||||
|
||||
tar --create --gunzip --file='$(BUILD_DIR)/funkwhale-front.tar.gz' \
|
||||
tar --create --gunzip --file='$(BUILD_DIR)/funkwhale-app.tar.gz' \
|
||||
--owner='root' \
|
||||
--group='root' \
|
||||
--exclude-vcs \
|
||||
--transform='s/^front\/dist/front/' \
|
||||
front/dist
|
||||
--transform='s/^app\/dist/app/' \
|
||||
app/dist
|
||||
|
||||
cd '$(BUILD_DIR)' && \
|
||||
tar --extract --gunzip --file='funkwhale-front.tar.gz' && \
|
||||
zip -q 'funkwhale-front.zip' -r front && \
|
||||
rm -Rf front
|
||||
tar --extract --gunzip --file='funkwhale-app.tar.gz' && \
|
||||
zip -q 'funkwhale-app.zip' -r app && \
|
||||
rm -Rf app
|
||||
|
||||
# cd '$(BUILD_DIR)' && \
|
||||
# cp ../front/tauri/target/release/bundle/appimage/funkwhale_*.AppImage FunkwhaleDesktop.AppImage
|
||||
# cp ../app/tauri/target/release/bundle/appimage/funkwhale_*.AppImage FunkwhaleDesktop.AppImage
|
||||
|
||||
cd '$(BUILD_DIR)' && sha256sum * > SHA256SUMS
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Funkwhale
|
||||
|
||||
[](https://funkwhale.audio)
|
||||
[](https://funkwhale.audio)
|
||||
|
||||
Funkwhale is a platform for uploading, sharing, and publishing audio content across the federated web. Curate your music library, listen to podcasts, or create your own content and share it with the world.
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@ If a URL is specified, the index.html file will be fetched through HTTP.
|
|||
If a path is provided,
|
||||
it will be accessed from disk.
|
||||
|
||||
Use something like ``/srv/funkwhale/front/dist/`` if the web processes shows
|
||||
Use something like ``/srv/funkwhale/app/dist/`` if the web processes shows
|
||||
request errors related to this.
|
||||
"""
|
||||
|
||||
|
|
|
@ -273,7 +273,7 @@ def get_target_state(target):
|
|||
|
||||
state = target_state_serializer(target).data
|
||||
# freeze target type/id in JSON so even if the corresponding object is deleted
|
||||
# we can have the info and display it in the frontend
|
||||
# we can have the info and display it in the app
|
||||
target_data = TARGET_FIELD.to_representation(target)
|
||||
state["_target"] = json.loads(json.dumps(target_data, cls=DjangoJSONEncoder))
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
.vite
|
||||
|
||||
# local env files
|
||||
.env.local
|
|
@ -1,3 +1,3 @@
|
|||
# Funkwhale Frontend
|
||||
# Funkwhale App
|
||||
|
||||
Please follow the instructions in [Set up your development environment — funkwhale 1.4.0 documentation](https://docs.funkwhale.audio/developer/setup/index.html).
|
|
@ -88,7 +88,7 @@ server {
|
|||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
location ~ "/(front/)?embed.html" {
|
||||
location ~ "/(app/)?embed.html" {
|
||||
alias /usr/share/nginx/html/embed.html;
|
||||
add_header Content-Security-Policy "connect-src https: http: 'self'; default-src 'self'; script-src 'self' unpkg.com 'unsafe-inline' 'unsafe-eval'; style-src https: http: 'self' 'unsafe-inline'; img-src https: http: 'self' data:; font-src https: http: 'self' data:; object-src 'none'; media-src https: http: 'self' data:";
|
||||
add_header Referrer-Policy "strict-origin-when-cross-origin";
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"name": "front",
|
||||
"version": "0.1.0",
|
||||
"name": "funkwhale-app",
|
||||
"version": "2.0.0-rc0",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"description": "Funkwhale front-end",
|
||||
"description": "Funkwhale app",
|
||||
"author": "Funkwhale Collective <contact@funkwhale.audio>",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 1005 B After Width: | Height: | Size: 1005 B |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |