Skip to content

Commit 212e424

Browse files
committed
perf: use unocss icons
1 parent 3ce2062 commit 212e424

File tree

4 files changed

+14
-68
lines changed

4 files changed

+14
-68
lines changed

app/pages/[[owner]]/[[repo]]/index.vue

+11-21
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,9 @@ const openState = reactive<Record<string, boolean>>({})
6262
:class="{ 'animate-spin opacity-50 pointer-events-none': status === 'pending' || status === 'idle' }"
6363
type="submit"
6464
>
65-
<Icon
65+
<span
6666
size="medium"
67-
class="text-gray-400 flex-shrink-0"
68-
name="tabler-refresh"
67+
class="text-gray-400 flex-shrink-0 i-tabler-refresh inline-block w-4 h-4"
6968
/>
7069
<span class="sr-only">refresh data</span>
7170
</button>
@@ -85,10 +84,8 @@ const openState = reactive<Record<string, boolean>>({})
8584
{{ repo }}
8685
</option>
8786
</select>
88-
<Icon
89-
size="large"
90-
class="absolute ml-2 text-gray-400 flex-shrink-0"
91-
name="tabler-search"
87+
<span
88+
class="absolute ml-2 text-gray-400 flex-shrink-0 i-tabler-search inline-block w-6 h-6"
9289
/>
9390
</label>
9491
</form>
@@ -107,11 +104,8 @@ const openState = reactive<Record<string, boolean>>({})
107104
<div
108105
class="flex flex-row gap-2 leading-tightest no-underline color-current"
109106
>
110-
<Icon
111-
size="large"
112-
class="flex-shrink-0"
113-
:class="'text-gray-500'"
114-
:name="'tabler-circle-dot'"
107+
<span
108+
class="flex-shrink-0 text-gray-500 i-tabler-circle-dot inline-block w-6 h-6"
115109
/>
116110
<div class="rounded-full h-4 bg-gray-500 w-70" />
117111
</div>
@@ -126,10 +120,8 @@ const openState = reactive<Record<string, boolean>>({})
126120
<span class="text-gray-500 inline-block mr-1 font-normal">#</span>
127121
</h2>
128122
<p class="flex flex-row gap-2 leading-tightest">
129-
<Icon
130-
size="large"
131-
class="flex-shrink-0 text-gray-400"
132-
name="tabler-alert-triangle"
123+
<span
124+
class="flex-shrink-0 text-gray-400 i-tabler-alert-triangle inline-block w-6 h-6"
133125
/>
134126
no clusters could be identified
135127
</p>
@@ -150,11 +142,9 @@ const openState = reactive<Record<string, boolean>>({})
150142
:key="i"
151143
class="flex flex-row gap-2 leading-tightest"
152144
>
153-
<Icon
154-
size="large"
155-
class="flex-shrink-0"
156-
:class="stateColors[issue.state] || 'text-gray-400'"
157-
:name="issue.pull_request ? 'tabler-git-pull-request' : issue.state === 'closed' ? 'tabler-circle-check' : 'tabler-circle-dot'"
145+
<span
146+
class="flex-shrink-0 inline-block w-6 h-6"
147+
:class="[stateColors[issue.state] || 'text-gray-400', issue.pull_request ? 'i-tabler-git-pull-request' : issue.state === 'closed' ? 'i-tabler-circle-check' : 'i-tabler-circle-dot']"
158148
/>
159149
<div class="flex flex-row gap-2 flex-wrap md:flex-nowrap md:pb-6 flex-grow">
160150
<NuxtLink

nuxt.config.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export default defineNuxtConfig({
44
'@unocss/nuxt',
55
'@nuxt/eslint',
66
'@nuxthub/core',
7-
'@nuxt/icon',
87
'nuxt-time',
98
'@nuxtjs/html-validator',
109
// TODO: 'nuxt-og-image',
@@ -50,4 +49,7 @@ export default defineNuxtConfig({
5049
stylistic: true,
5150
},
5251
},
52+
unocss: {
53+
icons: true,
54+
},
5355
})

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"dependencies": {
1515
"@iconify-json/ri": "1.2.3",
1616
"@iconify-json/tabler": "1.2.10",
17-
"@nuxt/icon": "^1.9.1",
1817
"@nuxthub/core": "^0.8.7",
1918
"@nuxtjs/html-validator": "1.8.2",
2019
"@octokit/rest": "^21.0.2",

pnpm-lock.yaml

-45
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)