Prosody mode only:

Removing old modes (ConverseJS and External URI).
Work in progress.
This commit is contained in:
John Livingston
2022-10-10 18:08:20 +02:00
parent e2ec66bf37
commit 7906ddf625
20 changed files with 98 additions and 572 deletions

View File

@ -1,4 +1,3 @@
import type { ChatType } from './types'
const validateColor = require('validate-color').default
type AutoColorValue = string
@ -19,14 +18,10 @@ interface AutoColors {
}
/**
* @param chatType value of the settings 'chat-type'
* @param theme value of the settings 'converse-theme'
* @returns true if the theme can use autocolors
*/
function isAutoColorsAvailable (chatType: ChatType, theme: string): boolean {
if (chatType !== 'builtin-prosody' && chatType !== 'builtin-converse') {
return false
}
function isAutoColorsAvailable (theme: string): boolean {
return theme === 'peertube' // currently the only theme that can handle autocolors.
}

View File

@ -1,4 +1,3 @@
type ChatType = 'disabled' | 'builtin-prosody' | 'builtin-converse' | 'external-uri'
type ConverseJSTheme = 'peertube' | 'default' | 'concord'
interface ProsodyListRoomsResultError {
@ -28,7 +27,6 @@ interface ProsodyListRoomsResultSuccess {
type ProsodyListRoomsResult = ProsodyListRoomsResultError | ProsodyListRoomsResultSuccess
export {
ChatType,
ConverseJSTheme,
ProsodyListRoomsResult,
ProsodyListRoomsResultRoom