Skip to content

Commit

Permalink
implemented the success slot of the modal
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Jun 25, 2023
1 parent 0082603 commit 69c60b2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
9 changes: 8 additions & 1 deletion webclient/src/components/feedback/EditRequestModal.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script setup lang="ts">
import BasicFeedbackModal from "@/components/feedback/TokenBasedModal.vue";
import { useGlobalStore } from "@/stores/global";
const global = useGlobalStore();
</script>

Expand All @@ -20,7 +21,13 @@ const global = useGlobalStore();
<h2>{{ $t("feedback.coordinates") }}</h2>
coordinates can be previewed here
</template>
<template v-slot:success> success </template>
<template v-slot:success="{ successUrl }">
<p>{{ $t("feedback.success.thank_you") }}</p>
<p>
{{ $t("feedback.success.response_at") }}
<a id="feedback-success-url" class="btn-link" :href="successUrl">{{ $t("feedback.success.this_pull_request") }}</a>
</p>
</template>
</BasicFeedbackModal>
</template>

Expand Down
3 changes: 1 addition & 2 deletions webclient/src/components/feedback/FeedbackModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { useI18n } from "vue-i18n";
import TokenBasedModal from "@/components/feedback/TokenBasedModal.vue";
const { t } = useI18n({ inheritLocale: true, useScope: "global" });
const global = useGlobalStore();
const deleteIssueRequested = ref(false);
</script>
Expand Down Expand Up @@ -90,7 +89,7 @@ const deleteIssueRequested = ref(false);
</label>
</div>
</template>
<template v-slot:success>
<template v-slot:success="{ successUrl }">
<p>{{ $t("feedback.success.thank_you") }}</p>
<p>
{{ $t("feedback.success.response_at") }}
Expand Down
2 changes: 1 addition & 1 deletion webclient/src/components/feedback/TokenBasedModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ function sendForm() {
</div>
<div class="modal-body">
<div class="content">
<slot name="success" />
<slot name="success" :successUrl="successUrl" />

<div class="buttons">
<button class="btn btn-primary" @click="closeForm">
Expand Down
2 changes: 1 addition & 1 deletion webclient/src/locales/de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ feedback:
coordinatepicker:
helptext:
enter_serveral: Falls du mehrere Koordinaten gleichzeitig korrigieren willst, kannst du dieses Fenster schließen und weitere Koordinaten editieren.
limitation_to_coordinates: Achtung, das gilt nur für Koordinaten!
saved_for_12h: Wir speichern deine Veränderungen für 12 Stunden bei dir lokal.
title: Koordinate auswählen
delete: Das zugehörige GitHub Issue löschen, sobald es gelöst wurde.
Expand Down Expand Up @@ -61,6 +60,7 @@ feedback:
response_at: Antwort auf dein Feedback findest du auf
thank_you: Vielen Dank für dein Feedback! Wir werden es schnellstmöglich bearbeiten.
this_issue: diesem GitHub Issue
this_pull_request: diesem GitHub Pull Request
title: Vielen Dank!
title: Feedback senden
type:
Expand Down
1 change: 1 addition & 0 deletions webclient/src/locales/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ feedback:
response_at: You can see our response at
thank_you: Thank you for giving your feedback. We will work on this as soon as possible.
this_issue: this GitHub issue
this_pull_request: this GitHub pull request
title: Thank you!
title: Send Feedback
type:
Expand Down

0 comments on commit 69c60b2

Please sign in to comment.