Skip to content

Commit c6d5664

Browse files
authored
style: update icons (#1084)
1 parent 34f48a1 commit c6d5664

2 files changed

Lines changed: 14 additions & 44 deletions

File tree

.github/workflows/cloudflare-preview.yml

Lines changed: 9 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -61,47 +61,16 @@ jobs:
6161
echo "Preview URL: $PREVIEW_URL"
6262
6363
- name: Comment PR with preview link
64-
uses: actions/github-script@v7
64+
uses: actions-cool/maintain-one-comment@v3
6565
with:
66-
github-token: ${{ secrets.GITHUB_TOKEN }}
67-
script: |
68-
const previewUrl = '${{ steps.deployment-url.outputs.url }}';
69-
const prNumber = context.issue.number;
66+
token: ${{ secrets.GITHUB_TOKEN }}
67+
body: |
68+
🚀 Cloudflare Workers Preview has been successfully deployed!
7069
71-
// Find existing comment
72-
const comments = await github.rest.issues.listComments({
73-
owner: context.repo.owner,
74-
repo: context.repo.repo,
75-
issue_number: prNumber,
76-
});
70+
**Preview URL:** ${{ steps.deployment-url.outputs.url }}
7771
78-
const botComment = comments.data.find(comment =>
79-
comment.user.type === 'Bot' &&
80-
comment.body.includes('Cloudflare Workers Preview')
81-
);
72+
<sub>Built with commit ${{ github.event.pull_request.head.sha }}</sub>
8273
83-
const commentBody = `## 🚀 Cloudflare Workers Preview
84-
85-
Your preview is ready!
86-
87-
**Preview URL:** ${previewUrl}
88-
89-
<sub>Built with commit ${context.sha}</sub>`;
90-
91-
if (botComment) {
92-
// Update existing comment
93-
await github.rest.issues.updateComment({
94-
owner: context.repo.owner,
95-
repo: context.repo.repo,
96-
comment_id: botComment.id,
97-
body: commentBody
98-
});
99-
} else {
100-
// Create new comment
101-
await github.rest.issues.createComment({
102-
owner: context.repo.owner,
103-
repo: context.repo.repo,
104-
issue_number: prNumber,
105-
body: commentBody
106-
});
107-
}
74+
<!-- Cloudflare Preview Comment -->
75+
body-include: '<!-- Cloudflare Preview Comment -->'
76+
number: ${{ github.event.pull_request.number }}

apps/web/src/components/editor/editor-header/index.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import { ChevronDownIcon, Menu, Paintbrush, Settings } from 'lucide-vue-next'
2+
import { ChevronDownIcon, Menu, Palette, SlidersHorizontal } from 'lucide-vue-next'
33
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'
44
import { useDisplayStore, useStore } from '@/stores'
55
import { addPrefix, generatePureHTML, processClipboardContent } from '@/utils'
@@ -266,24 +266,25 @@ async function copy() {
266266
<!-- 文章信息(移动端隐藏) -->
267267
<PostInfo class="hidden md:inline-flex" />
268268

269+
<!-- 编辑器设置按钮 -->
269270
<Popover>
270271
<PopoverTrigger as-child>
271272
<Button variant="outline" size="icon" class="mr-1">
272-
<Paintbrush class="size-4" />
273+
<SlidersHorizontal class="size-4" />
273274
</Button>
274275
</PopoverTrigger>
275276
<PopoverContent align="end">
276277
<ThemeCustomizer />
277278
</PopoverContent>
278279
</Popover>
279280

280-
<!-- 设置按钮 -->
281+
<!-- 样式面板 -->
281282
<Button
282283
variant="outline"
283284
size="icon"
284285
@click="store.isOpenRightSlider = !store.isOpenRightSlider"
285286
>
286-
<Settings class="size-4" />
287+
<Palette class="size-4" />
287288
</Button>
288289
</div>
289290
</header>

0 commit comments

Comments
 (0)