Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
inscode
NodeJS_639770
提交
59b14e7f
N
NodeJS_639770
项目概览
inscode
/
NodeJS_639770
与 Fork 源项目一致
Fork自
inscode / NodeJS
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
NodeJS_639770
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
59b14e7f
编写于
6月 11, 2024
作者:
D
DebugIsFalse
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'main' of gitcode.com:git_bot/ai-fe
上级
1ac1b535
9f93f9e3
变更
48
显示空白变更内容
内联
并排
Showing
48 changed file
with
1168 addition
and
1159 deletion
+1168
-1159
app.vue
app.vue
+7
-7
components/color-picker/ColorPicker.vue
components/color-picker/ColorPicker.vue
+28
-26
components/color-picker/ColorPickerPill.vue
components/color-picker/ColorPickerPill.vue
+11
-11
components/i/Aside.vue
components/i/Aside.vue
+32
-31
components/i/Collapse.vue
components/i/Collapse.vue
+10
-8
components/i/Confirm.vue
components/i/Confirm.vue
+17
-17
components/i/Create.vue
components/i/Create.vue
+74
-73
components/i/Empty.vue
components/i/Empty.vue
+4
-4
components/i/Exception.vue
components/i/Exception.vue
+10
-10
components/i/Logo.vue
components/i/Logo.vue
+3
-3
components/i/MenuSider.vue
components/i/MenuSider.vue
+23
-23
components/i/Nav.vue
components/i/Nav.vue
+31
-31
components/i/SearchHistory.vue
components/i/SearchHistory.vue
+36
-35
components/i/Sign.vue
components/i/Sign.vue
+51
-51
components/i/UserInfo.vue
components/i/UserInfo.vue
+59
-59
components/i/action/Collect.vue
components/i/action/Collect.vue
+9
-9
components/i/action/Thread.vue
components/i/action/Thread.vue
+9
-9
components/i/library/Collect.vue
components/i/library/Collect.vue
+13
-13
components/i/library/Create.vue
components/i/library/Create.vue
+64
-64
components/i/library/Edit.vue
components/i/library/Edit.vue
+1
-1
components/i/library/Header.vue
components/i/library/Header.vue
+58
-58
components/i/library/Select.vue
components/i/library/Select.vue
+49
-48
components/i/library/Thread.vue
components/i/library/Thread.vue
+56
-55
components/i/md/mdc.vue
components/i/md/mdc.vue
+4
-3
components/i/search/Article.vue
components/i/search/Article.vue
+11
-14
components/i/search/Ask.vue
components/i/search/Ask.vue
+43
-43
components/i/search/Content.vue
components/i/search/Content.vue
+22
-20
components/i/search/ExtraInfo.vue
components/i/search/ExtraInfo.vue
+52
-50
components/i/search/Header.vue
components/i/search/Header.vue
+87
-86
components/i/search/Process.vue
components/i/search/Process.vue
+31
-31
components/i/search/ProcessAction.vue
components/i/search/ProcessAction.vue
+16
-16
components/i/search/RecommendQuestion.vue
components/i/search/RecommendQuestion.vue
+12
-12
components/i/search/Source.vue
components/i/search/Source.vue
+36
-36
components/i/search/Title.vue
components/i/search/Title.vue
+1
-1
components/md/renderer.vue
components/md/renderer.vue
+3
-3
components/prose/Chart.global.vue
components/prose/Chart.global.vue
+3
-3
components/prose/GridTable.global.vue
components/prose/GridTable.global.vue
+13
-13
components/prose/ProseA.global.vue
components/prose/ProseA.global.vue
+6
-6
components/prose/ProsePre.global.vue
components/prose/ProsePre.global.vue
+12
-12
eslint.config.mjs
eslint.config.mjs
+1
-1
layouts/default.vue
layouts/default.vue
+10
-10
layouts/empty.vue
layouts/empty.vue
+1
-1
package-lock.json
package-lock.json
+0
-4
pages/index.vue
pages/index.vue
+20
-20
pages/library/[id].vue
pages/library/[id].vue
+24
-24
pages/library/index.vue
pages/library/index.vue
+38
-38
pages/mdc.vue
pages/mdc.vue
+5
-5
pages/search/[id].vue
pages/search/[id].vue
+62
-61
未找到文件。
app.vue
浏览文件 @
59b14e7f
<
template
>
<
template
>
<NuxtPwaManifest
/>
<NuxtPwaManifest
/>
<NuxtLoadingIndicator
/>
<NuxtLoadingIndicator
/>
<NuxtLayout>
<NuxtLayout>
<NuxtPage
/>
<NuxtPage
/>
</NuxtLayout>
</NuxtLayout>
<UNotifications
/>
<UNotifications
/>
<UModals
/>
<UModals
/>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
const
{
$updateUserInfo
}
=
useUserStore
()
const
{
$updateUserInfo
}
=
useUserStore
()
...
...
components/color-picker/ColorPicker.vue
浏览文件 @
59b14e7f
...
@@ -15,13 +15,15 @@
...
@@ -15,13 +15,15 @@
<
template
#panel
>
<
template
#panel
>
<div
class=
"flex flex-col p-2 gap-2"
>
<div
class=
"flex flex-col p-2 gap-2"
>
<div
class=
"grid grid-cols-5 gap-px"
>
<div
class=
"grid grid-cols-5 gap-px"
>
<ColorPickerPill
v-for=
"color in primaryColors"
:key=
"color.value"
:color=
"color"
:selected=
"primary"
@
select=
"primary = color"
/>
<ColorPickerPill
v-for=
"color in primaryColors"
:key=
"color.value"
:color=
"color"
:selected=
"primary"
@
select=
"primary = color"
/>
</div>
</div>
<UDivider
/>
<UDivider
/>
<div
class=
"grid grid-cols-5 gap-px"
>
<div
class=
"grid grid-cols-5 gap-px"
>
<ColorPickerPill
v-for=
"color in grayColors"
:key=
"color.value"
:color=
"color"
:selected=
"gray"
@
select=
"gray = color"
/>
<ColorPickerPill
v-for=
"color in grayColors"
:key=
"color.value"
:color=
"color"
:selected=
"gray"
@
select=
"gray = color"
/>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
...
components/color-picker/ColorPickerPill.vue
浏览文件 @
59b14e7f
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
:variant="color.value === selected.value ? 'solid' : 'ghost'"
:variant="color.value === selected.value ? 'solid' : 'ghost'"
@click.stop.prevent="$emit('select')"
@click.stop.prevent="$emit('select')"
>
>
<span
class=
"inline-block w-3 h-3 rounded-full"
:style=
"
{ backgroundColor: color.hex }"
/>
<span
class=
"inline-block w-3 h-3 rounded-full"
:style=
"
{ backgroundColor: color.hex }"
/>
</UButton>
</UButton>
</UTooltip>
</UTooltip>
</
template
>
</
template
>
...
...
components/i/Aside.vue
浏览文件 @
59b14e7f
<
template
>
<
template
>
<div
class=
"flex-grow overflow-hidden bg-gray-100 dark:bg-gray-900 border-r border-gray-200 dark:border-gray-800"
>
<div
class=
"flex-grow overflow-hidden bg-gray-100 dark:bg-gray-900 border-r border-gray-200 dark:border-gray-800"
>
<div
class=
"p-4 h-full flex flex-col"
>
<div
class=
"p-4 h-full flex flex-col"
>
<ILogo
class=
"mt-2"
/>
<ILogo
class=
"mt-2"
/>
<UButton
<UButton
:ui=
"
{ rounded: 'rounded-full' }"
:ui=
"
{ rounded: 'rounded-full' }"
class="flex w-full mt-6"
class="flex w-full mt-6"
...
@@ -19,16 +19,17 @@
...
@@ -19,16 +19,17 @@
</div>
</div>
</UButton>
</UButton>
<div
class=
"flex flex-grow overflow-hidden mt-4"
>
<div
class=
"flex flex-grow overflow-hidden mt-4"
>
<INav
/>
<INav
/>
</div>
</div>
</div>
</div>
</div>
</div>
<UDivider
/>
<UDivider/>
<div
class=
"bg-gray-100 dark:bg-gray-900 border-r border-gray-200 dark:border-gray-800 flex flex-col items-center justify-center"
>
<div
<IUserInfo
/>
class=
"bg-gray-100 dark:bg-gray-900 border-r border-gray-200 dark:border-gray-800 flex flex-col items-center justify-center"
>
<IUserInfo/>
</div>
</div>
<UModal
v-model=
"isOpenCreate"
:ui=
"
{ width: 'w-full sm:max-w-screen-md' }">
<UModal
v-model=
"isOpenCreate"
:ui=
"
{ width: 'w-full sm:max-w-screen-md' }">
<ICreate
@
search=
"handleCloseCreate"
/>
<ICreate
@
search=
"handleCloseCreate"
/>
</UModal>
</UModal>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
...
...
components/i/Collapse.vue
浏览文件 @
59b14e7f
...
@@ -5,7 +5,9 @@
...
@@ -5,7 +5,9 @@
@
before-leave=
"onBeforeLeave"
@
before-leave=
"onBeforeLeave"
@
leave=
"onLeave"
@
leave=
"onLeave"
>
>
<div
v-show=
"open"
class=
"flex transition-[height] overflow-hidden"
><slot
/></div>
<div
v-show=
"open"
class=
"flex transition-[height] overflow-hidden"
>
<slot/>
</div>
</Transition>
</Transition>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
...
...
components/i/Confirm.vue
浏览文件 @
59b14e7f
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<div
class=
"flex p-6 gap-4"
>
<div
class=
"flex p-6 gap-4"
>
<div
class=
"flex"
>
<div
class=
"flex"
>
<div
class=
"mx-auto flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-red-100"
>
<div
class=
"mx-auto flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-red-100"
>
<UIcon
name=
"i-heroicons-exclamation-triangle"
class=
"w-6 h-6 text-red-600"
/>
<UIcon
name=
"i-heroicons-exclamation-triangle"
class=
"w-6 h-6 text-red-600"
/>
</div>
</div>
</div>
</div>
<div
class=
"flex-grow flex flex-col"
>
<div
class=
"flex-grow flex flex-col"
>
...
...
components/i/Create.vue
浏览文件 @
59b14e7f
...
@@ -17,7 +17,8 @@
...
@@ -17,7 +17,8 @@
<div
class=
"flex justify-between items-center"
>
<div
class=
"flex justify-between items-center"
>
<div
class=
"flex items-center gap-2"
>
<div
class=
"flex items-center gap-2"
>
<UTooltip
class=
"relative"
:text=
"isPro ? '已开启专家搜索' : '已关闭专家搜索'"
:shortcuts=
"[metaSymbol, 'O']"
>
<UTooltip
class=
"relative"
:text=
"isPro ? '已开启专家搜索' : '已关闭专家搜索'"
:shortcuts=
"[metaSymbol, 'O']"
>
<div
v-show=
"!isPro"
class=
"absolute w-7 h-0.5 rotate-45 top-3.5 left-1 bg-gray-700 dark:bg-gray-200 hover:bg-gray-900 dark:hover:bg-white rounded"
/>
<div
v-show=
"!isPro"
class=
"absolute w-7 h-0.5 rotate-45 top-3.5 left-1 bg-gray-700 dark:bg-gray-200 hover:bg-gray-900 dark:hover:bg-white rounded"
/>
<UButton
<UButton
:ui=
"
{ rounded: 'rounded-full' }"
:ui=
"
{ rounded: 'rounded-full' }"
:icon="isPro ? 'i-heroicons-sparkles-20-solid' : 'i-heroicons-sparkles-20-solid'"
:icon="isPro ? 'i-heroicons-sparkles-20-solid' : 'i-heroicons-sparkles-20-solid'"
...
@@ -45,9 +46,9 @@
...
@@ -45,9 +46,9 @@
</UTooltip>
</UTooltip>
<UButton
v-else
color=
"gray"
variant=
"ghost"
:class=
"
{ 'group': selectedRepo }">
<UButton
v-else
color=
"gray"
variant=
"ghost"
:class=
"
{ 'group': selectedRepo }">
<UIcon
name=
"i-simple-icons-github"
/>
<UIcon
name=
"i-simple-icons-github"
/>
<span>
{{
selectedRepo
}}
</span>
<span>
{{
selectedRepo
}}
</span>
<UIcon
name=
"i-heroicons-chevron-down-20-solid"
class=
"text-xl flex group-hover:hidden"
/>
<UIcon
name=
"i-heroicons-chevron-down-20-solid"
class=
"text-xl flex group-hover:hidden"
/>
<UButton
<UButton
v-if=
"selectedRepo"
v-if=
"selectedRepo"
class=
"hidden group-hover:flex"
class=
"hidden group-hover:flex"
...
...
components/i/Empty.vue
浏览文件 @
59b14e7f
<
template
>
<
template
>
<div
class=
"flex flex-col justify-center h-72 items-center text-gray-300"
:class=
"
{ 'h-36': size === 'xs' }">
<div
class=
"flex flex-col justify-center h-72 items-center text-gray-300"
:class=
"
{ 'h-36': size === 'xs' }">
<UIcon
name=
"i-heroicons-inbox"
class=
"text-6xl"
/>
<UIcon
name=
"i-heroicons-inbox"
class=
"text-6xl"
/>
<div>
暂无数据
</div>
<div>
暂无数据
</div>
</div>
</div>
</
template
>
</
template
>
...
...
components/i/Exception.vue
浏览文件 @
59b14e7f
components/i/Logo.vue
浏览文件 @
59b14e7f
components/i/MenuSider.vue
浏览文件 @
59b14e7f
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
trailing-icon=
"i-heroicons-x-mark-20-solid"
trailing-icon=
"i-heroicons-x-mark-20-solid"
@
click=
"handleToggleAside"
@
click=
"handleToggleAside"
/>
/>
<IAside
/>
<IAside
/>
</USlideover>
</USlideover>
</div>
</div>
</
template
>
</
template
>
...
...
components/i/Nav.vue
浏览文件 @
59b14e7f
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
label=
"主题"
label=
"主题"
to=
"/library"
to=
"/library"
/>
/>
<ISearchHistory
@
sign=
"$openSign"
/>
<ISearchHistory
@
sign=
"$openSign"
/>
<ClientOnly>
<ClientOnly>
<UButton
<UButton
v-if=
"!$isSignIn"
v-if=
"!$isSignIn"
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
</ClientOnly>
</ClientOnly>
</div>
</div>
<UModal
v-model=
"$isOpenSign"
>
<UModal
v-model=
"$isOpenSign"
>
<ISign
@
close=
"$closeSign"
/>
<ISign
@
close=
"$closeSign"
/>
</UModal>
</UModal>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
...
...
components/i/SearchHistory.vue
浏览文件 @
59b14e7f
...
@@ -18,7 +18,8 @@
...
@@ -18,7 +18,8 @@
/>
/>
</div>
</div>
<ClientOnly>
<ClientOnly>
<div
v-auto-animate
class=
"flex overflow-y-auto flex-col gap-1 border-l border-gray-200 dark:border-gray-800 pl-2 ml-5"
>
<div
v-auto-animate
class=
"flex overflow-y-auto flex-col gap-1 border-l border-gray-200 dark:border-gray-800 pl-2 ml-5"
>
<template
v-for=
"item in $searchHistory.reverse()"
:key=
"item.c_id"
>
<template
v-for=
"item in $searchHistory.reverse()"
:key=
"item.c_id"
>
<UButton
<UButton
class=
"flex text-gray-400"
class=
"flex text-gray-400"
...
...
components/i/Sign.vue
浏览文件 @
59b14e7f
<
template
>
<
template
>
<div
class=
"flex flex-col items-start gap-4 p-4"
>
<div
class=
"flex flex-col items-start gap-4 p-4"
>
<div
class=
"flex w-full justify-between"
>
<div
class=
"flex w-full justify-between"
>
<ILogo
/>
<ILogo
/>
<UButton
<UButton
color=
"gray"
color=
"gray"
variant=
"ghost"
variant=
"ghost"
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
size=
"md"
size=
"md"
@
click=
"handleGetSignUrl('gitcode')"
@
click=
"handleGetSignUrl('gitcode')"
>
>
<img
src=
"~/assets/svg/logo-gitcode.svg"
>
<img
src=
"~/assets/svg/logo-gitcode.svg"
>
使用 GitCode 登录
使用 GitCode 登录
</UButton>
</UButton>
<UButton
<UButton
...
...
components/i/UserInfo.vue
浏览文件 @
59b14e7f
...
@@ -6,16 +6,16 @@
...
@@ -6,16 +6,16 @@
<UDropdown
class=
"flex flex-grow"
:items=
"items"
>
<UDropdown
class=
"flex flex-grow"
:items=
"items"
>
<UButton
class=
"flex flex-grow"
color=
"gray"
variant=
"ghost"
>
<UButton
class=
"flex flex-grow"
color=
"gray"
variant=
"ghost"
>
<div
class=
"flex flex-grow items-center gap-2"
>
<div
class=
"flex flex-grow items-center gap-2"
>
<UAvatar
:src=
"$info.avatar_url"
/>
<UAvatar
:src=
"$info.avatar_url"
/>
<div>
{{
$info
.
nickname
}}
</div>
<div>
{{
$info
.
nickname
}}
</div>
<UBadge
v-if=
"$info.pro"
size=
"xs"
color=
"yellow"
variant=
"soft"
label=
"PRO"
/>
<UBadge
v-if=
"$info.pro"
size=
"xs"
color=
"yellow"
variant=
"soft"
label=
"PRO"
/>
<UBadge
v-else
size=
"xs"
color=
"gray"
variant=
"soft"
label=
"FREE"
/>
<UBadge
v-else
size=
"xs"
color=
"gray"
variant=
"soft"
label=
"FREE"
/>
</div>
</div>
<UIcon
name=
"i-heroicons-chevron-down-20-solid"
class=
"text-lg"
/>
<UIcon
name=
"i-heroicons-chevron-down-20-solid"
class=
"text-lg"
/>
</UButton>
</UButton>
</UDropdown>
</UDropdown>
</div>
</div>
<UDivider
/>
<UDivider
/>
</
template
>
</
template
>
</ClientOnly>
</ClientOnly>
<div
class=
"flex justify-between gap-2 p-4"
>
<div
class=
"flex justify-between gap-2 p-4"
>
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
/>
/>
<ClientOnly>
<ClientOnly>
<div
class=
"flex"
>
<div
class=
"flex"
>
<ColorPicker
/>
<ColorPicker
/>
<USelectMenu
<USelectMenu
v-model=
"colorMode.preference"
v-model=
"colorMode.preference"
:ui-menu=
"{ width: 'w-32' }"
:ui-menu=
"{ width: 'w-32' }"
...
...
components/i/action/Collect.vue
浏览文件 @
59b14e7f
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
icon=
"i-heroicons-ellipsis-horizontal"
icon=
"i-heroicons-ellipsis-horizontal"
/>
/>
</UDropdown>
</UDropdown>
<ILibraryEdit
:id=
"id"
ref=
"refEdit"
/>
<ILibraryEdit
:id=
"id"
ref=
"refEdit"
/>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
import
{
IConfirm
}
from
'
#components
'
import
{
IConfirm
}
from
'
#components
'
...
...
components/i/action/Thread.vue
浏览文件 @
59b14e7f
components/i/library/Collect.vue
浏览文件 @
59b14e7f
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<div>
{{
item
.
name
}}
</div>
<div>
{{
item
.
name
}}
</div>
<div
class=
"flex"
>
<div
class=
"flex"
>
<div
class=
"flex items-center text-gray-500 text-sm gap-0.5"
>
<div
class=
"flex items-center text-gray-500 text-sm gap-0.5"
>
<UIcon
name=
"i-heroicons-square-3-stack-3d"
/>
<UIcon
name=
"i-heroicons-square-3-stack-3d"
/>
<span>
{{
item
.
record_count
}}
</span>
<span>
{{
item
.
record_count
}}
</span>
</div>
</div>
</div>
</div>
...
...
components/i/library/Create.vue
浏览文件 @
59b14e7f
components/i/library/Edit.vue
浏览文件 @
59b14e7f
<
template
>
<
template
>
<ILibraryCreate
:id=
"id"
ref=
"refCreate"
/>
<ILibraryCreate
:id=
"id"
ref=
"refCreate"
/>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
defineProps
({
defineProps
({
...
...
components/i/library/Header.vue
浏览文件 @
59b14e7f
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
<div
class=
"container max-w-screen-lg 2xl:max-w-screen-xl flex flex-col p-6"
>
<div
class=
"container max-w-screen-lg 2xl:max-w-screen-xl flex flex-col p-6"
>
<div
class=
"flex justify-between items-center gap-4"
>
<div
class=
"flex justify-between items-center gap-4"
>
<div
class=
"flex gap-4"
>
<div
class=
"flex gap-4"
>
<IMenuSider
/>
<IMenuSider
/>
<div
v-if=
"!collect"
class=
"flex flex-shrink-0 items-center text-xl gap-2"
>
<div
v-if=
"!collect"
class=
"flex flex-shrink-0 items-center text-xl gap-2"
>
<UIcon
name=
"i-heroicons-rectangle-stack-20-solid"
/>
<UIcon
name=
"i-heroicons-rectangle-stack-20-solid"
/>
<div>
主题
</div>
<div>
主题
</div>
</div>
</div>
<template
v-else
>
<template
v-else
>
...
@@ -16,15 +16,15 @@
...
@@ -16,15 +16,15 @@
to=
"/library"
to=
"/library"
/>
/>
<div
class=
"flex items-center text-xl gap-2"
>
<div
class=
"flex items-center text-xl gap-2"
>
<UIcon
name=
"i-heroicons-squares-2x2"
/>
<UIcon
name=
"i-heroicons-squares-2x2"
/>
<div>
{{
collect
}}
</div>
<div>
{{
collect
}}
</div>
<UBadge
color=
"gray"
variant=
"soft"
:label=
"count"
/>
<UBadge
color=
"gray"
variant=
"soft"
:label=
"count"
/>
</div>
</div>
</
template
>
</
template
>
</div>
</div>
<div
class=
"flex flex-grow justify-end items-center gap-4"
>
<div
class=
"flex flex-grow justify-end items-center gap-4"
>
<div
class=
"flex"
>
<div
class=
"flex"
>
<IActionCollect
v-if=
"collect"
:id=
"collectId"
/>
<IActionCollect
v-if=
"collect"
:id=
"collectId"
/>
</div>
</div>
<div
v-if=
"!collect"
class=
"flex"
>
<div
v-if=
"!collect"
class=
"flex"
>
<UInput
<UInput
...
@@ -52,9 +52,9 @@
...
@@ -52,9 +52,9 @@
</div>
</div>
<div
v-if=
"description"
class=
"text-gray-500 ml-12 mt-2"
>
{{ description }}
</div>
<div
v-if=
"description"
class=
"text-gray-500 ml-12 mt-2"
>
{{ description }}
</div>
</div>
</div>
<UDivider
/>
<UDivider
/>
<div
v-if=
"showTabs"
class=
"w-full p-6 block lg:hidden"
>
<div
v-if=
"showTabs"
class=
"w-full p-6 block lg:hidden"
>
<UTabs
:model-value=
"tab"
:items=
"tabs"
@
update:model-value=
"handleChangeTab"
/>
<UTabs
:model-value=
"tab"
:items=
"tabs"
@
update:model-value=
"handleChangeTab"
/>
</div>
</div>
</div>
</div>
</template>
</template>
...
...
components/i/library/Select.vue
浏览文件 @
59b14e7f
...
@@ -30,7 +30,8 @@
...
@@ -30,7 +30,8 @@
>
>
<div
class=
"flex flex-grow justify-between items-center"
>
<div
class=
"flex flex-grow justify-between items-center"
>
<div>
{{ item.name }}
</div>
<div>
{{ item.name }}
</div>
<UIcon
v-if=
"selected.includes(item.id)"
name=
"i-heroicons-check-circle-20-solid"
class=
"text-primary text-lg"
/>
<UIcon
v-if=
"selected.includes(item.id)"
name=
"i-heroicons-check-circle-20-solid"
class=
"text-primary text-lg"
/>
</div>
</div>
</UButton>
</UButton>
</div>
</div>
...
...
components/i/library/Thread.vue
浏览文件 @
59b14e7f
...
@@ -7,8 +7,9 @@
...
@@ -7,8 +7,9 @@
</ULink>
</ULink>
<div
class=
"flex justify-between items-center"
>
<div
class=
"flex justify-between items-center"
>
<div
class=
"flex gap-4"
>
<div
class=
"flex gap-4"
>
<UTooltip
class=
"flex items-center text-sm gap-0.5"
:class=
"textColor"
:text=
"thread.is_public ? '公开主题,链接可被发现' : '私密主题,仅自己可见'"
>
<UTooltip
class=
"flex items-center text-sm gap-0.5"
:class=
"textColor"
<UIcon
:name=
"thread.is_public ? 'i-heroicons-lock-open' : 'i-heroicons-lock-closed'"
/>
:text=
"thread.is_public ? '公开主题,链接可被发现' : '私密主题,仅自己可见'"
>
<UIcon
:name=
"thread.is_public ? 'i-heroicons-lock-open' : 'i-heroicons-lock-closed'"
/>
<span>
{{
thread
.
is_public
?
'
公开
'
:
'
私有
'
}}
</span>
<span>
{{
thread
.
is_public
?
'
公开
'
:
'
私有
'
}}
</span>
</UTooltip>
</UTooltip>
<!--
<div
class=
"flex items-center text-sm gap-0.5"
:class=
"textColor"
>
-->
<!--
<div
class=
"flex items-center text-sm gap-0.5"
:class=
"textColor"
>
-->
...
@@ -17,7 +18,7 @@
...
@@ -17,7 +18,7 @@
<!--
</div>
-->
<!--
</div>
-->
<div
class=
"flex"
:class=
"textColor"
>
<div
class=
"flex"
:class=
"textColor"
>
<UTooltip
class=
"flex items-center text-sm gap-0.5"
>
<UTooltip
class=
"flex items-center text-sm gap-0.5"
>
<UIcon
name=
"i-heroicons-clock"
/>
<UIcon
name=
"i-heroicons-clock"
/>
<span>
{{
useTime
(
thread
.
create_time
)
}}
</span>
<span>
{{
useTime
(
thread
.
create_time
)
}}
</span>
<template
#text
>
<template
#text
>
{{
toValue
(
useDateFormat
(
thread
.
create_time
,
'
YYYY年M月D日 HH:mm
'
))
}}
{{
toValue
(
useDateFormat
(
thread
.
create_time
,
'
YYYY年M月D日 HH:mm
'
))
}}
...
@@ -53,7 +54,7 @@
...
@@ -53,7 +54,7 @@
/>
/>
</div>
</div>
</div>
</div>
<UDivider
/>
<UDivider
/>
</template>
</template>
<
script
setup
>
<
script
setup
>
const
Layout
=
inject
(
'
Layout
'
)
const
Layout
=
inject
(
'
Layout
'
)
...
...
components/i/md/mdc.vue
浏览文件 @
59b14e7f
<
template
>
<
template
>
<div
class=
"grid grid-cols-1"
>
<div
class=
"grid grid-cols-1"
>
<MDC
v-if=
"content"
class=
"prose dark:prose-invert max-w-none"
:class=
"'prose-' + size"
:value=
"content"
tag=
"article"
/>
<MDC
v-if=
"content"
class=
"prose dark:prose-invert max-w-none"
:class=
"'prose-' + size"
:value=
"content"
tag=
"article"
/>
</div>
</div>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
...
...
components/i/search/Article.vue
浏览文件 @
59b14e7f
...
@@ -2,15 +2,12 @@
...
@@ -2,15 +2,12 @@
<div
class=
"flex flex-col lg:flex-row gap-6 space-x-0 lg:space-x-6"
>
<div
class=
"flex flex-col lg:flex-row gap-6 space-x-0 lg:space-x-6"
>
<div
class=
"flex flex-grow flex-col gap-6"
>
<div
class=
"flex flex-grow flex-col gap-6"
>
<div
class=
"grid"
>
<div
class=
"grid"
>
<slot
name=
"title"
/>
<slot
name=
"title"
/>
</div>
</div>
<slot
/>
<slot
/>
</div>
</div>
<div
v-if=
"$slots.extra"
class=
"flex flex-col w-full lg:w-64 flex-shrink-0 gap-6"
>
<div
v-if=
"$slots.extra"
class=
"flex flex-col w-full lg:w-64 flex-shrink-0 gap-6"
>
<slot
name=
"extra"
/>
<slot
name=
"extra"
/>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
setup
>
</
script
>
\ No newline at end of file
components/i/search/Ask.vue
浏览文件 @
59b14e7f
components/i/search/Content.vue
浏览文件 @
59b14e7f
<
template
>
<
template
>
<ISearchProcess
:collapse=
"collapse"
:actions=
"actions"
:status=
"processStatus"
/>
<ISearchProcess
:collapse=
"collapse"
:actions=
"actions"
:status=
"processStatus"
/>
<template
v-if=
"item.source && item.source.length > 0"
>
<template
v-if=
"item.source && item.source.length > 0"
>
<div
class=
"text-xl flex items-center space-x-1"
>
<div
class=
"text-xl flex items-center space-x-1"
>
<UIcon
name=
"i-heroicons-link-20-solid"
/>
<UIcon
name=
"i-heroicons-link-20-solid"
/>
<span>
来源
</span>
<span>
来源
</span>
</div>
</div>
<div
class=
"grid grid-cols-1 lg:grid-cols-3 gap-4"
>
<div
class=
"grid grid-cols-1 lg:grid-cols-3 gap-4"
>
<ISearchSource
:source=
"item.source"
/>
<ISearchSource
:source=
"item.source"
/>
</div>
</div>
</
template
>
</
template
>
<div
v-if=
"processStatus ==='finish'"
class=
"text-xl flex items-center space-x-1"
>
<div
v-if=
"processStatus ==='finish'"
class=
"text-xl flex items-center space-x-1"
>
<UIcon
name=
"i-heroicons-chat-bubble-left-right-20-solid"
/>
<UIcon
name=
"i-heroicons-chat-bubble-left-right-20-solid"
/>
<span>
{{ item.ansLoading ? '回答中' : '回答' }}
</span>
<span>
{{ item.ansLoading ? '回答中' : '回答' }}
</span>
</div>
</div>
<IMdMdc
:content=
"item.article"
/>
<IMdMdc
:content=
"item.article"
/>
<div
v-if=
"item.showActions"
class=
"space-x-2"
>
<div
v-if=
"item.showActions"
class=
"space-x-2"
>
<UButton
size=
"xs"
color=
"gray"
leading-icon=
"i-heroicons-document-duplicate-20-solid"
label=
"复制"
@
click=
"handleCopyMD"
/>
<UButton
size=
"xs"
color=
"gray"
leading-icon=
"i-heroicons-document-duplicate-20-solid"
label=
"复制"
<UButton
size=
"xs"
color=
"gray"
leading-icon=
"i-heroicons-share-20-solid"
label=
"分享"
@
click=
"handleShare"
/>
@
click=
"handleCopyMD"
/>
<UButton
v-if=
"isLastIndex"
size=
"xs"
color=
"gray"
leading-icon=
"i-heroicons-arrow-path-rounded-square-20-solid"
label=
"重写"
@
click=
"handleReGenerate"
/>
<UButton
size=
"xs"
color=
"gray"
leading-icon=
"i-heroicons-share-20-solid"
label=
"分享"
@
click=
"handleShare"
/>
<UButton
v-if=
"isLastIndex"
size=
"xs"
color=
"gray"
leading-icon=
"i-heroicons-arrow-path-rounded-square-20-solid"
label=
"重写"
@
click=
"handleReGenerate"
/>
</div>
</div>
</template>
</template>
<
script
setup
>
<
script
setup
>
...
...
components/i/search/ExtraInfo.vue
浏览文件 @
59b14e7f
<
template
>
<
template
>
<div
class=
"flex flex-col gap-4 sticky top-16"
>
<div
class=
"flex flex-col gap-4 sticky top-16"
>
<div
class=
"text-xl flex items-center space-x-1"
>
<div
class=
"text-xl flex items-center space-x-1"
>
<UIcon
name=
"i-heroicons-square-3-stack-3d-20-solid"
/>
<UIcon
name=
"i-heroicons-square-3-stack-3d-20-solid"
/>
<span>
补充信息
</span>
<span>
补充信息
</span>
</div>
</div>
<template
v-for=
"(item, index) in data"
:key=
"index"
>
<template
v-for=
"(item, index) in data"
:key=
"index"
>
...
@@ -13,9 +13,11 @@
...
@@ -13,9 +13,11 @@
<template
v-if=
"chart.info"
>
<template
v-if=
"chart.info"
>
<div
class=
"flex mb-2"
>
<div
class=
"flex mb-2"
>
<div
class=
"flex items-center gap-1 text-sm overflow-hidden"
>
<div
class=
"flex items-center gap-1 text-sm overflow-hidden"
>
<UIcon
class=
"flex-shrink-0"
name=
"i-simple-icons-github"
/>
<UIcon
class=
"flex-shrink-0"
name=
"i-simple-icons-github"
/>
<ULink
class=
"flex-grow truncate underline"
:to=
"chart.info.url"
target=
"_blank"
:title=
"chart.info.description"
>
{{
chart
.
info
.
name
}}
</ULink>
<ULink
class=
"flex-grow truncate underline"
:to=
"chart.info.url"
target=
"_blank"
<UIcon
class=
"flex-shrink-0"
name=
"i-heroicons-arrow-top-right-on-square"
/>
:title=
"chart.info.description"
>
{{
chart
.
info
.
name
}}
</ULink>
<UIcon
class=
"flex-shrink-0"
name=
"i-heroicons-arrow-top-right-on-square"
/>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -40,10 +42,10 @@
...
@@ -40,10 +42,10 @@
<
template
v-else
>
<
template
v-else
>
<UCard
:ui=
"cardUI"
>
<UCard
:ui=
"cardUI"
>
<div
class=
"flex flex-col gap-1"
>
<div
class=
"flex flex-col gap-1"
>
<USkeleton
class=
"h-4"
/>
<USkeleton
class=
"h-4"
/>
<USkeleton
class=
"h-4 w-2/3"
/>
<USkeleton
class=
"h-4 w-2/3"
/>
<USkeleton
class=
"h-4"
/>
<USkeleton
class=
"h-4"
/>
<USkeleton
class=
"h-4 w-2/3"
/>
<USkeleton
class=
"h-4 w-2/3"
/>
</div>
</div>
</UCard>
</UCard>
</
template
>
</
template
>
...
...
components/i/search/Header.vue
浏览文件 @
59b14e7f
<
template
>
<
template
>
<header
class=
"sticky top-0 z-10 bg-white dark:bg-black w-full flex flex-col"
>
<header
class=
"sticky top-0 z-10 bg-white dark:bg-black w-full flex flex-col"
>
<div
class=
"w-full p-2 justify-between flex"
>
<div
class=
"w-full p-2 justify-between flex"
>
<IMenuSider
/>
<IMenuSider
/>
<div
class=
"hidden md:flex"
>
<div
class=
"hidden md:flex"
>
<div
v-if=
"repo"
class=
"flex items-center gap-2"
>
<div
v-if=
"repo"
class=
"flex items-center gap-2"
>
<UIcon
name=
"i-simple-icons-github"
/>
{{
repo
}}
<UIcon
name=
"i-simple-icons-github"
/>
{{
repo
}}
</div>
</div>
</div>
</div>
<div
class=
"flex-grow justify-center items-center space-x-2 hidden sm:flex"
>
<div
class=
"flex-grow justify-center items-center space-x-2 hidden sm:flex"
>
...
@@ -48,34 +49,34 @@
...
@@ -48,34 +49,34 @@
>
>
<div
class=
"flex-grow flex flex-col gap-1 text-sm"
>
<div
class=
"flex-grow flex flex-col gap-1 text-sm"
>
<div
class=
"flex items-center gap-1"
:class=
"
{ 'text-primary-500': !isOpen }">
<div
class=
"flex items-center gap-1"
:class=
"
{ 'text-primary-500': !isOpen }">
<UIcon
name=
"i-heroicons-lock-closed-16-solid"
/>
<UIcon
name=
"i-heroicons-lock-closed-16-solid"
/>
<span>
私密
</span>
<span>
私密
</span>
</div>
</div>
<div
class=
"text-xs text-gray-500"
>
只有作者可以查看
</div>
<div
class=
"text-xs text-gray-500"
>
只有作者可以查看
</div>
</div>
</div>
<div
v-if=
"!isOpen"
>
<div
v-if=
"!isOpen"
>
<UIcon
name=
"i-heroicons-check-circle-20-solid"
class=
"text-primary-500 text-xl"
/>
<UIcon
name=
"i-heroicons-check-circle-20-solid"
class=
"text-primary-500 text-xl"
/>
</div>
</div>
</div>
</div>
<UDivider
/>
<UDivider
/>
<div
<div
class=
"flex flex-grow justify-between m-1 p-1 cursor-pointer rounded hover:bg-gray-100 dark:hover:bg-gray-800"
class=
"flex flex-grow justify-between m-1 p-1 cursor-pointer rounded hover:bg-gray-100 dark:hover:bg-gray-800"
@
click=
"handleUpdateOpenState(true)"
@
click=
"handleUpdateOpenState(true)"
>
>
<div
class=
"flex-grow flex flex-col gap-1 text-sm"
:class=
"
{ 'text-primary-500': isOpen }">
<div
class=
"flex-grow flex flex-col gap-1 text-sm"
:class=
"
{ 'text-primary-500': isOpen }">
<div
class=
"flex items-center gap-1"
>
<div
class=
"flex items-center gap-1"
>
<UIcon
name=
"i-heroicons-share-20-solid"
/>
<UIcon
name=
"i-heroicons-share-20-solid"
/>
<span>
可分享的
</span>
<span>
可分享的
</span>
</div>
</div>
<div
class=
"text-xs text-gray-500"
>
任何持有链接的人都可以查看
</div>
<div
class=
"text-xs text-gray-500"
>
任何持有链接的人都可以查看
</div>
</div>
</div>
<div
v-if=
"isOpen"
>
<div
v-if=
"isOpen"
>
<UIcon
name=
"i-heroicons-check-circle-20-solid"
class=
"text-primary-500 text-xl"
/>
<UIcon
name=
"i-heroicons-check-circle-20-solid"
class=
"text-primary-500 text-xl"
/>
</div>
</div>
</div>
</div>
</div>
</div>
<div
v-if=
"isOpen"
class=
"flex gap-1 items-center text-xs text-primary-500"
>
<div
v-if=
"isOpen"
class=
"flex gap-1 items-center text-xs text-primary-500"
>
<UIcon
name=
"i-heroicons-clipboard-document-check"
/>
<UIcon
name=
"i-heroicons-clipboard-document-check"
/>
<span>
链接已复制
</span>
<span>
链接已复制
</span>
</div>
</div>
</div>
</div>
...
@@ -83,7 +84,7 @@
...
@@ -83,7 +84,7 @@
</UPopover>
</UPopover>
</div>
</div>
</div>
</div>
<UDivider
/>
<UDivider
/>
</header>
</header>
</template>
</template>
<
script
setup
>
<
script
setup
>
...
...
components/i/search/Process.vue
浏览文件 @
59b14e7f
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<UCard
:ui=
"
{ body: { padding: 'p-4 sm:p-4' } }">
<UCard
:ui=
"
{ body: { padding: 'p-4 sm:p-4' } }">
<div
class=
"flex justify-between items-center"
>
<div
class=
"flex justify-between items-center"
>
<div
class=
"flex items-center gap-2 text-lg"
>
<div
class=
"flex items-center gap-2 text-lg"
>
<UIcon
name=
"i-heroicons-sparkles-20-solid"
/>
<UIcon
name=
"i-heroicons-sparkles-20-solid"
/>
搜索过程
搜索过程
</div>
</div>
<UButton
<UButton
...
@@ -17,8 +17,8 @@
...
@@ -17,8 +17,8 @@
<ICollapse
:open=
"openCollapse"
class=
"mt-2"
>
<ICollapse
:open=
"openCollapse"
class=
"mt-2"
>
<div
v-auto-animate
class=
"flex flex-col gap-2 w-full text-gray-500 dark:text-gray-400"
>
<div
v-auto-animate
class=
"flex flex-col gap-2 w-full text-gray-500 dark:text-gray-400"
>
<template
v-if=
"status !== 'finish' && !actions.length"
>
<template
v-if=
"status !== 'finish' && !actions.length"
>
<USkeleton
class=
"h-4"
/>
<USkeleton
class=
"h-4"
/>
<USkeleton
class=
"h-4 w-2/3"
/>
<USkeleton
class=
"h-4 w-2/3"
/>
</
template
>
</
template
>
<
template
v-for=
"(action, index) in actions"
:key=
"action.action"
>
<
template
v-for=
"(action, index) in actions"
:key=
"action.action"
>
<ISearchProcessAction
<ISearchProcessAction
...
...
components/i/search/ProcessAction.vue
浏览文件 @
59b14e7f
<
template
>
<
template
>
<div
class=
"text-base flex items-center gap-1"
>
<div
class=
"text-base flex items-center gap-1"
>
<UIcon
:name=
"item.icon"
/>
<UIcon
:name=
"item.icon"
/>
{{
item
.
name
}}
{{
item
.
name
}}
</div>
</div>
<template
v-if=
"['rephrase_question', 'tool_select'].includes((action.action))"
>
<template
v-if=
"['rephrase_question', 'tool_select'].includes((action.action))"
>
<div
class=
"pl-5"
>
<div
class=
"pl-5"
>
<IMdMdc
:content=
"action.output"
size=
"sm"
/>
<IMdMdc
:content=
"action.output"
size=
"sm"
/>
</div>
</div>
</
template
>
</
template
>
<
template
v-else-if=
"['search_file', 'search_web'].includes(action.action)"
>
<
template
v-else-if=
"['search_file', 'search_web'].includes(action.action)"
>
<div
class=
"text-xs pl-5"
>
找到
{{
action
.
output
.
length
}}
条来源
</div>
<div
class=
"text-xs pl-5"
>
找到
{{
action
.
output
.
length
}}
条来源
</div>
</
template
>
</
template
>
<
template
v-if=
"last && status !== 'finish'"
>
<
template
v-if=
"last && status !== 'finish'"
>
<USkeleton
class=
"h-4"
/>
<USkeleton
class=
"h-4"
/>
<USkeleton
class=
"h-4 w-2/3"
/>
<USkeleton
class=
"h-4 w-2/3"
/>
</
template
>
</
template
>
</template>
</template>
<
script
setup
>
<
script
setup
>
...
...
components/i/search/RecommendQuestion.vue
浏览文件 @
59b14e7f
<
template
>
<
template
>
<div
class=
"text-xl flex items-center space-x-1"
>
<div
class=
"text-xl flex items-center space-x-1"
>
<UIcon
name=
"i-heroicons-rectangle-group-20-solid"
/>
<UIcon
name=
"i-heroicons-rectangle-group-20-solid"
/>
<span>
相关问题
</span>
<span>
相关问题
</span>
</div>
</div>
<div
class=
"flex flex-col gap-2"
>
<div
class=
"flex flex-col gap-2"
>
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
>
>
<div
class=
"justify-between w-full flex items-center"
>
<div
class=
"justify-between w-full flex items-center"
>
<div
class=
"truncate"
>
{{
item
.
title
}}
</div>
<div
class=
"truncate"
>
{{
item
.
title
}}
</div>
<UIcon
name=
"i-heroicons-plus-20-solid"
class=
"text-base"
/>
<UIcon
name=
"i-heroicons-plus-20-solid"
class=
"text-base"
/>
</div>
</div>
</UButton>
</UButton>
</div>
</div>
...
...
components/i/search/Source.vue
浏览文件 @
59b14e7f
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<div
class=
"flex flex-col h-full gap-1"
>
<div
class=
"flex flex-col h-full gap-1"
>
<template
v-if=
"getIconPath(item.url) === 'github'"
>
<template
v-if=
"getIconPath(item.url) === 'github'"
>
<div
class=
"items-center flex gap-1"
>
<div
class=
"items-center flex gap-1"
>
<UIcon
name=
"i-simple-icons-github"
class=
"flex-shrink-0"
/>
<UIcon
name=
"i-simple-icons-github"
class=
"flex-shrink-0"
/>
<div
class=
"flex flex-grow overflow-hidden"
>
<div
class=
"flex flex-grow overflow-hidden"
>
<div
class=
"truncate"
>
{{
item
.
title
}}
</div>
<div
class=
"truncate"
>
{{
item
.
title
}}
</div>
</div>
</div>
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<div
class=
"line-clamp-2 text-sm"
>
{{
item
.
title
}}
</div>
<div
class=
"line-clamp-2 text-sm"
>
{{
item
.
title
}}
</div>
</div>
</div>
<div
class=
"items-center flex gap-1"
>
<div
class=
"items-center flex gap-1"
>
<UAvatar
:src=
"getIconPath(item.url)"
size=
"2xs"
class=
"flex-shrink-0"
/>
<UAvatar
:src=
"getIconPath(item.url)"
size=
"2xs"
class=
"flex-shrink-0"
/>
<div
class=
"flex flex-grow overflow-hidden"
>
<div
class=
"flex flex-grow overflow-hidden"
>
<div
class=
"truncate text-xs text-gray-500"
>
{{
getDomain
(
item
.
url
)
}}
</div>
<div
class=
"truncate text-xs text-gray-500"
>
{{
getDomain
(
item
.
url
)
}}
</div>
</div>
</div>
...
@@ -29,8 +29,8 @@
...
@@ -29,8 +29,8 @@
</ULink>
</ULink>
<UCard
v-if=
"source.length > 6"
class=
"cursor-pointer"
:ui=
"cardUI"
@
click=
"handleToggleShowAll"
>
<UCard
v-if=
"source.length > 6"
class=
"cursor-pointer"
:ui=
"cardUI"
@
click=
"handleToggleShowAll"
>
<div
class=
"flex items-center justify-center h-full gap-1"
>
<div
class=
"flex items-center justify-center h-full gap-1"
>
<UIcon
v-if=
"!showAllSource"
name=
"i-heroicons-chevron-down-20-solid"
/>
<UIcon
v-if=
"!showAllSource"
name=
"i-heroicons-chevron-down-20-solid"
/>
<UIcon
v-else
name=
"i-heroicons-chevron-up-20-solid"
/>
<UIcon
v-else
name=
"i-heroicons-chevron-up-20-solid"
/>
<div
v-if=
"!showAllSource"
>
查看全部{{ source.length }}个来源
</div>
<div
v-if=
"!showAllSource"
>
查看全部{{ source.length }}个来源
</div>
<div
v-else
>
收起
</div>
<div
v-else
>
收起
</div>
</div>
</div>
...
...
components/i/search/Title.vue
浏览文件 @
59b14e7f
components/md/renderer.vue
浏览文件 @
59b14e7f
components/prose/Chart.global.vue
浏览文件 @
59b14e7f
components/prose/GridTable.global.vue
浏览文件 @
59b14e7f
components/prose/ProseA.global.vue
浏览文件 @
59b14e7f
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
:href=
"href"
:href=
"href"
:target=
"target"
:target=
"target"
>
>
<slot
/>
<slot
/>
</NuxtLink>
</NuxtLink>
</
template
>
</
template
>
...
...
components/prose/ProsePre.global.vue
浏览文件 @
59b14e7f
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
@
click=
"handleCopy"
@
click=
"handleCopy"
/>
/>
</pre>
</pre>
<UDivider
:ui=
"
{ border: { base: 'border-gray-700' } }"
/>
<UDivider
:ui=
"
{ border: { base: 'border-gray-700' } }"
/>
<pre
:class=
"$props.class"
class=
"m-0 rounded-none"
><code
v-html=
"codeBlock"
/></pre>
<pre
:class=
"$props.class"
class=
"m-0 rounded-none"
><code
v-html=
"codeBlock"
/></pre>
</UCard>
</UCard>
</
template
>
</
template
>
...
...
eslint.config.mjs
浏览文件 @
59b14e7f
...
@@ -6,8 +6,8 @@ export default withNuxt({
...
@@ -6,8 +6,8 @@ export default withNuxt({
rules
:
{
rules
:
{
'
semi
'
:
[
0
],
'
semi
'
:
[
0
],
'
vue/html-indent
'
:
[
'
off
'
],
'
indent
'
:
[
'
error
'
,
2
],
'
indent
'
:
[
'
error
'
,
2
],
'
vue/html-indent
'
:
[
'
off
'
,
2
,
{}],
'
no-empty
'
:
[
'
error
'
,
{
'
allowEmptyCatch
'
:
true
}],
'
no-empty
'
:
[
'
error
'
,
{
'
allowEmptyCatch
'
:
true
}],
'
vue/no-v-html
'
:
'
off
'
,
'
vue/no-v-html
'
:
'
off
'
,
'
no-useless-escape
'
:
'
error
'
,
'
no-useless-escape
'
:
'
error
'
,
...
...
layouts/default.vue
浏览文件 @
59b14e7f
<
template
>
<
template
>
<div
class=
"flex min-h-screen"
>
<div
class=
"flex min-h-screen"
>
<div
class=
"fixed top-0 w-64 hidden md:flex flex-col h-screen"
>
<div
class=
"fixed top-0 w-64 hidden md:flex flex-col h-screen"
>
<IAside
/>
<IAside
/>
</div>
</div>
<div
class=
"w-full ml-0 md:ml-64 bg-white dark:bg-black flex flex-grow"
>
<div
class=
"w-full ml-0 md:ml-64 bg-white dark:bg-black flex flex-grow"
>
<slot
/>
<slot
/>
</div>
</div>
</div>
</div>
<ILibraryCreate
/>
<ILibraryCreate
/>
<ILibrarySelect
@
success=
"handleCollectSuccess"
/>
<ILibrarySelect
@
success=
"handleCollectSuccess"
/>
</
template
>
</
template
>
<
script
setup
>
<
script
setup
>
const
selectCollectData
=
ref
(
null
)
const
selectCollectData
=
ref
(
null
)
...
...
layouts/empty.vue
浏览文件 @
59b14e7f
<
template
>
<
template
>
<slot
/>
<slot
/>
</
template
>
</
template
>
package-lock.json
浏览文件 @
59b14e7f
...
@@ -5012,8 +5012,6 @@
...
@@ -5012,8 +5012,6 @@
},
},
"node_modules/@parcel/watcher-wasm/node_modules/napi-wasm": {
"node_modules/@parcel/watcher-wasm/node_modules/napi-wasm": {
"version": "1.1.0",
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/napi-wasm/-/napi-wasm-1.1.0.tgz",
"integrity": "sha512-lHwIAJbmLSjF9VDRm9GoVOy9AGp3aIvkjv+Kvz9h16QR3uSVYH78PNQUnT2U4X53mhlnV2M7wrhibQ3GHicDmg==",
"inBundle": true,
"inBundle": true,
"license": "MIT"
"license": "MIT"
},
},
...
@@ -24105,8 +24103,6 @@
...
@@ -24105,8 +24103,6 @@
"dependencies": {
"dependencies": {
"napi-wasm": {
"napi-wasm": {
"version": "1.1.0",
"version": "1.1.0",
"resolved": "https://registry.npmmirror.com/napi-wasm/-/napi-wasm-1.1.0.tgz",
"integrity": "sha512-lHwIAJbmLSjF9VDRm9GoVOy9AGp3aIvkjv+Kvz9h16QR3uSVYH78PNQUnT2U4X53mhlnV2M7wrhibQ3GHicDmg==",
"bundled": true
"bundled": true
}
}
}
}
pages/index.vue
浏览文件 @
59b14e7f
<
template
>
<
template
>
<div
class=
"flex flex-col items-center justify-center w-full h-full"
>
<div
class=
"flex flex-col items-center justify-center w-full h-full"
>
<ILogo
/>
<ILogo
/>
<div
class=
"mt-2"
>
开源搜索,直达结果
</div>
<div
class=
"mt-2"
>
开源搜索,直达结果
</div>
<ICreate
ref=
"refCreate"
/>
<ICreate
ref=
"refCreate"
/>
<div
class=
"max-w-screen-md w-full p-6 grid grid-cols-1 lg:grid-cols-2 gap-4"
>
<div
class=
"max-w-screen-md w-full p-6 grid grid-cols-1 lg:grid-cols-2 gap-4"
>
<template
v-for=
"(item, index) in recommendQuestions"
:key=
"index"
>
<template
v-for=
"(item, index) in recommendQuestions"
:key=
"index"
>
<UButton
<UButton
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</
template
>
</
template
>
</div>
</div>
</div>
</div>
<IMenuSider
fixed
/>
<IMenuSider
fixed
/>
</template>
</template>
<
script
setup
>
<
script
setup
>
const
recommendQuestions
=
[
const
recommendQuestions
=
[
...
...
pages/library/[id].vue
浏览文件 @
59b14e7f
pages/library/index.vue
浏览文件 @
59b14e7f
<
template
>
<
template
>
<div
class=
"w-full items-center flex flex-col"
>
<div
class=
"w-full items-center flex flex-col"
>
<ILibraryHeader
show-tabs
:tab=
"tab"
@
change-tab=
"handleChangeTab"
@
search=
"handleSearch"
@
clear=
"getThreadData"
/>
<ILibraryHeader
show-tabs
:tab=
"tab"
@
change-tab=
"handleChangeTab"
@
search=
"handleSearch"
@
clear=
"getThreadData"
/>
<div
class=
"container max-w-screen-lg 2xl:max-w-screen-xl flex flex-col p-6 pt-0 lg:pt-6"
>
<div
class=
"container max-w-screen-lg 2xl:max-w-screen-xl flex flex-col p-6 pt-0 lg:pt-6"
>
<div
v-show=
"ready"
class=
"flex gap-10"
>
<div
v-show=
"ready"
class=
"flex gap-10"
>
<div
v-show=
"tab === 0 || tab === -1"
class=
"flex flex-col flex-grow"
>
<div
v-show=
"tab === 0 || tab === -1"
class=
"flex flex-col flex-grow"
>
...
@@ -11,13 +11,13 @@
...
@@ -11,13 +11,13 @@
:item=
"item"
:item=
"item"
@
delete=
"handleDeletedThread"
@
delete=
"handleDeletedThread"
/>
/>
<IEmpty
v-if=
"!threads.length"
/>
<IEmpty
v-if=
"!threads.length"
/>
</div>
</div>
</div>
</div>
<div
v-show=
"tab === 1 || tab === -1"
class=
"flex flex-col flex-shrink-0 w-full lg:w-56"
>
<div
v-show=
"tab === 1 || tab === -1"
class=
"flex flex-col flex-shrink-0 w-full lg:w-56"
>
<div
class=
"flex justify-between items-center"
>
<div
class=
"flex justify-between items-center"
>
<div
class=
"flex items-center text-lg gap-2"
>
<div
class=
"flex items-center text-lg gap-2"
>
<UIcon
name=
"i-heroicons-squares-2x2"
/>
<UIcon
name=
"i-heroicons-squares-2x2"
/>
<div>
合集
</div>
<div>
合集
</div>
</div>
</div>
<UButton
<UButton
...
...
pages/mdc.vue
浏览文件 @
59b14e7f
<
template
>
<
template
>
<div
class=
"w-full p-6"
>
<div
class=
"w-full p-6"
>
<IMdMdc
:content=
"lineChart"
/>
<IMdMdc
:content=
"lineChart"
/>
<UDivider
/>
<UDivider
/>
<IMdMdc
:content=
"tableChart"
/>
<IMdMdc
:content=
"tableChart"
/>
</div>
</div>
</
template
>
</
template
>
...
...
pages/search/[id].vue
浏览文件 @
59b14e7f
<
template
>
<
template
>
<div
class=
"w-full items-center flex flex-col"
>
<div
class=
"w-full items-center flex flex-col"
>
<IException
v-if=
"historyStatus !== 200"
:code=
"historyStatus"
/>
<IException
v-if=
"historyStatus !== 200"
:code=
"historyStatus"
/>
<template
v-else
>
<template
v-else
>
<iSearchHeader
<iSearchHeader
ref=
"refHeader"
ref=
"refHeader"
...
@@ -9,11 +9,12 @@
...
@@ -9,11 +9,12 @@
:repo=
"state.repo"
:repo=
"state.repo"
@
update-query=
"handleUpdateQuery"
@
update-query=
"handleUpdateQuery"
/>
/>
<div
ref=
"scrollElement"
class=
"container min-h-svh max-w-screen-lg 2xl:max-w-screen-xl flex flex-col space-y-6 p-6 mb-6 pb-0"
>
<div
ref=
"scrollElement"
class=
"container min-h-svh max-w-screen-lg 2xl:max-w-screen-xl flex flex-col space-y-6 p-6 mb-6 pb-0"
>
<template
v-for=
"(item, index) in data"
:key=
"index"
>
<template
v-for=
"(item, index) in data"
:key=
"index"
>
<ISearchArticle>
<ISearchArticle>
<template
#title
>
<template
#title
>
<ISearchTitle
:id=
"index + 1"
as=
"h2"
:title=
"item.question"
/>
<ISearchTitle
:id=
"index + 1"
as=
"h2"
:title=
"item.question"
/>
</
template
>
</
template
>
<ISearchContent
<ISearchContent
:item=
"item"
:item=
"item"
...
@@ -25,15 +26,15 @@
...
@@ -25,15 +26,15 @@
process-status=
"finish"
process-status=
"finish"
/>
/>
<
template
v-if=
"item.extra && item.extra.length > 0"
#extra
>
<
template
v-if=
"item.extra && item.extra.length > 0"
#extra
>
<ISearchExtraInfo
:data=
"item.extra"
/>
<ISearchExtraInfo
:data=
"item.extra"
/>
</
template
>
</
template
>
</ISearchArticle>
</ISearchArticle>
<UDivider
v-if=
"data.length !== index + 1 || askingData.question"
class=
"pt-3 pb-2"
/>
<UDivider
v-if=
"data.length !== index + 1 || askingData.question"
class=
"pt-3 pb-2"
/>
</template>
</template>
<
template
v-if=
"askingData.question"
>
<
template
v-if=
"askingData.question"
>
<ISearchArticle>
<ISearchArticle>
<template
#title
>
<template
#title
>
<ISearchTitle
:id=
"data.length + 1"
as=
"h2"
:title=
"askingData.question"
/>
<ISearchTitle
:id=
"data.length + 1"
as=
"h2"
:title=
"askingData.question"
/>
</
template
>
</
template
>
<ISearchContent
<ISearchContent
:item=
"askingData"
:item=
"askingData"
...
@@ -45,7 +46,7 @@
...
@@ -45,7 +46,7 @@
@
regenerate=
"handleReGenerate"
@
regenerate=
"handleReGenerate"
/>
/>
<
template
v-if=
"askingSidebarCards.length > 0"
#extra
>
<
template
v-if=
"askingSidebarCards.length > 0"
#extra
>
<ISearchExtraInfo
:data=
"askingSidebarCards"
/>
<ISearchExtraInfo
:data=
"askingSidebarCards"
/>
</
template
>
</
template
>
</ISearchArticle>
</ISearchArticle>
</template>
</template>
...
@@ -56,7 +57,7 @@
...
@@ -56,7 +57,7 @@
/>
/>
</div>
</div>
<div
class=
"container max-w-screen-lg 2xl:max-w-screen-xl sticky bottom-4 flex pl-6 pr-6"
>
<div
class=
"container max-w-screen-lg 2xl:max-w-screen-xl sticky bottom-4 flex pl-6 pr-6"
>
<ISearchAsk
:asking=
"asking"
@
stop=
"handleStopGenerate"
@
ask=
"handleContinueAsk"
/>
<ISearchAsk
:asking=
"asking"
@
stop=
"handleStopGenerate"
@
ask=
"handleContinueAsk"
/>
</div>
</div>
</template>
</template>
</div>
</div>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录