Skip to content

Commit db9bec1

Browse files
committed
fix: resolve warning logs
1 parent 64695ac commit db9bec1

4 files changed

Lines changed: 101 additions & 101 deletions

File tree

apps/web/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@
9797
</script>
9898
<script>
9999
window.MathJax = {
100-
loader: { load: ['[tex]/ams'] },
101-
tex: { packages: { '[+]': ['ams'] }, tags: 'ams' },
100+
tex: { tags: 'ams' },
102101
svg: { fontCache: 'none' },
103102
}
104103
</script>

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

Lines changed: 94 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ import { Check, Info } from 'lucide-vue-next'
44
import { CheckboxIndicator, CheckboxRoot, Primitive } from 'radix-vue'
55
import { useStore } from '@/stores'
66
7+
defineOptions({
8+
inheritAttrs: false,
9+
})
10+
711
const store = useStore()
812
const { output, editor } = storeToRefs(store)
913
@@ -117,96 +121,98 @@ onBeforeMount(() => {
117121
</script>
118122

119123
<template>
120-
<Dialog v-model:open="dialogVisible" @update:open="onUpdate">
121-
<DialogTrigger>
122-
<Button v-if="!store.isMobile" variant="outline" @click="prePost">
123-
发布
124-
</Button>
125-
</DialogTrigger>
126-
<DialogContent>
127-
<DialogHeader>
128-
<DialogTitle>发布</DialogTitle>
129-
</DialogHeader>
130-
<Alert>
131-
<Info class="h-4 w-4" />
132-
<AlertTitle>提示</AlertTitle>
133-
<AlertDescription>
134-
此功能由第三方浏览器插件支持,本平台不保证安全性及同步准确度。
135-
</AlertDescription>
136-
</Alert>
137-
138-
<Alert v-if="!extensionInstalled">
139-
<Info class="h-4 w-4" />
140-
<AlertTitle>未检测到插件</AlertTitle>
141-
<AlertDescription>
142-
请安装
143-
<Primitive
144-
as="a" class="text-blue-500" href="https://www.wechatsync.com/?utm_source=syncicon#install"
145-
target="_blank"
146-
>
147-
文章同步助手
148-
</Primitive>
149-
插件
150-
</AlertDescription>
151-
</Alert>
152-
153-
<div class="w-full flex items-center gap-4">
154-
<Label for="thumb" class="w-10 text-end">
155-
封面
156-
</Label>
157-
<Input id="thumb" v-model="form.thumb" placeholder="自动提取第一张图" />
158-
</div>
159-
<div class="w-full flex items-center gap-4">
160-
<Label for="title" class="w-10 text-end">
161-
标题
162-
</Label>
163-
<Input id="title" v-model="form.title" placeholder="自动提取第一个标题" />
164-
</div>
165-
<div class="w-full flex items-start gap-4">
166-
<Label for="desc" class="w-10 text-end">
167-
描述
168-
</Label>
169-
<Textarea id="desc" v-model="form.desc" placeholder="自动提取第一个段落" />
170-
</div>
171-
172-
<div class="w-full flex items-start gap-4">
173-
<Label class="w-10 text-end">
174-
账号
175-
</Label>
176-
<div class="flex flex-1 flex-col gap-2">
177-
<div v-for="account in form.accounts" :key="account.uid + account.displayName" class="flex items-center gap-2">
178-
<label class="flex flex-row items-center gap-4">
179-
<CheckboxRoot
180-
v-model:checked="account.checked"
181-
class="bg-background hover:bg-muted h-[25px] w-[25px] flex appearance-none items-center justify-center border border-gray-200 rounded-[4px] outline-hidden"
182-
>
183-
<CheckboxIndicator>
184-
<Check v-if="account.checked" class="h-4 w-4" />
185-
</CheckboxIndicator>
186-
</CheckboxRoot>
187-
<span class="flex items-center gap-2 text-sm">
188-
<img
189-
:src="account.icon"
190-
alt=""
191-
class="inline-block h-[20px] w-[20px]"
124+
<div v-bind="$attrs">
125+
<Dialog v-model:open="dialogVisible" @update:open="onUpdate">
126+
<DialogTrigger>
127+
<Button v-if="!store.isMobile" variant="outline" @click="prePost">
128+
发布
129+
</Button>
130+
</DialogTrigger>
131+
<DialogContent>
132+
<DialogHeader>
133+
<DialogTitle>发布</DialogTitle>
134+
</DialogHeader>
135+
<Alert>
136+
<Info class="h-4 w-4" />
137+
<AlertTitle>提示</AlertTitle>
138+
<AlertDescription>
139+
此功能由第三方浏览器插件支持,本平台不保证安全性及同步准确度。
140+
</AlertDescription>
141+
</Alert>
142+
143+
<Alert v-if="!extensionInstalled">
144+
<Info class="h-4 w-4" />
145+
<AlertTitle>未检测到插件</AlertTitle>
146+
<AlertDescription>
147+
请安装
148+
<Primitive
149+
as="a" class="text-blue-500" href="https://www.wechatsync.com/?utm_source=syncicon#install"
150+
target="_blank"
151+
>
152+
文章同步助手
153+
</Primitive>
154+
插件
155+
</AlertDescription>
156+
</Alert>
157+
158+
<div class="w-full flex items-center gap-4">
159+
<Label for="thumb" class="w-10 text-end">
160+
封面
161+
</Label>
162+
<Input id="thumb" v-model="form.thumb" placeholder="自动提取第一张图" />
163+
</div>
164+
<div class="w-full flex items-center gap-4">
165+
<Label for="title" class="w-10 text-end">
166+
标题
167+
</Label>
168+
<Input id="title" v-model="form.title" placeholder="自动提取第一个标题" />
169+
</div>
170+
<div class="w-full flex items-start gap-4">
171+
<Label for="desc" class="w-10 text-end">
172+
描述
173+
</Label>
174+
<Textarea id="desc" v-model="form.desc" placeholder="自动提取第一个段落" />
175+
</div>
176+
177+
<div class="w-full flex items-start gap-4">
178+
<Label class="w-10 text-end">
179+
账号
180+
</Label>
181+
<div class="flex flex-1 flex-col gap-2">
182+
<div v-for="account in form.accounts" :key="account.uid + account.displayName" class="flex items-center gap-2">
183+
<label class="flex flex-row items-center gap-4">
184+
<CheckboxRoot
185+
v-model:checked="account.checked"
186+
class="bg-background hover:bg-muted h-[25px] w-[25px] flex appearance-none items-center justify-center border border-gray-200 rounded-[4px] outline-hidden"
192187
>
193-
{{ account.title }} - {{ account.displayName ?? account.home }}
194-
</span>
195-
</label>
188+
<CheckboxIndicator>
189+
<Check v-if="account.checked" class="h-4 w-4" />
190+
</CheckboxIndicator>
191+
</CheckboxRoot>
192+
<span class="flex items-center gap-2 text-sm">
193+
<img
194+
:src="account.icon"
195+
alt=""
196+
class="inline-block h-[20px] w-[20px]"
197+
>
198+
{{ account.title }} - {{ account.displayName ?? account.home }}
199+
</span>
200+
</label>
201+
</div>
196202
</div>
197203
</div>
198-
</div>
199-
200-
<DialogFooter>
201-
<Button variant="outline" @click="dialogVisible = false">
202-
取 消
203-
</Button>
204-
<Button :disabled="!allowPost" @click="post">
205-
确 定
206-
</Button>
207-
</DialogFooter>
208-
</DialogContent>
209-
</Dialog>
210204

211-
<PostTaskDialog v-model:open="postTaskDialogVisible" :post="form" />
205+
<DialogFooter>
206+
<Button variant="outline" @click="dialogVisible = false">
207+
取 消
208+
</Button>
209+
<Button :disabled="!allowPost" @click="post">
210+
确 定
211+
</Button>
212+
</DialogFooter>
213+
</DialogContent>
214+
</Dialog>
215+
216+
<PostTaskDialog v-model:open="postTaskDialogVisible" :post="form" />
217+
</div>
212218
</template>

apps/web/src/components/ui/progress/Progress.vue

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
<script setup lang="ts">
22
import type { ProgressRootProps } from 'radix-vue'
3-
import { ProgressIndicator, ProgressRoot, useForwardPropsEmits } from 'radix-vue'
3+
import { ProgressIndicator, ProgressRoot } from 'radix-vue'
44
55
const props = defineProps<ProgressRootProps>()
6-
const emits = defineEmits<{
7-
(e: `update:modelValue`, payload: string | number): void
8-
}>()
96
10-
const modelValue = useVModel(props, `modelValue`, emits, {
11-
passive: true,
12-
defaultValue: 0,
13-
})
14-
const forwarded = useForwardPropsEmits(props, emits)
7+
const modelValue = computed(() => props.modelValue ?? 0)
158
</script>
169

1710
<template>
1811
<ProgressRoot
19-
v-bind="forwarded"
20-
v-model="modelValue"
12+
v-bind="props"
13+
:model-value="modelValue"
2114
class="relative overflow-hidden bg-blackA9 rounded-full w-full h-4 sm:h-5"
2215
style="transform: translateZ(0)"
2316
>

pnpm-lock.yaml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)