Commit Graph

48 Commits (e6b455b4ea3418ad76c4e914ce27f8e90a019de4)

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 c0e3d9ff90
Rename not fount page to error page 2022-07-08 10:58:05 +02:00
Chocobozzz 384ba8b77a Support videos stats in client 2022-04-15 09:49:35 +02:00
kontrollanten 72dd3a7c26
Fix titles on upload page (#4904)
* client/video-add: fix route titles

* client/video-add: show progress in page title

* Styling

Co-authored-by: Chocobozzz <me@florianbigard.com>
2022-04-08 11:14:12 +02:00
Chocobozzz 92e66e04f7
Rename studio to editor 2022-03-22 17:24:32 +01:00
Chocobozzz c729caf6cc Add basic video editor support 2022-02-28 10:42:19 +01:00
kontrollanten a37e9e74ff
Give moderators access to edit channels (#4608)
* give admins access to edit all channels

closes #4598

* test(channels): +admin update another users channel

* Fix tests

* fix(server): delete another users channel

Since the channel owner isn't necessary the auth user we need to check
the right account whether it's the last video or not.

* REMOVE_ANY_VIDEO_CHANNEL > MANAGE_ANY_VIDEO_CHANNEL

Merge REMOVE_ANY_VIDEO_CHANNEL and MANY_VIDEO_CHANNELS to
MANAGE_ANY_VIDEO_CHANNEL.

* user-right: moderator can't manage admins channel

* client: MyVideoChannelCreateComponent > VideoChannelCreateComponent

* client: MyVideoChannelEdit > VideoChannelEdit

* Revert "user-right: moderator can't manage admins channel"

This reverts commit 2c627c154e.

* server: clean dupl validator functionality

* fix ensureUserCanManageChannel usage

It's not async anymore.

* server: merge channel validator middleares

ensureAuthUserOwnsChannelValidator & ensureUserCanManageChannel gets
merged into one middleware.

* client(VideoChannelEdit): redirect to prev route

* fix(VideoChannels): handle anon users

* client: new routes for create/update channel

* Refactor channel validators

Co-authored-by: Chocobozzz <me@florianbigard.com>
2021-12-13 15:29:13 +01:00
Chocobozzz d63e6d4604
Add ability for plugins to register client routes 2021-12-10 15:01:12 +01:00
Chocobozzz dd24f1bb0a
Add video filters to common video pages 2021-08-25 11:24:11 +02:00
Chocobozzz fc21ef5c62
Speed up plugins loading 2021-06-04 15:45:44 +02:00
Chocobozzz 8e08d415f9
Load server config on app init 2021-06-04 15:45:44 +02:00
Chocobozzz a1eda903a4
Support '/w/' and '/w/p/' for watch page
And use them as default in client
2021-05-28 11:38:08 +02:00
Chocobozzz 012580d98f
Cleanup
We must not expose private actor objects to clients
Just make 2 GET requests on channel/accounts instead
2021-05-28 10:22:50 +02:00
Chocobozzz 8f608a4cb2
Merge branch 'develop' into shorter-URLs-channels-accounts 2021-05-27 16:12:41 +02:00
Chocobozzz 0f01a8bacd Remove ngx-meta
Unmaintained
2021-05-27 16:00:13 +02:00
Chocobozzz 2539932e16
Instance homepage support (#4007)
* Prepare homepage parsers

* Add ability to update instance hompage

* Add ability to set homepage as landing page

* Add homepage preview in admin

* Dynamically update left menu for homepage

* Inject home content in homepage

* Add videos list and channel miniature custom markup

* Remove unused elements in markup service
2021-05-27 15:59:55 +02:00
Kimsible 7188739644 Make /a and /c default URLs for accounts and channels 2021-05-05 11:48:25 +02:00
Kimsible 69e076ddb0 Refactor client @actorName matcher with new API route 2021-05-05 11:47:03 +02:00
Kimsible ff8c5ccf09 Add shorter URLs for accounts and channels client-side 2021-05-05 11:47:03 +02:00
Chocobozzz 0bd6d35f13
Add watch redirection for playlists 2021-03-04 09:04:10 +01:00
Chocobozzz d43c6b1ffc Implement remote interaction 2021-01-15 10:49:10 +01:00
Chocobozzz 17119e4a54 Reorganize left menu and account menu
Add my-settings and my-library in left menu
Move administration below my-library
Split account menu: my-setting and my library
2020-11-13 12:02:21 +01:00
Chocobozzz ca00baa75a
Avoid 404 when changing language 2020-08-26 08:54:19 +02:00
Chocobozzz 1942f11d5e Lazy load all routes 2020-06-23 16:00:49 +02:00
Chocobozzz 67ed6552b8 Reorganize client shared modules 2020-06-23 16:00:49 +02:00
Rigel Kent 3b20bdd6dc Servicify menu, close menu on admin for small and medium screens 2020-03-10 16:22:52 +01:00
Chocobozzz f36da21e40
Update angular 2019-07-25 11:00:43 +02:00
Chocobozzz b247a13270
Add success icon on registration 2019-05-29 14:39:49 +02:00
Chocobozzz 489290b8b1
Restore videos list components 2019-04-02 11:45:02 +02:00
Chocobozzz 07a982363f Correctly scroll in notification preferences 2019-01-09 11:15:15 +01:00
Josh Morel d9eaee3939 add user account email verificiation (#977)
* add user account email verificiation

includes server and client code to:

* enable verificationRequired via custom config
* send verification email with registration
* ask for verification email
* verify via email
* prevent login if not verified and required
* conditional client links to ask for new verification email

* allow login for verified=null

these are users created when verification not required
should still be able to login when verification is enabled

* refactor email verifcation pr

* change naming from verified to emailVerified
* change naming from askVerifyEmail to askSendVerifyEmail
* undo unrelated automatic prettier formatting on api/config
* use redirectService for home
* remove redundant success notification on email verified

* revert test.yaml smpt host
2018-08-31 09:18:19 +02:00
Chocobozzz b889cdb2c6
Avoid 404 title on the first page load 2018-06-28 17:16:22 +02:00
Chocobozzz 78f912ed57 Improve P2P & Privacy section 2018-06-27 14:59:09 +02:00
Chocobozzz a51bad1acc
Add 404 page 2018-05-31 14:24:13 +02:00
Chocobozzz 4b4f22fc30
Remove bad comments 2018-05-17 15:25:50 +02:00
Chocobozzz 74af5a8361
Client E2E tests first step 2018-05-17 10:55:50 +02:00
Chocobozzz 62e62f118d
Load my-account module lazily 2018-05-09 09:32:26 +02:00
Chocobozzz 170726f523
Implement video channel views 2018-04-25 16:56:13 +02:00
Chocobozzz 0626e7af82
Add account view 2018-04-24 15:13:19 +02:00
Chocobozzz ae5a3dd664
Update videos response api 2018-03-19 10:32:51 +01:00
Chocobozzz 901637bb87
Add ability to change the homepage 2018-03-01 13:57:29 +01:00
Chocobozzz 63c4db6d71
Move to angular cli 2017-12-12 10:58:16 +01:00
Chocobozzz 2bbb34127f
Add auto scroll to videos list 2017-12-01 16:17:32 +01:00
Chocobozzz a685e25ca0
Try to optimize frontend 2017-10-09 14:28:44 +02:00
Chocobozzz 04de542abd Update webpack config 2017-09-06 21:48:15 +02:00
Chocobozzz df98563e21 Use typescript standard and lint all files 2017-06-16 14:32:15 +02:00
Chocobozzz b99290b1d5 Client: lazy load admin area 2017-01-23 22:32:43 +01:00
Chocobozzz 693b1aba46 Client: split in angular modules 2016-11-21 22:09:45 +01:00