Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

add plugin selector to about/menu elements (#4597)

kontrollanten28c6556789e4
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 1026c4e0da..7f2a6aa772 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 @@
<my-custom-markup-container [content]="descriptionContent"></my-custom-markup-container>
</div>
- <div class="anchor" id="moderation"></div>
- <a
- *ngIf="html.moderationInformation || html.codeOfConduct || html.terms"
- class="anchor-link"
- routerLink="/about/instance"
- fragment="moderation"
- #anchorLink
- (click)="onClickCopyLink(anchorLink)">
- <h2 i18n class="middle-title">
- MODERATION
- </h2>
- </a>
-
- <div class="block moderation-information" *ngIf="html.moderationInformation">
- <div class="anchor" id="moderation-information"></div>
+ <div myPluginSelector pluginSelectorId="about-instance-moderation">
+ <div class="anchor" id="moderation"></div>
<a
+ *ngIf="html.moderationInformation || html.codeOfConduct || html.terms"
class="anchor-link"
routerLink="/about/instance"
- fragment="moderation-information"
+ fragment="moderation"
#anchorLink
(click)="onClickCopyLink(anchorLink)">
- <h3 i18n class="section-title">Moderation information</h3>
+ <h2 i18n class="middle-title">
+ MODERATION
+ </h2>
</a>
- <div [innerHTML]="html.moderationInformation"></div>
- </div>
+ <div class="block moderation-information" *ngIf="html.moderationInformation">
+ <div class="anchor" id="moderation-information"></div>
+ <a
+ class="anchor-link"
+ routerLink="/about/instance"
+ fragment="moderation-information"
+ #anchorLink
+ (click)="onClickCopyLink(anchorLink)">
+ <h3 i18n class="section-title">Moderation information</h3>
+ </a>
- <div class="block code-of-conduct" *ngIf="html.codeOfConduct">
- <div class="anchor" id="code-of-conduct"></div>
- <a
- class="anchor-link"
- routerLink="/about/instance"
- fragment="code-of-conduct"
- #anchorLink
- (click)="onClickCopyLink(anchorLink)">
- <h3 i18n class="section-title">Code of conduct</h3>
- </a>
+ <div [innerHTML]="html.moderationInformation"></div>
+ </div>
- <div [innerHTML]="html.codeOfConduct"></div>
- </div>
+ <div class="block code-of-conduct" *ngIf="html.codeOfConduct">
+ <div class="anchor" id="code-of-conduct"></div>
+ <a
+ class="anchor-link"
+ routerLink="/about/instance"
+ fragment="code-of-conduct"
+ #anchorLink
+ (click)="onClickCopyLink(anchorLink)">
+ <h3 i18n class="section-title">Code of conduct</h3>
+ </a>
- <div class="block terms">
- <div class="anchor" id="terms"></div>
- <a
- class="anchor-link"
- routerLink="/about/instance"
- fragment="terms"
- #anchorLink
- (click)="onClickCopyLink(anchorLink)">
- <h3 i18n class="section-title">Terms</h3>
- </a>
+ <div [innerHTML]="html.codeOfConduct"></div>
+ </div>
- <div [innerHTML]="html.terms"></div>
- </div>
+ <div class="block terms">
+ <div class="anchor" id="terms"></div>
+ <a
+ class="anchor-link"
+ routerLink="/about/instance"
+ fragment="terms"
+ #anchorLink
+ (click)="onClickCopyLink(anchorLink)">
+ <h3 i18n class="section-title">Terms</h3>
+ </a>
- <div class="anchor" id="other-information"></div>
- <a
- *ngIf="html.hardwareInformation"
- class="anchor-link"
- routerLink="/about/instance"
- fragment="other-information"
- #anchorLink
- (click)="onClickCopyLink(anchorLink)">
- <h2 i18n class="middle-title">
- OTHER INFORMATION
- </h2>
- </a>
+ <div [innerHTML]="html.terms"></div>
+ </div>
+ </div>
- <div class="block hardware-information" *ngIf="html.hardwareInformation">
- <div class="anchor" id="hardware-information"></div>
+ <div myPluginSelector pluginSelectorId="about-instance-other-information">
+ <div class="anchor" id="other-information"></div>
<a
+ *ngIf="html.hardwareInformation"
class="anchor-link"
routerLink="/about/instance"
- fragment="hardware-information"
+ fragment="other-information"
#anchorLink
(click)="onClickCopyLink(anchorLink)">
- <h3 i18n class="section-title">Hardware information</h3>
+ <h2 i18n class="middle-title">
+ OTHER INFORMATION
+ </h2>
</a>
- <div [innerHTML]="html.hardwareInformation"></div>
+ <div class="block hardware-information" *ngIf="html.hardwareInformation">
+ <div class="anchor" id="hardware-information"></div>
+ <a
+ class="anchor-link"
+ routerLink="/about/instance"
+ fragment="hardware-information"
+ #anchorLink
+ (click)="onClickCopyLink(anchorLink)">
+ <h3 i18n class="section-title">Hardware information</h3>
+ </a>
+
+ <div [innerHTML]="html.hardwareInformation"></div>
+ </div>
</div>
</div>
- <div class="col-md-12 col-xl-6">
+ <div class="col-md-12 col-xl-6" myPluginSelector pluginSelectorId="about-instance-features">
<h2 class="sr-only" i18n>FEATURES</h2>
<my-instance-features-table></my-instance-features-table>
</div>
- <div class="col">
+ <div class="col" myPluginSelector pluginSelectorId="about-instance-statistics">
<div class="anchor" id="statistics"></div>
<a
class="anchor-link"
diff --git a/client/src/app/+about/about.component.html b/client/src/app/+about/about.component.html
index 1ab00c5df4..63d429ebfb 100644
--- a/client/src/app/+about/about.component.html
+++ b/client/src/app/+about/about.component.html
@@ -2,11 +2,11 @@
<div class="sub-menu" [ngClass]="{ 'sub-menu-fixed': !isBroadcastMessageDisplayed }">
<div class="links">
- <a i18n routerLink="instance" routerLinkActive="active" class="title-page title-page-about">Instance</a>
+ <a myPluginSelector pluginSelectorId="about-menu-instance" i18n routerLink="instance" routerLinkActive="active" class="title-page title-page-about">Instance</a>
- <a i18n routerLink="peertube" routerLinkActive="active" class="title-page title-page-about">PeerTube</a>
+ <a myPluginSelector pluginSelectorId="about-menu-peertube" i18n routerLink="peertube" routerLinkActive="active" class="title-page title-page-about">PeerTube</a>
- <a i18n routerLink="follows" routerLinkActive="active" class="title-page title-page-about">Network</a>
+ <a myPluginSelector pluginSelectorId="about-menu-network" i18n routerLink="follows" routerLinkActive="active" class="title-page title-page-about">Network</a>
</div>
</div>
diff --git a/client/src/app/menu/menu.component.html b/client/src/app/menu/menu.component.html
index 46dd807ec5..55fc27b5f4 100644
--- a/client/src/app/menu/menu.component.html
+++ b/client/src/app/menu/menu.component.html
@@ -30,7 +30,10 @@
<div class="dropdown-divider"></div>
- <a ngbDropdownItem ngbDropdownToggle class="dropdown-item" (click)="openLanguageChooser()">
+ <a
+ myPluginSelector pluginSelectorId="menu-user-dropdown-language-item"
+ ngbDropdownItem ngbDropdownToggle class="dropdown-item" (click)="openLanguageChooser()"
+ >
<my-global-icon iconName="language" aria-hidden="true"></my-global-icon>
<span i18n>Interface:</span>
<span class="ml-auto text-muted">{{ currentInterfaceLanguage }}</span>
diff --git a/shared/models/plugins/client/plugin-selector-id.type.ts b/shared/models/plugins/client/plugin-selector-id.type.ts
index b74dffbef7..8d23314b5a 100644
--- a/shared/models/plugins/client/plugin-selector-id.type.ts
+++ b/shared/models/plugins/client/plugin-selector-id.type.ts
@@ -1 +1,10 @@
-export type PluginSelectorId = 'login-form'
+export type PluginSelectorId =
+ 'login-form' |
+ 'menu-user-dropdown-language-item' |
+ 'about-instance-features' |
+ 'about-instance-statistics' |
+ 'about-instance-moderation' |
+ 'about-menu-instance' |
+ 'about-menu-peertube' |
+ 'about-menu-network' |
+ 'about-instance-other-information'