mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-02 17:29:29 +02:00
add x link
Add missing code
This commit is contained in:
parent
dd52e8b89e
commit
ef28ba3038
17 changed files with 51 additions and 5 deletions
|
@ -846,6 +846,7 @@
|
|||
* `peertube-x` by Solen DP (CC-BY)
|
||||
* `flame` by Freepik (Flaticon License)
|
||||
* `local` by Larea (CC-BY)
|
||||
* X (Twitter) icon: [Wikimedia Commons](https://fr.m.wikipedia.org/wiki/Fichier:X_logo_2023.svg)
|
||||
|
||||
|
||||
# Contributors to our 2020 crowdfunding :heart:
|
||||
|
|
|
@ -27,17 +27,25 @@
|
|||
*ngIf="config.instance.social.mastodonLink"
|
||||
class="media peertube-button-link rounded-icon-button mb-3" i18n-title title="Go to the Mastodon profile"
|
||||
target="_blank" rel="noopener noreferrer" [href]="config.instance.social.mastodonLink"
|
||||
>
|
||||
>
|
||||
<my-global-icon iconName="mastodon"></my-global-icon>
|
||||
</a>
|
||||
|
||||
<a
|
||||
*ngIf="config.instance.social.xLink"
|
||||
class="media peertube-button-link rounded-icon-button mb-3" i18n-title title="Go to the X profile"
|
||||
target="_blank" rel="noopener noreferrer" [href]="config.instance.social.xLink"
|
||||
>
|
||||
<my-global-icon iconName="x-twitter"></my-global-icon>
|
||||
</a>
|
||||
|
||||
<a
|
||||
*ngIf="config.instance.social.blueskyLink"
|
||||
class="media peertube-button-link rounded-icon-button mb-3" i18n-title title="Go to the Bluesky profile"
|
||||
target="_blank" rel="noopener noreferrer" [href]="config.instance.social.blueskyLink"
|
||||
>
|
||||
<my-global-icon iconName="bluesky"></my-global-icon>
|
||||
</a>
|
||||
<my-global-icon iconName="bluesky"></my-global-icon>
|
||||
</a>
|
||||
|
||||
<a
|
||||
*ngIf="config.instance.social.externalLink"
|
||||
|
|
|
@ -172,6 +172,17 @@
|
|||
<div *ngIf="formErrors.instance.social.mastodonLink" class="form-error" role="alert">{{ formErrors.instance.social.mastodonLink }}</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label i18n for="instanceSocialXLink">X link</label>
|
||||
|
||||
<input
|
||||
type="text" id="instanceSocialXLink" class="form-control"
|
||||
formControlName="xLink" [ngClass]="{ 'input-error': formErrors.instance.social.xLink }"
|
||||
>
|
||||
|
||||
<div *ngIf="formErrors.instance.social.xLink" class="form-error" role="alert">{{ formErrors.instance.social.xLink }}</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label i18n for="instanceSocialBlueskyLink">Bluesky link</label>
|
||||
|
||||
|
|
|
@ -59,6 +59,7 @@ type Form = {
|
|||
externalLink: FormControl<string>
|
||||
mastodonLink: FormControl<string>
|
||||
blueskyLink: FormControl<string>
|
||||
xLink: FormControl<string>
|
||||
}>
|
||||
|
||||
isNSFW: FormControl<boolean>
|
||||
|
@ -205,7 +206,8 @@ export class AdminConfigInformationComponent implements OnInit, OnDestroy, CanCo
|
|||
social: {
|
||||
externalLink: URL_VALIDATOR,
|
||||
mastodonLink: URL_VALIDATOR,
|
||||
blueskyLink: URL_VALIDATOR
|
||||
blueskyLink: URL_VALIDATOR,
|
||||
xLink: URL_VALIDATOR
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ const icons = {
|
|||
'flame': require('../../../assets/images/misc/flame.svg'),
|
||||
'fediverse': require('../../../assets/images/misc/fediverse.svg'),
|
||||
'mastodon': require('../../../assets/images/misc/mastodon.svg'),
|
||||
'x-twitter': require('../../../assets/images/misc/x-twitter.svg'),
|
||||
'bluesky': require('../../../assets/images/misc/bluesky.svg'),
|
||||
|
||||
// feather/lucide icons
|
||||
|
|
4
client/src/assets/images/misc/x-twitter.svg
Normal file
4
client/src/assets/images/misc/x-twitter.svg
Normal file
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="300" height="271" viewBox="0 0 300 271" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m236 0h46l-101 115 118 156h-92.6l-72.5-94.8-83 94.8h-46l107-123-113-148h94.9l65.5 86.6zm-16.1 244h25.5l-165-218h-27.4z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 266 B |
|
@ -964,6 +964,8 @@ instance:
|
|||
mastodon_link: ''
|
||||
# Bluesky
|
||||
bluesky_link: ''
|
||||
# X
|
||||
x_link: ''
|
||||
|
||||
customizations:
|
||||
javascript: '' # Directly your JavaScript code (without <script> tags). Will be eval at runtime
|
||||
|
|
|
@ -974,6 +974,8 @@ instance:
|
|||
mastodon_link: ''
|
||||
# Bluesky
|
||||
bluesky_link: ''
|
||||
# X
|
||||
x_link: ''
|
||||
|
||||
customizations:
|
||||
javascript: '' # Directly your JavaScript code (without <script> tags). Will be eval at runtime
|
||||
|
|
|
@ -47,6 +47,7 @@ export interface CustomConfig {
|
|||
externalLink: string
|
||||
mastodonLink: string
|
||||
blueskyLink: string
|
||||
xLink: string
|
||||
}
|
||||
|
||||
defaultClientRoute: string
|
||||
|
|
|
@ -131,6 +131,7 @@ export interface ServerConfig {
|
|||
externalLink: string
|
||||
mastodonLink: string
|
||||
blueskyLink: string
|
||||
xLink: string
|
||||
}
|
||||
|
||||
defaultClientRoute: string
|
||||
|
|
|
@ -36,6 +36,7 @@ function checkInitialConfig (server: PeerTubeServer, data: CustomConfig) {
|
|||
expect(data.instance.social.externalLink).to.be.empty
|
||||
expect(data.instance.social.blueskyLink).to.be.empty
|
||||
expect(data.instance.social.mastodonLink).to.be.empty
|
||||
expect(data.instance.social.xLink).to.be.empty
|
||||
|
||||
expect(data.instance.languages).to.have.lengthOf(0)
|
||||
expect(data.instance.categories).to.have.lengthOf(0)
|
||||
|
@ -196,7 +197,8 @@ function buildNewCustomConfig (server: PeerTubeServer): CustomConfig {
|
|||
social: {
|
||||
externalLink: 'https://joinpeertube.org/',
|
||||
mastodonLink: 'https://framapiaf.org/@peertube',
|
||||
blueskyLink: 'https://bsky.app/profile/joinpeertube.org'
|
||||
blueskyLink: 'https://bsky.app/profile/joinpeertube.org',
|
||||
xLink: 'https://x.org/@joinpeertube'
|
||||
},
|
||||
|
||||
defaultClientRoute: '/videos/recently-added',
|
||||
|
|
|
@ -326,6 +326,7 @@ function customConfig (): CustomConfig {
|
|||
social: {
|
||||
blueskyLink: CONFIG.INSTANCE.SOCIAL.BLUESKY,
|
||||
mastodonLink: CONFIG.INSTANCE.SOCIAL.MASTODON_LINK,
|
||||
xLink: CONFIG.INSTANCE.SOCIAL.X_LINK,
|
||||
externalLink: CONFIG.INSTANCE.SOCIAL.EXTERNAL_LINK
|
||||
},
|
||||
|
||||
|
|
|
@ -149,6 +149,7 @@ export function checkMissedConfig () {
|
|||
'instance.social.external_link',
|
||||
'instance.social.mastodon_link',
|
||||
'instance.social.bluesky_link',
|
||||
'instance.social.x_link',
|
||||
'services.twitter.username',
|
||||
'followers.instance.enabled',
|
||||
'followers.instance.manual_approval',
|
||||
|
|
|
@ -959,6 +959,9 @@ const CONFIG = {
|
|||
},
|
||||
get BLUESKY () {
|
||||
return config.get<string>('instance.social.bluesky_link')
|
||||
},
|
||||
get X_LINK () {
|
||||
return config.get<string>('instance.social.x_link')
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -141,6 +141,7 @@ class ServerConfigManager {
|
|||
social: {
|
||||
blueskyLink: CONFIG.INSTANCE.SOCIAL.BLUESKY,
|
||||
mastodonLink: CONFIG.INSTANCE.SOCIAL.MASTODON_LINK,
|
||||
xLink: CONFIG.INSTANCE.SOCIAL.X_LINK,
|
||||
externalLink: CONFIG.INSTANCE.SOCIAL.EXTERNAL_LINK
|
||||
},
|
||||
customizations: {
|
||||
|
|
|
@ -32,6 +32,7 @@ export const customConfigUpdateValidator = [
|
|||
body('instance.social.mastodonLink').exists(),
|
||||
body('instance.social.blueskyLink').exists(),
|
||||
body('instance.defaultLanguage').exists(),
|
||||
body('instance.social.xLink').exists(),
|
||||
|
||||
body('instance.isNSFW').isBoolean(),
|
||||
body('instance.languages').custom(isStringArray),
|
||||
|
|
|
@ -9599,6 +9599,8 @@ components:
|
|||
type: string
|
||||
blueskyLink:
|
||||
type: string
|
||||
xLink:
|
||||
type: string
|
||||
customizations:
|
||||
type: object
|
||||
properties:
|
||||
|
@ -10072,6 +10074,8 @@ components:
|
|||
type: string
|
||||
blueskyLink:
|
||||
type: string
|
||||
xLink:
|
||||
type: string
|
||||
defaultClientRoute:
|
||||
type: string
|
||||
customizations:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue