Skip to content

Commit

Permalink
Merge branch 'main' into feature/gpt-integration
Browse files Browse the repository at this point in the history
  • Loading branch information
SponsoredByPuma authored Apr 4, 2024
2 parents 3ef3c27 + bfcc419 commit 4c10970
Show file tree
Hide file tree
Showing 15 changed files with 117 additions and 84 deletions.
2 changes: 1 addition & 1 deletion backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
implementation 'org.springframework.boot:spring-boot-starter-websocket'
implementation 'com.google.oauth-client:google-oauth-client:1.35.0'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.4.0'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.5.0'
implementation 'com.google.api-client:google-api-client-gson:1.35.2'
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'org.springdoc:springdoc-openapi-ui:1.8.0'
Expand Down
6 changes: 6 additions & 0 deletions frontend/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,11 @@ module.exports = {
noImplicitAny: 0,
allowJs: 0,
"@typescript-eslint/no-non-null-assertion": 0,
"prettier/prettier": [
"error",
{
endOfLine: "auto",
},
],
},
};
8 changes: 4 additions & 4 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"webstomp-client": "^1.2.6"
},
"devDependencies": {
"@crowdin/cli": "^3.19.0",
"@crowdin/cli": "^3.19.1",
"@types/canvas-confetti": "^1.6.4",
"@types/hammerjs": "^2.0.45",
"@types/papaparse": "^5.3.14",
Expand Down
75 changes: 54 additions & 21 deletions frontend/src/components/CardSetComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
@click="onCardSetSelected(item)"
>
<div class="card-title">
{{ item.name }}
{{ getTitle(item.position, userStoryMode !== jiraTag) }}
</div>
<div class="card-description">
{{ item.description }}
{{ getDescription(item.position, userStoryMode !== jiraTag) }}
<div v-if="item.values.length === 0">
<span id="createSetHint">
<b-icon-info-circle class="mt-3 me-1" />{{
Expand Down Expand Up @@ -95,65 +95,48 @@ export default defineComponent({
name: "",
values: [],
activeValues: [] as string[],
position: 0,
},
createSetInput: "",
allCardSets: [
{
name: this.t("session.prepare.step.selection.cardSet.sets.fibonacci.label"),
description: this.t("session.prepare.step.selection.cardSet.sets.fibonacci.description"),
values: ["1", "2", "3", "5", "8", "13", "21", "34", "55", "?"],
activeValues: ["1", "2", "3", "5", "8", "13", "21"],
position: 1,
},
{
name: this.t("session.prepare.step.selection.cardSet.sets.tShirtSizes.label"),
description: this.t(
"session.prepare.step.selection.cardSet.sets.tShirtSizes.description"
),
values: ["XXS", "XS", "S", "M", "L", "XL", "XXL", "XXXL", "?"],
activeValues: ["XS", "S", "M", "L", "XL"],
position: 2,
},
{
name: this.t("session.prepare.step.selection.cardSet.sets.hours.label"),
description: this.t("session.prepare.step.selection.cardSet.sets.hours.description"),
values: ["1", "2", "3", "4", "5", "6", "8", "10", "12", "16", "?"],
activeValues: ["1", "2", "3", "4", "5", "6", "8", "10", "12", "16"],
position: 3,
},
{
name: this.t("session.prepare.step.selection.cardSet.sets.numbers.label"),
description: this.t("session.prepare.step.selection.cardSet.sets.numbers.description"),
values: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "?"],
activeValues: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"],
position: 4,
},
{
name: this.t("session.prepare.step.selection.cardSet.sets.ownSet.label"),
description: this.t("session.prepare.step.selection.cardSet.sets.ownSet.description"),
values: [],
activeValues: [],
position: 5,
},
],
allCardSetsWithJiraMode: [
{
name: this.t("session.prepare.step.selection.cardSet.sets.fibonacci.label"),
description: this.t("session.prepare.step.selection.cardSet.sets.fibonacci.description"),
values: ["1", "2", "3", "5", "8", "13", "21", "34", "55", "?"],
activeValues: ["1", "2", "3", "5", "8", "13", "21"],
position: 1,
},
{
name: this.t("session.prepare.step.selection.cardSet.sets.hours.label"),
description: this.t("session.prepare.step.selection.cardSet.sets.hours.description"),
values: ["1", "2", "3", "4", "5", "6", "8", "10", "12", "16", "?"],
activeValues: ["1", "2", "3", "4", "5", "6", "8", "10", "12", "16"],
position: 2,
},
{
name: this.t("session.prepare.step.selection.cardSet.sets.numbers.label"),
description: this.t("session.prepare.step.selection.cardSet.sets.numbers.description"),
values: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "?"],
activeValues: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"],
position: 3,
Expand Down Expand Up @@ -188,6 +171,56 @@ export default defineComponent({
});
},
methods: {
getTitle(pos, mode) {
if (mode) {
switch (pos) {
case 1:
return this.t("session.prepare.step.selection.cardSet.sets.fibonacci.label");
case 2:
return this.t("session.prepare.step.selection.cardSet.sets.tShirtSizes.label");
case 3:
return this.t("session.prepare.step.selection.cardSet.sets.hours.label");
case 4:
return this.t("session.prepare.step.selection.cardSet.sets.numbers.label");
case 5:
return this.t("session.prepare.step.selection.cardSet.sets.ownSet.label");
}
} else {
switch (pos) {
case 1:
return this.t("session.prepare.step.selection.cardSet.sets.fibonacci.label");
case 2:
return this.t("session.prepare.step.selection.cardSet.sets.hours.label");
case 3:
return this.t("session.prepare.step.selection.cardSet.sets.numbers.label");
}
}
},
getDescription(pos, mode) {
if (mode) {
switch (pos) {
case 1:
return this.t("session.prepare.step.selection.cardSet.sets.fibonacci.description");
case 2:
return this.t("session.prepare.step.selection.cardSet.sets.tShirtSizes.description");
case 3:
return this.t("session.prepare.step.selection.cardSet.sets.hours.description");
case 4:
return this.t("session.prepare.step.selection.cardSet.sets.numbers.description");
case 5:
return this.t("session.prepare.step.selection.cardSet.sets.ownSet.description");
}
} else {
switch (pos) {
case 1:
return this.t("session.prepare.step.selection.cardSet.sets.fibonacci.description");
case 2:
return this.t("session.prepare.step.selection.cardSet.sets.hours.description");
case 3:
return this.t("session.prepare.step.selection.cardSet.sets.numbers.description");
}
}
},
isActiveCardSetNumber(num) {
return this.selectedCardSet.activeValues.includes(num) ? "active" : "outline-secondary";
},
Expand Down Expand Up @@ -215,7 +248,7 @@ export default defineComponent({
return `${this.getCardActiveClass(item)} ${this.getPictureClass(item)}`;
},
getCardActiveClass(item) {
return this.selectedCardSet.name === item.name ? "selected" : "";
return this.selectedCardSet.position === item.position ? "selected" : "";
},
getPictureClass(item) {
if (this.userStoryMode !== this.jiraTag) {
Expand Down
35 changes: 22 additions & 13 deletions frontend/src/components/DownloadPWAModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,36 @@
@ok="install()"
@hide="closeModal()"
>
{{t('page.landing.install')}}
{{ t("page.landing.install") }}
</b-modal>
</template>

<script lang="ts">
import {defineComponent, ref} from "vue";
import {useI18n} from "vue-i18n";
import { defineComponent, ref, Ref } from "vue";
import { useI18n } from "vue-i18n";
interface BeforeInstallPromptEvent extends Event {
prompt(): void;
userChoice: Promise<{
outcome: "accepted" | "dismissed";
}>;
}
export default defineComponent({
name: "DownloadPWAModal",
setup() {
const deferredPrompt: any = ref();
const deferredPrompt: Ref<BeforeInstallPromptEvent | null> = ref(null);
const checkIfNotInstalled = false;
window.addEventListener("beforeinstallprompt", (e) => {
e.preventDefault();
deferredPrompt.value = e;
deferredPrompt.value = e as BeforeInstallPromptEvent;
});
window.addEventListener("appinstalled", () => {
deferredPrompt.value = null;
});
const { t } = useI18n();
return {deferredPrompt, checkIfNotInstalled, t};
return { deferredPrompt, checkIfNotInstalled, t };
},
computed: {
isMobile() {
Expand All @@ -40,22 +47,24 @@ export default defineComponent({
},
created() {
const isInStandaloneMode = () =>
(window.matchMedia('(display-mode: standalone)').matches) || document.referrer.includes('android-app://');
this.checkIfNotInstalled = this.isMobile && !isInStandaloneMode() && !localStorage.getItem('downloadPWA');
window.matchMedia("(display-mode: standalone)").matches ||
document.referrer.includes("android-app://");
this.checkIfNotInstalled =
this.isMobile && !isInStandaloneMode() && !localStorage.getItem("downloadPWA");
},
methods: {
closeModal() {
localStorage.setItem('downloadPWA', 'true');
localStorage.setItem("downloadPWA", "true");
},
async install() {
console.log("Installing...");
if (this.deferredPrompt) {
this.deferredPrompt.prompt();
this.deferredPrompt.userChoice.then((choiceResult: any) => {
if (choiceResult.outcome === 'accepted') {
console.log('User accepted the Diveni prompt');
this.deferredPrompt.userChoice.then((choiceResult) => {
if (choiceResult.outcome === "accepted") {
console.log("User accepted the Diveni prompt");
} else {
console.log('User dismissed the Diveni prompt');
console.log("User dismissed the Diveni prompt");
}
this.deferredPrompt = null;
});
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/JiraComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<sign-in-with-jira-cloud-button-component v-if="isJiraCloudEnabled" class="my-1" />
<sign-in-with-jira-server-button-component v-if="isJiraServerEnabled" class="my-1" />
<sign-in-with-azure-cloud-button-component v-if="isAzureDevOpsEnabled" class="my-1" />
<sign-in-with-git-hub-button-component v-if="isGithubEnabled" class="my-1"/>
<sign-in-with-git-hub-button-component v-if="isGithubEnabled" class="my-1" />
<sign-in-with-gitlab-button-component v-if="isGitlabEnabled" class="my-1" />
</li>
<li>
Expand Down
6 changes: 1 addition & 5 deletions frontend/src/components/MemberVoteCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
</div>
</div>
<div v-else>
<div
class="swipe-card"
:style="swipeableCardBackgroundColor"
@click="onCardClicked()"
>
<div class="swipe-card" :style="swipeableCardBackgroundColor" @click="onCardClicked()">
<div class="text">
{{ dragged ? "💪" : voteOption }}
</div>
Expand Down
24 changes: 8 additions & 16 deletions frontend/src/components/SignInWithGitlabButtonComponent.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
<template>
<div>
<b-button
variant="primary"
:disabled="disabled"
@click="
clicked = !clicked
"
>
<b-button variant="primary" :disabled="disabled" @click="clicked = !clicked">
{{
t(
"session.prepare.step.selection.mode.description.withIssueTracker.buttons.signInWithGitlab.label"
Expand All @@ -30,15 +24,14 @@
</div>
</div>
</div>

</template>

<script lang="ts">
import apiService from "@/services/api.service";
import {defineComponent} from "vue";
import {useDiveniStore} from "@/store";
import {useToast} from "vue-toastification";
import {useI18n} from "vue-i18n";
import { defineComponent } from "vue";
import { useDiveniStore } from "@/store";
import { useToast } from "vue-toastification";
import { useI18n } from "vue-i18n";
export default defineComponent({
name: "SignInWithGitlabButtonComponent",
Expand All @@ -47,7 +40,7 @@ export default defineComponent({
type: Boolean,
required: false,
default: false,
}
},
},
setup() {
const store = useDiveniStore();
Expand All @@ -58,8 +51,8 @@ export default defineComponent({
data() {
return {
clicked: false,
patToken: ""
}
patToken: "",
};
},
methods: {
async getAccessToken() {
Expand All @@ -81,7 +74,6 @@ export default defineComponent({
},
},
});
</script>

<style scoped>
Expand Down
11 changes: 4 additions & 7 deletions frontend/src/components/actions/SessionLeaveButton.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<template>
<div
class="img-holderLeave"
:class="isMobile ? '' : 'mt-5'"
>
<div class="img-holderLeave" :class="isMobile ? '' : 'mt-5'">
<div id="picture-holderLeave">
<b-img id="pandaPictureLeave" :src="require('@/assets/LeaveButton.png')" />
</div>
Expand All @@ -26,14 +23,14 @@ import { useI18n } from "vue-i18n";
export default defineComponent({
name: "SessionLeaveButton",
props: {
isMobile: { type: Boolean, default: false },
},
setup() {
const store = useDiveniStore();
const { t } = useI18n();
return { store, t };
},
props: {
isMobile: { type: Boolean, default: false },
},
methods: {
leaveSession() {
const endPoint = `${Constants.webSocketUnregisterRoute}`;
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/views/LandingPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
<h1 class="mt-5 text-center">Connectors</h1>
</b-container>
<CarouselComponent class="py-5"></CarouselComponent>
<DownloadPWAModal/>
<DownloadPWAModal />
</div>
</template>

Expand Down Expand Up @@ -299,5 +299,4 @@ export default defineComponent({
overflow: auto;
width: 35%;
}
</style>
Loading

0 comments on commit 4c10970

Please sign in to comment.