From: Chocobozzz Date: Tue, 7 Dec 2021 12:47:34 +0000 (+0100) Subject: Merge branch 'release/4.0.0' into develop X-Git-Tag: v4.1.0-rc.1~400 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=636d73c58866ed235c207719e41fdde3c2d6c969;hp=7e44bd4a6f39373ef1751d4d19cdcf7de65bdcf9;p=github%2FChocobozzz%2FPeerTube.git Merge branch 'release/4.0.0' into develop --- diff --git a/.github/actions/reusable-deploy/action.yml b/.github/actions/reusable-deploy/action.yml new file mode 100644 index 000000000..bc69a2e43 --- /dev/null +++ b/.github/actions/reusable-deploy/action.yml @@ -0,0 +1,46 @@ +name: "Reusable deploy on builds.joinpeertube.org" + +description: "Reusable deploy on builds.joinpeertube.org" + +inputs: + source: + required: true + description: "Source file/files/directory/directories to deploy" + destination: + required: true + description: "Destination directory on builds.joinpeertube.org" + knownHosts: + required: true + description: "Known hosts" + deployKey: + required: true + description: "Deploy key" + deployUser: + required: true + description: "Deploy user" + deployHost: + required: true + description: "Deploy host" + + +runs: + using: "composite" + + steps: + - name: "Deploy" + shell: bash + run: | + mkdir -p ~/.ssh + chmod 700 ~/.ssh + + echo "Adding ssh key to known hosts" + echo -e "${{ inputs.knownHosts }}" > ~/.ssh/known_hosts; + + eval `ssh-agent -s` + + echo "Adding ssh deploy key" + ssh-add <(echo "${{ inputs.deployKey }}"); + + echo "Uploading files" + + scp ${{ inputs.source }} ${{ inputs.deployUser }}@${{ inputs.deployHost }}:../../web/${{ inputs.destination }}; diff --git a/.github/actions/reusable-prepare-peertube-build/action.yml b/.github/actions/reusable-prepare-peertube-build/action.yml new file mode 100644 index 000000000..41ebf71c5 --- /dev/null +++ b/.github/actions/reusable-prepare-peertube-build/action.yml @@ -0,0 +1,31 @@ +name: "Reusable prepare PeerTube build" + +description: "Reusable prepare PeerTube build" + +inputs: + node-version: + required: true + description: 'NodeJS version' + +runs: + using: "composite" + + steps: + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: ${{ inputs.node-version }} + + - name: Cache Node.js modules + uses: actions/cache@v2 + with: + path: | + **/node_modules + key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.OS }}-node- + ${{ runner.OS }}- + + - name: Install dependencies + shell: bash + run: yarn install --frozen-lockfile diff --git a/.github/actions/reusable-prepare-peertube-run/action.yml b/.github/actions/reusable-prepare-peertube-run/action.yml new file mode 100644 index 000000000..1a6cd2cfd --- /dev/null +++ b/.github/actions/reusable-prepare-peertube-run/action.yml @@ -0,0 +1,16 @@ +name: "Reusable prepare PeerTube run" +description: "Reusable prepare PeerTube run" + +runs: + using: "composite" + + steps: + - name: Setup system dependencies + shell: bash + run: | + sudo apt-get install postgresql-client-common redis-tools parallel + wget --quiet --no-check-certificate "https://download.cpy.re/ffmpeg/ffmpeg-release-4.3.1-64bit-static.tar.xz" + tar xf ffmpeg-release-4.3.1-64bit-static.tar.xz + mkdir -p $HOME/bin + cp ffmpeg-*/{ffmpeg,ffprobe} $HOME/bin + echo "$HOME/bin" >> $GITHUB_PATH diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 86f675432..7e8259d27 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -29,48 +29,15 @@ jobs: env: PGUSER: peertube PGHOST: localhost - NODE_PENDING_JOB_WAIT: 500 steps: - uses: actions/checkout@v2 - - name: Use Node.js - uses: actions/setup-node@v1 + - uses: './.github/actions/reusable-prepare-peertube-build' with: node-version: '12.x' - - name: Setup system dependencies - run: | - sudo apt-get install postgresql-client-common redis-tools parallel - wget --quiet --no-check-certificate "https://download.cpy.re/ffmpeg/ffmpeg-release-4.3.1-64bit-static.tar.xz" - tar xf ffmpeg-release-4.3.1-64bit-static.tar.xz - mkdir -p $HOME/bin - cp ffmpeg-*/{ffmpeg,ffprobe} $HOME/bin - echo "$HOME/bin" >> $GITHUB_PATH - - - name: Cache Node.js modules - uses: actions/cache@v2 - with: - path: | - **/node_modules - key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.OS }}-node- - ${{ runner.OS }}- - - - name: Cache fixtures - uses: actions/cache@v2 - with: - path: | - fixtures - key: ${{ runner.OS }}-fixtures-${{ matrix.test_suite }}-${{ hashFiles('fixtures/*') }} - restore-keys: | - ${{ runner.OS }}-fixtures-${{ matrix.test_suite }}- - ${{ runner.OS }}-fixtures- - ${{ runner.OS }}- - - - name: Install dependencies - run: yarn install --frozen-lockfile + - uses: './.github/actions/reusable-prepare-peertube-run' - name: Build run: | @@ -111,27 +78,11 @@ jobs: cat benchmark.json build-time.json startup-time.json - name: Upload benchmark result - env: - STATS_DEPLOYEMENT_KNOWN_HOSTS: ${{ secrets.STATS_DEPLOYEMENT_KNOWN_HOSTS }} - STATS_DEPLOYEMENT_KEY: ${{ secrets.STATS_DEPLOYEMENT_KEY }} - STATS_DEPLOYEMENT_USER: ${{ secrets.STATS_DEPLOYEMENT_USER }} - STATS_DEPLOYEMENT_HOST: ${{ secrets.STATS_DEPLOYEMENT_HOST }} - run: | - mkdir -p ~/.ssh - chmod 700 ~/.ssh - if [ ! -z ${STATS_DEPLOYEMENT_KNOWN_HOSTS+x} ]; then - echo "Adding ssh key to known hosts" - echo -e "${STATS_DEPLOYEMENT_KNOWN_HOSTS}" > ~/.ssh/known_hosts; - fi - - eval `ssh-agent -s` - - if [ ! -z ${STATS_DEPLOYEMENT_KEY+x} ]; then - echo "Adding ssh reployement key" - ssh-add <(echo "${STATS_DEPLOYEMENT_KEY}"); - fi - - if [ ! -z ${STATS_DEPLOYEMENT_KEY+x} ]; then - echo "Uploading files" - scp benchmark.json build-time.json startup-time.json ${STATS_DEPLOYEMENT_USER}@${STATS_DEPLOYEMENT_HOST}:../../web/peertube-stats; - fi + uses: './.github/actions/reusable-deploy' + with: + source: benchmark.json build-time.json startup-time.json + destination: peertube-stats + knownHosts: ${{ secrets.STATS_DEPLOYEMENT_KNOWN_HOSTS }} + deployKey: ${{ secrets.STATS_DEPLOYEMENT_KEY }} + deployUser: ${{ secrets.STATS_DEPLOYEMENT_USER }} + deployHost: ${{ secrets.STATS_DEPLOYEMENT_HOST }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 000000000..8764cdd0e --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,68 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ develop, next ] + schedule: + - cron: '36 9 * * 5' + +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' ] + # Learn more about CodeQL language support at https://git.io/codeql-language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + config-file: ./.github/workflows/codeql/codeql-config.yml + # 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. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/codeql/codeql-config.yml b/.github/workflows/codeql/codeql-config.yml new file mode 100644 index 000000000..8b771ae99 --- /dev/null +++ b/.github/workflows/codeql/codeql-config.yml @@ -0,0 +1,4 @@ +name: "PeerTube CodeQL config" + +paths-ignore: + - server/tests diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 000000000..7afe641b3 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,70 @@ +name: Docker + +on: + push: + branches: + - 'master' + schedule: + - cron: '0 3 * * *' + +jobs: + generate-matrix: + name: Generate matrix for Docker build + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + ref: master + - name: Set matrix for build + id: set-matrix + run: | + # FIXME: https://github.com/actions/checkout/issues/290 + git fetch --force --tags + + one="{ \"file\": \"./support/docker/production/Dockerfile.bullseye\", \"ref\": \"develop\", \"tags\": \"chocobozzz/peertube:develop-bullseye\" }" + two="{ \"file\": \"./support/docker/production/Dockerfile.buster\", \"ref\": \"master\", \"tags\": \"chocobozzz/peertube:production-buster,chocobozzz/peertube:$(git describe --abbrev=0)-buster\" }" + three="{ \"file\": \"./support/docker/production/Dockerfile.nginx\", \"ref\": \"master\", \"tags\": \"chocobozzz/peertube-webserver:latest\" }" + + matrix="[$one,$two,$three]" + echo ::set-output name=matrix::{\"include\":$(echo $matrix)} + + docker: + runs-on: ubuntu-latest + + needs: generate-matrix + + strategy: + matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} + fail-fast: false + + steps: + - + name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - + name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - + name: Checkout develop + uses: actions/checkout@v2 + with: + ref: ${{ matrix.ref }} + - + name: Docker build + uses: docker/build-push-action@v2 + with: + context: '.' + platforms: linux/amd64,linux/arm64 + push: true + file: ${{ matrix.file }} + tags: ${{ matrix.tags }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 000000000..23898b7ef --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,33 @@ +name: Nightly + +on: + schedule: + - cron: '0 3 * * *' + +jobs: + + nightly: + runs-on: ubuntu-latest + + steps: + - + name: Checkout develop + uses: actions/checkout@v2 + with: + ref: develop + + - uses: './.github/actions/reusable-prepare-peertube-build' + with: + node-version: '14.x' + + - name: Build + run: npm run nightly + + - uses: './.github/actions/reusable-deploy' + with: + source: ./peertube-nightly-* + destination: nightly + knownHosts: ${{ secrets.STATS_DEPLOYEMENT_KNOWN_HOSTS }} + deployKey: ${{ secrets.STATS_DEPLOYEMENT_KEY }} + deployUser: ${{ secrets.STATS_DEPLOYEMENT_USER }} + deployHost: ${{ secrets.STATS_DEPLOYEMENT_HOST }} diff --git a/.github/workflows/stats.yml b/.github/workflows/stats.yml index e211f6a3b..c87e6fb77 100644 --- a/.github/workflows/stats.yml +++ b/.github/workflows/stats.yml @@ -1,4 +1,4 @@ -name: "Stats" +name: Stats on: push: @@ -20,24 +20,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Use Node.js - uses: actions/setup-node@v1 + - uses: './.github/actions/reusable-prepare-peertube-build' with: node-version: '14.x' - - name: Cache Node.js modules - uses: actions/cache@v2 - with: - path: | - **/node_modules - key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.OS }}-node- - ${{ runner.OS }}- - - - name: Install dependencies - run: yarn install --frozen-lockfile - - name: Angular bundlewatch uses: jackyef/bundlewatch-gh-action@master with: @@ -73,27 +59,11 @@ jobs: - name: Upload stats if: github.event_name != 'pull_request' - env: - STATS_DEPLOYEMENT_KNOWN_HOSTS: ${{ secrets.STATS_DEPLOYEMENT_KNOWN_HOSTS }} - STATS_DEPLOYEMENT_KEY: ${{ secrets.STATS_DEPLOYEMENT_KEY }} - STATS_DEPLOYEMENT_USER: ${{ secrets.STATS_DEPLOYEMENT_USER }} - STATS_DEPLOYEMENT_HOST: ${{ secrets.STATS_DEPLOYEMENT_HOST }} - run: | - mkdir -p ~/.ssh - chmod 700 ~/.ssh - if [ ! -z ${STATS_DEPLOYEMENT_KNOWN_HOSTS+x} ]; then - echo "Adding ssh key to known hosts" - echo -e "${STATS_DEPLOYEMENT_KNOWN_HOSTS}" > ~/.ssh/known_hosts; - fi - - eval `ssh-agent -s` - - if [ ! -z ${STATS_DEPLOYEMENT_KEY+x} ]; then - echo "Adding ssh reployement key" - ssh-add <(echo "${STATS_DEPLOYEMENT_KEY}"); - fi - - if [ ! -z ${STATS_DEPLOYEMENT_KEY+x} ]; then - echo "Uploading files" - scp lighthouse.json client-build-stats.json scc.json ${STATS_DEPLOYEMENT_USER}@${STATS_DEPLOYEMENT_HOST}:../../web/peertube-stats; - fi + uses: './.github/actions/reusable-deploy' + with: + source: lighthouse.json client-build-stats.json scc.json + destination: peertube-stats + knownHosts: ${{ secrets.STATS_DEPLOYEMENT_KNOWN_HOSTS }} + deployKey: ${{ secrets.STATS_DEPLOYEMENT_KEY }} + deployUser: ${{ secrets.STATS_DEPLOYEMENT_USER }} + deployHost: ${{ secrets.STATS_DEPLOYEMENT_HOST }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 78a9a28c0..030ec3790 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Test Suite +name: Test on: push: @@ -50,29 +50,11 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Use Node.js - uses: actions/setup-node@v1 + - uses: './.github/actions/reusable-prepare-peertube-build' with: node-version: '12.x' - - name: Setup system dependencies - run: | - sudo apt-get install postgresql-client-common redis-tools parallel - wget --quiet --no-check-certificate "https://download.cpy.re/ffmpeg/ffmpeg-release-4.3.1-64bit-static.tar.xz" - tar xf ffmpeg-release-4.3.1-64bit-static.tar.xz - mkdir -p $HOME/bin - cp ffmpeg-*/{ffmpeg,ffprobe} $HOME/bin - echo "$HOME/bin" >> $GITHUB_PATH - - - name: Cache Node.js modules - uses: actions/cache@v2 - with: - path: | - **/node_modules - key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.OS }}-node- - ${{ runner.OS }}- + - uses: './.github/actions/reusable-prepare-peertube-run' - name: Cache fixtures uses: actions/cache@v2 @@ -85,9 +67,6 @@ jobs: ${{ runner.OS }}-fixtures- ${{ runner.OS }}- - - name: Install dependencies - run: yarn install --frozen-lockfile - - name: Set env test variable (schedule) if: github.event_name != 'schedule' run: | diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index ad94c8cab..000000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,84 +0,0 @@ -image: chocobozzz/peertube-ci:14 - -stages: - - clients - - docker-nightly - -cache: - key: yarn - paths: - - .yarn-cache - - cached-fixtures - -# build-openapi-clients: -# stage: clients -# only: -# refs: -# - master -# - schedules -# changes: -# - support/doc/api/openapi.yaml -# script: -# - apt-get update -qq -# - apt-get -yqqq install openjdk-8-jre -# - yarn install --pure-lockfile -# - scripts/openapi-peertube-version.sh -# - scripts/openapi-clients.sh - -build-nightly: - stage: docker-nightly - only: - - schedules - script: - - yarn install --pure-lockfile --cache-folder .yarn-cache - - npm run nightly - - mkdir "${HOME}/.ssh" - - chmod 700 "${HOME}/.ssh" - - if [ ! -z ${DEPLOYEMENT_KNOWN_HOSTS+x} ]; then echo -e "${DEPLOYEMENT_KNOWN_HOSTS}" > ${HOME}/.ssh/known_hosts; fi - - eval `ssh-agent -s` - - if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then ssh-add <(echo "${DEPLOYEMENT_KEY}"); fi - - if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then scp ./peertube-nightly-* ${DEPLOYEMENT_USER}@${DEPLOYEMENT_HOST}:../../web/nightly; fi - -.docker: &docker - stage: docker-nightly - cache: {} - image: - name: gcr.io/kaniko-project/executor:debug - entrypoint: [""] - before_script: - - mkdir -p /kaniko/.docker - - echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$CI_REGISTRY_AUTH\",\"email\":\"$CI_REGISTRY_EMAIL\"}}}" > /kaniko/.docker/config.json - script: - - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $DOCKERFILE --destination $DOCKER_IMAGE_NAME - -build-docker-develop: - <<: *docker - only: - - schedules - variables: - DOCKER_IMAGE_NAME: chocobozzz/peertube:develop-bullseye - DOCKERFILE: $CI_PROJECT_DIR/support/docker/production/Dockerfile.bullseye - -build-docker-webserver: - <<: *docker - only: - - schedules - variables: - DOCKER_IMAGE_NAME: chocobozzz/peertube-webserver - DOCKERFILE: $CI_PROJECT_DIR/support/docker/production/Dockerfile.nginx - -build-docker-tag: - <<: *docker - only: - - tags - variables: - DOCKER_IMAGE_NAME: chocobozzz/peertube:$CI_COMMIT_TAG-bullseye - DOCKERFILE: $CI_PROJECT_DIR/support/docker/production/Dockerfile.bullseye - -build-docker-master: - <<: *docker - only: - - master - variables: - DOCKER_IMAGE_NAME: chocobozzz/peertube:production-bullseye - DOCKERFILE: $CI_PROJECT_DIR/support/docker/production/Dockerfile.bullseye diff --git a/client/src/app/+about/about-instance/about-instance.component.html b/client/src/app/+about/about-instance/about-instance.component.html index 1026c4e0d..7f2a6aa77 100644 --- a/client/src/app/+about/about-instance/about-instance.component.html +++ b/client/src/app/+about/about-instance/about-instance.component.html @@ -116,95 +116,99 @@ -
- -

