From a927f5cd1589e1ee55ddb5ef01687dfa58a3cbc9 Mon Sep 17 00:00:00 2001 From: Matthew Nickson Date: Thu, 2 Jun 2022 16:40:56 +0100 Subject: [PATCH] Fixed typos + improved clarity and detail of some JSDoc Apply suggestions from code review Co-authored-by: Nelson Chan --- src/components/ProxyDialog.vue | 2 +- src/components/TagsManager.vue | 6 +++--- src/mixins/mobile.js | 2 +- src/util.ts | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/ProxyDialog.vue b/src/components/ProxyDialog.vue index e52698f9f..434c571be 100644 --- a/src/components/ProxyDialog.vue +++ b/src/components/ProxyDialog.vue @@ -130,7 +130,7 @@ export default { }, methods: { - /** Show dialog to confirm delection */ + /** Show dialog to confirm deletion */ deleteConfirm() { this.modal.hide(); this.$refs.confirmDelete.show(); diff --git a/src/components/TagsManager.vue b/src/components/TagsManager.vue index fd94c93e2..2958babe8 100644 --- a/src/components/TagsManager.vue +++ b/src/components/TagsManager.vue @@ -271,9 +271,9 @@ export default { }, /** * Get colour of text inside the tag - * @param {Object} option Object representing color choice. If - * option.color is set, the text color will be white, else it - * be chosen based upon application theme + * @param {Object} option The tag that needs to be displayed. + * Defaults to "white" unless the tag has no color, which will + * then return the body color (based on application theme) * @returns string */ textColor(option) { diff --git a/src/mixins/mobile.js b/src/mixins/mobile.js index 32ee209fc..00ea88866 100644 --- a/src/mixins/mobile.js +++ b/src/mixins/mobile.js @@ -18,7 +18,7 @@ export default { this.updateBody(); }, - /** Update the document body */ + /** Add css-class "mobile" to body if needed */ updateBody() { if (this.isMobile) { document.body.classList.add("mobile"); diff --git a/src/util.ts b/src/util.ts index b28ba3c15..b69f31ace 100644 --- a/src/util.ts +++ b/src/util.ts @@ -314,9 +314,9 @@ export function getCryptoRandomInt(min: number, max: number):number { } /** - * Generate a secret - * @param length Lenght of secret to generate - * @returns + * Generate a random alphanumeric string of fixed length + * @param length Length of string to generate + * @returns string */ export function genSecret(length = 64) { let secret = "";