diff --git a/src/assets/icons/thumbs-down.svg b/src/assets/icons/thumbs-down.svg new file mode 100644 index 0000000000..52aa171be6 --- /dev/null +++ b/src/assets/icons/thumbs-down.svg @@ -0,0 +1,6 @@ + + diff --git a/src/assets/icons/thumbs-up.svg b/src/assets/icons/thumbs-up.svg new file mode 100644 index 0000000000..cda73f907a --- /dev/null +++ b/src/assets/icons/thumbs-up.svg @@ -0,0 +1,6 @@ + + diff --git a/src/components/Feedback.astro b/src/components/Feedback.astro index 9b8c17d0d8..a47972a290 100644 --- a/src/components/Feedback.astro +++ b/src/components/Feedback.astro @@ -1,7 +1,8 @@ --- import { accelerator } from '@lib/accelerator'; -import type { Frontmatter } from 'astro-accelerator-utils/types/Frontmatter'; -import { SITE } from '@config'; +import { Lang, Translations } from '@util/Languages'; +import Button from './Button.astro'; +import { RATING_NO, RATING_YES } from '../scripts/modules/feedback-form.js'; const stats = new accelerator.statistics('components/Feedback.astro'); stats.start(); @@ -9,18 +10,140 @@ stats.start(); // Properties type Props = { lang: string; - frontmatter: Frontmatter; - headings: { depth: number; slug: string; text: string }[]; }; -const { lang, frontmatter, headings } = Astro.props satisfies Props; +const { lang } = Astro.props satisfies Props; -// Logic -const heading = await accelerator.markdown.getTextFrom(frontmatter.title); -const formUrl = `https://docs.google.com/forms/d/e/1FAIpQLSehVdN2w6tgSvp5QX7lHGnHDmgKi2Yfvko7bM2izgWQaqg-Wg/viewform?usp=pp_url&entry.336432709=${encodeURIComponent(heading)}`; +// Language +const _ = Lang(lang); stats.stop(); --- -
Please let us know if you have any feedback about this page.
- ++ {_(Translations.octopus_feedback.question)} +
++ {_(Translations.octopus_feedback.thanks)} +
+