// @unocss-include import { getRgb } from '@sa/color'; import { $t } from '@/locales'; import { localStg } from '@/utils/storage'; import systemLogo from '@/assets/svg-icon/logo.svg?raw'; export function setupLoading() { const themeColor = localStg.get('themeColor') || '#646cff'; const { r, g, b } = getRgb(themeColor); const primaryColor = `--primary-color: ${r} ${g} ${b}`; const loadingClasses = [ 'left-0 top-0', 'left-0 bottom-0 animate-delay-500', 'right-0 top-0 animate-delay-1000', 'right-0 bottom-0 animate-delay-1500' ]; const logoWithClass = systemLogo.replace(' { return `
`; }) .join('\n'); const loading = `
${logoWithClass}
${dot}

${$t('system.title')}

`; const app = document.getElementById('app'); if (app) { app.innerHTML = loading; } }