Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

voice navigator - try again message

DanielŻuławski4edea66a6d9c
diff --git a/src/Web/Grand.Web/Views/Shared/VoiceNavigator/VoiceNavigator.cshtml b/src/Web/Grand.Web/Views/Shared/VoiceNavigator/VoiceNavigator.cshtml
index dbbfcf653..04fc3dda0 100644
--- a/src/Web/Grand.Web/Views/Shared/VoiceNavigator/VoiceNavigator.cshtml
+++ b/src/Web/Grand.Web/Views/Shared/VoiceNavigator/VoiceNavigator.cshtml
@@ -81,7 +81,8 @@
],
transcript: "",
variant: "info",
- micMessage: "@Loc["voicenavigator.voice.holdtospeak"]"
+ micMessage: "@Loc["voicenavigator.voice.holdtospeak"]",
+ voiceMessage: "@Loc["voicenavigator.voice.tryagain"]"
}),
methods: {
startRecording() {
@@ -123,10 +124,20 @@
if (found) {
voicenavigator.stopRecording();
voicenavigator.variant = "success";
+
setTimeout(function () {
window.location.href = element.url;
}, 300)
+
break
+ } else {
+ if (key == voicenavigator.commands.length - 1) {
+ setTimeout(function () {
+ var msg = new SpeechSynthesisUtterance();
+ msg.text = voicenavigator.voiceMessage;
+ window.speechSynthesis.speak(msg);
+ }, 300)
+ }
}
}
}