From 941a7300e157f62b251900f5ce912521254c8c6e Mon Sep 17 00:00:00 2001 From: Sebastian Fellner Date: Sat, 15 Jun 2024 12:56:50 +0200 Subject: [PATCH 1/3] added the possibility to filter the wordcloud as an user requested it --- components/charts/WordCloud.vue | 91 ++++++++++++++++++++++++++++----- functions/transformChatData.js | 5 +- utils/translations.js | 2 + 3 files changed, 82 insertions(+), 16 deletions(-) diff --git a/components/charts/WordCloud.vue b/components/charts/WordCloud.vue index 933f517a..2cc6d1c3 100644 --- a/components/charts/WordCloud.vue +++ b/components/charts/WordCloud.vue @@ -1,5 +1,24 @@ diff --git a/functions/transformChatData.js b/functions/transformChatData.js index 7689724f..ceccb6d2 100644 --- a/functions/transformChatData.js +++ b/functions/transformChatData.js @@ -452,7 +452,8 @@ export class Chat { }); } - getAllWords() { - return this._allWords.then((x) => x.slice(0, this._maxWordsWordCloud)); + async getAllWords() { + let x = await this._allWords; + return x.slice(0, this._maxWordsWordCloud); } } diff --git a/utils/translations.js b/utils/translations.js index d0659f0d..ac59e387 100644 --- a/utils/translations.js +++ b/utils/translations.js @@ -194,6 +194,8 @@ export const messages = { downloadResults: "Download Results", lookingFor: "Looking for", pdfDownload: "PDF download", + excludeWords: "Exclude Words", + excludeWordsHint: "Should be space separated list. RegEx is also supported." }, de: { titleGoogle: "WhatsAnalyze - The WhatsApp Chat Analyzer", From 7c8e1823435e7827b277789a467b6a44670cceca Mon Sep 17 00:00:00 2001 From: "sebastian.fellner.extern@joyn.de" Date: Tue, 25 Jun 2024 09:54:35 +0200 Subject: [PATCH 2/3] run prettier again locallay, and add it to pipeline --- .github/workflows/husky.yml | 2 +- .prettierignore | 1 + components/FeedbackBtn.vue | 14 ++++---- components/charts/WordCloud.vue | 62 ++++++++++++++++----------------- utils/translations.js | 3 +- 5 files changed, 42 insertions(+), 40 deletions(-) diff --git a/.github/workflows/husky.yml b/.github/workflows/husky.yml index d291a53f..587254ca 100644 --- a/.github/workflows/husky.yml +++ b/.github/workflows/husky.yml @@ -28,5 +28,5 @@ jobs: node-version: 16 - name: install dependencies run: pnpm install - - run: pnpm exec prettier --write . + - run: pnpm exec prettier -c . - run: pnpm exec eslint . diff --git a/.prettierignore b/.prettierignore index 5e32d445..3baac928 100644 --- a/.prettierignore +++ b/.prettierignore @@ -3,3 +3,4 @@ node_modules coverage pnpm-lock.yaml +nuxt.config.js diff --git a/components/FeedbackBtn.vue b/components/FeedbackBtn.vue index f0fb2a04..5ea03682 100644 --- a/components/FeedbackBtn.vue +++ b/components/FeedbackBtn.vue @@ -116,14 +116,14 @@ export default { email: "", emailRules: [ (v) => !!v || this.$t("email"), - (v) => /.+@.+\..+/.test(v) || this.$t("email") + (v) => /.+@.+\..+/.test(v) || this.$t("email"), ], text: "", starValue: 0, starRules: [(v) => !!v || this.$t("rating")], select: null, dialog: false, - message: null + message: null, }; }, @@ -144,10 +144,10 @@ export default { text: this.text, rating: this.starValue, locale: this.$i18n.locale, - email: this.email + email: this.email, }, - created: this.$fireModule.firestore.FieldValue.serverTimestamp() - } + created: this.$fireModule.firestore.FieldValue.serverTimestamp(), + }, }; this.$fire.firestore .collection("mail") @@ -157,8 +157,8 @@ export default { this.message = this.$t("messageReceived"); }); } - } - } + }, + }, };