mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-03-19 15:18:02 -04:00
Merge pull request #470 from lanedirt/469-webassembly-required-error-not-visible-in-client-app
Show error if client does not support WebAssembly
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# @version 0.9.3
|
||||
# @version 0.9.4
|
||||
|
||||
# Repository information used for downloading files and images from GitHub
|
||||
REPO_OWNER="lanedirt"
|
||||
@@ -253,7 +253,7 @@ handle_docker_compose() {
|
||||
fi
|
||||
printf "\n ${CYAN}> docker-compose.yml downloaded successfully.${NC}\n"
|
||||
else
|
||||
printf "\n ${YELLOW}> Failed to download docker-compose.yml, please check your internet connection and try again. Alternatively, you can download it manually from ${GITHUB_RAW_URL_REPO}/blob/${version_tag}/docker-compose.yml and place it in the root directory of AliasVault.${NC}\n"
|
||||
printf "\n ${YELLOW}> Failed to download docker-compose.yml, please check your internet connection and try again. Alternatively, you can download it manually from ${GITHUB_RAW_URL_REPO}/${version_tag}/docker-compose.yml and place it in the root directory of AliasVault.${NC}\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -262,7 +262,7 @@ handle_docker_compose() {
|
||||
if curl -sSf "${GITHUB_RAW_URL_REPO}/${version_tag}/docker-compose.letsencrypt.yml" -o "docker-compose.letsencrypt.yml" > /dev/null 2>&1; then
|
||||
printf "\n ${CYAN}> docker-compose.letsencrypt.yml downloaded successfully.${NC}\n"
|
||||
else
|
||||
printf "\n ${YELLOW}> Failed to download docker-compose.letsencrypt.yml, please check your internet connection and try again. Alternatively, you can download it manually from ${GITHUB_RAW_URL_REPO}/blob/${version_tag}/docker-compose.letsencrypt.yml and place it in the root directory of AliasVault.${NC}\n"
|
||||
printf "\n ${YELLOW}> Failed to download docker-compose.letsencrypt.yml, please check your internet connection and try again. Alternatively, you can download it manually from ${GITHUB_RAW_URL_REPO}/${version_tag}/docker-compose.letsencrypt.yml and place it in the root directory of AliasVault.${NC}\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<a href="/">
|
||||
<div class="text-5xl font-bold text-gray-900 dark:text-white mb-4 flex items-center">
|
||||
<img src="img/logo.svg" alt="AliasVault" class="w-20 h-20 mr-2" />
|
||||
<span class="relative">
|
||||
<span class="relative inline-flex flex-wrap items-center">
|
||||
AliasVault
|
||||
<span class="absolute -top-2 bg-primary-500 text-white text-xs px-2 py-0.5 rounded-full font-normal">BETA</span>
|
||||
<span class="ml-2 bg-primary-500 text-white text-xs px-2 py-0.5 rounded-full font-normal sm:absolute sm:-top-2 sm:ml-1">BETA</span>
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<input
|
||||
id="searchWidget"
|
||||
type="text"
|
||||
placeholder="Type here to search"
|
||||
placeholder="Search for a service..."
|
||||
autocomplete="off"
|
||||
class="w-full px-4 py-2 text-gray-700 bg-white border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-600 dark:focus:ring-primary-500"
|
||||
@bind-value="SearchTerm"
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
<div class="mt-4 text-center">
|
||||
<p id="security-quote" class="text-sm text-primary-600 italic"></p>
|
||||
</div>
|
||||
<div id="error-message" class="hidden text-red-600 dark:text-red-400 mt-4"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -144,7 +145,7 @@
|
||||
clearInterval(intervalId);
|
||||
} else if (elapsedTime % 1000 < checkInterval) {
|
||||
if (!('WebAssembly' in window)) {
|
||||
showError("AliasVault requires WebAssembly, which this browser does not support. Please use a modern browser that supports WebAssembly.");
|
||||
showError("AliasVault requires WebAssembly, which this browser does not support. Try using a more modern browser that supports WebAssembly.");
|
||||
clearInterval(intervalId);
|
||||
}
|
||||
}
|
||||
@@ -157,7 +158,6 @@
|
||||
const errorMessageElement = document.getElementById('error-message');
|
||||
|
||||
const showError = (message) => {
|
||||
loadingScreen.querySelector('.inner').classList.add('hidden');
|
||||
errorMessageElement.textContent = message;
|
||||
errorMessageElement.classList.remove('hidden');
|
||||
document.querySelector('.loading-progress-text').classList.add('hidden');
|
||||
@@ -167,14 +167,14 @@
|
||||
// Listen for unhandled errors
|
||||
window.addEventListener('error', function(event) {
|
||||
if (event.error && event.error.message && event.error.message.includes('WebAssembly')) {
|
||||
showError("AliasVault requires WebAssembly, which this browser does not support. Please use a modern browser that supports WebAssembly.");
|
||||
showError("AliasVault requires WebAssembly, which this browser does not support. Try using a more modern browser that supports WebAssembly.");
|
||||
}
|
||||
});
|
||||
|
||||
// Listen for unhandled promise rejections
|
||||
window.addEventListener('unhandledrejection', function(event) {
|
||||
if (event.reason && event.reason.message && event.reason.message.includes('WebAssembly')) {
|
||||
showError("AliasVault requires WebAssembly, which this browser does not support. Please use a modern browser that supports WebAssembly.");
|
||||
showError("AliasVault requires WebAssembly, which this browser does not support. Try using a more modern browser that supports WebAssembly.");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user