Commit Graph

27 Commits (develop)

Author SHA1 Message Date
kontrollanten eb51d65448 fix(client/plugins): getUser returns MyUser
Avoid exposing AuthUser as external API.
2024-05-17 10:50:52 +02:00
kontrollanten 8624325523 feat(client/plugins): add getUser to helpers
Let plugins access the user object.

closes #6355
2024-05-17 10:50:52 +02:00
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
Wicklow 40346ead2b
Feature/password protected videos (#5836)
* Add server endpoints

* Refactoring test suites

* Update server and add openapi documentation

* fix compliation and tests

* upload/import password protected video on client

* add server error code

* Add video password to update resolver

* add custom message when sharing pw protected video

* improve confirm component

* Add new alert in component

* Add ability to watch protected video on client

* Cannot have password protected replay privacy

* Add migration

* Add tests

* update after review

* Update check params tests

* Add live videos test

* Add more filter test

* Update static file privacy test

* Update object storage tests

* Add test on feeds

* Add missing word

* Fix tests

* Fix tests on live videos

* add embed support on password protected videos

* fix style

* Correcting data leaks

* Unable to add password protected privacy on replay

* Updated code based on review comments

* fix validator and command

* Updated code based on review comments
2023-06-29 09:48:55 +02:00
Chocobozzz 9d4c60dccc
Add ability for plugins to register ws routes 2022-10-11 11:11:04 +02:00
lutangar d2d4a5a999 Fix plugin settings manager definition
This mainly fix the `onSettingsChange` argument typing.
I'm not 100% sure the setting `value` can be a boolean though.
But this is how it was typed before so I just made it consistent.

Feel free to change - or suggest change - to the type names / location.
2022-01-20 13:43:20 +01:00
lutangar 8b03e2ce1a feat(types): create peertube-types package
Create dedicated Typescript "types" configuration file for each "projects".
Create a types folder which includes every useful ts definition:
- client
- server
- shared
Add tooling to create a proper package, extract dependencies, etc...
Add CI Github task.

refactor(types): publish types package in release script
2021-12-16 10:08:43 +01:00
Chocobozzz d63e6d4604
Add ability for plugins to register client routes 2021-12-10 15:01:12 +01:00
Chocobozzz 9df52d660f
Migrate client to eslint 2021-08-18 08:35:06 +02:00
Chocobozzz 37a44fc915 Add ability to search playlists 2021-06-25 14:44:01 +02:00
John Livingston 9777fe9eeb
Adding frontend peertubeHelpers.getBaseRouterRoute. (#4153)
* Adding frontend peertubeHelpers.getBaseRouterRoute.

* Fix doctoc.
2021-06-03 12:28:26 +02:00
Chocobozzz 4eca42ffb4
Add getAuthHeader client helper 2021-04-22 11:29:06 +02:00
Chocobozzz 3c47fa3bc0
Add ability to hide plugin settings 2021-04-09 13:50:31 +02:00
Chocobozzz faeec106ef
Add auth user client hook actions 2021-03-24 18:18:41 +01:00
Chocobozzz 21e493d4d8
Add ability to set a custom quota 2021-02-10 11:36:40 +01:00
Chocobozzz 7294aab0c8 Add ability to set custom field to video form 2020-08-21 15:39:51 +02:00
Kim 8c7725dc3c
Add markdown support to plugins (#2654)
* Add markdown renderer to plugins

* Chore: add doc for markdown plugins

* Fix typing markdown plugin helpers

* Add lines between components in template

Co-authored-by: kimsible <kimsible@users.noreply.github.com>
2020-04-20 14:51:24 +02:00
Kim 437e8e06eb
Add custom modal to plugin helpers (#2631)
* Add custom modal component

* Add custom modal to app and plugins helpers

* Fixes custom modal component

* Add doc for custom modal

* Fix newline end of file html and scss files

* Move my-custom-modal component outside component for UserLoggedIn modals

* Move initializeCustomModal to ngAfterViewInit()

* Wrap events and conditionnals

* Replace ng-show with ngIf*

* Add modalRef to open only one modal + onCloseClick

* Refacto + Fix access methods of custom modal

* Fix methods names custom-modal.component

* Fix implement AfterViewInit & no default boolean

Co-authored-by: kimsible <kimsible@users.noreply.github.com>
2020-04-15 15:35:41 +02:00
Chocobozzz f757be65b8
Better plugin notifier typings 2020-04-15 09:21:06 +02:00
Kim 74c2dece42
Add notifier to plugin helpers (#2627)
* Add notifier to client PeerTubeHelpers plugin

* Add doc for notifier PeerTubeHelpers

* Add getBaseClientScriptsRoute to client PeerTubeHelpers plugin

* Add doc for getBaseClientScriptsRoute PeerTubeHelpers

* Remove unused helper

Co-authored-by: kimsible <kimsible@users.noreply.github.com>
2020-04-15 09:08:59 +02:00
Julien Maulny 4271212172
Enhance jobs list displaying on smaller screens 2020-01-06 15:10:19 +01:00
Chocobozzz 1061c73fde
Add ability to filter per job type 2019-12-04 14:49:59 +01:00
Rigel Kent eb8f702c83 (plugins) add helper to know if user is logged-in 2019-12-02 09:19:34 +01:00
Chocobozzz d75db01f14
Add plugin translation system 2019-07-26 15:18:30 +02:00
Chocobozzz 23bdacf8ec
Add setting helper to client plugins 2019-07-26 15:18:28 +02:00
Chocobozzz 523990dbe6
Upgrade server dependencies 2019-07-25 11:00:41 +02:00
Chocobozzz bfa1a32b34
Add client hook/register typings 2019-07-24 11:55:08 +02:00