fix: misc ux issues

This commit is contained in:
Jannat Patel
2024-10-11 13:39:30 +05:30
parent 016dafb3c3
commit 6e97449bf7
10 changed files with 295 additions and 66 deletions

View File

@@ -82,10 +82,13 @@ export function getFileSize(file_size) {
export function showToast(title, text, icon, iconClasses = null) {
if (!iconClasses) {
iconClasses =
icon == 'check'
? 'bg-green-600 text-white rounded-md p-px'
: 'bg-red-600 text-white rounded-md p-px'
if (icon == 'check') {
iconClasses = 'bg-green-600 text-white rounded-md p-px'
} else if (icon == 'circle-warn') {
iconClasses = 'bg-yellow-600 text-white rounded-md p-px'
} else {
iconClasses = 'bg-red-600 text-white rounded-md p-px'
}
}
createToast({
title: title,