Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace icon fonts with UnoCSS #2219

Merged
merged 3 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"eslint.packageManager": "pnpm",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
Expand Down
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"HKLM",
"Hmmss",
"icns",
"iconify",
"incorrectsv",
"ingame",
"intlify",
Expand Down
28 changes: 15 additions & 13 deletions electron/preload/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
function domReady(condition: DocumentReadyState[] = ["complete", "interactive"]) {
function domReady(
condition: DocumentReadyState[] = ["complete", "interactive"],
) {
return new Promise((resolve) => {
if (condition.includes(document.readyState)) {
resolve(true);
Expand All @@ -14,12 +16,12 @@ function domReady(condition: DocumentReadyState[] = ["complete", "interactive"])

const safeDOM = {
append(parent: HTMLElement, child: HTMLElement) {
if (!Array.from(parent.children).find(e => e === child)) {
if (!Array.from(parent.children).find((e) => e === child)) {
return parent.appendChild(child);
}
},
remove(parent: HTMLElement, child: HTMLElement) {
if (Array.from(parent.children).find(e => e === child)) {
if (Array.from(parent.children).find((e) => e === child)) {
return parent.removeChild(child);
}
},
Expand All @@ -34,18 +36,18 @@ const safeDOM = {
function useLoading() {
const className = "loaders-css__square-spin";
const styleContent = `
@keyframes square-spin {
25% { transform: perspective(100px) rotateX(180deg) rotateY(0); }
50% { transform: perspective(100px) rotateX(180deg) rotateY(180deg); }
75% { transform: perspective(100px) rotateX(0) rotateY(180deg); }
100% { transform: perspective(100px) rotateX(0) rotateY(0); }
@keyframes pulse {
0% { opacity: 0.5; }
50% { opacity: 1; }
100% { opacity: 0.5; }
}
.${className} > div {
animation-fill-mode: both;
width: 50px;
height: 50px;
background: #fff;
animation: square-spin 3s 0s cubic-bezier(0.09, 0.57, 0.49, 0.9) infinite;
width: 225px;
height: 75px;
background: url('src/assets/weakauras.png');
background-size: cover;
animation: pulse 3s 0s cubic-bezier(0.09, 0.57, 0.49, 0.9) infinite;
}
.app-loading-wrap {
position: fixed;
Expand All @@ -56,7 +58,7 @@ function useLoading() {
display: flex;
align-items: center;
justify-content: center;
background: #282c34;
background: #131313;
z-index: 9;
}
`;
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
"tga": "^1.0.7"
},
"devDependencies": {
"@iconify-json/fa6-brands": "^1.1.17",
"@iconify-json/mdi": "^1.1.58",
"@iconify/tools": "^3.0.7",
"@intlify/unplugin-vue-i18n": "^1.5.0",
"@types/archiver": "^6.0.2",
"@types/auto-launch": "^5.0.5",
Expand All @@ -56,6 +59,7 @@
"@types/tail": "^2.2.3",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"@unocss/preset-icons": "^0.58.0",
"@unocss/preset-web-fonts": "^0.58.0",
"@vitejs/plugin-vue": "^4.5.1",
"@vue/eslint-config-standard": "^8.0.1",
Expand All @@ -74,7 +78,6 @@
"glob": "^10.3.10",
"luaparse": "^0.2.1",
"luxon": "^3.4.4",
"material-icons": "^1.13.12",
"pinia": "^2.1.7",
"pinia-plugin-persistedstate-2": "^2.0.14",
"prettier": "4.0.0-alpha.3",
Expand Down
Loading