ActivityPub-federated video streaming platform using P2P directly in your web browser
Make /a and /c default URLs for accounts and channels
Kimsible718873964490
diff --git a/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts b/client/src/app/+accounts/account-video-channels/account-video-channels.component.tsindex 0628c7a963..96d1e0f85a 100644--- a/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts+++ b/client/src/app/+accounts/account-video-channels/account-video-channels.component.ts@@ -133,6 +133,6 @@ export class AccountVideoChannelsComponent implements OnInit, OnDestroy {}getVideoChannelLink (videoChannel: VideoChannel) {- return [ '/video-channels', videoChannel.nameWithHost ]+ return [ '/c', videoChannel.nameWithHost ]}}diff --git a/client/src/app/+admin/users/user-edit/user-edit.component.html b/client/src/app/+admin/users/user-edit/user-edit.component.htmlindex 5e92c0f36a..772ebf2721 100644--- a/client/src/app/+admin/users/user-edit/user-edit.component.html+++ b/client/src/app/+admin/users/user-edit/user-edit.component.html@@ -10,7 +10,7 @@<ng-container *ngIf="!isCreation()"><li class="breadcrumb-item active" i18n>Edit</li><li class="breadcrumb-item active" aria-current="page">- <a *ngIf="user" [routerLink]="[ '/accounts', user?.username ]">{{ user?.username }}</a>+ <a *ngIf="user" [routerLink]="[ '/a', user?.username ]">{{ user?.username }}</a></li></ng-container></ol>diff --git a/client/src/app/+admin/users/user-list/user-list.component.html b/client/src/app/+admin/users/user-list/user-list.component.htmlindex 44d8a7e87c..5b4f35c772 100644--- a/client/src/app/+admin/users/user-list/user-list.component.html+++ b/client/src/app/+admin/users/user-list/user-list.component.html@@ -87,7 +87,7 @@</td><td *ngIf="isSelected('username')">- <a i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer" [routerLink]="[ '/accounts/' + user.username ]">+ <a i18n-title title="Open account in a new tab" target="_blank" rel="noopener noreferrer" [routerLink]="[ '/a/' + user.username ]"><div class="chip two-lines"><my-actor-avatar [account]="user?.account" size="32"></my-actor-avatar><div>diff --git a/client/src/app/+my-library/+my-video-channels/my-video-channels.component.html b/client/src/app/+my-library/+my-video-channels/my-video-channels.component.htmlindex e41cbe921f..9f139b4f29 100644--- a/client/src/app/+my-library/+my-video-channels/my-video-channels.component.html+++ b/client/src/app/+my-library/+my-video-channels/my-video-channels.component.html@@ -17,10 +17,10 @@<div class="video-channels"><div *ngFor="let videoChannel of videoChannels; let i = index" class="video-channel">- <my-actor-avatar [channel]="videoChannel" [internalHref]="[ '/video-channels', videoChannel.nameWithHost ]"></my-actor-avatar>+ <my-actor-avatar [channel]="videoChannel" [internalHref]="[ '/c', videoChannel.nameWithHost ]"></my-actor-avatar><div class="video-channel-info">- <a [routerLink]="[ '/video-channels', videoChannel.nameWithHost ]" class="video-channel-names" i18n-title title="Channel page">+ <a [routerLink]="[ '/c', videoChannel.nameWithHost ]" class="video-channel-names" i18n-title title="Channel page"><div class="video-channel-display-name">{{ videoChannel.displayName }}</div><div class="video-channel-name">{{ videoChannel.nameWithHost }}</div></a>diff --git a/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.html b/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.htmlindex f91cebacfb..1bd459059b 100644--- a/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.html+++ b/client/src/app/+my-library/my-subscriptions/my-subscriptions.component.html@@ -14,17 +14,17 @@<div class="video-channels" myInfiniteScroller [autoInit]="true" (nearOfBottom)="onNearOfBottom()" [dataObservable]="onDataSubject.asObservable()"><div *ngFor="let videoChannel of videoChannels" class="video-channel">- <my-actor-avatar [channel]="videoChannel" [internalHref]="[ '/video-channels', videoChannel.nameWithHost ]"></my-actor-avatar>+ <my-actor-avatar [channel]="videoChannel" [internalHref]="[ '/c', videoChannel.nameWithHost ]"></my-actor-avatar><div class="video-channel-info">- <a [routerLink]="[ '/video-channels', videoChannel.nameWithHost ]" class="video-channel-names" i18n-title title="Channel page">+ <a [routerLink]="[ '/c', videoChannel.nameWithHost ]" class="video-channel-names" i18n-title title="Channel page"><div class="video-channel-display-name">{{ videoChannel.displayName }}</div><div class="video-channel-name">{{ videoChannel.nameWithHost }}</div></a><div i18n class="video-channel-followers">{{ videoChannel.followersCount }} subscribers</div>- <a [routerLink]="[ '/accounts', videoChannel.ownerBy ]" i18n-title title="Owner account page" class="actor-owner">+ <a [routerLink]="[ '/a', videoChannel.ownerBy ]" i18n-title title="Owner account page" class="actor-owner"><span i18n>Created by {{ videoChannel.ownerBy }}</span><my-actor-avatar [account]="videoChannel.ownerAccount" size="18"></my-actor-avatar>diff --git a/client/src/app/+remote-interaction/remote-interaction.component.ts b/client/src/app/+remote-interaction/remote-interaction.component.tsindex e24607b24c..3ebe62f49e 100644--- a/client/src/app/+remote-interaction/remote-interaction.component.ts+++ b/client/src/app/+remote-interaction/remote-interaction.component.ts@@ -43,7 +43,7 @@ export class RemoteInteractionComponent implements OnInit {} else if (channelResult.data.length !== 0) {const channel = new VideoChannel(channelResult.data[0])- redirectUrl = '/video-channels/' + channel.nameWithHost+ redirectUrl = '/c/' + channel.nameWithHost} else {this.error = $localize`Cannot access to the remote resource`returndiff --git a/client/src/app/+search/search.component.ts b/client/src/app/+search/search.component.tsindex ecede19a3d..8a781cbe4e 100644--- a/client/src/app/+search/search.component.ts+++ b/client/src/app/+search/search.component.ts@@ -214,7 +214,7 @@ export class SearchComponent implements OnInit, OnDestroy {const linkType = this.getVideoLinkType()if (linkType === 'internal') {- return [ '/video-channels', channel.nameWithHost ]+ return [ '/c', channel.nameWithHost ]}if (linkType === 'lazy-load') {diff --git a/client/src/app/+video-channels/video-channels.component.ts b/client/src/app/+video-channels/video-channels.component.tsindex 41fdb5e799..3833d9c542 100644--- a/client/src/app/+video-channels/video-channels.component.ts+++ b/client/src/app/+video-channels/video-channels.component.ts@@ -112,7 +112,7 @@ export class VideoChannelsComponent implements OnInit, OnDestroy {}getAccountUrl () {- return [ '/accounts', this.videoChannel.ownerBy ]+ return [ '/a', this.videoChannel.ownerBy ]}private loadChannelVideosCount () {diff --git a/client/src/app/+videos/+video-watch/comment/video-comment.component.html b/client/src/app/+videos/+video-watch/comment/video-comment.component.htmlindex d7ba40ef6c..fc0d66ffd2 100644--- a/client/src/app/+videos/+video-watch/comment/video-comment.component.html+++ b/client/src/app/+videos/+video-watch/comment/video-comment.component.html@@ -11,7 +11,7 @@<div class="comment-account-date"><div class="comment-account">- <a [routerLink]="[ '/accounts', comment.by ]">+ <a [routerLink]="[ '/a', comment.by ]"><span class="comment-account-name" [ngClass]="{ 'video-author': video.account.id === comment.account.id }">{{ comment.account.displayName }}</span>diff --git a/client/src/app/+videos/+video-watch/video-avatar-channel.component.html b/client/src/app/+videos/+video-watch/video-avatar-channel.component.htmlindex 5f149cbd11..5a72218584 100644--- a/client/src/app/+videos/+video-watch/video-avatar-channel.component.html+++ b/client/src/app/+videos/+video-watch/video-avatar-channel.component.html@@ -1,11 +1,11 @@<div class="wrapper" [ngClass]="{ 'generic-channel': genericChannel }"><my-actor-avatarclass="channel" [channel]="video.channel"- [internalHref]="[ '/video-channels', video.byVideoChannel ]" [title]="channelLinkTitle"+ [internalHref]="[ '/c', video.byVideoChannel ]" [title]="channelLinkTitle"></my-actor-avatar><my-actor-avatarclass="account" [account]="video.account"- [internalHref]="[ '/accounts', video.byAccount ]" [title]="accountLinkTitle">+ [internalHref]="[ '/a', video.byAccount ]" [title]="accountLinkTitle"></my-actor-avatar></div>diff --git a/client/src/app/+videos/+video-watch/video-watch.component.html b/client/src/app/+videos/+video-watch/video-watch.component.htmlindex 4779602d24..bb41fba779 100644--- a/client/src/app/+videos/+video-watch/video-watch.component.html+++ b/client/src/app/+videos/+video-watch/video-watch.component.html@@ -183,16 +183,16 @@<div class="video-info-channel-left-links ml-1"><ng-container *ngIf="!isChannelDisplayNameGeneric()">- <a [routerLink]="[ '/video-channels', video.byVideoChannel ]" i18n-title title="Channel page">+ <a [routerLink]="[ '/c', video.byVideoChannel ]" i18n-title title="Channel page">{{ video.channel.displayName }}</a>- <a [routerLink]="[ '/accounts', video.byAccount ]" i18n-title title="Account page">+ <a [routerLink]="[ '/a', video.byAccount ]" i18n-title title="Account page"><span i18n>By {{ video.byAccount }}</span></a></ng-container><ng-container *ngIf="isChannelDisplayNameGeneric()">- <a [routerLink]="[ '/accounts', video.byAccount ]" class="single-link" i18n-title title="Account page">+ <a [routerLink]="[ '/a', video.byAccount ]" class="single-link" i18n-title title="Account page"><span i18n>{{ video.byAccount }}</span></a></ng-container>diff --git a/client/src/app/+videos/video-list/overview/video-overview.component.html b/client/src/app/+videos/video-list/overview/video-overview.component.htmlindex e21bffb6c5..d3c602aa58 100644--- a/client/src/app/+videos/video-list/overview/video-overview.component.html+++ b/client/src/app/+videos/video-list/overview/video-overview.component.html@@ -32,7 +32,7 @@<div class="section channel videos" *ngFor="let object of overview.channels"><div class="section-title">- <a [routerLink]="[ '/video-channels', buildVideoChannelBy(object) ]">+ <a [routerLink]="[ '/c', buildVideoChannelBy(object) ]"><my-actor-avatar [channel]="buildVideoChannel(object)"></my-actor-avatar><h2 class="section-title">{{ object.channel.displayName }}</h2>diff --git a/client/src/app/app-routing.module.ts b/client/src/app/app-routing.module.tsindex 23fd52e8b0..0a43ab0ad8 100644--- a/client/src/app/app-routing.module.ts+++ b/client/src/app/app-routing.module.ts@@ -27,11 +27,11 @@ const routes: Routes = [loadChildren: () => import('./+signup/+verify-account/verify-account.module').then(m => m.VerifyAccountModule)},{- path: 'accounts',+ path: 'a',loadChildren: () => import('./+accounts/accounts.module').then(m => m.AccountsModule)},{- path: 'video-channels',+ path: 'c',loadChildren: () => import('./+video-channels/video-channels.module').then(m => m.VideoChannelsModule)},{@@ -67,12 +67,12 @@ const routes: Routes = [redirectTo: 'videos/watch/playlist'},{- path: 'a',- redirectTo: 'accounts'+ path: 'accounts',+ redirectTo: 'a'},{- path: 'c',- redirectTo: 'video-channels'+ path: 'video-channels',+ redirectTo: 'c'},{matcher: (url): UrlMatchResult => {diff --git a/client/src/app/menu/menu.component.html b/client/src/app/menu/menu.component.htmlindex 2e07deca2a..3a7ffcbb6b 100644--- a/client/src/app/menu/menu.component.html+++ b/client/src/app/menu/menu.component.html@@ -18,7 +18,7 @@</div><div ngbDropdownMenu>- <a *ngIf="user.account" ngbDropdownItem ngbDropdownToggle class="dropdown-item" [routerLink]="[ '/accounts', user.account.nameWithHost ]"+ <a *ngIf="user.account" ngbDropdownItem ngbDropdownToggle class="dropdown-item" [routerLink]="[ '/a', user.account.nameWithHost ]"#profile (click)="onActiveLinkScrollToAnchor(profile)"><my-global-icon iconName="go" aria-hidden="true"></my-global-icon> <ng-container i18n>Public profile</ng-container></a>diff --git a/client/src/app/root.component.ts b/client/src/app/root.component.tsindex c65f594489..ae999e0587 100644--- a/client/src/app/root.component.ts+++ b/client/src/app/root.component.ts@@ -30,12 +30,12 @@ export class RootComponent implements OnInit {]))).subscribe(actor => {- if (actor.constructor.name === 'Account') {- this.router.navigateByUrl(`/accounts/${actor.name}`)+ if (/\/accounts\//.test(actor.url)) {+ this.router.navigate([ `/a/${actor.name}` ], { state: { type: 'others', obj: { status: 200 } }, skipLocationChange: true })}- if (actor.constructor.name === 'VideoChannel') {- this.router.navigateByUrl(`/video-channels/${actor.name}`)+ if (/\/video-channels\//.test(actor.url)) {+ this.router.navigate([ `/c/${actor.name}` ], { state: { type: 'others', obj: { status: 200 } }, skipLocationChange: true })}})}diff --git a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.tsindex 4dc2b4f10b..07b9dddba0 100644--- a/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts+++ b/client/src/app/shared/shared-abuse-list/abuse-list-table.component.ts@@ -124,7 +124,7 @@ export class AbuseListTableComponent extends RestTable implements OnInit {}getAccountUrl (abuse: ProcessedAbuse) {- return '/accounts/' + abuse.flaggedAccount.nameWithHost+ return '/a/' + abuse.flaggedAccount.nameWithHost}getVideoEmbed (abuse: AdminAbuse) {diff --git a/client/src/app/shared/shared-main/users/user-notification.model.ts b/client/src/app/shared/shared-main/users/user-notification.model.tsindex ed5791794d..002a01583b 100644--- a/client/src/app/shared/shared-main/users/user-notification.model.ts+++ b/client/src/app/shared/shared-main/users/user-notification.model.ts@@ -242,7 +242,7 @@ export class UserNotification implements UserNotificationServer {}private buildAccountUrl (account: { name: string, host: string }) {- return '/accounts/' + Actor.CREATE_BY_STRING(account.name, account.host)+ return '/a/' + Actor.CREATE_BY_STRING(account.name, account.host)}private buildVideoImportUrl () {diff --git a/client/src/app/shared/shared-video-comment/video-comment.model.ts b/client/src/app/shared/shared-video-comment/video-comment.model.tsindex 9a4e3954e5..1a2fe03db6 100644--- a/client/src/app/shared/shared-video-comment/video-comment.model.ts+++ b/client/src/app/shared/shared-video-comment/video-comment.model.ts@@ -95,7 +95,7 @@ export class VideoCommentAdmin implements VideoCommentAdminServerModel {if (this.account) {this.by = Actor.CREATE_BY_STRING(this.account.name, this.account.host)- this.account.localUrl = '/accounts/' + this.by+ this.account.localUrl = '/a/' + this.by}}}diff --git a/client/src/app/shared/shared-video-miniature/video-miniature.component.html b/client/src/app/shared/shared-video-miniature/video-miniature.component.htmlindex 645be92bd3..6c34123ed3 100644--- a/client/src/app/shared/shared-video-miniature/video-miniature.component.html+++ b/client/src/app/shared/shared-video-miniature/video-miniature.component.html@@ -12,12 +12,12 @@<div class="d-flex video-miniature-meta"><my-actor-avatar*ngIf="displayOptions.avatar && displayOwnerVideoChannel()" [title]="channelLinkTitle"- [channel]="video.channel" [size]="actorImageSize" [internalHref]="[ '/video-channels', video.byVideoChannel ]"+ [channel]="video.channel" [size]="actorImageSize" [internalHref]="[ '/c', video.byVideoChannel ]"></my-actor-avatar><my-actor-avatar*ngIf="displayOptions.avatar && displayOwnerAccount()" [title]="channelLinkTitle"- [account]="video.account" [size]="actorImageSize" [internalHref]="[ '/video-channels', video.byVideoChannel ]"+ [account]="video.account" [size]="actorImageSize" [internalHref]="[ '/c', video.byVideoChannel ]"></my-actor-avatar><div class="w-100 d-flex flex-column">@@ -39,10 +39,10 @@</span></span>- <a tabindex="-1" *ngIf="displayOptions.by && displayOwnerAccount()" class="video-miniature-account" [routerLink]="[ '/video-channels', video.byVideoChannel ]">+ <a tabindex="-1" *ngIf="displayOptions.by && displayOwnerAccount()" class="video-miniature-account" [routerLink]="[ '/c', video.byVideoChannel ]">{{ video.byAccount }}</a>- <a tabindex="-1" *ngIf="displayOptions.by && displayOwnerVideoChannel()" class="video-miniature-channel" [routerLink]="[ '/video-channels', video.byVideoChannel ]">+ <a tabindex="-1" *ngIf="displayOptions.by && displayOwnerVideoChannel()" class="video-miniature-channel" [routerLink]="[ '/c', video.byVideoChannel ]">{{ video.byVideoChannel }}</a>diff --git a/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.html b/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.htmlindex ec004a4070..e74f58f473 100644--- a/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.html+++ b/client/src/app/shared/shared-video-playlist/video-playlist-element-miniature.component.html@@ -20,7 +20,7 @@[attr.title]="playlistElement.video.name">{{ playlistElement.video.name }}</a>- <a *ngIf="accountLink" tabindex="-1" class="video-info-account" [routerLink]="[ '/accounts', playlistElement.video.byAccount ]">+ <a *ngIf="accountLink" tabindex="-1" class="video-info-account" [routerLink]="[ '/a', playlistElement.video.byAccount ]">{{ playlistElement.video.byAccount }}</a><span *ngIf="!accountLink" tabindex="-1" class="video-info-account">{{ playlistElement.video.byAccount }}</span>diff --git a/client/src/app/shared/shared-video-playlist/video-playlist-miniature.component.html b/client/src/app/shared/shared-video-playlist/video-playlist-miniature.component.htmlindex f50f950039..81c36e6fe4 100644--- a/client/src/app/shared/shared-video-playlist/video-playlist-miniature.component.html+++ b/client/src/app/shared/shared-video-playlist/video-playlist-miniature.component.html@@ -19,7 +19,7 @@{{ playlist.displayName }}</a>- <a i18n [routerLink]="[ '/video-channels', playlist.videoChannelBy ]" class="by" *ngIf="displayChannel && playlist.videoChannelBy">+ <a i18n [routerLink]="[ '/c', playlist.videoChannelBy ]" class="by" *ngIf="displayChannel && playlist.videoChannelBy">{{ playlist.videoChannelBy }}</a>