mirror of
https://github.com/nextcloud/spreed.git
synced 2025-12-18 05:20:50 +01:00
fix(eslint): auto-fix 'jsdoc/no-types'
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
This commit is contained in:
parent
50a558dc02
commit
7586586146
18 changed files with 37 additions and 38 deletions
|
|
@ -49,7 +49,6 @@ export default [
|
|||
'jsdoc/check-param-names': 'off', // need to respect JS
|
||||
'jsdoc/check-tag-names': 'off', // need to respect JS
|
||||
'jsdoc/check-types': 'off', // need to respect JS
|
||||
'jsdoc/no-types': 'off', // need to respect JS
|
||||
'jsdoc/require-param': 'off', // need to respect JS
|
||||
'jsdoc/require-param-type': 'off', // need to respect JS
|
||||
'jsdoc/require-param-description': 'off', // need to respect JS
|
||||
|
|
|
|||
|
|
@ -207,10 +207,10 @@ export default {
|
|||
* new block will be used even for the same participant if the text
|
||||
* direction changed.
|
||||
*
|
||||
* @param {object} model the CallParticipantModel for the participant
|
||||
* @param model the CallParticipantModel for the participant
|
||||
* that was transcribed.
|
||||
* @param {string} message the transcribed message.
|
||||
* @param {string} languageId the ID of the language of the transcribed
|
||||
* @param message the transcribed message.
|
||||
* @param languageId the ID of the language of the transcribed
|
||||
* message.
|
||||
*/
|
||||
handleTranscript(model: CallParticipantModel, message: string, languageId: string) {
|
||||
|
|
@ -302,9 +302,9 @@ export default {
|
|||
* transcript element (unless the internal area of the transcript is not
|
||||
* large enough yet to be scrolled).
|
||||
*
|
||||
* @param {number} block the index of the block in the current list of
|
||||
* @param block the index of the block in the current list of
|
||||
* blocks.
|
||||
* @param {number} line the index of the line in the current list of
|
||||
* @param line the index of the line in the current list of
|
||||
* lines of the block.
|
||||
*/
|
||||
scrollToBlockAndLine(block: number, line: number) {
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ liveTranscriptionStore.loadLiveTranscriptionLanguages().catch(() => {
|
|||
/**
|
||||
* Set the live transcription language from the given option
|
||||
*
|
||||
* @param {object} language the option with the language to set
|
||||
* @param language the option with the language to set
|
||||
*/
|
||||
async function changeLanguage(language: LanguageOption) {
|
||||
languageBeingChanged.value = true
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ async function startMeeting() {
|
|||
/**
|
||||
* Scrolls the event cards wrapper in the specified direction.
|
||||
*
|
||||
* @param {string} direction - The direction to scroll ('backward' or 'forward').
|
||||
* @param direction - The direction to scroll ('backward' or 'forward').
|
||||
*/
|
||||
function scrollEventCards({ direction }: { direction: 'backward' | 'forward' }) {
|
||||
const scrollDirection = (direction === 'backward' ? -1 : 1) * (isDirectionRTL ? -1 : 1)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ async function initAudioEncoder() {
|
|||
/**
|
||||
* Composable to use audio encoder for voice messages feature
|
||||
*
|
||||
* @return {DeepReadonly<Ref<boolean>>} - whether the encoder is ready
|
||||
* @return - whether the encoder is ready
|
||||
*/
|
||||
export function useAudioEncoder(): DeepReadonly<Ref<boolean>> {
|
||||
if (requiresInit) {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ const isFullscreen = ref<boolean>(document.fullscreenElement !== null)
|
|||
/**
|
||||
* Composable to check whether the page is displayed at fullscreen
|
||||
*
|
||||
* @return {DeepReadonly<Ref<boolean>>} - computed boolean whether the page is displayed at fullscreen
|
||||
* @return - computed boolean whether the page is displayed at fullscreen
|
||||
*/
|
||||
function useDocumentFullscreenComposable() {
|
||||
const changeIsFullscreen = () => {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { onBeforeMount, onBeforeUnmount, readonly, ref } from 'vue'
|
|||
/**
|
||||
* Composable to check whether the page is visible.
|
||||
*
|
||||
* @return {DeepReadonly<Ref<boolean>>} - computed boolean whether the page is visible
|
||||
* @return - computed boolean whether the page is visible
|
||||
*/
|
||||
function useDocumentVisibilityComposable() {
|
||||
const isDocumentVisible = ref<boolean>(!document.hidden)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* Generate a random string id for HTML RefIDs
|
||||
*
|
||||
* @todo Replace with real useId composable from Vue 3.5 after upgrade
|
||||
* @return {string} String with 6 characters of digits and letters
|
||||
* @return String with 6 characters of digits and letters
|
||||
*/
|
||||
export function useId(): string {
|
||||
return Math.random().toString(36).slice(2, 9)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import { EventBus } from '../services/EventBus.ts'
|
|||
/**
|
||||
* Generate base url for Talk Web app based on server's root
|
||||
*
|
||||
* @return {string} Vue Router base url
|
||||
* @return Vue Router base url
|
||||
*/
|
||||
function generateTalkWebBasePath(): string {
|
||||
// if index.php is in the url AND we got this far, then it's working:
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ async function getCertificateExpiration(host: certificateExpirationParams['host'
|
|||
* Checks if the certificate of a host is valid
|
||||
*
|
||||
* @param host The host to check the certificate
|
||||
* @return {boolean} true if the certificate is valid, false otherwise
|
||||
* @return true if the certificate is valid, false otherwise
|
||||
*/
|
||||
async function isCertificateValid(host: certificateExpirationParams['host']): Promise<boolean> {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import { generateOcsUrl } from '@nextcloud/router'
|
|||
/**
|
||||
* Enable live transcription
|
||||
*
|
||||
* @param {string} token conversation token
|
||||
* @param token conversation token
|
||||
*/
|
||||
async function enableLiveTranscription(token: string): liveTranscriptionEnableResponse {
|
||||
return axios.post(generateOcsUrl('apps/spreed/api/v1/live-transcription/{token}', { token }))
|
||||
|
|
@ -25,7 +25,7 @@ async function enableLiveTranscription(token: string): liveTranscriptionEnableRe
|
|||
/**
|
||||
* Disable live transcription
|
||||
*
|
||||
* @param {string} token conversation token
|
||||
* @param token conversation token
|
||||
*/
|
||||
async function disableLiveTranscription(token: string): liveTranscriptionDisableResponse {
|
||||
return axios.delete(generateOcsUrl('apps/spreed/api/v1/live-transcription/{token}', { token }))
|
||||
|
|
@ -41,8 +41,8 @@ async function getLiveTranscriptionLanguages(): liveTranscriptionGetAvailableLan
|
|||
/**
|
||||
* Set language for live transcription
|
||||
*
|
||||
* @param {string} token conversation token
|
||||
* @param {string} languageId the ID of the language
|
||||
* @param token conversation token
|
||||
* @param languageId the ID of the language
|
||||
*/
|
||||
async function setLiveTranscriptionLanguage(token: string, languageId: string): liveTranscriptionSetLanguageResponse {
|
||||
return axios.post(generateOcsUrl('apps/spreed/api/v1/live-transcription/{token}/language', { token }), {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ type PromotePayload = {
|
|||
* @param audioInputList list of registered audio devices in order of preference
|
||||
* @param audioOutputList list of registered speaker devices in order of preference
|
||||
* @param videoInputList list of registered video devices in order of preference
|
||||
* @return {string} preference list in readable format
|
||||
* @return preference list in readable format
|
||||
*/
|
||||
function listMediaDevices(
|
||||
attributes: Attributes,
|
||||
|
|
@ -81,7 +81,7 @@ ${videoInputList.map(getDeviceString).join('\n')}
|
|||
*
|
||||
* @param devices list of available devices
|
||||
* @param inputList list of registered audio/video devices in order of preference
|
||||
* @return {string|undefined} first available (plugged) device id
|
||||
* @return first available (plugged) device id
|
||||
*/
|
||||
function getFirstAvailableMediaDevice(devices: MediaDeviceInfo[], inputList: MediaDeviceInfo[]): string | undefined {
|
||||
return inputList.find((device) => devices.some((d) => d.kind === device.kind && d.deviceId === device.deviceId))?.deviceId
|
||||
|
|
@ -92,7 +92,7 @@ function getFirstAvailableMediaDevice(devices: MediaDeviceInfo[], inputList: Med
|
|||
*
|
||||
* @param device device
|
||||
* @param devicesList list of registered devices in order of preference
|
||||
* @return {MediaDeviceInfo[]} updated devices list
|
||||
* @return updated devices list
|
||||
*/
|
||||
function registerNewMediaDevice(device: MediaDeviceInfo, devicesList: MediaDeviceInfo[]): MediaDeviceInfo[] {
|
||||
console.debug('Registering new device:', device)
|
||||
|
|
@ -115,7 +115,7 @@ function registerNewMediaDevice(device: MediaDeviceInfo, devicesList: MediaDevic
|
|||
* @param data.devices list of available devices
|
||||
* @param data.inputList list of registered audio/video devices in order of preference
|
||||
* @param data.inputId id of currently selected input
|
||||
* @return {InputListUpdated} updated devices list (null, if it has not been changed)
|
||||
* @return updated devices list (null, if it has not been changed)
|
||||
*/
|
||||
function promoteMediaDevice({ kind, devices, inputList, inputId }: PromotePayload): InputListUpdated {
|
||||
if (!inputId) {
|
||||
|
|
@ -160,7 +160,7 @@ function promoteMediaDevice({ kind, devices, inputList, inputId }: PromotePayloa
|
|||
* @param audioInputList list of registered audio devices in order of preference
|
||||
* @param audioOutputList list of registered speaker devices in order of preference
|
||||
* @param videoInputList list of registered video devices in order of preference
|
||||
* @return {InputLists} object with updated devices lists (null, if they have not been changed)
|
||||
* @return object with updated devices lists (null, if they have not been changed)
|
||||
*/
|
||||
function populateMediaDevicesPreferences(
|
||||
devices: MediaDeviceInfo[],
|
||||
|
|
|
|||
|
|
@ -111,9 +111,9 @@ export const usePollsStore = defineStore('polls', {
|
|||
* poll data every time someone votes, so we create a debounce
|
||||
* function for each poll and store it in the pollStore
|
||||
*
|
||||
* @param { object } root0 The arguments passed to the action
|
||||
* @param { string } root0.token The token of the conversation
|
||||
* @param { number } root0.pollId The id of the poll
|
||||
* @param root0 The arguments passed to the action
|
||||
* @param root0.token The token of the conversation
|
||||
* @param root0.pollId The id of the poll
|
||||
*/
|
||||
debounceGetPollData({ token, pollId }: { token: string, pollId: string }) {
|
||||
if (!this.debouncedFunctions[token]) {
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ export const useSessionStore = defineStore('session', {
|
|||
*
|
||||
* @param token - Conversation token
|
||||
* @param users - Users payload from signaling message
|
||||
* @return {boolean} whether list has unknown sessions mapped to attendees list
|
||||
* @return whether list has unknown sessions mapped to attendees list
|
||||
*/
|
||||
updateSessions(token: string, users: SignalingSessionPayload[]): boolean {
|
||||
let hasUnknownSessions = false
|
||||
|
|
|
|||
|
|
@ -106,9 +106,9 @@ export const useSharedItemsStore = defineStore('sharedItems', {
|
|||
},
|
||||
|
||||
/**
|
||||
* @param {Token} token conversation token
|
||||
* @param {Type} type type of shared item
|
||||
* @param {Message[]} messages message with shared items
|
||||
* @param token conversation token
|
||||
* @param type type of shared item
|
||||
* @param messages message with shared items
|
||||
*/
|
||||
addSharedItemsFromMessages(token: string, type: string, messages: SharedItems[keyof SharedItems][]) {
|
||||
this.checkForExistence(token, type)
|
||||
|
|
@ -176,7 +176,7 @@ export const useSharedItemsStore = defineStore('sharedItems', {
|
|||
},
|
||||
|
||||
/**
|
||||
* @param {Token} token conversation token
|
||||
* @param token conversation token
|
||||
*/
|
||||
async getSharedItemsOverview(token: string) {
|
||||
if (this.overviewLoaded[token]) {
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ export function isEvent(conversation: Conversation): boolean {
|
|||
/**
|
||||
* check if the conversation is archived
|
||||
*
|
||||
* @param {object} conversation conversation object
|
||||
* @param conversation conversation object
|
||||
* @param showArchived whether current filtered list is of archived conversation
|
||||
*/
|
||||
export function shouldIncludeArchived(conversation: Conversation, showArchived: boolean): boolean {
|
||||
|
|
@ -88,7 +88,7 @@ export function getEventTimeRange(conversation: Conversation): EventTimeRange {
|
|||
/**
|
||||
* check if the conversation is not an event conversation or if it is, check if it is happening in 16 hours
|
||||
*
|
||||
* @param {object} conversation conversation object
|
||||
* @param conversation conversation object
|
||||
*/
|
||||
export function shouldIncludeEvents(conversation: Conversation): boolean {
|
||||
return !isEvent(conversation)
|
||||
|
|
@ -98,7 +98,7 @@ export function shouldIncludeEvents(conversation: Conversation): boolean {
|
|||
/**
|
||||
* check if the conversation is happening in 16 hours
|
||||
*
|
||||
* @param {object} conversation conversation object
|
||||
* @param conversation conversation object
|
||||
*/
|
||||
export function shouldEventBeVisible(conversation: Conversation): boolean {
|
||||
const startTime = getEventTimeRange(conversation).start
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import { defaultRemoteURL } from '@nextcloud/files/dav'
|
|||
*
|
||||
* @param filepath - The path to the user's file, e.g., Talk/20240101-000102.png
|
||||
* @param userid - The user id, e.g., 'admin'. Defaults to the current user id
|
||||
* @return {string} The WebDAV URL to the file, e.g., https://nextcloud.ltd/remote.php/dav/files/admin/Talk/20240101-000102.png
|
||||
* @return The WebDAV URL to the file, e.g., https://nextcloud.ltd/remote.php/dav/files/admin/Talk/20240101-000102.png
|
||||
*/
|
||||
export function generateUserFileUrl(filepath: string, userid: string | undefined = getCurrentUser()?.uid) {
|
||||
if (!userid) {
|
||||
|
|
@ -24,7 +24,7 @@ export function generateUserFileUrl(filepath: string, userid: string | undefined
|
|||
* Generate a download link for a public share
|
||||
*
|
||||
* @param shareLink - The public share link, e.g., https://nextcloud.ltd/s/CBeNTiJz5JeT2CH/
|
||||
* @return {string} The download link, e.g., https://nextcloud.ltd/s/CBeNTiJz5JeT2CH/download
|
||||
* @return The download link, e.g., https://nextcloud.ltd/s/CBeNTiJz5JeT2CH/download
|
||||
*/
|
||||
export function generatePublicShareDownloadUrl(shareLink: string) {
|
||||
return shareLink + '/download'
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ export function getDisplayNameWithFallback(displayName: string, source: string,
|
|||
/**
|
||||
* Returns concatenated display names with comma divider
|
||||
*
|
||||
* @param {Array} displayNames list of display name
|
||||
* @param {number} [maxLength] max allowed length
|
||||
* @param displayNames list of display name
|
||||
* @param [maxLength] max allowed length
|
||||
*/
|
||||
export function getDisplayNamesList(displayNames: string[], maxLength?: number): string {
|
||||
const sanitizedList = displayNames.map((name) => name.trim()).filter(Boolean)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue