diff options
Diffstat (limited to 'apps/user_status/src/store/userStatus.js')
-rw-r--r-- | apps/user_status/src/store/userStatus.js | 124 |
1 files changed, 62 insertions, 62 deletions
diff --git a/apps/user_status/src/store/userStatus.js b/apps/user_status/src/store/userStatus.js index 99761da1265..84434895e18 100644 --- a/apps/user_status/src/store/userStatus.js +++ b/apps/user_status/src/store/userStatus.js @@ -55,9 +55,9 @@ const mutations = { /** * Sets a new status * - * @param {Object} state The Vuex state - * @param {Object} data The destructuring object - * @param {String} data.statusType The new status type + * @param {object} state The Vuex state + * @param {object} data The destructuring object + * @param {string} data.statusType The new status type */ setStatus(state, { statusType }) { state.status = statusType @@ -67,12 +67,12 @@ const mutations = { /** * Sets a message using a predefined message * - * @param {Object} state The Vuex state - * @param {Object} data The destructuring object - * @param {String} data.messageId The messageId - * @param {Number|null} data.clearAt When to automatically clear the status - * @param {String} data.message The message - * @param {String} data.icon The icon + * @param {object} state The Vuex state + * @param {object} data The destructuring object + * @param {string} data.messageId The messageId + * @param {number | null} data.clearAt When to automatically clear the status + * @param {string} data.message The message + * @param {string} data.icon The icon */ setPredefinedMessage(state, { messageId, clearAt, message, icon }) { state.messageId = messageId @@ -86,11 +86,11 @@ const mutations = { /** * Sets a custom message * - * @param {Object} state The Vuex state - * @param {Object} data The destructuring object - * @param {String} data.message The message - * @param {String} data.icon The icon - * @param {Number} data.clearAt When to automatically clear the status + * @param {object} state The Vuex state + * @param {object} data The destructuring object + * @param {string} data.message The message + * @param {string} data.icon The icon + * @param {number} data.clearAt When to automatically clear the status */ setCustomMessage(state, { message, icon, clearAt }) { state.messageId = null @@ -104,7 +104,7 @@ const mutations = { /** * Clears the status * - * @param {Object} state The Vuex state + * @param {object} state The Vuex state */ clearMessage(state) { state.messageId = null @@ -118,14 +118,14 @@ const mutations = { /** * Loads the status from initial state * - * @param {Object} state The Vuex state - * @param {Object} data The destructuring object - * @param {String} data.status The status type - * @param {Boolean} data.statusIsUserDefined Whether or not this status is user-defined - * @param {String} data.message The message - * @param {String} data.icon The icon - * @param {Number} data.clearAt When to automatically clear the status - * @param {Boolean} data.messageIsPredefined Whether or not the message is predefined + * @param {object} state The Vuex state + * @param {object} data The destructuring object + * @param {string} data.status The status type + * @param {boolean} data.statusIsUserDefined Whether or not this status is user-defined + * @param {string} data.message The message + * @param {string} data.icon The icon + * @param {number} data.clearAt When to automatically clear the status + * @param {boolean} data.messageIsPredefined Whether or not the message is predefined * @param {string} data.messageId The id of the predefined message */ loadStatusFromServer(state, { status, statusIsUserDefined, message, icon, clearAt, messageIsPredefined, messageId }) { @@ -146,12 +146,12 @@ const actions = { /** * Sets a new status * - * @param {Object} vuex The Vuex destructuring object + * @param {object} vuex The Vuex destructuring object * @param {Function} vuex.commit The Vuex commit function - * @param {Object} vuex.state The Vuex state object - * @param {Object} data The data destructuring object - * @param {String} data.statusType The new status type - * @returns {Promise<void>} + * @param {object} vuex.state The Vuex state object + * @param {object} data The data destructuring object + * @param {string} data.statusType The new status type + * @return {Promise<void>} */ async setStatus({ commit, state }, { statusType }) { await setStatus(statusType) @@ -170,11 +170,11 @@ const actions = { * This doesn't trigger another 'user_status:status.updated' * event. * - * @param {Object} vuex The Vuex destructuring object + * @param {object} vuex The Vuex destructuring object * @param {Function} vuex.commit The Vuex commit function - * @param {Object} vuex.state The Vuex state object - * @param {String} status The new status - * @returns {Promise<void>} + * @param {object} vuex.state The Vuex state object + * @param {string} status The new status + * @return {Promise<void>} */ async setStatusFromObject({ commit, state }, status) { commit('loadStatusFromServer', status) @@ -183,14 +183,14 @@ const actions = { /** * Sets a message using a predefined message * - * @param {Object} vuex The Vuex destructuring object + * @param {object} vuex The Vuex destructuring object * @param {Function} vuex.commit The Vuex commit function - * @param {Object} vuex.state The Vuex state object - * @param {Object} vuex.rootState The Vuex root state - * @param {Object} data The data destructuring object - * @param {String} data.messageId The messageId - * @param {Object|null} data.clearAt When to automatically clear the status - * @returns {Promise<void>} + * @param {object} vuex.state The Vuex state object + * @param {object} vuex.rootState The Vuex root state + * @param {object} data The data destructuring object + * @param {string} data.messageId The messageId + * @param {object | null} data.clearAt When to automatically clear the status + * @return {Promise<void>} */ async setPredefinedMessage({ commit, rootState, state }, { messageId, clearAt }) { const resolvedClearAt = getTimestampForClearAt(clearAt) @@ -212,14 +212,14 @@ const actions = { /** * Sets a custom message * - * @param {Object} vuex The Vuex destructuring object + * @param {object} vuex The Vuex destructuring object * @param {Function} vuex.commit The Vuex commit function - * @param {Object} vuex.state The Vuex state object - * @param {Object} data The data destructuring object - * @param {String} data.message The message - * @param {String} data.icon The icon - * @param {Object|null} data.clearAt When to automatically clear the status - * @returns {Promise<void>} + * @param {object} vuex.state The Vuex state object + * @param {object} data The data destructuring object + * @param {string} data.message The message + * @param {string} data.icon The icon + * @param {object | null} data.clearAt When to automatically clear the status + * @return {Promise<void>} */ async setCustomMessage({ commit, state }, { message, icon, clearAt }) { const resolvedClearAt = getTimestampForClearAt(clearAt) @@ -238,10 +238,10 @@ const actions = { /** * Clears the status * - * @param {Object} vuex The Vuex destructuring object + * @param {object} vuex The Vuex destructuring object * @param {Function} vuex.commit The Vuex commit function - * @param {Object} vuex.state The Vuex state object - * @returns {Promise<void>} + * @param {object} vuex.state The Vuex state object + * @return {Promise<void>} */ async clearMessage({ commit, state }) { await clearMessage() @@ -258,9 +258,9 @@ const actions = { /** * Re-fetches the status from the server * - * @param {Object} vuex The Vuex destructuring object + * @param {object} vuex The Vuex destructuring object * @param {Function} vuex.commit The Vuex commit function - * @returns {Promise<void>} + * @return {Promise<void>} */ async reFetchStatusFromServer({ commit }) { const status = await fetchCurrentStatus() @@ -270,17 +270,17 @@ const actions = { /** * Stores the status we got in the reply of the heartbeat * - * @param {Object} vuex The Vuex destructuring object + * @param {object} vuex The Vuex destructuring object * @param {Function} vuex.commit The Vuex commit function - * @param {Object} status The data destructuring object - * @param {String} status.status The status type - * @param {Boolean} status.statusIsUserDefined Whether or not this status is user-defined - * @param {String} status.message The message - * @param {String} status.icon The icon - * @param {Number} status.clearAt When to automatically clear the status - * @param {Boolean} status.messageIsPredefined Whether or not the message is predefined - * @param {String} status.messageId The id of the predefined message - * @returns {Promise<void>} + * @param {object} status The data destructuring object + * @param {string} status.status The status type + * @param {boolean} status.statusIsUserDefined Whether or not this status is user-defined + * @param {string} status.message The message + * @param {string} status.icon The icon + * @param {number} status.clearAt When to automatically clear the status + * @param {boolean} status.messageIsPredefined Whether or not the message is predefined + * @param {string} status.messageId The id of the predefined message + * @return {Promise<void>} */ async setStatusFromHeartbeat({ commit }, status) { commit('loadStatusFromServer', status) @@ -289,7 +289,7 @@ const actions = { /** * Loads the server from the initial state * - * @param {Object} vuex The Vuex destructuring object + * @param {object} vuex The Vuex destructuring object * @param {Function} vuex.commit The Vuex commit function */ loadStatusFromInitialState({ commit }) { |