diff --git a/CHANGELOG.md b/CHANGELOG.md index a1c67aa9..daad8b04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Links to the app info in web app - Loading indicator for search page in web app +- Feedback link through email ### Fixed diff --git a/playlet-web/src/lib/ScreenInfo.svelte b/playlet-web/src/lib/ScreenInfo.svelte index 6d640907..43e94ca2 100644 --- a/playlet-web/src/lib/ScreenInfo.svelte +++ b/playlet-web/src/lib/ScreenInfo.svelte @@ -38,19 +38,21 @@ let deviceInfo = {}; let invidiousInfo = {}; let preferencesInfo = {}; + const feedbackTitle = encodeURIComponent("[Feedback] Playlet"); let githubUrlIssue = "https://github.com/iBicha/playlet/issues/new"; + let mailToUrl = "mailto:brahim.hadriche@gmail.com"; playletStateStore.subscribe((value) => { appInfo = value.app || {}; deviceInfo = value.device || {}; invidiousInfo = value.invidious || {}; preferencesInfo = value.preferences || {}; - githubUrlIssue = CreateGithubIssueUrl(); + githubUrlIssue = createGithubIssueUrl(); + mailToUrl = createMailToUrl(); }); - function CreateGithubIssueUrl() { - let title = "[Feedback] Playlet"; - let body = `### Feedback + function createFeedbackBody() { + return `### Feedback _insert feedback here_ #### App Info @@ -72,9 +74,16 @@ ${JSON.stringify(invidiousInfo, null, 2)} \`\`\` ${JSON.stringify(preferencesInfo, null, 2)} \`\`\``; - title = encodeURIComponent(title); - body = encodeURIComponent(body); - return `https://github.com/iBicha/playlet/issues/new?title=${title}&body=${body}`; + } + + function createGithubIssueUrl() { + const body = encodeURIComponent(createFeedbackBody()); + return `https://github.com/iBicha/playlet/issues/new?title=${feedbackTitle}&body=${body}`; + } + + function createMailToUrl() { + const body = encodeURIComponent(createFeedbackBody()); + return `mailto:brahim.hadriche@gmail.com?subject=${feedbackTitle}&body=${body}`; } @@ -86,6 +95,10 @@ ${JSON.stringify(preferencesInfo, null, 2)} href={githubUrlIssue} target="_blank" rel="noopener noreferrer">creating an issue on Github + or by + sending an email.