- MODERATION -

-
- -
-
+
+
-

Moderation information

+

+ MODERATION +

-
-
+ + + +
-
-
+
+
-

Hardware information

+

+ OTHER INFORMATION +

-
+
-
+

FEATURES

-
+ diff --git a/client/src/app/+accounts/accounts.component.html b/client/src/app/+accounts/accounts.component.html index 0bb24de2e..8362e6b7e 100644 --- a/client/src/app/+accounts/accounts.component.html +++ b/client/src/app/+accounts/accounts.component.html @@ -19,10 +19,8 @@ > Banned - Muted - Instance muted - Muted by your instance - Instance muted by your instance + +
diff --git a/client/src/app/+accounts/accounts.component.scss b/client/src/app/+accounts/accounts.component.scss index cdd00487b..5043b98c4 100644 --- a/client/src/app/+accounts/accounts.component.scss +++ b/client/src/app/+accounts/accounts.component.scss @@ -30,16 +30,10 @@ } } -my-user-moderation-dropdown, -.badge { - @include margin-left(10px); +my-user-moderation-dropdown { + margin: 0 10px; - position: relative; - top: 3px; -} - -.badge { - font-size: 13px; + height: fit-content; } .copy-button { @@ -64,6 +58,10 @@ my-user-moderation-dropdown, @include avatar-row-responsive(var(--myImgMargin), var(--myGreyFontSize)); } +.actor-display-name { + align-items: center; +} + .description { grid-column: 1 / 3; max-width: 1000px; diff --git a/client/src/app/+accounts/accounts.component.ts b/client/src/app/+accounts/accounts.component.ts index 0dcbc250a..898325492 100644 --- a/client/src/app/+accounts/accounts.component.ts +++ b/client/src/app/+accounts/accounts.component.ts @@ -12,7 +12,7 @@ import { VideoChannelService, VideoService } from '@app/shared/shared-main' -import { AccountReportComponent } from '@app/shared/shared-moderation' +import { AccountReportComponent, BlocklistService } from '@app/shared/shared-moderation' import { HttpStatusCode, User, UserRight } from '@shared/models' @Component({ @@ -52,6 +52,7 @@ export class AccountsComponent implements OnInit, OnDestroy { private authService: AuthService, private videoService: VideoService, private markdown: MarkdownService, + private blocklist: BlocklistService, private screenService: ScreenService ) { } @@ -159,6 +160,7 @@ export class AccountsComponent implements OnInit, OnDestroy { this.updateModerationActions() this.loadUserIfNeeded(account) this.loadAccountVideosCount() + this.loadAccountBlockStatus() } private showReportModal () { @@ -217,4 +219,9 @@ export class AccountsComponent implements OnInit, OnDestroy { this.accountVideosCount = res.total }) } + + private loadAccountBlockStatus () { + this.blocklist.getStatus({ accounts: [ this.account.nameWithHostForced ], hosts: [ this.account.host ] }) + .subscribe(status => this.account.updateBlockStatus(status)) + } } diff --git a/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.html b/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.html index 318c8e2c2..c9533208a 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.html @@ -56,6 +56,36 @@
+ + + + +
+ +
+
+
+ + + +
+ + + ⚠️ You don't have any external auth plugin enabled. + ⚠️ You have multiple external auth plugins enabled. + + +
+
+
+
+
@@ -276,7 +306,7 @@
VIDEO CHANNELS
- +
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts index 7a8258820..81457bd36 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts @@ -36,6 +36,10 @@ export class EditBasicConfigurationComponent implements OnInit, OnChanges { } } + countExternalAuth () { + return this.serverConfig.plugin.registeredExternalAuths.length + } + getVideoQuotaOptions () { return this.configService.videoQuotaOptions } diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts index fdb0a7532..f2eaa3033 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts @@ -106,6 +106,18 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { whitelisted: null } }, + client: { + videos: { + miniature: { + preferAuthorDisplayName: null + } + }, + menu: { + login: { + redirectOnSingleExternalAuth: null + } + } + }, cache: { previews: { size: CACHE_PREVIEWS_SIZE_VALIDATOR diff --git a/client/src/app/+login/login.component.html b/client/src/app/+login/login.component.html index 90eea1505..531b06dc9 100644 --- a/client/src/app/+login/login.component.html +++ b/client/src/app/+login/login.component.html @@ -48,7 +48,8 @@