Re-ordering the settings page.
This commit is contained in:
parent
8f5b2ae565
commit
3ba64d3732
@ -41,6 +41,7 @@ Peertube image.
|
|||||||
|
|
||||||
* ConverseJS v10.0.0 (instead of v9.0.0).
|
* ConverseJS v10.0.0 (instead of v9.0.0).
|
||||||
* Prosody server: enabling mod_disco.
|
* Prosody server: enabling mod_disco.
|
||||||
|
* Settings page re-ordered.
|
||||||
|
|
||||||
### Minor changes and fixes
|
### Minor changes and fixes
|
||||||
|
|
||||||
|
@ -14,10 +14,10 @@ function initSettings (options: RegisterServerOptions): void {
|
|||||||
registerSetting({
|
registerSetting({
|
||||||
type: 'html',
|
type: 'html',
|
||||||
private: true,
|
private: true,
|
||||||
descriptionHTML: `Please read the
|
descriptionHTML: `You can find the plugin documentation here:
|
||||||
<a href="https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/README.md" target="_blank">
|
<a href="https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/README.md" target="_blank">
|
||||||
documentation
|
Peertube Plugin Livechat documentation
|
||||||
</a> first.`
|
</a>.`
|
||||||
})
|
})
|
||||||
registerSetting({
|
registerSetting({
|
||||||
type: 'html',
|
type: 'html',
|
||||||
@ -27,34 +27,12 @@ function initSettings (options: RegisterServerOptions): void {
|
|||||||
(if this button is not opening a new window, please try to refresh the page).`
|
(if this button is not opening a new window, please try to refresh the page).`
|
||||||
})
|
})
|
||||||
|
|
||||||
// ********** Chat Server
|
// ********** Chat
|
||||||
registerSetting({
|
registerSetting({
|
||||||
type: 'html',
|
type: 'html',
|
||||||
private: true,
|
private: true,
|
||||||
descriptionHTML: '<h3>Chat Server</h3>'
|
descriptionHTML: '<h3>Chat</h3>'
|
||||||
})
|
})
|
||||||
registerSetting({
|
|
||||||
name: 'chat-help-builtin-prosody',
|
|
||||||
type: 'html',
|
|
||||||
label: 'Prosody server',
|
|
||||||
descriptionHTML: `This plugin uses the Prosody XMPP server to handle chat rooms.<br>
|
|
||||||
The Peertube server will control this Prosody server.<br>
|
|
||||||
By default, this plugin comes with a Prosody AppImage.`,
|
|
||||||
private: true
|
|
||||||
})
|
|
||||||
registerSetting({
|
|
||||||
name: 'use-system-prosody',
|
|
||||||
type: 'input-checkbox',
|
|
||||||
label: 'Use system Prosody',
|
|
||||||
descriptionHTML: `Warning: don't check this settings if you are not sure of what you are doing.<br>
|
|
||||||
By checking this settings, your Peertube will use the Prosody server that comes with your system,
|
|
||||||
and not the embeded AppImage.<br>
|
|
||||||
Only use this if you encounter problems with the embedded Prosody.`,
|
|
||||||
private: true,
|
|
||||||
default: false
|
|
||||||
})
|
|
||||||
|
|
||||||
// TODO: fix the settings order. Since there is no more multiple chat-mode, the order is not good.
|
|
||||||
registerSetting({
|
registerSetting({
|
||||||
name: 'prosody-list-rooms',
|
name: 'prosody-list-rooms',
|
||||||
label: 'List existing rooms',
|
label: 'List existing rooms',
|
||||||
@ -63,6 +41,12 @@ Only use this if you encounter problems with the embedded Prosody.`,
|
|||||||
private: true
|
private: true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// ********** Chat behaviour
|
||||||
|
registerSetting({
|
||||||
|
type: 'html',
|
||||||
|
private: true,
|
||||||
|
descriptionHTML: '<h3>Chat behaviour</h3>'
|
||||||
|
})
|
||||||
registerSetting({
|
registerSetting({
|
||||||
name: 'prosody-room-type',
|
name: 'prosody-room-type',
|
||||||
label: 'Room type',
|
label: 'Room type',
|
||||||
@ -75,25 +59,6 @@ Only use this if you encounter problems with the embedded Prosody.`,
|
|||||||
{ value: 'channel', label: 'Webchat rooms are grouped by channel' }
|
{ value: 'channel', label: 'Webchat rooms are grouped by channel' }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
registerSetting({
|
|
||||||
name: 'prosody-port',
|
|
||||||
label: 'Prosody port',
|
|
||||||
type: 'input',
|
|
||||||
default: '52800',
|
|
||||||
private: true,
|
|
||||||
descriptionHTML:
|
|
||||||
`The port that will be used by the builtin Prosody server.<br>
|
|
||||||
Change it if this port is already in use on your server.<br>
|
|
||||||
You can close this port on your firewall, it will not be accessed from the outer world.`
|
|
||||||
})
|
|
||||||
|
|
||||||
// ********** Chat behaviour
|
|
||||||
registerSetting({
|
|
||||||
type: 'html',
|
|
||||||
private: true,
|
|
||||||
descriptionHTML: '<h3>Chat behaviour</h3>'
|
|
||||||
})
|
|
||||||
registerSetting({
|
registerSetting({
|
||||||
name: 'chat-auto-display',
|
name: 'chat-auto-display',
|
||||||
label: 'Automatically open the chat',
|
label: 'Automatically open the chat',
|
||||||
@ -110,6 +75,20 @@ You can close this port on your firewall, it will not be accessed from the outer
|
|||||||
type: 'input-checkbox',
|
type: 'input-checkbox',
|
||||||
default: true
|
default: true
|
||||||
})
|
})
|
||||||
|
registerSetting({
|
||||||
|
name: 'chat-share-url',
|
||||||
|
label: 'Show the «share chat link» button',
|
||||||
|
descriptionHTML: 'There will be a button for sharing a chat url (could be used to intregrated in OBS for example).',
|
||||||
|
private: false,
|
||||||
|
type: 'select',
|
||||||
|
default: 'owner',
|
||||||
|
options: [
|
||||||
|
{ label: 'Show for nobody', value: 'nobody' },
|
||||||
|
{ label: 'Show for everyone', value: 'everyone' },
|
||||||
|
{ label: 'Show for the video owner', value: 'owner' },
|
||||||
|
{ label: 'Show for the video owner and instance\'s moderators', value: 'owner+moderators' }
|
||||||
|
]
|
||||||
|
})
|
||||||
registerSetting({
|
registerSetting({
|
||||||
name: 'chat-per-live-video',
|
name: 'chat-per-live-video',
|
||||||
label: 'Users can activate the chat for their lives',
|
label: 'Users can activate the chat for their lives',
|
||||||
@ -165,23 +144,12 @@ Don't add private videos, the UUIDs will be send to frontend.`,
|
|||||||
private: false
|
private: false
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// ********** Theming
|
||||||
registerSetting({
|
registerSetting({
|
||||||
name: 'chat-style',
|
name: 'theming-advanced',
|
||||||
label: 'Webchat iframe style attribute',
|
|
||||||
type: 'input-textarea',
|
|
||||||
default: '',
|
|
||||||
descriptionHTML:
|
|
||||||
`Additional styles to be added on the iframe style attribute. <br>
|
|
||||||
Example: height:400px;`,
|
|
||||||
private: false
|
|
||||||
})
|
|
||||||
|
|
||||||
// ********** ConverseJS advanced settings
|
|
||||||
registerSetting({
|
|
||||||
name: 'converse-advanced',
|
|
||||||
type: 'html',
|
type: 'html',
|
||||||
private: true,
|
private: true,
|
||||||
descriptionHTML: '<h3>ConverseJS advanced settings</h3>'
|
descriptionHTML: '<h3>Theming</h3>'
|
||||||
})
|
})
|
||||||
|
|
||||||
registerSetting({
|
registerSetting({
|
||||||
@ -214,28 +182,58 @@ You can report the bug on the official
|
|||||||
</a>. Don't forget to specify which theme is not working.`
|
</a>. Don't forget to specify which theme is not working.`
|
||||||
})
|
})
|
||||||
|
|
||||||
// ********** Built-in Prosody advanced settings
|
registerSetting({
|
||||||
|
name: 'chat-style',
|
||||||
|
label: 'Webchat iframe style attribute',
|
||||||
|
type: 'input-textarea',
|
||||||
|
default: '',
|
||||||
|
descriptionHTML:
|
||||||
|
`Additional styles to be added on the iframe style attribute. <br>
|
||||||
|
Example: height:400px;`,
|
||||||
|
private: false
|
||||||
|
})
|
||||||
|
|
||||||
|
// ********** Chat server advanced settings
|
||||||
registerSetting({
|
registerSetting({
|
||||||
name: 'prosody-advanced',
|
name: 'prosody-advanced',
|
||||||
type: 'html',
|
type: 'html',
|
||||||
private: true,
|
private: true,
|
||||||
descriptionHTML: '<h3>Prosody advanced settings</h3>'
|
descriptionHTML: '<h3>Chat server advanced settings</h3>'
|
||||||
})
|
})
|
||||||
|
|
||||||
registerSetting({
|
registerSetting({
|
||||||
name: 'chat-share-url',
|
name: 'chat-help-builtin-prosody',
|
||||||
label: 'Show the «share chat link» button',
|
type: 'html',
|
||||||
descriptionHTML: 'There will be a button for sharing a chat url (could be used to intregrated in OBS for example).',
|
label: 'Prosody server',
|
||||||
private: false,
|
descriptionHTML: `This plugin uses the Prosody XMPP server to handle chat rooms.<br>
|
||||||
type: 'select',
|
This plugin comes with a Prosody AppImage, that will be used to run the service.`,
|
||||||
default: 'owner',
|
private: true
|
||||||
options: [
|
|
||||||
{ label: 'Show for nobody', value: 'nobody' },
|
|
||||||
{ label: 'Show for everyone', value: 'everyone' },
|
|
||||||
{ label: 'Show for the video owner', value: 'owner' },
|
|
||||||
{ label: 'Show for the video owner and instance\'s moderators', value: 'owner+moderators' }
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
registerSetting({
|
||||||
|
name: 'use-system-prosody',
|
||||||
|
type: 'input-checkbox',
|
||||||
|
label: 'Use system Prosody',
|
||||||
|
descriptionHTML: `Warning: don't check this settings if you are not sure of what you are doing.<br>
|
||||||
|
By checking this settings, your Peertube will use the Prosody server that comes with your system,
|
||||||
|
and not the embeded AppImage.<br>
|
||||||
|
Only use this if you encounter problems with the embedded Prosody.`,
|
||||||
|
private: true,
|
||||||
|
default: false
|
||||||
|
})
|
||||||
|
|
||||||
|
registerSetting({
|
||||||
|
name: 'prosody-port',
|
||||||
|
label: 'Prosody port',
|
||||||
|
type: 'input',
|
||||||
|
default: '52800',
|
||||||
|
private: true,
|
||||||
|
descriptionHTML:
|
||||||
|
`The port that will be used by the builtin Prosody server.<br>
|
||||||
|
Change it if this port is already in use on your server.<br>
|
||||||
|
You can close this port on your firewall, it will not be accessed from the outer world.`
|
||||||
|
})
|
||||||
|
|
||||||
registerSetting({
|
registerSetting({
|
||||||
name: 'prosody-peertube-uri',
|
name: 'prosody-peertube-uri',
|
||||||
label: 'Peertube url for API calls',
|
label: 'Peertube url for API calls',
|
||||||
@ -256,7 +254,7 @@ You can use this field to customise Peertube's URI for Prosody modules (for exam
|
|||||||
private: true,
|
private: true,
|
||||||
descriptionHTML:
|
descriptionHTML:
|
||||||
`If checked, room contents will be saved by default.
|
`If checked, room contents will be saved by default.
|
||||||
Any user that join a room will we what was written before he joins.<br>
|
Any user that join a room will see what was written before he joins.<br>
|
||||||
Please note that it is always possible to enable/disable the content
|
Please note that it is always possible to enable/disable the content
|
||||||
archiving for a specific room, by editing its properties.
|
archiving for a specific room, by editing its properties.
|
||||||
`
|
`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user