Skip to content

Commit 731a03e

Browse files
authored
chore: splitting icons into standalone components (#55)
1 parent 95c9f99 commit 731a03e

30 files changed

Lines changed: 502 additions & 431 deletions

.github/workflows/release.yml

Lines changed: 6 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -22,80 +22,12 @@ on:
2222
- minor
2323
- major
2424

25-
permissions:
26-
contents: write
27-
pull-requests: write
28-
29-
concurrency:
30-
group: "release"
31-
cancel-in-progress: false
3225

3326
jobs:
3427
release:
35-
runs-on: ubuntu-latest
36-
37-
steps:
38-
- name: Checkout
39-
uses: actions/checkout@v6
40-
41-
- name: "Update Dev Container Index"
42-
run: bash ./scripts/update-data.sh
43-
44-
- name: "Bump to new version"
45-
id: bump
46-
run: |
47-
_version=$(npm --no-git-tag-version version ${{ github.event.inputs.version || 'patch' }})
48-
49-
echo "new_version=$_version" >> $GITHUB_OUTPUT
50-
echo "New version: $_version"
51-
52-
- name: "Create Pull Request"
53-
id: cpr
54-
uses: peter-evans/create-pull-request@v8
55-
with:
56-
token: ${{ secrets.RELEASE_PAT }}
57-
title: "chore(release): bump version to ${{ env.NEW_VERSION }}"
58-
body: "chore(release): bump version to ${{ env.NEW_VERSION }}"
59-
commit-message: "chore(release): bump version to ${{ env.NEW_VERSION }}"
60-
branch: "release-${{ env.NEW_VERSION }}"
61-
delete-branch: true
62-
env:
63-
NEW_VERSION: ${{ steps.bump.outputs.new_version }}
64-
65-
- name: "Auto-merge PR"
66-
env:
67-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68-
run: |
69-
gh pr merge --squash --auto "${{ steps.cpr.outputs.pull-request-number }}"
70-
71-
- name: "Wait for PR to merge"
72-
if: steps.cpr.outputs.pull-request-number != ''
73-
timeout-minutes: 3
74-
env:
75-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76-
PR_NUMBER: ${{ steps.cpr.outputs.pull-request-number }}
77-
run: |
78-
while true; do
79-
STATE=$(gh pr view "$PR_NUMBER" --json state --template '{{.state}}')
80-
if [ "$STATE" == "MERGED" ]; then
81-
echo "PR merged."
82-
break
83-
fi
84-
if [ "$STATE" == "CLOSED" ]; then
85-
echo "PR closed without merging."
86-
exit 1
87-
fi
88-
echo "State: $STATE. Waiting 3s..."
89-
sleep 3
90-
done
91-
92-
- name: "Release"
93-
if: steps.cpr.outputs.pull-request-number != ''
94-
env:
95-
# https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/trigger-a-workflow#triggering-a-workflow-from-a-workflow
96-
GITHUB_TOKEN: ${{ secrets.RELEASE_PAT }}
97-
NEW_VERSION: ${{ steps.bump.outputs.new_version }}
98-
run: |
99-
gh release create $NEW_VERSION \
100-
--target main \
101-
-t $NEW_VERSION
28+
uses: drehelis/improved-chainsaw/.github/workflows/release.yml@main
29+
with:
30+
version: ${{ github.event.inputs.version || 'patch' }}
31+
pre_release_command: "bash ./scripts/update-data.sh"
32+
timeout_minutes: 5
33+
secrets: inherit
Lines changed: 30 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<script setup lang="ts">
22
import type { Section } from "../../types";
3+
import IconPresets from "../ui/icons/IconPresets.vue";
4+
import IconSettings from "../ui/icons/IconSettings.vue";
5+
import IconFeatures from "../ui/icons/IconFeatures.vue";
6+
import IconNetwork from "../ui/icons/IconNetwork.vue";
7+
import IconMounts from "../ui/icons/IconMounts.vue";
8+
import IconAdvanced from "../ui/icons/IconAdvanced.vue";
39
410
defineProps<{
511
activeSection: Section;
@@ -20,24 +26,15 @@ defineEmits<{
2026
:class="{ active: activeSection === 'presets' }"
2127
title="Presets (Quick Start)"
2228
>
23-
<svg
24-
class="w-6 h-6"
29+
<IconPresets
30+
class="w-6 h-6 transition-colors duration-200"
2531
:class="
2632
activeSection === 'presets'
2733
? 'text-ide-text-bright'
2834
: 'text-ide-text-muted group-hover:text-ide-text'
2935
"
30-
fill="none"
31-
viewBox="0 0 24 24"
32-
stroke="currentColor"
33-
>
34-
<path
35-
stroke-linecap="round"
36-
stroke-linejoin="round"
37-
stroke-width="1.5"
38-
d="M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"
39-
/>
40-
</svg>
36+
stroke-width="1.5"
37+
/>
4138
</div>
4239

4340
<div
@@ -46,130 +43,79 @@ defineEmits<{
4643
:class="{ active: activeSection === 'general' }"
4744
title="General Settings"
4845
>
49-
<svg
50-
class="w-6 h-6"
46+
<IconSettings
47+
class="w-6 h-6 transition-colors duration-200"
5148
:class="
5249
activeSection === 'general'
5350
? 'text-ide-text-bright'
5451
: 'text-ide-text-muted group-hover:text-ide-text'
5552
"
56-
fill="none"
57-
viewBox="0 0 24 24"
58-
stroke="currentColor"
59-
>
60-
<path
61-
stroke-linecap="round"
62-
stroke-linejoin="round"
63-
stroke-width="1.5"
64-
d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"
65-
/>
66-
<path
67-
stroke-linecap="round"
68-
stroke-linejoin="round"
69-
stroke-width="1.5"
70-
d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"
71-
/>
72-
</svg>
53+
stroke-width="1.5"
54+
/>
7355
</div>
7456
<div
7557
@click="$emit('update:activeSection', 'features')"
7658
class="activity-item group"
7759
:class="{ active: activeSection === 'features' }"
7860
title="Features"
7961
>
80-
<svg
81-
class="w-6 h-6"
62+
<IconFeatures
63+
class="w-6 h-6 transition-colors duration-200"
8264
:class="
8365
activeSection === 'features'
8466
? 'text-ide-text-bright'
8567
: 'text-ide-text-muted group-hover:text-ide-text'
8668
"
87-
fill="none"
88-
viewBox="0 0 24 24"
89-
stroke="currentColor"
90-
>
91-
<path
92-
stroke-linecap="round"
93-
stroke-linejoin="round"
94-
stroke-width="1.5"
95-
d="M21 7.5l-9-5.25L3 7.5m18 0l-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9"
96-
/>
97-
</svg>
69+
stroke-width="1.5"
70+
/>
9871
</div>
9972
<div
10073
@click="$emit('update:activeSection', 'ports')"
10174
class="activity-item group"
10275
:class="{ active: activeSection === 'ports' }"
10376
title="Network & Ports"
10477
>
105-
<svg
106-
class="w-6 h-6"
78+
<IconNetwork
79+
class="w-6 h-6 transition-colors duration-200"
10780
:class="
10881
activeSection === 'ports'
10982
? 'text-ide-text-bright'
11083
: 'text-ide-text-muted group-hover:text-ide-text'
11184
"
112-
fill="none"
113-
viewBox="0 0 24 24"
114-
stroke="currentColor"
115-
>
116-
<path
117-
stroke-linecap="round"
118-
stroke-linejoin="round"
119-
stroke-width="1.5"
120-
d="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.963 11.963 0 0112 10.5a11.963 11.963 0 01-7.843-2.918m15.686 0A8.996 8.996 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418"
121-
/>
122-
</svg>
85+
stroke-width="1.5"
86+
/>
12387
</div>
12488
<div
12589
@click="$emit('update:activeSection', 'mounts')"
12690
class="activity-item group"
12791
:class="{ active: activeSection === 'mounts' }"
12892
title="Mounts"
12993
>
130-
<svg
131-
class="w-6 h-6"
94+
<IconMounts
95+
class="w-6 h-6 transition-colors duration-200"
13296
:class="
13397
activeSection === 'mounts'
13498
? 'text-ide-text-bright'
13599
: 'text-ide-text-muted group-hover:text-ide-text'
136100
"
137-
fill="none"
138-
viewBox="0 0 24 24"
139-
stroke="currentColor"
140-
>
141-
<path
142-
stroke-linecap="round"
143-
stroke-linejoin="round"
144-
stroke-width="1.5"
145-
d="M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"
146-
/>
147-
</svg>
101+
stroke-width="1.5"
102+
/>
148103
</div>
149104
<div
150105
@click="$emit('update:activeSection', 'advanced')"
151106
class="activity-item group"
152107
:class="{ active: activeSection === 'advanced' }"
153108
title="Advanced & Hooks"
154109
>
155-
<svg
156-
class="w-6 h-6"
110+
<IconAdvanced
111+
class="w-6 h-6 transition-colors duration-200"
157112
:class="
158113
activeSection === 'advanced'
159114
? 'text-ide-text-bright'
160115
: 'text-ide-text-muted group-hover:text-ide-text'
161116
"
162-
fill="none"
163-
viewBox="0 0 24 24"
164-
stroke="currentColor"
165-
>
166-
<path
167-
stroke-linecap="round"
168-
stroke-linejoin="round"
169-
stroke-width="1.5"
170-
d="M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"
171-
/>
172-
</svg>
117+
stroke-width="1.5"
118+
/>
173119
</div>
174120
</aside>
175121
</template>

src/components/layout/CommandPalette.vue

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<script setup lang="ts">
22
import { ref, computed, watch, useTemplateRef, nextTick } from "vue";
33
import { useCommandPalette } from "../../composables/useCommandPalette";
4+
import IconSearch from "../ui/icons/IconSearch.vue";
5+
import IconFrown from "../ui/icons/IconFrown.vue";
46
57
const {
68
isOpen,
@@ -114,19 +116,7 @@ const groupedCommands = computed(() => {
114116
class="flex items-center gap-3 px-4 border-b border-ide-border bg-ide-sidebar"
115117
>
116118
<!-- Search Icon -->
117-
<svg
118-
class="w-4 h-4 text-ide-text-muted shrink-0"
119-
fill="none"
120-
viewBox="0 0 24 24"
121-
stroke="currentColor"
122-
>
123-
<path
124-
stroke-linecap="round"
125-
stroke-linejoin="round"
126-
stroke-width="2"
127-
d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
128-
/>
129-
</svg>
119+
<IconSearch class="w-4 h-4 text-ide-text-muted shrink-0" />
130120

131121
<input
132122
ref="input"
@@ -206,24 +196,11 @@ const groupedCommands = computed(() => {
206196
</template>
207197
</template>
208198

209-
<!-- Empty state -->
210199
<div
211200
v-else
212201
class="flex flex-col items-center justify-center py-12 text-ide-text-muted"
213202
>
214-
<svg
215-
class="w-8 h-8 mb-3 opacity-30"
216-
fill="none"
217-
viewBox="0 0 24 24"
218-
stroke="currentColor"
219-
>
220-
<path
221-
stroke-linecap="round"
222-
stroke-linejoin="round"
223-
stroke-width="1.5"
224-
d="M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
225-
/>
226-
</svg>
203+
<IconFrown class="w-8 h-8 mb-3 opacity-30" stroke-width="1.5" />
227204
<p class="text-[11px]">
228205
No commands match <em>{{ query }}</em>
229206
</p>

0 commit comments

Comments
 (0)