Skip to content

Commit

Permalink
Merge pull request #358 from SpiritFour/fixes
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
fellnerse authored May 31, 2024
2 parents 2f64496 + b20ebcc commit 6751c1d
Show file tree
Hide file tree
Showing 33 changed files with 18,900 additions and 409 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
jest.config.js
test/*
static/sw.js
5 changes: 4 additions & 1 deletion .github/workflows/deployment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 16
- run: yarn install && yarn ci-dev-build
- uses: pnpm/action-setup@v2
with:
version: 8
- run: pnpm install && pnpm ci-dev-build
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
- uses: actions/setup-node@v3
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/deployment-live.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Install and Build 🔧
run: |
yarn install
yarn nuxt generate
pnpm install
pnpm nuxt generate
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
- name: Deploy 🚀
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/deployment-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 16
- run: yarn install && yarn ci-dev-build
- uses: pnpm/action-setup@v2
with:
version: 8
- run: pnpm install && pnpm ci-dev-build
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
- uses: actions/setup-node@v3
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/husky.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ jobs:
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 16
- name: install yarn
run: npm install -g yarn
- name: install dependencies
run: yarn install
- run: yarn run prettier --write .
- run: yarn run eslint .
run: pnpm install
- run: pnpm exec prettier --write .
- run: pnpm exec eslint .
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
*.md
node_modules
coverage
pnpm-lock.yaml
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11
3 changes: 3 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodejs 16.20.2
python 3.11.9
pnpm 8.15.8
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,21 @@ Please report bugs in the github issues.
# Running whatsanalyze locally

## Build Setup
We use node 16, with 18 we had issues with our linter. The project also needs python to be installed, but the version needs to be `3.11` or lower.

```bash
# install dependencies
$ yarn install
$ pnpm install

# serve with hot reload at localhost:3000
$ yarn dev
$ pnpm dev

# build for production and launch server
$ yarn build
$ yarn start
$ pnpm build
$ pnpm start

# generate static project
$ yarn generate
$ pnpm generate
```

Search for prettier and eslint in pycharm to set it up on saving a file.
Expand Down
33 changes: 18 additions & 15 deletions components/About.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@
sm="6"
>
<v-row justify="center">
<v-img :lazy-src="person.image" :src="person.image"
style="height: 120px; max-width: 120px; border-radius: 60px" />
<v-img
:lazy-src="person.image"
:src="person.image"
style="height: 120px; max-width: 120px; border-radius: 60px"
/>
</v-row>
<v-row class="text-h5 font-weight-bold" justify="center">
{{ person.name }}
Expand All @@ -40,13 +43,13 @@
</v-col>
</v-row>
<v-row align="center" class="mx-md-10">
<v-col
v-for="university in universities"
:key="university"
cols="3"
>
<v-col v-for="university in universities" :key="university" cols="3">
<v-row justify="center">
<v-img :lazy-src="university" :src="university" style="width: 100%; max-width: 100px" />
<v-img
:lazy-src="university"
:src="university"
style="width: 100%; max-width: 100px"
/>
</v-row>
</v-col>
</v-row>
Expand All @@ -66,20 +69,20 @@ export default {
// eslint-disable-next-line no-undef
require("~/assets/img/uni/Otago_Logo.png"),
// eslint-disable-next-line no-undef
require("~/assets/img/uni/Stockholm_Logo.png")
require("~/assets/img/uni/Stockholm_Logo.png"),
],
persons: [
{
// eslint-disable-next-line no-undef
image: require("~/assets/img/us/Sebastian_WA.jpg"),
name: "Sebastian Fellner",
description: ["Computer Science MSc", "AI Enthusiast"]
description: ["Computer Science MSc", "AI Enthusiast"],
},
{
// eslint-disable-next-line no-undef
image: require("~/assets/img/us/Paul_WA.jpg"),
name: "Paul Kehnel",
description: ["Computer Science MSc", "Bicycle Dude"]
description: ["Computer Science MSc", "Bicycle Dude"],
},
{
// eslint-disable-next-line no-undef
Expand All @@ -91,11 +94,11 @@ export default {
// eslint-disable-next-line no-undef
image: require("~/assets/img/us/Moritz_WA.jpeg"),
name: "Moritz Wolf",
description: ["Robotics MSc", "Outdoor Specialist"]
}
]
description: ["Robotics MSc", "Outdoor Specialist"],
},
],
};
}
},
};
</script>

Expand Down
17 changes: 11 additions & 6 deletions components/ArrowDown.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
<template>
<v-icon :class="{'arrow-down':animate}" class="py-2" color="rgba(0,0,0,0.8)" content-class="elevation-0"
size="50"
@click="goToExportExplainer">
<v-icon
:class="{ 'arrow-down': animate }"
class="py-2"
color="rgba(0,0,0,0.8)"
content-class="elevation-0"
size="50"
@click="goToExportExplainer"
>
mdi-chevron-down
</v-icon>
<!-- todo hide ugly button grey thingy after pressing-->
Expand All @@ -14,8 +19,8 @@ export default {
methods: {
goToExportExplainer() {
this.$vuetify.goTo(".exportexplainer", { duration: 300 });
}
}
},
},
};
</script>

Expand All @@ -35,4 +40,4 @@ export default {
opacity: 0.5;
}
}
</style>
</style>
23 changes: 10 additions & 13 deletions components/ChatVisualization/Chat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,7 @@
"
class="my-8"
>
<v-btn
class="ma-auto white--text btn-color"
@click="nextMessages"
>
<v-btn class="ma-auto white--text btn-color" @click="nextMessages">
Load next {{ offset }} messages
</v-btn>
</v-row>
Expand All @@ -106,18 +103,18 @@ export default {
return {
startIdx: 0,
selectedEgo: "",
offset: 20
offset: 20,
};
},
methods: {
parseMessage(message) {
const validUrl = new RegExp(
"(https?:\\/\\/)?" + // protocol
"((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|" + // domain name
"((\\d{1,3}\\.){3}\\d{1,3}))" + // OR ip (v4) address
"(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*" + // port and path
"(\\?[;&a-z\\d%_.~+=-]*)?" + // query string
"(\\#[-a-z\\d_]*)?",
"((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|" + // domain name
"((\\d{1,3}\\.){3}\\d{1,3}))" + // OR ip (v4) address
"(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*" + // port and path
"(\\?[;&a-z\\d%_.~+=-]*)?" + // query string
"(\\#[-a-z\\d_]*)?",
"i"
);
const words = message.split(" ");
Expand Down Expand Up @@ -152,8 +149,8 @@ export default {
this.startIdx += this.offset;
const container = this.$el.querySelector("#chat");
container.scrollTop = 0;
}
}
},
},
};
</script>

Expand All @@ -171,7 +168,7 @@ export default {
overflow: scroll;
overflow-x: hidden;
background-color: rgb(13, 20, 24);
background-image: url("https://whatsapp-chat-parser.netlify.app/static/media/bg-dark.ffb9199c.png");
background-image: url("/dark-bg.jpg");
}
.myMessage {
Expand Down
9 changes: 3 additions & 6 deletions components/ChatVisualization/PdfDownloadPopup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,9 @@
<v-card-text class="pt-3 text-body-1 font-weight-bold">
Supporting us keeps the 💻 running 🎉
</v-card-text>
<v-progress-linear
v-show="isLoading"
class="mb-2"
color="blue"
indeterminate
></v-progress-linear>

<div v-if="isLoading" class="loading mb-2" />

<v-row align="center" class="pt-6 pr-10" cols="12" justify="center">
<ChatVisualizationPayment
:amount="price"
Expand Down
20 changes: 10 additions & 10 deletions components/Cta.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,27 @@ export default {
showImage: { default: false, type: Boolean },
to: { default: "", type: String },
buttonTxt: {
default: function() {
default: function () {
return "analyzeYourChat";
},
type: String
type: String,
},
text: {
default: function() {
default: function () {
return "analyzeYourChatLong";
},
type: String
type: String,
},
title: {
default: function () {
return "analyzeYourChatTitle";
},
type: String
}
type: String,
},
},
data() {
return {
GTAG_INTERACTION
GTAG_INTERACTION,
};
},
methods: {
Expand All @@ -62,7 +62,7 @@ export default {
this.$vuetify.goTo(".filehandler", { duration: 300, offset: 300 });
}
},
gtagEvent
}
gtagEvent,
},
};
</script>
</script>
10 changes: 3 additions & 7 deletions components/DownloadPopup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</v-btn>
</template>

<v-card>
<v-card class="overflow-hidden">
<v-card-title class="headline cyan" style="word-break: normal">
<div class="text-h4 font-weight-bold">{{ $t("didWeMake") }}</div>
<span>{{ $t("buyUsCoffee") }}</span>
Expand Down Expand Up @@ -65,12 +65,8 @@
</form>
</v-row>
<v-divider></v-divider>
<v-progress-linear
v-if="loading"
class="mb-0"
color="blue"
indeterminate
></v-progress-linear>
<div v-if="loading" class="loading" />

<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="red darken-1" text @click="dialog = false">
Expand Down
Loading

0 comments on commit 6751c1d

Please sign in to comment.