diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index 16ae302ca..000000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster -ARG VARIANT=20 -FROM mcr.microsoft.com/devcontainers/javascript-node:0-${VARIANT} as base - -# Setup the node environment -ENV NODE_ENV=development - -# Install additional OS packages. -RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends \ - curl tzdata ffmpeg && \ - rm -rf /var/lib/apt/lists/* diff --git a/.devcontainer/dev.js b/.devcontainer/dev.js deleted file mode 100644 index 054690d4f..000000000 --- a/.devcontainer/dev.js +++ /dev/null @@ -1,10 +0,0 @@ -// Using port 3333 is important when running the client web app separately -const Path = require('path') -module.exports.config = { - Port: 3333, - ConfigPath: Path.resolve('config'), - MetadataPath: Path.resolve('metadata'), - FFmpegPath: '/usr/bin/ffmpeg', - FFProbePath: '/usr/bin/ffprobe', - SkipBinariesCheck: false -} diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 0213d5178..000000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,40 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node -{ - "name": "Audiobookshelf", - "build": { - "dockerfile": "Dockerfile", - // Update 'VARIANT' to pick a Node version: 18, 16, 14. - // Append -bullseye or -buster to pin to an OS version. - // Use -bullseye variants on local arm64/Apple Silicon. - "args": { - "VARIANT": "20" - } - }, - "mounts": [ - "source=abs-server-node_modules,target=${containerWorkspaceFolder}/node_modules,type=volume", - "source=abs-client-node_modules,target=${containerWorkspaceFolder}/client/node_modules,type=volume" - ], - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, - // Use 'forwardPorts' to make a list of ports inside the container available locally. - "forwardPorts": [ - 3000, - 3333 - ], - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "sh .devcontainer/post-create.sh", - // Configure tool-specific properties. - "customizations": { - // Configure properties specific to VS Code. - "vscode": { - // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "dbaeumer.vscode-eslint", - "octref.vetur" - ] - } - } - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} \ No newline at end of file diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh deleted file mode 100644 index bd1e38733..000000000 --- a/.devcontainer/post-create.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -# Mark the working directory as safe for use with git -git config --global --add safe.directory $PWD - -# If there is no dev.js file, create it -if [ ! -f dev.js ]; then - cp .devcontainer/dev.js . -fi - -# Update permissions for node_modules folders -# https://code.visualstudio.com/remote/advancedcontainers/improve-performance#_use-a-targeted-named-volume -if [ -d node_modules ]; then - sudo chown $(id -u):$(id -g) node_modules -fi - -if [ -d client/node_modules ]; then - sudo chown $(id -u):$(id -g) client/node_modules -fi - -# Install packages for the server -if [ -f package.json ]; then - npm ci -fi - -# Install packages and build the client -if [ -f client/package.json ]; then - (cd client; npm ci; npm run generate) -fi diff --git a/.dockerignore b/.dockerignore index 11cc0bbce..942b75ec5 100644 --- a/.dockerignore +++ b/.dockerignore @@ -12,5 +12,4 @@ dev.js test/ /client/.nuxt/ /client/dist/ -/dist/ -/deploy/ \ No newline at end of file +/dist/ \ No newline at end of file diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 0efcc5b5b..000000000 --- a/.editorconfig +++ /dev/null @@ -1,8 +0,0 @@ -root = true - -[*] -indent_style = space -indent_size = 2 -charset = utf-8 -insert_final_newline = true -trim_trailing_whitespace = true \ No newline at end of file diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index fe61167aa..000000000 --- a/.gitattributes +++ /dev/null @@ -1,5 +0,0 @@ -# Set the default behavior, in case people don't have core.autocrlf set. -* text=auto - -# Declare files that will always have CRLF line endings on checkout. -.devcontainer/post-create.sh text eol=lf diff --git a/.github/ISSUE_TEMPLATE/bug.yaml b/.github/ISSUE_TEMPLATE/bug.yaml index 89aec401c..c6619a730 100644 --- a/.github/ISSUE_TEMPLATE/bug.yaml +++ b/.github/ISSUE_TEMPLATE/bug.yaml @@ -1,50 +1,33 @@ name: 🐞 Bug Report -description: File a bug/issue and help us improve Audiobookshelf -title: '[Bug]: ' -labels: ['bug', 'triage'] +description: File a bug/issue +title: "[Bug]: " +labels: ["bug", "triage"] body: - type: markdown attributes: - value: 'Thank you for filing a bug report! 🐛' + value: "### Please first search for your issue and check the [docs](https://audiobookshelf.org/docs)." - type: markdown attributes: - value: 'Please first search for your issue and check the [docs](https://audiobookshelf.org/docs).' - - type: markdown - attributes: - value: 'Report issues with the mobile app [here](https://github.com/advplyr/audiobookshelf-app/issues/new/choose).' - - type: markdown - attributes: - value: 'Join the [discord server](https://discord.gg/HQgCbd6E75) for questions or if you are not sure about a bug.' + value: "### Mobile app issues report [here](https://github.com/advplyr/audiobookshelf-app/issues/new/choose)." - type: textarea id: what-happened attributes: - label: What happened? - placeholder: Tell us what you see! - validations: - required: true - - type: textarea - id: what-was-expected - attributes: - label: What did you expect to happen? - placeholder: Tell us what you expected to see! Be as descriptive as you can and include screenshots if applicable. + label: Describe the issue + description: What happened & what did you expect to happen validations: required: true - type: textarea id: steps-to-reproduce attributes: label: Steps to reproduce the issue - value: '1. ' + value: "1. " validations: required: true - - type: markdown - attributes: - value: '## Install Environment' - type: input id: version attributes: label: Audiobookshelf version - description: Do not put 'Latest version', please put the actual version here - placeholder: 'e.g. v1.6.60' + placeholder: "e.g. v1.6.60" validations: required: true - type: dropdown @@ -54,45 +37,7 @@ body: options: - Docker - Debian/PPA - - Windows Tray App - Built from source - - Other (list in "Additional Notes" box) + - Other validations: - required: true - - type: dropdown - id: server-os - attributes: - label: What OS is your Audiobookshelf server hosted from? - options: - - Windows - - macOS - - Linux - - Other (list in "Additional Notes" box) - validations: - required: true - - type: dropdown - id: desktop-browsers - attributes: - label: If the issue is being seen in the UI, what browsers are you seeing the problem on? - options: - - Chrome - - Firefox - - Safari - - Edge - - Firefox for Android - - Chrome for Android - - Safari on iOS - - Other (list in "Additional Notes" box) - - type: textarea - id: logs - attributes: - label: Logs - description: Please include any relevant logs here. This field is automatically formatted into code, so you do not need to include any backticks. - placeholder: Paste logs here - render: shell - - type: textarea - id: additional-notes - attributes: - label: Additional Notes - description: Anything else you want to add? - placeholder: 'e.g. I have tried X, Y, and Z.' + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index d04ad818f..000000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,5 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: Discord - url: https://discord.gg/HQgCbd6E75 - about: Ask questions, get help troubleshooting, and join the Abs community here. diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml index 768880916..75363c0e4 100644 --- a/.github/ISSUE_TEMPLATE/feature.yml +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -1,63 +1,17 @@ name: 🚀 Feature Request description: Request a feature/enhancement -title: '[Enhancement]: ' -labels: ['enhancement'] +title: "[Enhancement]: " +labels: ["enhancement"] body: - type: markdown attributes: - value: '#### *Mobile app features should be [requested here](https://github.com/advplyr/audiobookshelf-app/issues/new/choose)*.' + value: "### Please first search in both issues & discussions for your enhancement." - type: markdown attributes: - value: '## Web/Server Feature Request Description' - - type: markdown - attributes: - value: 'Please first search in both issues & discussions for your enhancement.' - - type: dropdown - id: enhancment-type - attributes: - label: Type of Enhancement - options: - - Server Backend - - Web Interface/Frontend - - Documentation + value: "### Mobile app features should be requested [here](https://github.com/advplyr/audiobookshelf-app/issues/new/choose)." - type: textarea id: describe attributes: - label: Describe the Feature/Enhancement - description: Please help us understand what you want. - placeholder: What is your vision? + label: Describe the feature/enhancement validations: required: true - - type: textarea - id: the-why - attributes: - label: Why would this be helpful? - description: Please help us understand why this would enhance your experience. - placeholder: Explain the "why" or "use case". - validations: - required: true - - type: textarea - id: image - attributes: - label: Future Implementation (Screenshot) - description: Please help us visualize by including a doodle or screenshot. - placeholder: How could this look? - validations: - required: true - - type: markdown - attributes: - value: '## Web/Server Current Implementation' - - type: input - id: version - attributes: - label: Audiobookshelf Server Version - description: Do not put 'Latest version', please put your current version number here - placeholder: 'e.g. v1.6.60' - validations: - required: true - - type: textarea - id: current-image - attributes: - label: Current Implementation (Screenshot) - description: What page were you looking at when you thought of this enhancement? - placeholder: If an image is not applicable, please explain why. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index 0cd521a5b..000000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,33 +0,0 @@ - - -## Brief summary - - - -## Which issue is fixed? - - - -## In-depth Description - - - -## How have you tested this? - - - -## Screenshots - - diff --git a/.github/workflows/apply_comments.yaml b/.github/workflows/apply_comments.yaml deleted file mode 100644 index 69a7ce280..000000000 --- a/.github/workflows/apply_comments.yaml +++ /dev/null @@ -1,55 +0,0 @@ -name: Add issue comments by label -on: - issues: - types: - - labeled -jobs: - help-wanted: - if: github.event.label.name == 'help wanted' - runs-on: ubuntu-latest - permissions: - issues: write - steps: - - name: Help wanted comment - run: gh issue comment "$NUMBER" --body "$BODY" - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GH_REPO: ${{ github.repository }} - NUMBER: ${{ github.event.issue.number }} - BODY: > - This issue is not able to be completed due to limited bandwidth or access to the required test hardware. - - This issue is available for anyone to work on. - - - config-issue: - if: github.event.label.name == 'config-issue' - runs-on: ubuntu-latest - permissions: - issues: write - steps: - - name: Config issue comment - run: gh issue close "$NUMBER" --reason "not planned" --comment "$BODY" - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GH_REPO: ${{ github.repository }} - NUMBER: ${{ github.event.issue.number }} - BODY: > - After reviewing this issue, this appears to be a problem with your setup and not Audiobookshelf. This issue is being closed to keep the issue tracker focused on Audiobookshelf itself. Please reach out on the Audiobookshelf Discord for community support. - - Some common search terms to help you find the solution to your problem: - - Reverse proxy - - Enabling websockets - - SSL (https vs http) - - Configuring a static IP - - `localhost` versus IP address - - hairpin NAT - - VPN - - firewall ports - - public versus private network - - bridge versus host mode - - Docker networking - - DNS (such as EAI_AGAIN errors) - - After you have followed these steps, please post the solution or steps you followed to fix the problem to help others in the future, or show that it is a problem with Audiobookshelf so we can reopen the issue. - diff --git a/.github/workflows/close-issues-on-release.yml b/.github/workflows/close-issues-on-release.yml deleted file mode 100644 index 9c5907589..000000000 --- a/.github/workflows/close-issues-on-release.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Close fixed issues on release. -on: - release: - types: [published] - -permissions: - contents: read - issues: write - -jobs: - comment: - runs-on: ubuntu-latest - steps: - - name: Close issues marked as fixed upon a release. - uses: gcampbell-msft/fixed-pending-release@7fa1b75a0c04bcd4b375110522878e5f6100cff5 - with: - label: 'awaiting release' - removeLabel: true - applyToAll: true - message: Fixed in [${releaseTag}](${releaseUrl}). diff --git a/.github/workflows/close_blank_issues.yaml b/.github/workflows/close_blank_issues.yaml deleted file mode 100644 index 7190546a0..000000000 --- a/.github/workflows/close_blank_issues.yaml +++ /dev/null @@ -1,42 +0,0 @@ -name: Close Issues not using a template - -on: - issues: - types: - - opened - -permissions: - issues: write - -jobs: - close_issue: - runs-on: ubuntu-latest - - steps: - - name: Check issue headings - uses: actions/github-script@v7 - with: - script: | - const issueBody = context.payload.issue.body || ""; - - // Match Markdown headings (e.g., # Heading, ## Heading) - const headingRegex = /^(#{1,6})\s.+/gm; - const headings = [...issueBody.matchAll(headingRegex)]; - - if (headings.length < 3) { - // Post a comment - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.issue.number, - body: "Thank you for opening an issue! To help us review your request efficiently, please use one of the provided issue templates. If you're seeking information or have a general question, consider opening a Discussion or joining the conversation on our Discord. Thanks!" - }); - - // Close the issue - await github.rest.issues.update({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.issue.number, - state: "closed" - }); - } diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 809563018..000000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,78 +0,0 @@ -name: 'CodeQL' - -on: - push: - branches: ['master'] - # Only build when files in these directories have been changed - paths: - - client/** - - server/** - - test/** - - index.js - - package.json - pull_request: - # The branches below must be a subset of the branches above - branches: ['master'] - # Only build when files in these directories have been changed - paths: - - client/** - - server/** - - test/** - - index.js - - package.json - schedule: - - cron: '16 5 * * 4' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: ['javascript'] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] - # Use only 'java' to analyze code written in Java, Kotlin or both - # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - - # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality - - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - # ℹ️ Command-line programs to run using the OS shell. - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - # If the Autobuild fails above, remove it and uncomment the following three lines. - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - - # - run: | - # echo "Run, Build Application using script" - # ./location_of_script_within_repo/buildscript.sh - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: '/language:${{matrix.language}}' diff --git a/.github/workflows/component-tests.yml b/.github/workflows/component-tests.yml deleted file mode 100644 index fcc2c2138..000000000 --- a/.github/workflows/component-tests.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Run Component Tests - -on: - workflow_dispatch: - inputs: - ref: - description: 'Branch/Tag/SHA to test' - required: true - pull_request: - paths: - - 'client/**' - - '.github/workflows/component-tests.yml' - push: - paths: - - 'client/**' - - '.github/workflows/component-tests.yml' - -jobs: - run-component-tests: - name: Run Component Tests - runs-on: ubuntu-latest - - steps: - - name: Checkout (push/pull request) - uses: actions/checkout@v4 - if: github.event_name != 'workflow_dispatch' - - - name: Checkout (workflow_dispatch) - uses: actions/checkout@v4 - with: - ref: ${{ inputs.ref }} - if: github.event_name == 'workflow_dispatch' - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'npm' - - - name: Install dependencies - run: | - cd client - npm ci - - - name: Run tests - run: | - cd client - npm test diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index fdb57fbc5..8b6783244 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -1,16 +1,10 @@ --- + name: Build and Push Docker Image on: - # Allows you to run workflow manually from Actions tab - workflow_dispatch: - inputs: - tags: - description: 'Docker Tag' - required: true - default: 'latest' push: - branches: [main, master] + branches: [master] tags: - 'v*.*.*' # Only build when files in these directories have been changed @@ -19,33 +13,34 @@ on: - server/** - index.js - package.json + # Allows you to run workflow manually from Actions tab + workflow_dispatch: jobs: build: - if: ${{ !contains(github.event.head_commit.message, 'skip ci') && github.repository == 'advplyr/audiobookshelf' }} - runs-on: ubuntu-24.04 + if: "!contains(github.event.head_commit.message, 'skip ci')" + runs-on: ubuntu-20.04 steps: - name: Check out - uses: actions/checkout@v4 + uses: actions/checkout@v2 - name: Docker meta id: meta - uses: docker/metadata-action@v5 + uses: docker/metadata-action@v3 with: images: advplyr/audiobookshelf,ghcr.io/${{ github.repository_owner }}/audiobookshelf tags: | type=edge,branch=master type=semver,pattern={{version}} - - name: Setup QEMU - uses: docker/setup-qemu-action@v3 + uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - + uses: docker/setup-buildx-action@v1 + - name: Cache Docker layers - uses: actions/cache@v4 + uses: actions/cache@v2 with: path: /tmp/.buildx-cache key: ${{ runner.os }}-buildx-${{ github.sha }} @@ -53,29 +48,28 @@ jobs: ${{ runner.os }}-buildx- - name: Login to Dockerhub - uses: docker/login-action@v3 + uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} - + - name: Login to ghcr - uses: docker/login-action@v3 + uses: docker/login-action@v1 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GHCR_PASSWORD }} - name: Build image - uses: docker/build-push-action@v6 + uses: docker/build-push-action@v2 with: - tags: ${{ github.event.inputs.tags || steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + tags: ${{ steps.meta.outputs.tags }} context: . - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64,linux/arm64,linux/arm/v7 push: true cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - + - name: Move cache run: | rm -rf /tmp/.buildx-cache diff --git a/.github/workflows/i18n-integration.yml b/.github/workflows/i18n-integration.yml deleted file mode 100644 index 8b3a4678f..000000000 --- a/.github/workflows/i18n-integration.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Verify all i18n files are alphabetized - -on: - pull_request: - paths: - - client/strings/** # Should only check if any strings changed - push: - paths: - - client/strings/** # Should only check if any strings changed - -jobs: - update_translations: - runs-on: ubuntu-latest - steps: - # Check out the repository - - name: Checkout repository - uses: actions/checkout@v4 - - # Set up node to run the javascript - - name: Set up node - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'npm' - - # The only argument is the `directory`, which is where the i18n files are - # stored. - - name: Run Update JSON Files action - uses: audiobookshelf/audiobookshelf-i18n-updater@v1.3.0 - with: - directory: 'client/strings/' # Adjust the directory path as needed diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml deleted file mode 100644 index 18c1d2dae..000000000 --- a/.github/workflows/integration-test.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Integration Test - -on: - pull_request: - push: - branches-ignore: - - 'dependabot/**' # Don't run dependabot branches, as they are already covered by pull requests - # Only build when files in these directories have been changed - paths: - - client/** - - server/** - - test/** - - index.js - - package.json - -jobs: - build: - name: build and test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: setup node - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'npm' - - - name: install pkg (using yao-pkg fork for targeting node20) - run: npm install -g @yao-pkg/pkg - - - name: get client dependencies - working-directory: client - run: npm ci - - - name: build client - working-directory: client - run: npm run generate - - - name: get server dependencies - run: npm ci --only=production - - - name: build binary - run: pkg -t node20-linux-x64 -o audiobookshelf . - - - name: run audiobookshelf - run: | - ./audiobookshelf & - sleep 5 - - - name: test if server is available - run: curl -sf http://127.0.0.1:3333 | grep Audiobookshelf diff --git a/.github/workflows/lint-openapi.yml b/.github/workflows/lint-openapi.yml deleted file mode 100644 index ec08ecb36..000000000 --- a/.github/workflows/lint-openapi.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: API linting - -# Run on pull requests or pushes when there is a change to any OpenAPI files in docs/ -on: - pull_request: - push: - paths: - - 'docs/**' - -# This action only needs read permissions -permissions: - contents: read - -jobs: - build: - runs-on: ubuntu-latest - steps: - # Check out the repository - - name: Checkout - uses: actions/checkout@v4 - - # Set up node to run the javascript - - name: Set up node - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'npm' - - # Install Redocly CLI - - name: Install Redocly CLI - run: npm install -g @redocly/cli@latest - - # Perform linting for exploded spec - - name: Run linting for exploded spec - run: redocly lint docs/root.yaml --format=github-actions - - # Perform linting for bundled spec - - name: Run linting for bundled spec - run: redocly lint docs/openapi.json --format=github-actions diff --git a/.github/workflows/notify-abs-windows.yml b/.github/workflows/notify-abs-windows.yml deleted file mode 100644 index 9ede33b81..000000000 --- a/.github/workflows/notify-abs-windows.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Dispatch an abs-windows event - -on: - release: - types: [published] - workflow_dispatch: - -jobs: - abs-windows-dispatch: - runs-on: ubuntu-latest - steps: - - name: Send a remote repository dispatch event - uses: peter-evans/repository-dispatch@v3 - with: - token: ${{ secrets.ABS_WINDOWS_PAT }} - repository: mikiher/audiobookshelf-windows - event-type: build-windows diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml deleted file mode 100644 index 91a22c716..000000000 --- a/.github/workflows/unit-tests.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Run Unit Tests - -on: - workflow_dispatch: - inputs: - ref: - description: 'Branch/Tag/SHA to test' - required: true - pull_request: - push: - -jobs: - run-unit-tests: - name: Run Unit Tests - runs-on: ubuntu-latest - - steps: - - name: Checkout (push/pull request) - uses: actions/checkout@v4 - if: github.event_name != 'workflow_dispatch' - - - name: Checkout (workflow_dispatch) - uses: actions/checkout@v4 - with: - ref: ${{ inputs.ref }} - if: github.event_name == 'workflow_dispatch' - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: 'npm' - - - name: Install dependencies - run: npm ci - - - name: Run tests - run: npm test diff --git a/.gitignore b/.gitignore index 12ebec1c2..769b06394 100644 --- a/.gitignore +++ b/.gitignore @@ -1,26 +1,16 @@ .env -/dev.js -**/node_modules/ +dev.js +node_modules/ /config/ /audiobooks/ /audiobooks2/ /podcasts/ /media/ /metadata/ -/plugins/ +test/ /client/.nuxt/ /client/dist/ /dist/ -/deploy/ -/coverage/ -/.nyc_output/ -/ffmpeg* -/ffprobe* -/unicode* -/libnusqlite3* sw.* -.DS_STORE -.idea/* -tailwind.compiled.css -tailwind.config.js +.DS_STORE \ No newline at end of file diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index d3d0ff992..000000000 --- a/.prettierrc +++ /dev/null @@ -1,17 +0,0 @@ -{ - "semi": false, - "singleQuote": true, - "printWidth": 400, - "proseWrap": "never", - "trailingComma": "none", - "overrides": [ - { - "files": ["*.html"], - "options": { - "singleQuote": false, - "wrapAttributes": false, - "sortAttributes": false - } - } - ] -} \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index d2a045982..000000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "recommendations": [ - "EditorConfig.EditorConfig", - "esbenp.prettier-vscode", - "octref.vetur" - ] -} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 20706b262..000000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - // 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", - "configurations": [ - { - "type": "node", - "request": "launch", - "name": "Debug server", - "runtimeExecutable": "npm", - "args": [ - "run", - "dev" - ], - "skipFiles": [ - "/**" - ] - }, - { - "type": "node", - "request": "launch", - "name": "Debug client (nuxt)", - "runtimeExecutable": "npm", - "args": [ - "run", - "dev" - ], - "cwd": "${workspaceFolder}/client", - "skipFiles": [ - "${workspaceFolder}//**" - ] - } - ], - "compounds": [ - { - "name": "Debug server and client (nuxt)", - "configurations": [ - "Debug server", - "Debug client (nuxt)" - ] - } - ] -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 75503e6a4..000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "vetur.format.defaultFormatterOptions": { - "prettier": { - "semi": false, - "singleQuote": true, - "printWidth": 400, - "proseWrap": "never", - "trailingComma": "none" - }, - "prettyhtml": { - "printWidth": 400, - "singleQuote": false, - "wrapAttributes": false, - "sortAttributes": false - } - }, - "editor.formatOnSave": true, - "editor.detectIndentation": true, - "editor.tabSize": 2, - "javascript.format.semicolons": "remove", - "[javascript][json][jsonc]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "[vue]": { - "editor.defaultFormatter": "octref.vetur" - } -} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index e041741fb..000000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "version": "2.0.0", - "tasks": [ - { - "path": "client", - "type": "npm", - "script": "generate", - "detail": "nuxt generate", - "label": "Build client", - "group": { - "kind": "build", - "isDefault": true - } - }, - { - "dependsOn": [ - "Build client" - ], - "type": "npm", - "script": "dev", - "detail": "nodemon --watch server index.js", - "label": "Run server", - "group": { - "kind": "test", - "isDefault": true - } - }, - { - "path": "client", - "type": "npm", - "script": "dev", - "detail": "nuxt", - "label": "Run Live-reload client", - "group": { - "kind": "test", - "isDefault": false - } - } - ] -} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 816bdd3c3..39111c191 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,73 +1,19 @@ -ARG NUSQLITE3_DIR="/usr/local/lib/nusqlite3" -ARG NUSQLITE3_PATH="${NUSQLITE3_DIR}/libnusqlite3.so" - ### STAGE 0: Build client ### -FROM node:20-alpine AS build-client - +FROM node:16-alpine AS build WORKDIR /client COPY /client /client -RUN npm ci && npm cache clean --force +RUN npm install RUN npm run generate ### STAGE 1: Build server ### -FROM node:20-alpine AS build-server - -ARG NUSQLITE3_DIR -ARG TARGETPLATFORM - +FROM node:16-alpine +RUN apk update && apk add --no-cache --update ffmpeg ENV NODE_ENV=production - -RUN apk add --no-cache --update \ - curl \ - make \ - python3 \ - g++ \ - unzip - -WORKDIR /server -COPY index.js package* /server -COPY /server /server/server - -RUN case "$TARGETPLATFORM" in \ - "linux/amd64") \ - curl -L -o /tmp/library.zip "https://github.com/mikiher/nunicode-sqlite/releases/download/v1.2/libnusqlite3-linux-musl-x64.zip" ;; \ - "linux/arm64") \ - curl -L -o /tmp/library.zip "https://github.com/mikiher/nunicode-sqlite/releases/download/v1.2/libnusqlite3-linux-musl-arm64.zip" ;; \ - *) echo "Unsupported platform: $TARGETPLATFORM" && exit 1 ;; \ - esac && \ - unzip /tmp/library.zip -d $NUSQLITE3_DIR && \ - rm /tmp/library.zip - -RUN npm ci --only=production - -### STAGE 2: Create minimal runtime image ### -FROM node:20-alpine - -ARG NUSQLITE3_DIR -ARG NUSQLITE3_PATH - -# Install only runtime dependencies -RUN apk add --no-cache --update \ - tzdata \ - ffmpeg \ - tini - -WORKDIR /app - -# Copy compiled frontend and server from build stages -COPY --from=build-client /client/dist /app/client/dist -COPY --from=build-server /server /app -COPY --from=build-server ${NUSQLITE3_PATH} ${NUSQLITE3_PATH} - +COPY --from=build /client/dist /client/dist +COPY index.js index.js +COPY package-lock.json package-lock.json +COPY package.json package.json +COPY server server +RUN npm ci --production EXPOSE 80 - -ENV PORT=80 -ENV NODE_ENV=production -ENV CONFIG_PATH="/config" -ENV METADATA_PATH="/metadata" -ENV SOURCE="docker" -ENV NUSQLITE3_DIR=${NUSQLITE3_DIR} -ENV NUSQLITE3_PATH=${NUSQLITE3_PATH} - -ENTRYPOINT ["tini", "--"] -CMD ["node", "index.js"] +CMD ["npm", "start"] diff --git a/build/debian/DEBIAN/postinst b/build/debian/DEBIAN/postinst index b80d18c68..51cfe75b2 100644 --- a/build/debian/DEBIAN/postinst +++ b/build/debian/DEBIAN/postinst @@ -2,11 +2,49 @@ set -e set -o pipefail -ABS_LOG_DIR="/var/log/audiobookshelf" +FFMPEG_INSTALL_DIR="/usr/lib/audiobookshelf-ffmpeg/" declare -r init_type='auto' declare -ri no_rebuild='0' +add_user() { + : "${1:?'User was not defined'}" + declare -r user="$1" + declare -r uid="$2" + + if [ -z "$uid" ]; then + declare -r uid_flags="" + else + declare -r uid_flags="--uid $uid" + fi + + declare -r group="${3:-$user}" + declare -r descr="${4:-No description}" + declare -r shell="${5:-/bin/false}" + + if ! getent passwd | grep -q "^$user:"; then + echo "Creating system user: $user in $group with $descr and shell $shell" + useradd $uid_flags --gid $group --no-create-home --system --shell $shell -c "$descr" $user + fi +} + +add_group() { + : "${1:?'Group was not defined'}" + declare -r group="$1" + declare -r gid="$2" + + if [ -z "$gid" ]; then + declare -r gid_flags="" + else + declare -r gid_flags="--gid $gid" + fi + + if ! getent group | grep -q "^$group:" ; then + echo "Creating system group: $group" + groupadd $gid_flags --system $group + fi +} + start_service () { : "${1:?'Service name was not defined'}" declare -r service_name="$1" @@ -38,10 +76,13 @@ start_service () { fi } -# Create log directory if not there and set ownership -if [ ! -d "$ABS_LOG_DIR" ]; then - mkdir -p "$ABS_LOG_DIR" - chown -R 'audiobookshelf:audiobookshelf' "$ABS_LOG_DIR" -fi + +add_group 'audiobookshelf' '' +add_user 'audiobookshelf' '' 'audiobookshelf' 'audiobookshelf user-daemon' '/bin/false' + +mkdir -p '/var/log/audiobookshelf' +chown -R 'audiobookshelf:audiobookshelf' '/var/log/audiobookshelf' +chown -R 'audiobookshelf:audiobookshelf' '/usr/share/audiobookshelf' +chown -R 'audiobookshelf:audiobookshelf' "$FFMPEG_INSTALL_DIR" start_service 'audiobookshelf' diff --git a/build/debian/DEBIAN/preinst b/build/debian/DEBIAN/preinst index 241a47010..02104133f 100644 --- a/build/debian/DEBIAN/preinst +++ b/build/debian/DEBIAN/preinst @@ -2,46 +2,96 @@ set -e set -o pipefail -DEFAULT_DATA_DIR="/usr/share/audiobookshelf" -CONFIG_PATH="/etc/default/audiobookshelf" -DEFAULT_PORT=13378 +FFMPEG_INSTALL_DIR="/usr/lib/audiobookshelf-ffmpeg/" +DEFAULT_AUDIOBOOK_PATH="/usr/share/audiobookshelf/audiobooks" +DEFAULT_DATA_PATH="/usr/share/audiobookshelf" +DEFAULT_PORT=7331 DEFAULT_HOST="0.0.0.0" -add_user() { - : "${1:?'User was not defined'}" - declare -r user="$1" - declare -r uid="$2" +CONFIG_PATH="/etc/default/audiobookshelf" - if [ -z "$uid" ]; then - declare -r uid_flags="" - else - declare -r uid_flags="--uid $uid" +install_ffmpeg() { + echo "Starting FFMPEG Install" + + WGET="wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz" + + if ! cd "$FFMPEG_INSTALL_DIR"; then + echo "WARNING: can't access working directory ($FFMPEG_INSTALL_DIR) creating it" >&2 + mkdir "$FFMPEG_INSTALL_DIR" + cd "$FFMPEG_INSTALL_DIR" fi - declare -r group="${3:-$user}" - declare -r descr="${4:-No description}" - declare -r shell="${5:-/bin/false}" + $WGET + tar xvf ffmpeg-git-amd64-static.tar.xz --strip-components=1 + rm ffmpeg-git-amd64-static.tar.xz - if ! getent passwd "$user" 2>&1 >/dev/null; then - echo "Creating system user: $user in $group with $descr and shell $shell" - useradd $uid_flags --gid $group --no-create-home --system --shell $shell -c "$descr" $user + echo "Good to go on Ffmpeg... hopefully" +} + +should_build_config() { + if [ -f "$CONFIG_PATH" ]; then + echo "You already have a config file. Do you want to use it?" + + options=("Yes" "No") + select yn in "${options[@]}" + do + case $yn in + "Yes") + false; return + ;; + "No") + true; return + ;; + esac + done + else + echo "No existing config found in $CONFIG_PATH" + true; return fi } -add_group() { - : "${1:?'Group was not defined'}" - declare -r group="$1" - declare -r gid="$2" +setup_config_interactive() { + if should_build_config; then + echo "Okay, let's setup a new config." - if [ -z "$gid" ]; then - declare -r gid_flags="" - else - declare -r gid_flags="--gid $gid" - fi + AUDIOBOOK_PATH="" + read -p " + Enter path for your audiobooks [Default: $DEFAULT_AUDIOBOOK_PATH]:" AUDIOBOOK_PATH + + if [[ -z "$AUDIOBOOK_PATH" ]]; then + AUDIOBOOK_PATH="$DEFAULT_AUDIOBOOK_PATH" + fi + + DATA_PATH="" + read -p " + Enter path for data files, i.e. streams, downloads, database [Default: $DEFAULT_DATA_PATH]:" DATA_PATH + + if [[ -z "$DATA_PATH" ]]; then + DATA_PATH="$DEFAULT_DATA_PATH" + fi + + PORT="" + read -p " + Port for the web ui [Default: $DEFAULT_PORT]:" PORT + + if [[ -z "$PORT" ]]; then + PORT="$DEFAULT_PORT" + fi + + config_text="AUDIOBOOK_PATH=$AUDIOBOOK_PATH + METADATA_PATH=$DATA_PATH/metadata + CONFIG_PATH=$DATA_PATH/config + FFMPEG_PATH=/usr/lib/audiobookshelf-ffmpeg/ffmpeg + FFPROBE_PATH=/usr/lib/audiobookshelf-ffmpeg/ffprobe + PORT=$PORT + HOST=$DEFAULT_HOST" + + echo "$config_text" + + echo "$config_text" > /etc/default/audiobookshelf; + + echo "Config created" - if ! getent group "$group" 2>&1 >/dev/null; then - echo "Creating system group: $group" - groupadd $gid_flags --system $group fi } @@ -49,22 +99,16 @@ setup_config() { if [ -f "$CONFIG_PATH" ]; then echo "Existing config found." cat $CONFIG_PATH - else - - if [ ! -d "$DEFAULT_DATA_DIR" ]; then - # Create directory and set permissions - echo "Creating default data dir at $DEFAULT_DATA_DIR" - mkdir "$DEFAULT_DATA_DIR" - chown -R 'audiobookshelf:audiobookshelf' "$DEFAULT_DATA_DIR" - fi - echo "Creating default config." - config_text="METADATA_PATH=$DEFAULT_DATA_DIR/metadata -CONFIG_PATH=$DEFAULT_DATA_DIR/config -PORT=$DEFAULT_PORT -HOST=$DEFAULT_HOST" + config_text="AUDIOBOOK_PATH=$DEFAULT_AUDIOBOOK_PATH + METADATA_PATH=$DEFAULT_DATA_PATH/metadata + CONFIG_PATH=$DEFAULT_DATA_PATH/config + FFMPEG_PATH=/usr/lib/audiobookshelf-ffmpeg/ffmpeg + FFPROBE_PATH=/usr/lib/audiobookshelf-ffmpeg/ffprobe + PORT=$DEFAULT_PORT + HOST=$DEFAULT_HOST" echo "$config_text" @@ -74,8 +118,6 @@ HOST=$DEFAULT_HOST" fi } -add_group 'audiobookshelf' '' - -add_user 'audiobookshelf' '' 'audiobookshelf' 'audiobookshelf user-daemon' '/bin/false' - setup_config + +install_ffmpeg diff --git a/build/debian/lib/systemd/system/audiobookshelf.service b/build/debian/lib/systemd/system/audiobookshelf.service index a933c64d6..528a2c30a 100644 --- a/build/debian/lib/systemd/system/audiobookshelf.service +++ b/build/debian/lib/systemd/system/audiobookshelf.service @@ -10,7 +10,7 @@ ExecStart=/usr/share/audiobookshelf/audiobookshelf ExecReload=/bin/kill -HUP $MAINPID Restart=always User=audiobookshelf -Group=audiobookshelf +PermissionsStartOnly=true [Install] WantedBy=multi-user.target \ No newline at end of file diff --git a/build/debian/usr/lib/.gitkeep b/build/debian/usr/lib/audiobookshelf-ffmpeg/.gitkeep similarity index 100% rename from build/debian/usr/lib/.gitkeep rename to build/debian/usr/lib/audiobookshelf-ffmpeg/.gitkeep diff --git a/build/debian/usr/share/.gitkeep b/build/debian/usr/share/audiobookshelf/.gitkeep similarity index 100% rename from build/debian/usr/share/.gitkeep rename to build/debian/usr/share/audiobookshelf/.gitkeep diff --git a/build/linuxpackager b/build/linuxpackager index 52a9beba9..903ee74f6 100755 --- a/build/linuxpackager +++ b/build/linuxpackager @@ -48,10 +48,11 @@ Description: $DESCRIPTION" echo "$controlfile" > dist/debian/DEBIAN/control; # Package debian -pkg -t node20-linux-x64 -o dist/debian/usr/share/audiobookshelf/audiobookshelf . +pkg -t node16-linux-x64 -o dist/debian/usr/share/audiobookshelf/audiobookshelf . -fakeroot dpkg-deb -Zxz --build dist/debian +fakeroot dpkg-deb --build dist/debian mv dist/debian.deb "dist/$OUTPUT_FILE" +chmod +x "dist/$OUTPUT_FILE" echo "Finished! Filename: $OUTPUT_FILE" diff --git a/client/assets/absicons.css b/client/assets/absicons.css deleted file mode 100644 index b2c0f8e88..000000000 --- a/client/assets/absicons.css +++ /dev/null @@ -1,106 +0,0 @@ -@font-face { - font-family: 'absicons'; - src: url('~static/fonts/absicons/absicons.eot?2jfq33'); - src: url('~static/fonts/absicons/absicons.eot?2jfq33#iefix') format('embedded-opentype'), - url('~static/fonts/absicons/absicons.ttf?2jfq33') format('truetype'), - url('~static/fonts/absicons/absicons.woff?2jfq33') format('woff'), - url('~static/fonts/absicons/absicons.svg?2jfq33#absicons') format('svg'); - font-weight: normal; - font-style: normal; - font-display: block; -} - -.abs-icons { - /* use !important to prevent issues with browser extensions that change fonts */ - font-family: 'absicons' !important; - speak: never; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; - - /* Better Font Rendering =========== */ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.icon-books-1:before { - content: "\e905"; -} - -.icon-microphone-1:before { - content: "\e902"; -} - -.icon-radio:before { - content: "\e903"; -} - -.icon-podcast:before { - content: "\e904"; -} - -.icon-audiobookshelf:before { - content: "\e900"; -} - -.icon-database:before { - content: "\e906"; -} - -.icon-microphone-2:before { - content: "\e901"; -} - -.icon-headphones:before { - content: "\e910"; -} - -.icon-music:before { - content: "\e911"; -} - -.icon-video:before { - content: "\e914"; -} - -.icon-microphone-3:before { - content: "\e91e"; -} - -.icon-book-1:before { - content: "\e91f"; -} - -.icon-books-2:before { - content: "\e920"; -} - -.icon-file-picture:before { - content: "\e927"; -} - -.icon-database-1:before { - content: "\e964"; -} - -.icon-rocket:before { - content: "\e9a5"; -} - -.icon-power:before { - content: "\e9b5"; -} - -.icon-star:before { - content: "\e9d9"; -} - -.icon-heart:before { - content: "\e9da"; -} - -.icon-rss:before { - content: "\ea9b"; -} \ No newline at end of file diff --git a/client/assets/app.css b/client/assets/app.css index 36b3b4bad..9a406d09e 100644 --- a/client/assets/app.css +++ b/client/assets/app.css @@ -1,11 +1,9 @@ @import './fonts.css'; @import './transitions.css'; @import './draggable.css'; -@import './defaultStyles.css'; -@import './absicons.css'; :root { - --bookshelf-texture-img: url(~static/textures/wood_default.jpg); + --bookshelf-texture-img: url(/textures/wood_default.jpg); --bookshelf-divider-bg: linear-gradient(180deg, rgba(149, 119, 90, 1) 0%, rgba(103, 70, 37, 1) 17%, rgba(103, 70, 37, 1) 88%, rgba(71, 48, 25, 1) 100%); } @@ -23,14 +21,11 @@ #bookshelf { height: calc(100% - 40px); background-image: linear-gradient(to right bottom, #2e2e2e, #303030, #313131, #333333, #353535, #343434, #323232, #313131, #2c2c2c, #282828, #232323, #1f1f1f); - - /* For Firefox */ - scrollbar-width: thin; - scrollbar-color: #855620 rgba(0, 0, 0, 0); } .bookshelf-row { - width: calc(100vw - (100vw - 100%)); + /* Sidebar width + scrollbar width */ + width: calc(100vw - 88px); } @media (max-width: 768px) { @@ -92,10 +87,11 @@ } /* Firefox */ -input[type='number'] { +input[type=number] { -moz-appearance: textfield; } + .tracksTable { border-collapse: collapse; width: 100%; @@ -110,7 +106,7 @@ input[type='number'] { background-color: #373838; } -.tracksTable tr:hover:not(:has(th)) { +.tracksTable tr:hover { background-color: #474747; } @@ -131,14 +127,6 @@ input[type='number'] { border-top: 6px solid white; } -.arrow-down-small { - width: 0; - height: 0; - border-left: 4px solid transparent; - border-right: 4px solid transparent; - border-top: 4px solid currentColor; -} - .triangle-right { width: 0; height: 0; @@ -176,10 +164,6 @@ input[type='number'] { box-shadow: 4px 1px 8px #11111166, -4px 1px 8px #11111166, 1px -4px 8px #11111166; } -.box-shadow-progressbar { - box-shadow: 0px -1px 4px rgb(62, 50, 2, 0.5); -} - .shadow-height { height: calc(100% - 4px); } @@ -207,6 +191,7 @@ Bookshelf Label color: #fce3a6; } + .cover-bg { width: calc(100% + 40px); height: calc(100% + 40px); @@ -218,35 +203,17 @@ Bookshelf Label filter: blur(20px); } -/* Padding for toastification toasts in the top right to not cover appbar/toolbar */ -.app-bar-and-toolbar .Vue-Toastification__container.top-right { - padding-top: 104px; -} -.app-bar .Vue-Toastification__container.top-right { - padding-top: 64px; -} - -.no-bars .Vue-Toastification__container.top-right { - padding-top: 8px; -} - -.abs-btn::before { - content: ''; - position: absolute; - border-radius: 6px; - top: 0; - left: 0; - width: 100%; - height: 100%; - background-color: rgba(255, 255, 255, 0); - transition: all 0.1s ease-in-out; -} - -.abs-btn:hover:not(:disabled)::before { - background-color: rgba(255, 255, 255, 0.1); -} - -.abs-btn:disabled::before { - background-color: rgba(0, 0, 0, 0.2); -} +.episode-subtitle { + word-break: break-word; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + line-height: 16px; + /* fallback */ + max-height: 32px; + /* fallback */ + -webkit-line-clamp: 2; + /* number of lines to show */ + -webkit-box-orient: vertical; +} \ No newline at end of file diff --git a/client/assets/defaultStyles.css b/client/assets/defaultStyles.css deleted file mode 100644 index e0ca79e29..000000000 --- a/client/assets/defaultStyles.css +++ /dev/null @@ -1,68 +0,0 @@ -/* - - This is for setting regular html styles for places where embedding HTML will be - like podcast episode descriptions. Otherwise TailwindCSS will have stripped all default markup. - -*/ - -.default-style p { - display: block; - margin-block-start: 1em; - margin-block-end: 1em; - margin-inline-start: 0px; - margin-inline-end: 0px; -} - -.default-style a { - text-decoration: none; - color: #5985ff; -} - -.default-style ul { - display: block; - list-style: circle; - list-style-type: disc; - margin-block-start: 1em; - margin-block-end: 1em; - margin-inline-start: 0px; - margin-inline-end: 0px; - padding-inline-start: 40px; -} - -.default-style ol { - display: block; - list-style: decimal; - list-style-type: decimal; - margin-block-start: 1em; - margin-block-end: 1em; - margin-inline-start: 0px; - margin-inline-end: 0px; - padding-inline-start: 40px; -} - -.default-style li { - display: list-item; - text-align: -webkit-match-parent; -} - -.default-style li::marker { - unicode-bidi: isolate; - font-variant-numeric: tabular-nums; - text-transform: none; - text-indent: 0px !important; - text-align: start !important; - text-align-last: start !important; -} - -.default-style.less-spacing p { - margin-block-start: 0; -} - -.default-style.less-spacing ul { - margin-block-start: 0; -} - -.default-style.less-spacing ol { - margin-block-start: 0; -} - diff --git a/client/assets/draggable.css b/client/assets/draggable.css index 31271e675..48dca6b80 100644 --- a/client/assets/draggable.css +++ b/client/assets/draggable.css @@ -1,40 +1,34 @@ .flip-list-move { transition: transform 0.5s; } - .no-move { transition: transform 0s; } - .ghost { opacity: 0.5; background-color: rgba(255, 255, 255, 0.25); } - .list-group { min-height: 30px; } - +#librariesTable .item { + cursor: n-resize; +} .drag-handle { cursor: n-resize; } - .list-group-item:not(.exclude) { cursor: n-resize; } - .list-group-item.exclude { cursor: not-allowed; } - .list-group-item:not(.ghost):not(.exclude):hover { background-color: rgba(0, 0, 0, 0.1); } - .list-group-item:nth-child(even):not(.ghost):not(.exclude) { background-color: rgba(0, 0, 0, 0.25); } - .list-group-item:nth-child(even):not(.ghost):not(.exclude):hover { background-color: rgba(0, 0, 0, 0.1); } @@ -42,7 +36,6 @@ .list-group-item.exclude:not(.ghost) { background-color: rgba(255, 0, 0, 0.25); } - .list-group-item.exclude:not(.ghost):hover { background-color: rgba(223, 0, 0, 0.25); } \ No newline at end of file diff --git a/client/assets/fonts.css b/client/assets/fonts.css index c568ffa6e..b7e75d0ca 100644 --- a/client/assets/fonts.css +++ b/client/assets/fonts.css @@ -1,12 +1,19 @@ @font-face { - font-family: 'Material Symbols Rounded'; + font-family: 'Material Icons'; font-style: normal; font-weight: 400; - src: url(~static/fonts/MaterialSymbolsRounded.woff2) format('woff2'); + src: url(/fonts/MaterialIcons.woff2) format('woff2'); } -.material-symbols { - font-family: 'Material Symbols Rounded'; +@font-face { + font-family: 'Material Icons Outlined'; + font-style: normal; + font-weight: 400; + src: url(/fonts/MaterialIconsOutlined.woff2) format('woff2'); +} + +.material-icons { + font-family: 'Material Icons'; font-weight: normal; font-style: normal; line-height: 1; @@ -17,12 +24,48 @@ word-wrap: normal; direction: ltr; -webkit-font-smoothing: antialiased; - vertical-align: top; } -.material-symbols.fill { - font-variation-settings: - 'FILL' 1 +.material-icons:not(.text-xs):not(.text-sm):not(.text-md):not(.text-base):not(.text-lg):not(.text-xl):not(.text-2xl):not(.text-3xl):not(.text-4xl):not(.text-5xl):not(.text-6xl):not(.text-7xl):not(.text-8xl) { + font-size: 1.5rem; +} + +.material-icons-outlined { + font-family: 'Material Icons Outlined'; + font-weight: normal; + font-style: normal; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -webkit-font-smoothing: antialiased; +} + +.material-icons-outlined:not(.text-xs):not(.text-sm):not(.text-md):not(.text-base):not(.text-lg):not(.text-xl):not(.text-2xl):not(.text-3xl):not(.text-4xl):not(.text-5xl):not(.text-6xl):not(.text-7xl):not(.text-8xl) { + font-size: 1.5rem; +} + + +@font-face { + font-family: 'Gentium Book Basic'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(/fonts/GentiumBookBasic.woff2) format('woff2'); + unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin */ +@font-face { + font-family: 'Gentium Book Basic'; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url(/fonts/GentiumBookBasic.woff2) format('woff2'); + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } /* cyrillic-ext */ @@ -31,7 +74,7 @@ font-style: normal; font-weight: 300; font-display: swap; - src: url(~static/fonts/Source_Sans_Pro/SourceSansPro-Light.ttf) format('truetype'); + src: url(/fonts/Source_Sans_Pro/SourceSansPro-Light.ttf) format('ttf'); unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; } @@ -41,7 +84,7 @@ font-style: normal; font-weight: 300; font-display: swap; - src: url(~static/fonts/Source_Sans_Pro/SourceSansPro-Light.ttf) format('truetype'); + src: url(/fonts/Source_Sans_Pro/SourceSansPro-Light.ttf) format('ttf'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } @@ -51,7 +94,7 @@ font-style: normal; font-weight: 300; font-display: swap; - src: url(~static/fonts/Source_Sans_Pro/SourceSansPro-Light.ttf) format('truetype'); + src: url(/fonts/Source_Sans_Pro/SourceSansPro-Light.ttf) format('ttf'); unicode-range: U+1F00-1FFF; } @@ -61,7 +104,7 @@ font-style: normal; font-weight: 300; font-display: swap; - src: url(~static/fonts/Source_Sans_Pro/SourceSansPro-Light.ttf) format('truetype'); + src: url(/fonts/Source_Sans_Pro/SourceSansPro-Light.ttf) format('ttf'); unicode-range: U+0370-03FF; } @@ -71,7 +114,7 @@ font-style: normal; font-weight: 300; font-display: swap; - src: url(~static/fonts/Source_Sans_Pro/SourceSansPro-Light.ttf) format('truetype'); + src: url(/fonts/Source_Sans_Pro/SourceSansPro-Light.ttf) format('ttf'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB; } @@ -81,7 +124,7 @@ font-style: normal; font-weight: 300; font-display: swap; - src: url(~static/fonts/Source_Sans_Pro/SourceSansPro-Light.ttf) format('truetype'); + src: url(/fonts/Source_Sans_Pro/SourceSansPro-Light.ttf) format('ttf'); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; } @@ -91,7 +134,7 @@ font-style: normal; font-weight: 300; font-display: swap; - src: url(~static/fonts/Source_Sans_Pro/SourceSansPro-Light.ttf) format('truetype'); + src: url(/fonts/Source_Sans_Pro/SourceSansPro-Light.ttf) format('ttf'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @@ -101,7 +144,7 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url(~static/fonts/Source_Sans_Pro/SourceSansPro-Regular.ttf) format('ttf'); + src: url(/fonts/Source_Sans_Pro/SourceSansPro-Regular.ttf) format('ttf'); unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; } @@ -111,7 +154,7 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url(~static/fonts/Source_Sans_Pro/SourceSansPro-Regular.ttf) format('truetype'); + src: url(/fonts/Source_Sans_Pro/SourceSansPro-Regular.ttf) format('ttf'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } @@ -121,7 +164,7 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url(~static/fonts/Source_Sans_Pro/SourceSansPro-Regular.ttf) format('truetype'); + src: url(/fonts/Source_Sans_Pro/SourceSansPro-Regular.ttf) format('ttf'); unicode-range: U+1F00-1FFF; } @@ -131,7 +174,7 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url(~static/fonts/Source_Sans_Pro/SourceSansPro-Regular.ttf) format('truetype'); + src: url(/fonts/Source_Sans_Pro/SourceSansPro-Regular.ttf) format('ttf'); unicode-range: U+0370-03FF; } @@ -141,7 +184,7 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url(~static/fonts/Source_Sans_Pro/SourceSansPro-Regular.ttf) format('truetype'); + src: url(/fonts/Source_Sans_Pro/SourceSansPro-Regular.ttf) format('ttf'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB; } @@ -151,7 +194,7 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url(~static/fonts/Source_Sans_Pro/SourceSansPro-Regular.ttf) format('truetype'); + src: url(/fonts/Source_Sans_Pro/SourceSansPro-Regular.ttf) format('ttf'); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; } @@ -161,7 +204,7 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url(~static/fonts/Source_Sans_Pro/SourceSansPro-Regular.ttf) format('truetype'); + src: url(/fonts/Source_Sans_Pro/SourceSansPro-Regular.ttf) format('ttf'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @@ -171,7 +214,7 @@ font-style: normal; font-weight: 600; font-display: swap; - src: url(~static/fonts/Source_Sans_Pro/SourceSansPro-SemiBold.ttf) format('truetype'); + src: url(/fonts/Source_Sans_Pro/SourceSansPro-SemiBold.ttf) format('ttf'); unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; } @@ -181,7 +224,7 @@ font-style: normal; font-weight: 600; font-display: swap; - src: url(~static/fonts/Source_Sans_Pro/SourceSansPro-SemiBold.ttf) format('truetype'); + src: url(/fonts/Source_Sans_Pro/SourceSansPro-SemiBold.ttf) format('ttf'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } @@ -191,7 +234,7 @@ font-style: normal; font-weight: 600; font-display: swap; - src: url(~static/fonts/Source_Sans_Pro/SourceSansPro-SemiBold.ttf) format('truetype'); + src: url(/fonts/Source_Sans_Pro/SourceSansPro-SemiBold.ttf) format('ttf'); unicode-range: U+1F00-1FFF; } @@ -201,7 +244,7 @@ font-style: normal; font-weight: 600; font-display: swap; - src: url(~static/fonts/Source_Sans_Pro/SourceSansPro-SemiBold.ttf) format('truetype'); + src: url(/fonts/Source_Sans_Pro/SourceSansPro-SemiBold.ttf) format('ttf'); unicode-range: U+0370-03FF; } @@ -211,7 +254,7 @@ font-style: normal; font-weight: 600; font-display: swap; - src: url(~static/fonts/Source_Sans_Pro/SourceSansPro-SemiBold.ttf) format('truetype'); + src: url(/fonts/Source_Sans_Pro/SourceSansPro-SemiBold.ttf) format('ttf'); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB; } @@ -221,7 +264,7 @@ font-style: normal; font-weight: 600; font-display: swap; - src: url(~static/fonts/Source_Sans_Pro/SourceSansPro-SemiBold.ttf) format('truetype'); + src: url(/fonts/Source_Sans_Pro/SourceSansPro-SemiBold.ttf) format('ttf'); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; } @@ -231,7 +274,7 @@ font-style: normal; font-weight: 600; font-display: swap; - src: url(~static/fonts/Source_Sans_Pro/SourceSansPro-SemiBold.ttf) format('truetype'); + src: url(/fonts/Source_Sans_Pro/SourceSansPro-SemiBold.ttf) format('ttf'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } @@ -241,7 +284,7 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url(~static/fonts/Ubuntu_Mono/UbuntuMono-Regular.ttf) format('truetype'); + src: url(/fonts/Ubuntu_Mono/UbuntuMono-Regular.ttf) format('ttf'); unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; } @@ -251,7 +294,7 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url(~static/fonts/Ubuntu_Mono/UbuntuMono-Regular.ttf) format('truetype'); + src: url(/fonts/Ubuntu_Mono/UbuntuMono-Regular.ttf) format('ttf'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; } @@ -261,7 +304,7 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url(~static/fonts/Ubuntu_Mono/UbuntuMono-Regular.ttf) format('truetype'); + src: url(/fonts/Ubuntu_Mono/UbuntuMono-Regular.ttf) format('ttf'); unicode-range: U+1F00-1FFF; } @@ -271,7 +314,7 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url(~static/fonts/Ubuntu_Mono/UbuntuMono-Regular.ttf) format('truetype'); + src: url(/fonts/Ubuntu_Mono/UbuntuMono-Regular.ttf) format('ttf'); unicode-range: U+0370-03FF; } @@ -281,7 +324,7 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url(~static/fonts/Ubuntu_Mono/UbuntuMono-Regular.ttf) format('truetype'); + src: url(/fonts/Ubuntu_Mono/UbuntuMono-Regular.ttf) format('ttf'); unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; } @@ -291,6 +334,6 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url(~static/fonts/Ubuntu_Mono/UbuntuMono-Regular.ttf) format('truetype'); + src: url(/fonts/Ubuntu_Mono/UbuntuMono-Regular.ttf) format('ttf'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} +} \ No newline at end of file diff --git a/client/assets/tailwind.css b/client/assets/tailwind.css deleted file mode 100644 index 7883f32ff..000000000 --- a/client/assets/tailwind.css +++ /dev/null @@ -1,85 +0,0 @@ -@import 'tailwindcss'; - -/* - The default border color has changed to `currentColor` in Tailwind CSS v4, - so we've added these compatibility styles to make sure everything still - looks the same as it did with Tailwind CSS v3. - - If we ever want to remove these styles, we need to add an explicit border - color utility to any element that depends on these defaults. -*/ -@layer base { - *, - ::after, - ::before, - ::backdrop, - ::file-selector-button { - border-color: var(--color-gray-200, currentColor); - } - - [role='button'], - button { - cursor: pointer; - } -} - -@theme { - --spacing-0\.5e: 0.125em; - --spacing-1e: 0.25em; - --spacing-1\.5e: 0.375em; - --spacing-2e: 0.5em; - --spacing-2\.5e: 0.625em; - --spacing-3e: 0.75em; - --spacing-3\.5e: 0.875em; - --spacing-4e: 1em; - --spacing-5e: 1.25em; - --spacing-6e: 1.5em; - --spacing-7e: 1.75em; - --spacing-8e: 2em; - --spacing-9e: 2.25em; - --spacing-10e: 2.5em; - --spacing-11e: 2.75em; - --spacing-12e: 3em; - --spacing-14e: 3.5em; - --spacing-16e: 4em; - --spacing-20e: 5em; - --spacing-24e: 6em; - --spacing-28e: 7em; - --spacing-32e: 8em; - --spacing-36e: 9em; - --spacing-40e: 10em; - --spacing-44e: 11em; - --spacing-48e: 12em; - --spacing-52e: 13em; - --spacing-56e: 14em; - --spacing-60e: 15em; - --spacing-64e: 16em; - --spacing-72e: 18em; - --spacing-80e: 20em; - --spacing-96e: 24em; - - --color-bg: #373838; - --color-primary: #232323; - --color-accent: #1ad691; - --color-error: #ff5252; - --color-info: #2196f3; - --color-success: #4caf50; - --color-warning: #fb8c00; - --color-darkgreen: rgb(34, 127, 35); - --color-black-50: #bbbbbb; - --color-black-100: #666666; - --color-black-200: #555555; - --color-black-300: #444444; - --color-black-400: #333333; - --color-black-500: #222222; - --color-black-600: #111111; - --color-black-700: #101010; - - --font-sans: 'Source Sans Pro'; - --font-mono: 'Ubuntu Mono'; - - --text-xxs: 0.625rem; - --text-1\.5xl: 1.375rem; - --text-2\.5xl: 1.6875rem; - --text-4\.5xl: 2.625rem; -} diff --git a/client/assets/transitions.css b/client/assets/transitions.css index 17667d014..55e1f73e7 100644 --- a/client/assets/transitions.css +++ b/client/assets/transitions.css @@ -20,67 +20,42 @@ transition-timing-function: cubic-bezier(0, 1, 0.5, 1); } -.slide-enter-to, -.slide-leave { +.slide-enter-to, .slide-leave { max-height: 600px; overflow: hidden; } -.slide-enter, -.slide-leave-to { +.slide-enter, .slide-leave-to { overflow: hidden; max-height: 0; } -.menu-enter, -.menu-leave-active { +.menu-enter, .menu-leave-active { transform: translateY(-15px); } - .menu-enter-active { transition: all 0.2s; } - .menu-leave-active { transition: all 0.1s; } - .menu-enter, .menu-leave-active { opacity: 0; } -.menux-enter, -.menux-leave-active { +.menux-enter, .menux-leave-active { transform: translateX(15px); } - .menux-enter-active { transition: all 0.2s; } - .menux-leave-active { transition: all 0.1s; } - .menux-enter, .menux-leave-active { opacity: 0; -} - - -.list-complete-item { - transition: all 0.8s ease; -} - -.list-complete-enter-from, -.list-complete-leave-to { - opacity: 0; - transform: translateY(30px); -} - -.list-complete-leave-active { - position: absolute; } \ No newline at end of file diff --git a/client/assets/trix.css b/client/assets/trix.css deleted file mode 100644 index 7432b25f4..000000000 --- a/client/assets/trix.css +++ /dev/null @@ -1,570 +0,0 @@ -@charset "UTF-8"; - -/* -Trix 1.3.1 -Copyright © 2020 Basecamp, LLC -http://trix-editor.org/*/ -trix-editor { - border: 1px solid rgb(75, 85, 99); - border-radius: 3px; - background: rgb(35, 35, 35); - margin: 0; - padding: 0.4em 0.6em; - min-height: 5em; - outline: none; -} - -trix-toolbar * { - box-sizing: border-box; -} - -trix-toolbar .trix-button-row { - display: flex; - flex-wrap: nowrap; - justify-content: space-between; - overflow-x: auto; -} - -trix-toolbar .trix-button-group { - display: flex; - margin-bottom: 10px; - border: 1px solid rgb(75, 85, 99); - border-top-color: rgb(75, 85, 99); - border-bottom-color: rgb(75, 85, 99); - border-radius: 3px; -} - -trix-toolbar .trix-button-group:not(:first-child) { - margin-left: 1.5vw; -} - -@media (max-device-width: 768px) { - trix-toolbar .trix-button-group:not(:first-child) { - margin-left: 0; - } -} - -trix-toolbar .trix-button-group-spacer { - flex-grow: 1; -} - -@media (max-device-width: 768px) { - trix-toolbar .trix-button-group-spacer { - display: none; - } -} - -trix-toolbar .trix-button { - position: relative; - float: left; - color: rgba(0, 0, 0, 0.6); - font-size: 0.75em; - font-weight: 600; - white-space: nowrap; - padding: 0 0.5em; - margin: 0; - outline: none; - border: none; - border-radius: 0; - background: transparent; -} - -trix-toolbar .trix-button:not(:first-child) { - border-left: 1px solid rgb(75, 85, 99); -} - -trix-toolbar .trix-button.trix-active { - background: #bbb; - color: black; -} - -trix-toolbar .trix-button:not(:disabled) { - cursor: pointer; - background: rgb(35, 35, 35); -} - -trix-toolbar .trix-button:disabled { - color: rgba(0, 0, 0, 0.25); -} - -@media (max-device-width: 768px) { - trix-toolbar .trix-button { - letter-spacing: -0.01em; - padding: 0 0.3em; - } -} - -trix-toolbar .trix-button--icon { - font-size: inherit; - width: 2.6em; - height: 1.6em; - max-width: calc(0.8em + 4vw); - text-indent: -9999px; -} - -@media (max-device-width: 768px) { - trix-toolbar .trix-button--icon { - height: 2em; - max-width: calc(0.8em + 3.5vw); - } -} - -trix-toolbar .trix-button--icon::before { - display: inline-block; - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - opacity: 0.6; - content: ""; - background-position: center; - background-repeat: no-repeat; - background-size: contain; - filter: invert(100%); -} - -@media (max-device-width: 768px) { - trix-toolbar .trix-button--icon::before { - right: 6%; - left: 6%; - } -} - -trix-toolbar .trix-button--icon.trix-active::before { - opacity: 1; -} - -trix-toolbar .trix-button--icon:disabled::before { - opacity: 0.125; -} - -trix-toolbar .trix-button--icon-attach::before { - background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M16.5%206v11.5a4%204%200%201%201-8%200V5a2.5%202.5%200%200%201%205%200v10.5a1%201%200%201%201-2%200V6H10v9.5a2.5%202.5%200%200%200%205%200V5a4%204%200%201%200-8%200v12.5a5.5%205.5%200%200%200%2011%200V6h-1.5z%22%2F%3E%3C%2Fsvg%3E); - top: 8%; - bottom: 4%; -} - -trix-toolbar .trix-button--icon-bold::before { - background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M15.6%2011.8c1-.7%201.6-1.8%201.6-2.8a4%204%200%200%200-4-4H7v14h7c2.1%200%203.7-1.7%203.7-3.8%200-1.5-.8-2.8-2.1-3.4zM10%207.5h3a1.5%201.5%200%201%201%200%203h-3v-3zm3.5%209H10v-3h3.5a1.5%201.5%200%201%201%200%203z%22%2F%3E%3C%2Fsvg%3E); -} - -trix-toolbar .trix-button--icon-italic::before { - background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M10%205v3h2.2l-3.4%208H6v3h8v-3h-2.2l3.4-8H18V5h-8z%22%2F%3E%3C%2Fsvg%3E); -} - -trix-toolbar .trix-button--icon-link::before { - background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M9.88%2013.7a4.3%204.3%200%200%201%200-6.07l3.37-3.37a4.26%204.26%200%200%201%206.07%200%204.3%204.3%200%200%201%200%206.06l-1.96%201.72a.91.91%200%201%201-1.3-1.3l1.97-1.71a2.46%202.46%200%200%200-3.48-3.48l-3.38%203.37a2.46%202.46%200%200%200%200%203.48.91.91%200%201%201-1.3%201.3z%22%2F%3E%3Cpath%20d%3D%22M4.25%2019.46a4.3%204.3%200%200%201%200-6.07l1.93-1.9a.91.91%200%201%201%201.3%201.3l-1.93%201.9a2.46%202.46%200%200%200%203.48%203.48l3.37-3.38c.96-.96.96-2.52%200-3.48a.91.91%200%201%201%201.3-1.3%204.3%204.3%200%200%201%200%206.07l-3.38%203.38a4.26%204.26%200%200%201-6.07%200z%22%2F%3E%3C%2Fsvg%3E); -} - -trix-toolbar .trix-button--icon-strike::before { - background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M12.73%2014l.28.14c.26.15.45.3.57.44.12.14.18.3.18.5%200%20.3-.15.56-.44.75-.3.2-.76.3-1.39.3A13.52%2013.52%200%200%201%207%2014.95v3.37a10.64%2010.64%200%200%200%204.84.88c1.26%200%202.35-.19%203.28-.56.93-.37%201.64-.9%202.14-1.57s.74-1.45.74-2.32c0-.26-.02-.51-.06-.75h-5.21zm-5.5-4c-.08-.34-.12-.7-.12-1.1%200-1.29.52-2.3%201.58-3.02%201.05-.72%202.5-1.08%204.34-1.08%201.62%200%203.28.34%204.97%201l-1.3%202.93c-1.47-.6-2.73-.9-3.8-.9-.55%200-.96.08-1.2.26-.26.17-.38.38-.38.64%200%20.27.16.52.48.74.17.12.53.3%201.05.53H7.23zM3%2013h18v-2H3v2z%22%2F%3E%3C%2Fsvg%3E); -} - -trix-toolbar .trix-button--icon-quote::before { - background-image: url(data:image/svg+xml,%3Csvg%20version%3D%221%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M6%2017h3l2-4V7H5v6h3zm8%200h3l2-4V7h-6v6h3z%22%2F%3E%3C%2Fsvg%3E); -} - -trix-toolbar .trix-button--icon-heading-1::before { - background-image: url(data:image/svg+xml,%3Csvg%20version%3D%221%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M12%209v3H9v7H6v-7H3V9h9zM8%204h14v3h-6v12h-3V7H8V4z%22%2F%3E%3C%2Fsvg%3E); -} - -trix-toolbar .trix-button--icon-code::before { - background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M18.2%2012L15%2015.2l1.4%201.4L21%2012l-4.6-4.6L15%208.8l3.2%203.2zM5.8%2012L9%208.8%207.6%207.4%203%2012l4.6%204.6L9%2015.2%205.8%2012z%22%2F%3E%3C%2Fsvg%3E); -} - -trix-toolbar .trix-button--icon-bullet-list::before { - background-image: url(data:image/svg+xml,%3Csvg%20version%3D%221%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M4%204a2%202%200%201%200%200%204%202%202%200%200%200%200-4zm0%206a2%202%200%201%200%200%204%202%202%200%200%200%200-4zm0%206a2%202%200%201%200%200%204%202%202%200%200%200%200-4zm4%203h14v-2H8v2zm0-6h14v-2H8v2zm0-8v2h14V5H8z%22%2F%3E%3C%2Fsvg%3E); -} - -trix-toolbar .trix-button--icon-number-list::before { - background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M2%2017h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1%203h1.8L2%2013.1v.9h3v-1H3.2L5%2010.9V10H2v1zm5-6v2h14V5H7zm0%2014h14v-2H7v2zm0-6h14v-2H7v2z%22%2F%3E%3C%2Fsvg%3E); -} - -trix-toolbar .trix-button--icon-undo::before { - background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M12.5%208c-2.6%200-5%201-6.9%202.6L2%207v9h9l-3.6-3.6A8%208%200%200%201%2020%2016l2.4-.8a10.5%2010.5%200%200%200-10-7.2z%22%2F%3E%3C%2Fsvg%3E); -} - -trix-toolbar .trix-button--icon-redo::before { - background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M18.4%2010.6a10.5%2010.5%200%200%200-16.9%204.6L4%2016a8%208%200%200%201%2012.7-3.6L13%2016h9V7l-3.6%203.6z%22%2F%3E%3C%2Fsvg%3E); -} - -trix-toolbar .trix-button--icon-decrease-nesting-level::before { - background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M3%2019h19v-2H3v2zm7-6h12v-2H10v2zm-8.3-.3l2.8%202.9L6%2014.2%204%2012l2-2-1.4-1.5L1%2012l.7.7zM3%205v2h19V5H3z%22%2F%3E%3C%2Fsvg%3E); -} - -trix-toolbar .trix-button--icon-increase-nesting-level::before { - background-image: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%3E%3Cpath%20d%3D%22M3%2019h19v-2H3v2zm7-6h12v-2H10v2zm-6.9-1L1%2014.2l1.4%201.4L6%2012l-.7-.7-2.8-2.8L1%209.9%203.1%2012zM3%205v2h19V5H3z%22%2F%3E%3C%2Fsvg%3E); -} - -trix-toolbar .trix-dialogs { - position: relative; -} - -trix-toolbar .trix-dialog { - position: absolute; - top: 0; - left: 0; - right: 0; - font-size: 0.75em; - padding: 15px 10px; - background: rgb(48, 48, 48); - box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); - border: 1px solid rgb(112, 112, 112); - border-radius: 5px; - z-index: 5; -} - -trix-toolbar .trix-input--dialog { - font-size: inherit; - font-weight: normal; - padding: 0.5em 0.8em; - margin: 0 10px 0 0; - border-radius: 3px; - border: 1px solid #bbb; - background-color: rgb(95, 95, 95); - box-shadow: none; - outline: none; - -webkit-appearance: none; - -moz-appearance: none; -} - -trix-toolbar .trix-input--dialog.validate:invalid { - box-shadow: #F00 0px 0px 1.5px 1px; -} - -trix-toolbar .trix-button--dialog { - font-size: inherit; - padding: 0.5em; - border-bottom: none; - color: #eee; -} - -trix-toolbar .trix-dialog--link { - max-width: 600px; -} - -trix-toolbar .trix-dialog__link-fields { - display: flex; - align-items: baseline; -} - -trix-toolbar .trix-dialog__link-fields .trix-input { - flex: 1; -} - -trix-toolbar .trix-dialog__link-fields .trix-button-group { - flex: 0 0 content; - margin: 0; -} - -trix-editor [data-trix-mutable]:not(.attachment__caption-editor) { - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -trix-editor [data-trix-mutable]::-moz-selection, -trix-editor [data-trix-cursor-target]::-moz-selection, -trix-editor [data-trix-mutable] ::-moz-selection { - background: none; -} - -trix-editor [data-trix-mutable]::selection, -trix-editor [data-trix-cursor-target]::selection, -trix-editor [data-trix-mutable] ::selection { - background: none; -} - -trix-editor [data-trix-mutable].attachment__caption-editor:focus::-moz-selection { - background: highlight; -} - -trix-editor [data-trix-mutable].attachment__caption-editor:focus::selection { - background: highlight; -} - -trix-editor [data-trix-mutable].attachment.attachment--file { - box-shadow: 0 0 0 2px highlight; - border-color: transparent; -} - -trix-editor [data-trix-mutable].attachment img { - box-shadow: 0 0 0 2px highlight; -} - -trix-editor .attachment { - position: relative; -} - -trix-editor .attachment:hover { - cursor: default; -} - -trix-editor .attachment--preview .attachment__caption:hover { - cursor: text; -} - -trix-editor .attachment__progress { - position: absolute; - z-index: 1; - height: 20px; - top: calc(50% - 10px); - left: 5%; - width: 90%; - opacity: 0.9; - transition: opacity 200ms ease-in; -} - -trix-editor .attachment__progress[value="100"] { - opacity: 0; -} - -trix-editor .attachment__caption-editor { - display: inline-block; - width: 100%; - margin: 0; - padding: 0; - font-size: inherit; - font-family: inherit; - line-height: inherit; - color: inherit; - text-align: center; - vertical-align: top; - border: none; - outline: none; - -webkit-appearance: none; - -moz-appearance: none; -} - -trix-editor .attachment__toolbar { - position: absolute; - z-index: 1; - top: -0.9em; - left: 0; - width: 100%; - text-align: center; -} - -trix-editor .trix-button-group { - display: inline-flex; -} - -trix-editor .trix-button { - position: relative; - float: left; - color: #666; - white-space: nowrap; - font-size: 80%; - padding: 0 0.8em; - margin: 0; - outline: none; - border: none; - border-radius: 0; - background: transparent; -} - -trix-editor .trix-button:not(:first-child) { - border-left: 1px solid #ccc; -} - -trix-editor .trix-button.trix-active { - background: #cbeefa; -} - -trix-editor .trix-button:not(:disabled) { - cursor: pointer; -} - -trix-editor .trix-button--remove { - text-indent: -9999px; - display: inline-block; - padding: 0; - outline: none; - width: 1.8em; - height: 1.8em; - line-height: 1.8em; - border-radius: 50%; - background-color: #fff; - border: 2px solid highlight; - box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.25); -} - -trix-editor .trix-button--remove::before { - display: inline-block; - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - opacity: 0.7; - content: ""; - background-image: url(data:image/svg+xml,%3Csvg%20height%3D%2224%22%20width%3D%2224%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M19%206.4L17.6%205%2012%2010.6%206.4%205%205%206.4l5.6%205.6L5%2017.6%206.4%2019l5.6-5.6%205.6%205.6%201.4-1.4-5.6-5.6z%22%2F%3E%3Cpath%20d%3D%22M0%200h24v24H0z%22%20fill%3D%22none%22%2F%3E%3C%2Fsvg%3E); - background-position: center; - background-repeat: no-repeat; - background-size: 90%; -} - -trix-editor .trix-button--remove:hover { - border-color: #333; -} - -trix-editor .trix-button--remove:hover::before { - opacity: 1; -} - -trix-editor .attachment__metadata-container { - position: relative; -} - -trix-editor .attachment__metadata { - position: absolute; - left: 50%; - top: 2em; - transform: translate(-50%, 0); - max-width: 90%; - padding: 0.1em 0.6em; - font-size: 0.8em; - color: #fff; - background-color: rgba(0, 0, 0, 0.7); - border-radius: 3px; -} - -trix-editor .attachment__metadata .attachment__name { - display: inline-block; - max-width: 100%; - vertical-align: bottom; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -trix-editor .attachment__metadata .attachment__size { - margin-left: 0.2em; - white-space: nowrap; -} - -.trix-content { - line-height: inherit; -} - -.trix-content * { - box-sizing: border-box; - margin: 0; - padding: 0; -} - -.trix-content p { - box-sizing: border-box; - margin-top: 0; - margin-bottom: 0.5em; - padding: 0; -} - -.trix-content h1 { - font-size: 1.2em; - line-height: 1.2; -} - -.trix-content blockquote { - border: 0 solid #ccc; - border-left-width: 0.3em; - margin-left: 0.3em; - padding-left: 0.6em; -} - -.trix-content [dir=rtl] blockquote, -.trix-content blockquote[dir=rtl] { - border-width: 0; - border-right-width: 0.3em; - margin-right: 0.3em; - padding-right: 0.6em; -} - -.trix-content li { - margin-left: 1em; -} - -.trix-content [dir=rtl] li { - margin-right: 1em; -} - -.trix-content pre { - display: inline-block; - width: 100%; - vertical-align: top; - font-family: monospace; - font-size: 0.9em; - padding: 0.5em; - white-space: pre; - background-color: #eee; - overflow-x: auto; -} - -.trix-content img { - max-width: 100%; - height: auto; -} - -.trix-content .attachment { - display: inline-block; - position: relative; - max-width: 100%; -} - -.trix-content .attachment a { - color: inherit; - text-decoration: none; -} - -.trix-content .attachment a:hover, -.trix-content .attachment a:visited:hover { - color: inherit; -} - -.trix-content .attachment__caption { - text-align: center; -} - -.trix-content .attachment__caption .attachment__name+.attachment__size::before { - content: ' · '; -} - -.trix-content .attachment--preview { - width: 100%; - text-align: center; -} - -.trix-content .attachment--preview .attachment__caption { - color: #666; - font-size: 0.9em; - line-height: 1.2; -} - -.trix-content .attachment--file { - color: #333; - line-height: 1; - margin: 0 2px 2px 2px; - padding: 0.4em 1em; - border: 1px solid #bbb; - border-radius: 5px; -} - -.trix-content .attachment-gallery { - display: flex; - flex-wrap: wrap; - position: relative; -} - -.trix-content .attachment-gallery .attachment { - flex: 1 0 33%; - padding: 0 0.5em; - max-width: 33%; -} - -.trix-content .attachment-gallery.attachment-gallery--2 .attachment, -.trix-content .attachment-gallery.attachment-gallery--4 .attachment { - flex-basis: 50%; - max-width: 50%; -} diff --git a/client/components/AudioPlayer.vue b/client/components/AudioPlayer.vue new file mode 100644 index 000000000..4bb39c7dc --- /dev/null +++ b/client/components/AudioPlayer.vue @@ -0,0 +1,418 @@ + + + + + \ No newline at end of file diff --git a/client/components/app/Appbar.vue b/client/components/app/Appbar.vue index 428ae6ebf..f30a4840f 100644 --- a/client/components/app/Appbar.vue +++ b/client/components/app/Appbar.vue @@ -1,82 +1,70 @@