-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update package * update gitignore * add prisma * add user service * add auth service * add password encryption * implement login route * add auth guard * remove test files * add dotenv package * add jwt generation * add jwt guard with profile controller * add profile site * improve code style with prettier * remove hello worlds * add helmet * add vue framework * connect vue to nest * add css * add login route * add logger middleware + loggin route * update package * add catch for duplicate user registration * implement submit method * make login and registerView more dynamic * hotfix * update prisma schema * update structure * generate Movie db service * add env tmp * update movie relation and service * create movie route and add imdb package * hotfix * implement GET movie:id * fix auth bugs * add info * implement POST movie * add try catch * implement GET movie/all * implement movie table * add client profile * client: add movie add button * prisma: add vote table * backend: edit structure * backend: add vote boilerplate * edit structure * backend: implement POST vote * db: improve naming * backend: add DELETE Vote * backend: add GET vote * update vote output * update proposer output * update package * Client: implement client-side state management to react on loading and logged_in * client: add history view * client: improve movie component table * backend: update route GET movie/all * client: display movie votes * client: implement vote * client: implement router logout * BD: add "name" attribute to userDB * backend: remove middleware from auth * backend: implement email confirm * common: update env tmp * client: add privacy * client: hot fix * client: hot fix * client: add AlertComponent.vue * backend: update movie information * backend: implement movie delete * client: implement delete own movie * client: implement form validation * common: add port configuration * client: add vertical scrolling in movie table * client: rename page title * client: add regex to imdb upload * client: outsource api call * client: hotfix * backend: fix initial interest (now server handled instead of client handled) * backend: restrict unvoting for own proposed movie * client: implement triggerable alert components * common: implemented client warnings on auth * common: implemented better version of client warnings on auth * client: style hotfix * common: update README.md * client: add GitHub Link * client: update login regex + add password confirm * client: create e-mail verified page * client: edit plugin structure * client: hot fix * client: hot fix * client: implement profile page style * client: divide form inputs into separate components * client: text improve * client: hotfix * client: hotfix * client: change route api/profile to api/user * backend: update auth (outsource password service + reduce payload to user_id) * backend: implemented user routes for self-management of own account * client: add profile options + implement get all user data * backend: add gravatar generation * client: add api logic to profile * backend: allow gravatar in helmet * backend: implement md5 hash algorithm * client: add logic to delete account * backend: outsource gravatar in a service + update gravatar url on email change * update README.md * prisma: Update database model to support history and watchlist * backend: add event service * backend: add job schedule structure * backend: add db infrastructure for history and watchlist model * backend: implement get_most_voted in vote db * backend: add event module * backend: implement watchlist job * backend: implement history job * backend: add routes GET movie/watchlist & movie/history * client: movie ts folder in components folder to util folder in src + add CardComponent * backend: add start_time to watchlist * backend: restrict deleting watchlist movies * client: hotfix * client: update favicon * backend: hotfix * backend: update GET watchlist information * common: improve packages * client: create TableComponent to outsource tables * client: add watchlist * client: implement history view * backend: implement GET public user information * backend: hotfix * client: implement watchlist interested feature * client: replace bad emojis with cool svg * client: add trash icon * backend: replace node-schedule with @nest/schedule * client: hotfix * backend: restrict user deletion, when proposed video is in watchlist + restrict already watched movies * client: alerts now shown when adding a movie * client: alerts now shown when deleting a movie
- Loading branch information
1 parent
4c6e26d
commit 351d866
Showing
52 changed files
with
664 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<template> | ||
<TableComponent id="table_history" :head="head"> | ||
<tr v-for="movie in history"> | ||
<td>{{ (new Date(movie.watched_at)).toLocaleDateString() }}</td> | ||
<td><a :href="movie.link" target="_blank">{{ movie.title }}</a></td> | ||
</tr> | ||
</TableComponent> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import TableComponent from "@/components/util/TableComponent.vue"; | ||
import { ref } from "vue"; | ||
import { call } from "@/util/api"; | ||
export default { | ||
name: "HistroyComponent", | ||
components: { TableComponent }, | ||
data() { | ||
return { | ||
head: ["Watched At", "Title"] | ||
} | ||
}, | ||
setup() { | ||
const history = ref([]); | ||
call("/api/movie/history") | ||
.then((data) => { | ||
history.value = data; | ||
}); | ||
return { | ||
history | ||
} | ||
} | ||
}; | ||
</script> | ||
|
||
<style scoped> | ||
#table_history { | ||
width: 90vw; | ||
margin: 20px auto; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<template> | ||
<CardComponent v-if="watchlist.length > 0" id="watchlist" header="Watchlist"> | ||
<TableComponent :head="head"> | ||
<tr v-for="movie in watchlist"> | ||
<td>{{ (new Date(movie.start_time)).toLocaleString() }}</td> | ||
<td><a :href="movie.link" target="_blank">{{ movie.title }}</a></td> | ||
<td> | ||
<button class="btn btn-primary" @click="interested(movie.interested)" | ||
data-bs-target="#modal_watchlist" data-bs-toggle="modal"> | ||
<img src="../assets/svg/person-hearts.svg" alt="Heart" /> | ||
</button> | ||
</td> | ||
</tr> | ||
</TableComponent> | ||
</CardComponent> | ||
|
||
<ModalComponent id="modal_watchlist" title="Interested"> | ||
<TableComponent :head="head_modal"> | ||
<tr v-for="user in interested_local"> | ||
<td><img v-if="user.use_gravatar" :src="user.gravatar_url" alt="avatar" class="profile" /> | ||
<img v-else src="../assets/img/Portrait_Placeholder.png" alt="placeholder_avatar" class="profile" /></td> | ||
<td>{{ user.name }}</td> | ||
</tr> | ||
</TableComponent> | ||
</ModalComponent> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import CardComponent from "@/components/util/CardComponent.vue"; | ||
import TableComponent from "@/components/util/TableComponent.vue"; | ||
import ModalComponent from "@/components/util/ModalComponent.vue"; | ||
import { call } from "@/util/api"; | ||
import { ref } from "vue"; | ||
const interested_local = ref([] as any); | ||
export default { | ||
name: "WatchlistComponent", | ||
components: { TableComponent, CardComponent, ModalComponent }, | ||
data() { | ||
return { | ||
head: ["Start", "Title", "Interested"], | ||
head_modal: ["Profile", "Name"], | ||
interested_local: interested_local | ||
}; | ||
}, | ||
setup() { | ||
const watchlist = ref([]); | ||
call("/api/movie/watchlist") | ||
.then((data) => { | ||
watchlist.value = data; | ||
}); | ||
return { | ||
watchlist | ||
}; | ||
}, | ||
methods: { | ||
interested(user_ids: number[]) { | ||
interested_local.value = []; | ||
for (const user_id of user_ids) { | ||
call(`/api/user/${user_id}`) | ||
.then((data) => { | ||
interested_local.value.push(data); | ||
}); | ||
} | ||
} | ||
} | ||
}; | ||
</script> | ||
|
||
<style scoped> | ||
#watchlist { | ||
width: min(90vw, 800px); | ||
margin: 20px auto; | ||
} | ||
#modal_watchlist { | ||
font-size: larger; | ||
} | ||
.profile { | ||
width: 40px; | ||
height: 40px; | ||
border-radius: 50%; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.