Commit Graph

43 Commits (9e2700b89d6ab06cb404005f062ba7e5d9c7c341)

Author SHA1 Message Date
Chocobozzz 3a4992633e
Migrate server to ESM
Sorry for the very big commit that may lead to git log issues and merge
conflicts, but it's a major step forward:

 * Server can be faster at startup because imports() are async and we can
   easily lazy import big modules
 * Angular doesn't seem to support ES import (with .js extension), so we
   had to correctly organize peertube into a monorepo:
    * Use yarn workspace feature
    * Use typescript reference projects for dependencies
    * Shared projects have been moved into "packages", each one is now a
      node module (with a dedicated package.json/tsconfig.json)
    * server/tools have been moved into apps/ and is now a dedicated app
      bundled and published on NPM so users don't have to build peertube
      cli tools manually
    * server/tests have been moved into packages/ so we don't compile
      them every time we want to run the server
 * Use isolatedModule option:
   * Had to move from const enum to const
     (https://www.typescriptlang.org/docs/handbook/enums.html#objects-vs-enums)
   * Had to explictely specify "type" imports when used in decorators
 * Prefer tsx (that uses esbuild under the hood) instead of ts-node to
   load typescript files (tests with mocha or scripts):
     * To reduce test complexity as esbuild doesn't support decorator
       metadata, we only test server files that do not import server
       models
     * We still build tests files into js files for a faster CI
 * Remove unmaintained peertube CLI import script
 * Removed some barrels to speed up execution (less imports)
2023-08-11 15:02:33 +02:00
Chocobozzz 65bb29c6d3
Remove unnecesary fixme/todo 2023-07-28 15:20:49 +02:00
Chocobozzz 784e2ad5c3
Prefer web videos in favour of webtorrent 2023-07-11 09:21:13 +02:00
Chocobozzz 5490930428
Remove suppressImplicitAnyIndexErrors
It's deprecated by TS
2023-05-24 16:56:05 +02:00
Alecks Gates cb0eda5602
Add Podcast RSS feeds (#5487)
* Initial test implementation of Podcast RSS

This is a pretty simple implementation to add support for The Podcast Namespace in RSS -- instead of affecting the existing RSS implementation, this adds a new UI option.

I attempted to retain compatibility with the rest of the RSS feed implementation as much as possible and have created a temporary fork of the "pfeed" library to support this effort.

* Update to pfeed-podcast 1.2.2

* Initial test implementation of Podcast RSS

This is a pretty simple implementation to add support for The Podcast Namespace in RSS -- instead of affecting the existing RSS implementation, this adds a new UI option.

I attempted to retain compatibility with the rest of the RSS feed implementation as much as possible and have created a temporary fork of the "pfeed" library to support this effort.

* Update to pfeed-podcast 1.2.2

* Initial test implementation of Podcast RSS

This is a pretty simple implementation to add support for The Podcast Namespace in RSS -- instead of affecting the existing RSS implementation, this adds a new UI option.

I attempted to retain compatibility with the rest of the RSS feed implementation as much as possible and have created a temporary fork of the "pfeed" library to support this effort.

* Update to pfeed-podcast 1.2.2

* Add correct feed image to RSS channel

* Prefer HLS videos for podcast RSS

Remove video/stream titles, add optional height attribute to podcast RSS

* Prefix podcast RSS images with root server URL

* Add optional video query support to include captions

* Add transcripts & person images to podcast RSS feed

* Prefer webseed/webtorrent files over HLS fragmented mp4s

* Experimentally adding podcast fields to basic config page

* Add validation for new basic config fields

* Don't include "content" in podcast feed, use full description for "description"

* Initial test implementation of Podcast RSS

This is a pretty simple implementation to add support for The Podcast Namespace in RSS -- instead of affecting the existing RSS implementation, this adds a new UI option.

I attempted to retain compatibility with the rest of the RSS feed implementation as much as possible and have created a temporary fork of the "pfeed" library to support this effort.

* Update to pfeed-podcast 1.2.2

* Add correct feed image to RSS channel

* Prefer HLS videos for podcast RSS

Remove video/stream titles, add optional height attribute to podcast RSS

* Prefix podcast RSS images with root server URL

* Add optional video query support to include captions

* Add transcripts & person images to podcast RSS feed

* Prefer webseed/webtorrent files over HLS fragmented mp4s

* Experimentally adding podcast fields to basic config page

* Add validation for new basic config fields

* Don't include "content" in podcast feed, use full description for "description"

* Add medium/socialInteract to podcast RSS feeds. Use HTML for description

* Change base production image to bullseye, install prosody in image

* Add liveItem and trackers to Podcast RSS feeds

Remove height from alternateEnclosure, replaced with title.

* Clear Podcast RSS feed cache when live streams start/end

* Upgrade to Node 16

* Refactor clearCacheRoute to use ApiCache

* Remove unnecessary type hint

* Update dockerfile to node 16, install python-is-python2

* Use new file paths for captions/playlists

* Fix legacy videos in RSS after migration to object storage

* Improve method of identifying non-fragmented mp4s in podcast RSS feeds

* Don't include fragmented MP4s in podcast RSS feeds

* Add experimental support for podcast:categories on the podcast RSS item

* Fix undefined category when no videos exist

Allows for empty feeds to exist (important for feeds that might only go live)

* Add support for podcast:locked -- user has to opt in to show their email

* Use comma for podcast:categories delimiter

* Make cache clearing async

* Fix merge, temporarily test with pfeed-podcast

* Syntax changes

* Add EXT_MIMETYPE constants for captions

* Update & fix tests, fix enclosure mimetypes, remove admin email

* Add test for podacst:socialInteract

* Add filters hooks for podcast customTags

* Remove showdown, updated to pfeed-podcast 6.1.2

* Add 'action:api.live-video.state.updated' hook

* Avoid assigning undefined category to podcast feeds

* Remove nvmrc

* Remove comment

* Remove unused podcast config

* Remove more unused podcast config

* Fix MChannelAccountDefault type hint missed in merge

* Remove extra line

* Re-add newline in config

* Fix lint errors for isEmailPublic

* Fix thumbnails in podcast feeds

* Requested changes based on review

* Provide podcast rss 2.0 only on video channels

* Misc cleanup for a less messy PR

* Lint fixes

* Remove pfeed-podcast

* Add peertube version to new hooks

* Don't use query include, remove TODO

* Remove film medium hack

* Clear podcast rss cache before video/channel update hooks

* Clear podcast rss cache before video uploaded/deleted hooks

* Refactor podcast feed cache clearing

* Set correct person name from video channel

* Styling

* Fix tests

---------

Co-authored-by: Chocobozzz <me@florianbigard.com>
2023-05-22 16:00:05 +02:00
Chocobozzz 6a7cea1527
Fix live update of autoplay next video 2023-02-15 11:32:08 +01:00
Chocobozzz b1d8261c45
Fix auto play setting for anonymous users 2023-01-23 15:24:58 +01:00
Chocobozzz 9e5cf66be7
Breaking API: Consistency with role id/label 2022-10-28 16:34:08 +02:00
Chocobozzz 3545e72c68 Put private videos under a specific subdirectory 2022-10-24 14:48:24 +02:00
Chocobozzz d12b40fb96
Implement two factor in client 2022-10-07 11:06:28 +02:00
Chocobozzz 42b4063699
Add ability for client to create server logs 2022-07-18 11:37:18 +02:00
kontrollanten d0800f7661
Implement avatar miniatures (#4639)
* client: remove unused file

* refactor(client/my-actor-avatar): size from input

Read size from component input instead of scss, to make it possible to
use smaller avatar images when implemented.

* implement avatar miniatures

close #4560

* fix(test): max file size

* fix(search-index): normalize res acc to avatarMini

* refactor avatars to an array

* client/search: resize channel avatar to 120

* refactor(client/videos): remove unused function

* client(actor-avatar): set default size

* fix tests and avatars full result

When findOne is used only an array containting one avatar is returned.

* update migration version and version notations

* server/search: harmonize normalizing

* Cleanup avatar miniature PR

Co-authored-by: Chocobozzz <me@florianbigard.com>
2022-02-28 08:34:43 +01:00
Chocobozzz d92d070c91
Split user service 2022-01-21 11:03:25 +01:00
Chocobozzz e8bffe9690
Remove unnecessary function 2022-01-18 11:37:29 +01:00
Chocobozzz b65de1be4d
Use different p2p policy for embeds and webapp 2021-12-16 10:08:55 +01:00
Chocobozzz a9bfa85d2c
Add ability for admins to set default p2p policy 2021-12-16 10:08:55 +01:00
Chocobozzz e0b1231b20
Fix autoblock message on upload page 2021-10-11 09:37:26 +02:00
Chocobozzz 6d210220be
Fix NSFW filter and add tests 2021-09-03 16:35:18 +02:00
Chocobozzz 8f58172565
Allow accounts to skip account setup modal 2021-08-27 10:15:55 +02:00
Chocobozzz bf80903fde
Don't display account setup modal on signup
Don't bother user with a modal just after signup
2021-08-27 09:26:45 +02:00
Ms Kimsible 52a354ab7a
Fix user quota alerts always displayed (#4354)
* Fix user quota alerts display on upload page

* Fix border-radius upload messages alerts

Co-authored-by: Ms Kimsible <kimsible@users.noreply.github.com>
2021-08-26 08:40:18 +02:00
Ms Kimsible 4e1592daa4
Alert user for low quota and video auto-block on upload page (#4336)
* Replace wording of instance contact

* Add contact-us button to no-quota alert on upload page

* Add alert for accounts with auto-blocked videos on upload page

* Add alert for accounts without enough quota + refacto on upload page

* Using ng-container and ng-template

* Add alert for daily quota

* Add hook filter for upload page alert messages

* Add instance name as subtitle in contact modal

* Fix eslint max-len on  string

* Fix missing word in quota left daily message - upload page

Co-authored-by: Kimsible <kimsible@users.noreply.github.com>
2021-08-25 11:38:10 +02:00
Chocobozzz 9df52d660f
Migrate client to eslint 2021-08-18 08:35:06 +02:00
Chocobozzz 1a7d0887b6
Refactor parseQueryStringFilter boolean handler 2021-05-03 16:42:15 +02:00
kontrollanten fbdcd4ec9f
Add AccountAvatarComponent (#3965)
* refactor(client): create account-avatar component

* continue implement account-avatar

* fix review comments
2021-04-15 10:01:27 +02:00
Chocobozzz f479685678 Agnostic actor image storage 2021-04-08 10:07:53 +02:00
Chocobozzz cb2e36618c
Fix updating boolean anonymous settings 2021-02-26 09:39:47 +01:00
Chocobozzz 24d3352ce4
Fix anonymous user settings 2021-02-25 10:26:10 +01:00
Chocobozzz 7a8d858e97
Fix lint 2021-02-18 15:07:42 +01:00
Rigel Kent 1ea7da819e
add ability to remove one's avatar for account and channels (#3467)
* add ability to remove one's avatar for account and channels

* add ability to remove one's avatar for account and channels

* only display avatar edition options after input change
2021-01-13 09:12:55 +01:00
Chocobozzz b4c3c51dc8
Fix circular dependencies 2020-08-14 17:28:54 +02:00
Chocobozzz 66357162f8
Migrate to $localize
* Remove i18n polyfill to translate things in components
 * Reduce bundle sizes
 * Improve runtime perf
 * Reduce a lot the time to make a full client build
 * Reduce client build complexity
 * We don't need a service to translate things anymore (so we will be able to translate title pages etc)

Unfortunately we may loose some translations in the migration process.
I'll put a message on weblate to notify translators
2020-08-14 10:28:30 +02:00
Chocobozzz 94676e631c
Remove angular pipes module 2020-08-11 16:50:00 +02:00
Chocobozzz a4ff3100d3 Cleanup tokens logic in embed 2020-08-07 08:55:02 +02:00
Chocobozzz bd45d503e5 Reorganize shared models 2020-08-07 08:28:14 +02:00
Rigel Kent 4504f09f6e deal with refresh token in embed 2020-08-06 15:08:58 +02:00
Chocobozzz 7c87bce471
Fix anonymous user theme 2020-07-31 16:55:32 +02:00
Rigel Kent 4f5d045960 harmonize search for libraries 2020-07-29 18:15:53 +02:00
Rigel Kent bc99dfe54e variable columns for users list, more columns possible, badge display for statuses 2020-07-29 18:15:53 +02:00
Kim dfe3f7b72e
Add alert and hide upload view when no upload is possible (#2966)
* Add alert and hide upload view when no upload is possible

* Add about instance link to alert

* Hide videos and imports links when no upload is possible

* Correct curly spacing lint

* Put logic canUpload to User model + add isHidden param to to-menu-dropdown

* Use canSeeVideoLinks from user model

* Rename and change logic canUpload to isUploadDisabled

* Use isDisplayed() method intead of isHidden value

* Refactor client and check videos count using quota

Co-authored-by: kimsible <kimsible@users.noreply.github.com>
Co-authored-by: Chocobozzz <me@florianbigard.com>
2020-07-28 15:18:38 +02:00
Chocobozzz 4f32032fed Add migrations 2020-07-10 14:02:41 +02:00
Rigel Kent 8491293b02
add blocked filter in users list to filter banned users
fixes #2914
2020-07-02 22:50:33 +02:00
Chocobozzz 67ed6552b8 Reorganize client shared modules 2020-06-23 16:00:49 +02:00