Browse Source

feat:对接第三方登录。修复工作台聊天列表不显示

master
秋田弘 5 months ago
parent
commit
e4e617b835
  1. 3
      frontend/components.d.ts
  2. 55
      frontend/pnpm-lock.yaml
  3. BIN
      frontend/src/assets/login/QQ.png
  4. BIN
      frontend/src/assets/login/dingding.png
  5. BIN
      frontend/src/assets/login/gitee.png
  6. BIN
      frontend/src/assets/login/phone.png
  7. BIN
      frontend/src/assets/login/qywechat.png
  8. BIN
      frontend/src/assets/login/sina.png
  9. BIN
      frontend/src/assets/login/wechat.png
  10. 92
      frontend/src/components/chat/Chat.vue
  11. 2
      frontend/src/components/chat/ChatMenu.vue
  12. 156
      frontend/src/components/desktop/LockDesktop.vue
  13. 207
      frontend/src/components/setting/SetSystem.vue
  14. 15
      frontend/src/stores/login.ts
  15. 5
      frontend/src/system/config.ts
  16. 76
      frontend/src/system/index.ts
  17. 14
      frontend/src/system/type/type.ts
  18. 32
      go.mod
  19. 45
      go.sum

3
frontend/components.d.ts

@ -66,6 +66,7 @@ declare module 'vue' {
EditType: typeof import('./src/components/builtin/EditType.vue')['default'] EditType: typeof import('./src/components/builtin/EditType.vue')['default']
ElAside: typeof import('element-plus/es')['ElAside'] ElAside: typeof import('element-plus/es')['ElAside']
ElAvatar: typeof import('element-plus/es')['ElAvatar'] ElAvatar: typeof import('element-plus/es')['ElAvatar']
ElB: typeof import('element-plus/es')['ElB']
ElBadge: typeof import('element-plus/es')['ElBadge'] ElBadge: typeof import('element-plus/es')['ElBadge']
ElButton: typeof import('element-plus/es')['ElButton'] ElButton: typeof import('element-plus/es')['ElButton']
ElCard: typeof import('element-plus/es')['ElCard'] ElCard: typeof import('element-plus/es')['ElCard']
@ -90,6 +91,7 @@ declare module 'vue' {
ElIcon: typeof import('element-plus/es')['ElIcon'] ElIcon: typeof import('element-plus/es')['ElIcon']
ElImage: typeof import('element-plus/es')['ElImage'] ElImage: typeof import('element-plus/es')['ElImage']
ElInput: typeof import('element-plus/es')['ElInput'] ElInput: typeof import('element-plus/es')['ElInput']
ElItem: typeof import('element-plus/es')['ElItem']
ElMain: typeof import('element-plus/es')['ElMain'] ElMain: typeof import('element-plus/es')['ElMain']
ElMenu: typeof import('element-plus/es')['ElMenu'] ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
@ -140,6 +142,7 @@ declare module 'vue' {
MessageIcon: typeof import('./src/components/taskbar/MessageIcon.vue')['default'] MessageIcon: typeof import('./src/components/taskbar/MessageIcon.vue')['default']
Mobile: typeof import('./src/components/desktop/mobile/Mobile.vue')['default'] Mobile: typeof import('./src/components/desktop/mobile/Mobile.vue')['default']
MobileApp: typeof import('./src/components/desktop/mobile/MobileApp.vue')['default'] MobileApp: typeof import('./src/components/desktop/mobile/MobileApp.vue')['default']
MobileTemplate: typeof import('./src/components/window/MobileTemplate.vue')['default']
MusicStore: typeof import('./src/components/builtin/MusicStore.vue')['default'] MusicStore: typeof import('./src/components/builtin/MusicStore.vue')['default']
MusicViewer: typeof import('./src/components/builtin/MusicViewer.vue')['default'] MusicViewer: typeof import('./src/components/builtin/MusicViewer.vue')['default']
NasClient: typeof import('./src/components/setting/NasClient.vue')['default'] NasClient: typeof import('./src/components/setting/NasClient.vue')['default']

55
frontend/pnpm-lock.yaml

@ -14,6 +14,9 @@ importers:
'@liripeng/vue-audio-player': '@liripeng/vue-audio-player':
specifier: ^1.6.2 specifier: ^1.6.2
version: 1.6.2(typescript@5.6.3) version: 1.6.2(typescript@5.6.3)
'@onlyoffice/document-editor-vue':
specifier: ^1.4.0
version: 1.4.0(vue@3.5.12(typescript@5.6.3))
cherry-markdown: cherry-markdown:
specifier: ^0.8.52 specifier: ^0.8.52
version: 0.8.52 version: 0.8.52
@ -44,6 +47,12 @@ importers:
pinia-plugin-persist: pinia-plugin-persist:
specifier: ^1.0.0 specifier: ^1.0.0
version: 1.0.0(pinia@2.2.4(typescript@5.6.3)(vue@3.5.12(typescript@5.6.3)))(vue@3.5.12(typescript@5.6.3)) version: 1.0.0(pinia@2.2.4(typescript@5.6.3)(vue@3.5.12(typescript@5.6.3)))(vue@3.5.12(typescript@5.6.3))
swiper:
specifier: ^11.1.15
version: 11.2.0
vant:
specifier: ^4.9.15
version: 4.9.15(vue@3.5.12(typescript@5.6.3))
vue: vue:
specifier: ^3.4.31 specifier: ^3.4.31
version: 3.5.12(typescript@5.6.3) version: 3.5.12(typescript@5.6.3)
@ -317,6 +326,11 @@ packages:
resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==}
engines: {node: '>= 8'} engines: {node: '>= 8'}
'@onlyoffice/document-editor-vue@1.4.0':
resolution: {integrity: sha512-Fg5gSc1zF6bmpRapUd7rMpm7kEDF7mQIHQKfcsfJcILdFX9bwIhnkXEucETEA9zdt92nWMS6qiAgVeT61TdCyw==}
peerDependencies:
vue: ^3.0.0
'@parcel/watcher-android-arm64@2.4.1': '@parcel/watcher-android-arm64@2.4.1':
resolution: {integrity: sha512-LOi/WTbbh3aTn2RYddrO8pnapixAziFl6SMxHM69r3tvdSm94JtCenaKgk1GRg5FJ5wpMCpHeW+7yqPlvZv7kg==} resolution: {integrity: sha512-LOi/WTbbh3aTn2RYddrO8pnapixAziFl6SMxHM69r3tvdSm94JtCenaKgk1GRg5FJ5wpMCpHeW+7yqPlvZv7kg==}
engines: {node: '>= 10.0.0'} engines: {node: '>= 10.0.0'}
@ -533,6 +547,14 @@ packages:
'@types/web-bluetooth@0.0.16': '@types/web-bluetooth@0.0.16':
resolution: {integrity: sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==} resolution: {integrity: sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==}
'@vant/popperjs@1.3.0':
resolution: {integrity: sha512-hB+czUG+aHtjhaEmCJDuXOep0YTZjdlRR+4MSmIFnkCQIxJaXLQdSsR90XWvAI2yvKUI7TCGqR8pQg2RtvkMHw==}
'@vant/use@1.6.0':
resolution: {integrity: sha512-PHHxeAASgiOpSmMjceweIrv2AxDZIkWXyaczksMoWvKV2YAYEhoizRuk/xFnKF+emUIi46TsQ+rvlm/t2BBCfA==}
peerDependencies:
vue: ^3.0.0
'@vitejs/plugin-vue@5.1.4': '@vitejs/plugin-vue@5.1.4':
resolution: {integrity: sha512-N2XSI2n3sQqp5w7Y/AN/L2XDjBIRGqXko+eDp42sydYSBeJuSm5a1sLf8zakmo8u7tA8NmBgoDLA1HeOESjp9A==} resolution: {integrity: sha512-N2XSI2n3sQqp5w7Y/AN/L2XDjBIRGqXko+eDp42sydYSBeJuSm5a1sLf8zakmo8u7tA8NmBgoDLA1HeOESjp9A==}
engines: {node: ^18.0.0 || >=20.0.0} engines: {node: ^18.0.0 || >=20.0.0}
@ -572,6 +594,9 @@ packages:
'@vue/shared@3.5.12': '@vue/shared@3.5.12':
resolution: {integrity: sha512-L2RPSAwUFbgZH20etwrXyVyCBu9OxRSi8T/38QsvnkJyvq2LufW2lDCOzm7t/U9C1mkhJGWYfCuFBCmIuNivrg==} resolution: {integrity: sha512-L2RPSAwUFbgZH20etwrXyVyCBu9OxRSi8T/38QsvnkJyvq2LufW2lDCOzm7t/U9C1mkhJGWYfCuFBCmIuNivrg==}
'@vue/shared@3.5.13':
resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==}
'@vueuse/core@9.13.0': '@vueuse/core@9.13.0':
resolution: {integrity: sha512-pujnclbeHWxxPRqXWmdkKV5OX4Wk4YeK7wusHqRwU0Q7EFusHoqNA/aPhB6KCh9hEqJkLAJo7bb0Lh9b+OIVzw==} resolution: {integrity: sha512-pujnclbeHWxxPRqXWmdkKV5OX4Wk4YeK7wusHqRwU0Q7EFusHoqNA/aPhB6KCh9hEqJkLAJo7bb0Lh9b+OIVzw==}
@ -1270,6 +1295,10 @@ packages:
stylis@4.3.4: stylis@4.3.4:
resolution: {integrity: sha512-osIBl6BGUmSfDkyH2mB7EFvCJntXDrLhKjHTRj/rK6xLH0yuPrHULDRQzKokSOD4VoorhtKpfcfW1GAntu8now==} resolution: {integrity: sha512-osIBl6BGUmSfDkyH2mB7EFvCJntXDrLhKjHTRj/rK6xLH0yuPrHULDRQzKokSOD4VoorhtKpfcfW1GAntu8now==}
swiper@11.2.0:
resolution: {integrity: sha512-rjjAKgDEs+grR2eQshVDCcE4KNPC7CI294nfcbV9gE8WCsLdvOYXDeZKUYevqAZZp8j5hE7kpT3dAGVKFBWlxQ==}
engines: {node: '>= 4.7.0'}
symbol-tree@3.2.4: symbol-tree@3.2.4:
resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==}
@ -1366,6 +1395,11 @@ packages:
resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==}
hasBin: true hasBin: true
vant@4.9.15:
resolution: {integrity: sha512-XyIAnoGu2P/dc5R2NnjIJgKwfOTTVM2FJW/8WpsZA0FUBL6Lu+KHBaAY/x3IduwbowkaCIUUPViUopI2JSjbug==}
peerDependencies:
vue: ^3.0.0
vite@5.4.9: vite@5.4.9:
resolution: {integrity: sha512-20OVpJHh0PAM0oSOELa5GaZNWeDjcAvQjGXy2Uyr+Tp+/D2/Hdz6NLgpJLsarPTA2QJ6v8mX2P1ZfbsSKvdMkg==} resolution: {integrity: sha512-20OVpJHh0PAM0oSOELa5GaZNWeDjcAvQjGXy2Uyr+Tp+/D2/Hdz6NLgpJLsarPTA2QJ6v8mX2P1ZfbsSKvdMkg==}
engines: {node: ^18.0.0 || >=20.0.0} engines: {node: ^18.0.0 || >=20.0.0}
@ -1667,6 +1701,10 @@ snapshots:
'@nodelib/fs.scandir': 2.1.5 '@nodelib/fs.scandir': 2.1.5
fastq: 1.17.1 fastq: 1.17.1
'@onlyoffice/document-editor-vue@1.4.0(vue@3.5.12(typescript@5.6.3))':
dependencies:
vue: 3.5.12(typescript@5.6.3)
'@parcel/watcher-android-arm64@2.4.1': '@parcel/watcher-android-arm64@2.4.1':
optional: true optional: true
@ -1813,6 +1851,12 @@ snapshots:
'@types/web-bluetooth@0.0.16': {} '@types/web-bluetooth@0.0.16': {}
'@vant/popperjs@1.3.0': {}
'@vant/use@1.6.0(vue@3.5.12(typescript@5.6.3))':
dependencies:
vue: 3.5.12(typescript@5.6.3)
'@vitejs/plugin-vue@5.1.4(vite@5.4.9(@types/node@20.16.13)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@5.6.3))': '@vitejs/plugin-vue@5.1.4(vite@5.4.9(@types/node@20.16.13)(sass@1.80.3)(terser@5.36.0))(vue@3.5.12(typescript@5.6.3))':
dependencies: dependencies:
vite: 5.4.9(@types/node@20.16.13)(sass@1.80.3)(terser@5.36.0) vite: 5.4.9(@types/node@20.16.13)(sass@1.80.3)(terser@5.36.0)
@ -1874,6 +1918,8 @@ snapshots:
'@vue/shared@3.5.12': {} '@vue/shared@3.5.12': {}
'@vue/shared@3.5.13': {}
'@vueuse/core@9.13.0(vue@3.5.12(typescript@5.6.3))': '@vueuse/core@9.13.0(vue@3.5.12(typescript@5.6.3))':
dependencies: dependencies:
'@types/web-bluetooth': 0.0.16 '@types/web-bluetooth': 0.0.16
@ -2696,6 +2742,8 @@ snapshots:
stylis@4.3.4: stylis@4.3.4:
optional: true optional: true
swiper@11.2.0: {}
symbol-tree@3.2.4: {} symbol-tree@3.2.4: {}
terser@5.36.0: terser@5.36.0:
@ -2811,6 +2859,13 @@ snapshots:
uuid@9.0.1: uuid@9.0.1:
optional: true optional: true
vant@4.9.15(vue@3.5.12(typescript@5.6.3)):
dependencies:
'@vant/popperjs': 1.3.0
'@vant/use': 1.6.0(vue@3.5.12(typescript@5.6.3))
'@vue/shared': 3.5.13
vue: 3.5.12(typescript@5.6.3)
vite@5.4.9(@types/node@20.16.13)(sass@1.80.3)(terser@5.36.0): vite@5.4.9(@types/node@20.16.13)(sass@1.80.3)(terser@5.36.0):
dependencies: dependencies:
esbuild: 0.21.5 esbuild: 0.21.5

BIN
frontend/src/assets/login/QQ.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

BIN
frontend/src/assets/login/dingding.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
frontend/src/assets/login/gitee.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
frontend/src/assets/login/phone.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
frontend/src/assets/login/qywechat.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
frontend/src/assets/login/sina.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

BIN
frontend/src/assets/login/wechat.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

92
frontend/src/components/chat/Chat.vue

@ -19,7 +19,7 @@ const generateData = () => {
const data = ref(generateData()); const data = ref(generateData());
// users any[] // users any[]
let users = ref<any[]>([]); let users = ref<any[]>([]);
const myTransfer = ref() const myTransfer = ref();
watchEffect(() => { watchEffect(() => {
if (store.allUserList.length > 0) { if (store.allUserList.length > 0) {
@ -48,13 +48,24 @@ watch(
<el-aside class="menu"> <el-aside class="menu">
<chat-menu /> <chat-menu />
</el-aside> </el-aside>
<el-container class="side" v-if="store.currentNavId < 4"> <el-container
class="side"
v-if="store.currentNavId < 4"
>
<!--搜索栏--> <!--搜索栏-->
<template v-if="store.currentNavId < 2"> <div v-if="store.currentNavId < 2">
<el-header class="search"> <el-header class="search">
<el-input placeholder="搜索" :prefix-icon="Search" class="search-input" v-model="store.searchInput" /> <el-input
placeholder="搜索"
:prefix-icon="Search"
class="search-input"
v-model="store.searchInput"
/>
<!-- 邀请群聊 --> <!-- 邀请群聊 -->
<button class="inviteGroupChats" @click="store.setGroupChatInvitedDialogVisible(true)"> <button
class="inviteGroupChats"
@click="store.setGroupChatInvitedDialogVisible(true)"
>
<el-icon> <el-icon>
<Plus /> <Plus />
</el-icon> </el-icon>
@ -67,7 +78,7 @@ watch(
<chat-user-list v-if="store.currentNavId == 1" /> <chat-user-list v-if="store.currentNavId == 1" />
</el-scrollbar> </el-scrollbar>
</el-main> </el-main>
</template> </div>
<ai-chat-left v-if="store.currentNavId == 3" /> <ai-chat-left v-if="store.currentNavId == 3" />
</el-container> </el-container>
<el-container class="chat-box"> <el-container class="chat-box">
@ -75,35 +86,68 @@ watch(
<chat-user-info v-if="store.currentNavId == 1"></chat-user-info> <chat-user-info v-if="store.currentNavId == 1"></chat-user-info>
<ai-chat-main v-if="store.currentNavId == 3" /> <ai-chat-main v-if="store.currentNavId == 3" />
</el-container> </el-container>
<el-container class="chat-setting" v-if="store.currentNavId == 2"> <el-container
<iframe class="workflow" :src="workUrl"></iframe> class="chat-setting"
v-if="store.currentNavId == 2"
>
<iframe
class="workflow"
:src="workUrl"
></iframe>
</el-container> </el-container>
<el-container class="chat-setting" v-if="store.currentNavId == 5"> <el-container
class="chat-setting"
v-if="store.currentNavId == 5"
>
<ChatUserSetting /> <ChatUserSetting />
</el-container> </el-container>
</el-container> </el-container>
<!-- 邀请群聊弹窗 --> <!-- 邀请群聊弹窗 -->
<el-dialog v-model="store.groupChatInvitedDialogVisible" width="80%" title="创建群聊" style="height: 550px" <el-dialog
align-center> v-model="store.groupChatInvitedDialogVisible"
width="80%"
title="创建群聊"
style="height: 550px"
align-center
>
<div class="dialog-body"> <div class="dialog-body">
<!-- 添加输入部门名的输入框 --> <!-- 添加输入部门名的输入框 -->
<div> <div>
<el-form label-position="top"> <el-form label-position="top">
<el-form-item label="群聊名称:"> <el-form-item label="群聊名称:">
<el-input maxlength="8" show-word-limit style="width: 240px; height: 30px" <el-input
class="department-name" v-model="store.departmentName" placeholder="请输入群聊名称"></el-input> maxlength="8"
show-word-limit
style="width: 240px; height: 30px"
class="department-name"
v-model="store.departmentName"
placeholder="请输入群聊名称"
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<!-- 使用 Element el-transfer 组件替换自定义穿梭框 --> <!-- 使用 Element el-transfer 组件替换自定义穿梭框 -->
<el-transfer v-model="users" :data="data" :titles="['可选项', '已选项']" filterable style="height: 250px" <el-transfer
filter-placeholder="搜索用户名" :props="{ key: 'key', label: 'label', avatar: 'avatar' }" v-model="users"
:left-default-checked="[]" class="transfer-container" ref="myTransfer"> :data="data"
:titles="['可选项', '已选项']"
filterable
style="height: 250px"
filter-placeholder="搜索用户名"
:props="{ key: 'key', label: 'label', avatar: 'avatar' }"
:left-default-checked="[]"
class="transfer-container"
ref="myTransfer"
>
<!-- 自定义穿梭框列表项模板 --> <!-- 自定义穿梭框列表项模板 -->
<template #default="{ option }"> <template #default="{ option }">
<el-avatar :src="option.avatar" size="small" style="margin-right: 5px" /> <el-avatar
:src="option.avatar"
size="small"
style="margin-right: 5px"
/>
<span>{{ option.label }}</span> <span>{{ option.label }}</span>
</template> </template>
</el-transfer> </el-transfer>
@ -111,10 +155,16 @@ watch(
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button style="background-color: #0078d4; color: #fff" <el-button
@click="store.groupChatInvitedDialogVisible = false">取消</el-button> style="background-color: #0078d4; color: #fff"
<el-button style="background-color: #0078d4; color: #fff" @click="store.groupChatInvitedDialogVisible = false"
@click="store.createGroupChat(users)">确定</el-button> >取消</el-button
>
<el-button
style="background-color: #0078d4; color: #fff"
@click="store.createGroupChat(users)"
>确定</el-button
>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>

2
frontend/src/components/chat/ChatMenu.vue

@ -8,7 +8,7 @@ const store = useChatStore();
<template> <template>
<!-- 头像 --> <!-- 头像 -->
<el-row> <el-row>
<el-avatar shape="square" :size="40" class="userAvatar" :src="store.userInfo.avatar" /> <el-avatar shape="square" :size="30" class="userAvatar" :src="store.userInfo.avatar" />
</el-row> </el-row>
<!-- 菜单按钮 --> <!-- 菜单按钮 -->

156
frontend/src/components/desktop/LockDesktop.vue

@ -15,6 +15,7 @@
/> />
</el-avatar> </el-avatar>
</div> </div>
<div v-if="store.page == 'login'">
<el-form <el-form
v-if="!isRegisterMode" v-if="!isRegisterMode"
label-position="left" label-position="left"
@ -61,9 +62,7 @@
@click="onThirdPartyLogin(platform.name)" @click="onThirdPartyLogin(platform.name)"
/> />
</div> </div>
<div <div class="actions">
class="actions"
>
<a <a
href="#" href="#"
@click.prevent="toggleRegister" @click.prevent="toggleRegister"
@ -143,6 +142,26 @@
> >
</div> </div>
</el-form> </el-form>
</div>
<div v-else-if="store.page == 'setphone'">
<el-form>
<el-form-item>
<el-input
v-model="userName"
placeholder="请输入手机号"
autofocus
prefix-icon="Iphone"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type="primary"
@click="setPhone"
>确定</el-button
>
</el-form-item>
</el-form>
</div>
</el-card> </el-card>
</div> </div>
</template> </template>
@ -153,7 +172,7 @@
import { getSystemConfig, setSystemConfig } from "@/system/config"; import { getSystemConfig, setSystemConfig } from "@/system/config";
import router from "@/system/router"; import router from "@/system/router";
import { RestartApp } from "@/util/goutil"; import { RestartApp } from "@/util/goutil";
import { notifyError } from "@/util/msg"; import { notifyError, notifySuccess } from "@/util/msg";
import { onMounted, ref, watchEffect } from "vue"; import { onMounted, ref, watchEffect } from "vue";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
const route = useRoute(); const route = useRoute();
@ -164,19 +183,52 @@
const lockClassName = ref("screen-show"); const lockClassName = ref("screen-show");
const isRegisterMode = ref(false); const isRegisterMode = ref(false);
onMounted(() => {
getThirdpartyList();
});
const getThirdpartyList = async () => {
const result = await fetch(
config.userInfo.url + "/user/thirdparty/list"
);
if (result.ok) {
const data = await result.json();
console.log(data, "data");
}
};
const setPhone = async () => {
console.log("123");
const res = await fetch(config.userInfo.url + "/user/editdata", {
method: "POST",
body: JSON.stringify({
phone: userName.value,
}),
headers: {
ClientID: store.tempClientId,
Authorization: store.tempToken,
},
});
if (res.ok) {
notifySuccess("手机号设置成功");
} else {
notifyError("手机号设置失败");
}
};
const thirdPartyPlatforms = [ const thirdPartyPlatforms = [
// { {
// name: "wechat", name: "qywechat",
// icon: new URL("@/assets/login/wechat.png", import.meta.url).href, icon: new URL("@/assets/login/qywechat.png", import.meta.url).href,
// }, },
// { {
// name: "qq", name: "dingding",
// icon: new URL("@/assets/login/qq.png", import.meta.url).href, icon: new URL("@/assets/login/dingding.png", import.meta.url).href,
// }, },
// { {
// name: "sina", name: "phone",
// icon: new URL("@/assets/login/sina.png", import.meta.url).href, icon: new URL("@/assets/login/phone.png", import.meta.url).href,
// }, },
{ {
name: "github", name: "github",
icon: new URL("@/assets/login/github.png", import.meta.url).href, icon: new URL("@/assets/login/github.png", import.meta.url).href,
@ -211,55 +263,46 @@
watchEffect(() => { watchEffect(() => {
const code = route.query.code; const code = route.query.code;
if (code) { if (code) {
console.log(code, "---"); console.log("code:", code);
onLogin(); onLogin();
} }
}); });
const onLogin = async () => { async function onLogin() {
//localStorage.removeItem("godoosClientId");
if (loginCallback) { if (loginCallback) {
const platform = store.ThirdPartyPlatform; const platform = localStorage.getItem("ThirdPartyPlatform");
const code = router.currentRoute.value.query.code as string; const code = router.currentRoute.value.query.code as string;
console.log(platform, "platform");
// 使 // 使
const platformCodeMap: Record<string, string> = { const platformCodeMap: Record<string, string> = {
github: "github_code", github: "github",
gitee: "gitee_code", gitee: "gitee",
wechat: "wechat_code", wechat: "wechat",
qq: "qq_code", qq: "qq",
}; };
// //
const codeParam = platform ? platformCodeMap[platform] : null; const codeParam = platform ? platformCodeMap[platform] : null;
let res; //
if (codeParam) { const login_type = codeParam ? codeParam : "password";
// console.log(login_type, "login_type");
const returnedState = router.currentRoute.value.query
.state as string;
if (returnedState !== store.State) { const param = codeParam
notifyError("登录失败,请重试"); ? { code: code }
return; : { username: userName.value, password: userPassword.value };
}
res = await loginCallback(userName.value, userPassword.value, { const res = await loginCallback(login_type, param);
[codeParam]: code,
});
} else {
//
res = await loginCallback(userName.value, userPassword.value);
}
if (res) { if (res) {
store.ThirdPartyPlatform = null; localStorage.removeItem("ThirdPartyPlatform");
loginSuccess(); loginSuccess();
} else { } else {
notifyError("登录失败,请重试"); notifyError("登录失败,请重试");
} }
} }
}; }
const toggleRegister = () => { const toggleRegister = () => {
isRegisterMode.value = !isRegisterMode.value; isRegisterMode.value = !isRegisterMode.value;
@ -365,36 +408,21 @@
}; };
const onThirdPartyLogin = async (platform: string) => { const onThirdPartyLogin = async (platform: string) => {
localStorage.setItem("ThirdPartyPlatform", platform);
let loginFunction: (() => Promise<boolean>) | undefined; let loginFunction: (() => Promise<boolean>) | undefined;
//
store.ThirdPartyPlatform = platform;
switch (platform) { switch (platform) {
case "github": case "github":
// GitHub
loginFunction = async function () { loginFunction = async function () {
return await authWithGithub(); return await authWithGithub();
}; };
break; break;
case "wechat":
loginFunction = async function () {
return await authWithWechat();
};
break;
case "qq":
loginFunction = async function () {
return await authWithQQ();
};
break;
case "sina":
loginFunction = async function () {
return await authWithSina();
};
break;
case "gitee": case "gitee":
loginFunction = async function () { loginFunction = async function () {
return await authWithGitee(); return await authWithGitee();
}; };
break; break;
//
default: default:
notifyError("不支持的第三方登录平台"); notifyError("不支持的第三方登录平台");
return; return;
@ -414,7 +442,8 @@
store.State = state; store.State = state;
// url // url
const currentUrl = window.location.href; const currentUrl = window.location.href;
const url = config.userInfo.url + "/github/authorize?state=" + state; const url =
config.userInfo.url + "/user/github/authorize?state=" + state;
const res: any = await fetch(url, { const res: any = await fetch(url, {
method: "POST", method: "POST",
body: JSON.stringify({ body: JSON.stringify({
@ -461,7 +490,8 @@
store.State = state; store.State = state;
// url // url
const currentUrl = window.location.href; const currentUrl = window.location.href;
const url = config.userInfo.url + "/gitee/authorize?state=" + state; const url =
config.userInfo.url + "/user/gitee/authorize?state=" + state;
const res: any = await fetch(url, { const res: any = await fetch(url, {
method: "POST", method: "POST",
body: JSON.stringify({ body: JSON.stringify({
@ -487,6 +517,8 @@
notifyError("获取授权URL失败"); notifyError("获取授权URL失败");
return false; return false;
} }
// store.page = "phone";
// return true;
}; };
</script> </script>

207
frontend/src/components/setting/SetSystem.vue

@ -2,53 +2,87 @@
<div class="container"> <div class="container">
<div class="nav"> <div class="nav">
<ul> <ul>
<li v-for="(item, index) in items" :key="index" @click="selectItem(index)" <li
:class="{ active: index === activeIndex }"> v-for="(item, index) in items"
:key="index"
@click="selectItem(index)"
:class="{ active: index === activeIndex }"
>
{{ item }} {{ item }}
</li> </li>
</ul> </ul>
</div> </div>
<div class="setting"> <div class="setting">
<div v-if="1 === activeIndex"> <div v-if="1 === activeIndex">
<div class="setting-item" style="margin-top: 60px"> <div
class="setting-item"
style="margin-top: 60px"
>
<label>存储方式</label> <label>存储方式</label>
<el-select v-model="config.storeType"> <el-select v-model="config.storeType">
<el-option v-for="(item, key) in storeList" :key="key" :label="item.title" <el-option
:value="item.value" /> v-for="(item, key) in storeList"
:key="key"
:label="item.title"
:value="item.value"
/>
</el-select> </el-select>
</div> </div>
<template v-if="config.storeType === 'local'"> <template v-if="config.storeType === 'local'">
<div class="setting-item"> <div class="setting-item">
<label>存储地址</label> <label>存储地址</label>
<el-input v-model="config.storePath" @click="selectFile()" <el-input
placeholder="可为空,为空则取系统默认存储地址:/用户目录/.godoos/os" /> v-model="config.storePath"
@click="selectFile()"
placeholder="可为空,为空则取系统默认存储地址:/用户目录/.godoos/os"
/>
</div> </div>
<div class="setting-item"> <div class="setting-item">
<label>自定义端口</label> <label>自定义端口</label>
<el-input v-model="config.netPort" placeholder="可为空,为空则取系统默认56780" /> <el-input
v-model="config.netPort"
placeholder="可为空,为空则取系统默认56780"
/>
</div> </div>
<div class="setting-item"> <div class="setting-item">
<label>自定义路径</label> <label>自定义路径</label>
<el-input v-model="config.netPath" placeholder="自定义web访问路径,英文,不要加斜杠,可为空" /> <el-input
v-model="config.netPath"
placeholder="自定义web访问路径,英文,不要加斜杠,可为空"
/>
</div> </div>
</template> </template>
<template v-if="config.storeType === 'net'"> <template v-if="config.storeType === 'net'">
<div class="setting-item"> <div class="setting-item">
<label>服务器地址</label> <label>服务器地址</label>
<el-input v-model="config.storenet.url" placeholder="可访问的地址,例如http://192.168.1.6:56780 不要加斜杠" /> <el-input
v-model="config.storenet.url"
placeholder="可访问的地址,例如http://192.168.1.6:56780 不要加斜杠"
/>
</div> </div>
<div class="setting-item"> <div class="setting-item">
<label>允许跨域</label> <label>允许跨域</label>
<el-switch v-model="config.storenet.isCors" active-text="允许" inactive-text="不允许" <el-switch
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949" active-value="1" v-model="config.storenet.isCors"
inactive-value="" /> active-text="允许"
inactive-text="不允许"
style="
--el-switch-on-color: #13ce66;
--el-switch-off-color: #ff4949;
"
active-value="1"
inactive-value=""
/>
</div> </div>
</template> </template>
<template v-if="config.storeType === 'webdav'"> <template v-if="config.storeType === 'webdav'">
<div class="setting-item"> <div class="setting-item">
<label>服务器地址</label> <label>服务器地址</label>
<el-input v-model="config.webdavClient.url" placeholder="https://godoos.com/webdav 不要加斜杠" /> <el-input
v-model="config.webdavClient.url"
placeholder="https://godoos.com/webdav 不要加斜杠"
/>
</div> </div>
<div class="setting-item"> <div class="setting-item">
<label>登陆用户名</label> <label>登陆用户名</label>
@ -56,30 +90,46 @@
</div> </div>
<div class="setting-item"> <div class="setting-item">
<label>登陆密码</label> <label>登陆密码</label>
<el-input v-model="config.webdavClient.password" type="password" /> <el-input
v-model="config.webdavClient.password"
type="password"
/>
</div> </div>
</template> </template>
<div class="setting-item"> <div class="setting-item">
<label></label> <label></label>
<el-button @click="submitOsInfo" type="primary"> <el-button
@click="submitOsInfo"
type="primary"
>
{{ t("confirm") }} {{ t("confirm") }}
</el-button> </el-button>
</div> </div>
</div> </div>
<div v-if="2 === activeIndex"> <div v-if="2 === activeIndex">
<div class="setting-item" style="margin-top: 60px"> <div
class="setting-item"
style="margin-top: 60px"
>
<label>编辑器类型</label> <label>编辑器类型</label>
<el-select v-model="config.editorType"> <el-select v-model="config.editorType">
<el-option v-for="(item, key) in editorType" :key="key" :label="item.title" <el-option
:value="item.value" /> v-for="(item, key) in editorType"
:key="key"
:label="item.title"
:value="item.value"
/>
</el-select> </el-select>
</div> </div>
<template v-if="config.editorType === 'onlyoffice'"> <template v-if="config.editorType === 'onlyoffice'">
<div class="setting-item"> <div class="setting-item">
<label>地址</label> <label>地址</label>
<el-input v-model="config.onlyoffice.url" placeholder="https://godoos.com/onlyoffice 不要加斜杠" /> <el-input
v-model="config.onlyoffice.url"
placeholder="https://godoos.com/onlyoffice 不要加斜杠"
/>
</div> </div>
<!-- <div class="setting-item"> <!-- <div class="setting-item">
<label>私钥</label> <label>私钥</label>
@ -88,7 +138,10 @@
</template> </template>
<div class="setting-item"> <div class="setting-item">
<label></label> <label></label>
<el-button @click="submitEditInfo" type="primary"> <el-button
@click="submitEditInfo"
type="primary"
>
{{ t("confirm") }} {{ t("confirm") }}
</el-button> </el-button>
</div> </div>
@ -99,7 +152,10 @@
</div> </div>
<div class="setting-item"> <div class="setting-item">
<label></label> <label></label>
<el-button @click="exportBackup" type="primary"> <el-button
@click="exportBackup"
type="primary"
>
导出 导出
</el-button> </el-button>
</div> </div>
@ -108,42 +164,73 @@
</div> </div>
<div class="setting-item"> <div class="setting-item">
<label></label> <label></label>
<el-button @click="selectZipfile" type="primary"> <el-button
@click="selectZipfile"
type="primary"
>
导入 导入
</el-button> </el-button>
<input type="file" accept=".zip" style="display: none" ref="zipFileInput" /> <input
type="file"
accept=".zip"
style="display: none"
ref="zipFileInput"
/>
</div> </div>
</div> </div>
<div v-if="0 === activeIndex"> <div v-if="0 === activeIndex">
<div class="setting-item" style="margin-top: 60px"> <div
class="setting-item"
style="margin-top: 60px"
>
<label>用户角色</label> <label>用户角色</label>
<el-select v-model="config.userType"> <el-select v-model="config.userType">
<el-option v-for="(item, key) in userTypes" :key="key" :label="item.title" <el-option
:value="item.value" /> v-for="(item, key) in userTypes"
:key="key"
:label="item.title"
:value="item.value"
/>
</el-select> </el-select>
</div> </div>
<template v-if="config.userType === 'member'"> <template v-if="config.userType === 'member'">
<div class="setting-item"> <div class="setting-item">
<label>服务器地址</label> <label>服务器地址</label>
<el-input v-model="config.userInfo.url" placeholder="网址或域名,例子:https://godoos.com 不要加斜杠" /> <el-input
v-model="config.userInfo.url"
placeholder="网址或域名,例子:https://godoos.com 不要加斜杠"
/>
</div> </div>
<div class="setting-item"> <div class="setting-item">
<label>用户名</label> <label>用户名</label>
<el-input v-model="config.userInfo.username" placeholder="登录用户名" /> <el-input
v-model="config.userInfo.username"
placeholder="登录用户名"
/>
</div> </div>
<div class="setting-item"> <div class="setting-item">
<label>密码</label> <label>密码</label>
<el-input v-model="config.userInfo.password" type="password" placeholder="登录密码" /> <el-input
v-model="config.userInfo.password"
type="password"
placeholder="登录密码"
/>
</div> </div>
</template> </template>
<div class="setting-item"> <div class="setting-item">
<label></label> <label></label>
<el-button @click="saveUserInfo" type="primary"> <el-button
@click="saveUserInfo"
type="primary"
>
{{ t("confirm") }} {{ t("confirm") }}
</el-button> </el-button>
</div> </div>
</div> </div>
<div v-if="4 === activeIndex" class="setting-area"> <div
v-if="4 === activeIndex"
class="setting-area"
>
<SetFilePwd v-if="config.userType === 'person'"></SetFilePwd> <SetFilePwd v-if="config.userType === 'person'"></SetFilePwd>
</div> </div>
</div> </div>
@ -152,11 +239,8 @@
<script lang="ts" setup> <script lang="ts" setup>
import { Dialog, join, System, t } from "@/system"; import { Dialog, join, System, t } from "@/system";
import { getSystemConfig, setSystemConfig } from "@/system/config";
import { GetClientId } from "@/util/clientid.ts"; import { GetClientId } from "@/util/clientid.ts";
import {
getSystemConfig,
setSystemConfig,
} from "@/system/config";
import { OpenDirDialog, RestartApp } from "@/util/goutil"; import { OpenDirDialog, RestartApp } from "@/util/goutil";
import { notifyError, notifySuccess } from "@/util/msg"; import { notifyError, notifySuccess } from "@/util/msg";
import FileSaver from "file-saver"; import FileSaver from "file-saver";
@ -186,7 +270,13 @@ const storeList = [
// }, // },
]; ];
const items = ["用户角色", "存储配置", "编辑器类型", "备份还原", "文件密码箱"]; const items = [
"用户角色",
"存储配置",
"编辑器类型",
"备份还原",
"文件密码箱",
];
const editorType = [ const editorType = [
{ {
title: "系统默认", title: "系统默认",
@ -264,10 +354,12 @@ function submitOsInfo() {
const postUrl = config.value.apiUrl + "/system/setting"; const postUrl = config.value.apiUrl + "/system/setting";
fetch(postUrl, { fetch(postUrl, {
method: "POST", method: "POST",
body: JSON.stringify([{ body: JSON.stringify([
{
name: "isCors", name: "isCors",
value: saveData.storenet.isCors, value: saveData.storenet.isCors,
}]), },
]),
}) })
.then((res) => res.json()) .then((res) => res.json())
.then((res) => { .then((res) => {
@ -282,7 +374,6 @@ function submitOsInfo() {
} }
}); });
} }
} }
// if (saveData.storeType === "webdav") { // if (saveData.storeType === "webdav") {
// const urlRegex = /^(https?:\/\/)/; // const urlRegex = /^(https?:\/\/)/;
@ -335,11 +426,17 @@ function submitEditInfo() {
return; return;
} }
function parseData(saveData: any) { function parseData(saveData: any) {
let postData = [] let postData = [];
if (saveData.storePath !== "") { if (saveData.storePath !== "") {
postData.push({ name: "osPath", value: saveData.storePath }) postData.push({ name: "osPath", value: saveData.storePath });
} }
if (saveData.netPort != "" && saveData.netPort != "56780" && !isNaN(saveData.netPort) && saveData.netPort * 1 > 0 && saveData.netPort * 1 < 65535) { if (
saveData.netPort != "" &&
saveData.netPort != "56780" &&
!isNaN(saveData.netPort) &&
saveData.netPort * 1 > 0 &&
saveData.netPort * 1 < 65535
) {
postData.push({ postData.push({
name: "netPort", name: "netPort",
value: saveData.netPort, value: saveData.netPort,
@ -355,6 +452,7 @@ function parseData(saveData: any) {
} }
async function saveUserInfo() { async function saveUserInfo() {
const saveData = toRaw(config.value); const saveData = toRaw(config.value);
console.log(saveData);
if (saveData.userType == "person") { if (saveData.userType == "person") {
setSystemConfig(saveData); setSystemConfig(saveData);
notifySuccess("保存成功"); notifySuccess("保存成功");
@ -379,22 +477,35 @@ async function saveUserInfo() {
return; return;
} }
const password = saveData.userInfo.password; const password = saveData.userInfo.password;
const serverUrl = saveData.userInfo.url + "/member/login"; const serverUrl = saveData.userInfo.url + "/user/login";
const res = await fetch(serverUrl, { const res = await fetch(serverUrl, {
method: "POST", method: "POST",
body: JSON.stringify({ body: JSON.stringify({
// username: saveData.userInfo.username,
// password: password,
// clientId: GetClientId(),
client_id: GetClientId(),
login_type: "password",
param: {
username: saveData.userInfo.username, username: saveData.userInfo.username,
password: password, password: password,
clientId: GetClientId(), },
}), }),
}); });
// console.log(res);
// console.log(saveData);
// return;
if (res.status === 200) { if (res.status === 200) {
const data = await res.json(); const data = await res.json();
if (data.success) { if (data.success) {
data.data.url = saveData.userInfo.url; data.data.user.url = saveData.userInfo.url;
data.data.password = password; data.data.user.password = password;
saveData.userInfo = data.data; data.data.user.token = data.data.token;
saveData.userInfo = data.data.user;
setSystemConfig(saveData); setSystemConfig(saveData);
// console.log(data);
// return;
notifySuccess("登录成功"); notifySuccess("登录成功");
RestartApp(); RestartApp();
return; return;

15
frontend/src/stores/login.ts

@ -4,9 +4,18 @@ export const useLoginStore = defineStore("login", () => {
// 第三方登录方式 // 第三方登录方式
const ThirdPartyPlatform = ref<string | null>(null); const ThirdPartyPlatform = ref<string | null>(null);
const State = ref<string | null>(null); const State = ref<string>("");
// 临时token
const tempToken = ref<string>("");
// 临时clientId
const tempClientId = ref<string>("");
const page = ref("login");
return { return {
ThirdPartyPlatform, ThirdPartyPlatform,
State State,
page,
tempToken,
tempClientId,
}; };
}); },);

5
frontend/src/system/config.ts

@ -1,7 +1,7 @@
import { GetClientId } from "../util/clientid.ts";
import { generateRandomString } from "../util/common.ts"; import { generateRandomString } from "../util/common.ts";
export const configStoreType = localStorage.getItem('GodoOS-storeType') || 'local';
import { parseAiConfig } from "./aiconfig.ts"; import { parseAiConfig } from "./aiconfig.ts";
import { GetClientId } from "../util/clientid.ts"; export const configStoreType = localStorage.getItem('GodoOS-storeType') || 'local';
/** /**
* *
* *
@ -234,6 +234,7 @@ export function getUrl(url: string, islast = true) {
export function getWorkflowUrl() { export function getWorkflowUrl() {
const config = getSystemConfig(); const config = getSystemConfig();
if (config.userType == 'member') { if (config.userType == 'member') {
console.log(config.userInfo)
return config.userInfo.url + '/views/desktop/index.html' + '?uuid=' + GetClientId() + '&token=' + config.userInfo.token return config.userInfo.url + '/views/desktop/index.html' + '?uuid=' + GetClientId() + '&token=' + config.userInfo.token
} }
} }

76
frontend/src/system/index.ts

@ -20,8 +20,9 @@ import { useUpgradeStore } from '@/stores/upgrade';
import { RestartApp } from '@/util/goutil'; import { RestartApp } from '@/util/goutil';
import { notifyError } from '@/util/msg'; import { notifyError } from '@/util/msg';
//import { isShareFile } from '@/util/sharePath'; //import { isShareFile } from '@/util/sharePath';
import { pick } from '../util/modash'; import { useLoginStore } from '@/stores/login';
import { GetClientId } from "../util/clientid.ts"; import { GetClientId } from "../util/clientid.ts";
import { pick } from '../util/modash';
import { clearSystemConfig, fetchGet, getFileUrl, getSystemConfig, getSystemKey, setSystemConfig, setSystemKey } from './config'; import { clearSystemConfig, fetchGet, getFileUrl, getSystemConfig, getSystemKey, setSystemConfig, setSystemKey } from './config';
import { OsFileInterface } from './core/FIleInterface'; import { OsFileInterface } from './core/FIleInterface';
import { extname } from './core/Path'; import { extname } from './core/Path';
@ -148,13 +149,34 @@ export class System {
if (!tempCallBack) { if (!tempCallBack) {
throw new Error('没有设置登录回调函数'); throw new Error('没有设置登录回调函数');
} }
this._options.loginCallback = async (username: string, password: string) => { this._options.loginCallback = async (login_type: string, param: {}) => {
const res = await tempCallBack(username, password); const serverUrl = config.userInfo.url + '/user/login';
if (res) { const res: any = await fetch(serverUrl, {
method: "POST",
body: JSON.stringify({
client_id: GetClientId(),
login_type: login_type,
param: param,
}),
});
if (!res.ok) {
return false;
}
const jsondata = await res.json();
if (jsondata.success) {
jsondata.data.url = config.userInfo.url;
config.userInfo = jsondata.data;
setSystemConfig(config);
this._rootState.state = SystemStateEnum.open; this._rootState.state = SystemStateEnum.open;
this.refershAppList();
window.location.href = "/";
return true; return true;
} } else {
notifyError(jsondata.message);
return false; return false;
}
}; };
} }
} else { } else {
@ -163,7 +185,7 @@ export class System {
if (userInfo.url == '') { if (userInfo.url == '') {
return true; return true;
} }
const res = await fetchGet(`${userInfo.url}/member/islogin`); const res = await fetchGet(`${userInfo.url}/user/islogin`);
if (!res.ok) { if (!res.ok) {
notifyError('登录失败,请检查网络连接或重新登录'); notifyError('登录失败,请检查网络连接或重新登录');
return true; return true;
@ -179,40 +201,42 @@ export class System {
//return true; //return true;
this._rootState.state = SystemStateEnum.lock; this._rootState.state = SystemStateEnum.lock;
// 登录回调 // 登录回调
this._options.loginCallback = async ( this._options.loginCallback = async (login_type: string, param: {}) => {
username: string, password: string, loginCode?: { const serverUrl = config.userInfo.url + '/user/login';
github_code?: string,
gitee_code?: string
}
) => {
const serverUrl = config.userInfo.url + '/member/login'
const res: any = await fetch(serverUrl, { const res: any = await fetch(serverUrl, {
method: "POST", method: "POST",
body: JSON.stringify({ body: JSON.stringify({
username: username, client_id: GetClientId(),
password: password, login_type: login_type,
github_code: loginCode?.github_code, param: param,
gitee_code: loginCode?.gitee_code,
clientId: GetClientId(),
}), }),
}); });
if (!res.ok) { if (!res.ok) {
return false return false;
} }
const jsondata = await res.json(); const jsondata = await res.json();
if (jsondata.success) { if (jsondata.success) {
jsondata.data.url = config.userInfo.url jsondata.data.url = config.userInfo.url;
jsondata.data.password = password config.userInfo = jsondata.data;
config.userInfo = jsondata.data
setSystemConfig(config); setSystemConfig(config);
if (jsondata.code == 10000) {
const loginStore = useLoginStore();
loginStore.tempToken = jsondata.data.token;
loginStore.tempClientId = jsondata.data.client_id;
loginStore.page = "setphone";
return true;
}
this._rootState.state = SystemStateEnum.open; this._rootState.state = SystemStateEnum.open;
this.refershAppList() this.refershAppList();
window.location.href = "/"; window.location.href = "/";
return true return true;
} else { } else {
notifyError(jsondata.message) notifyError(jsondata.message);
return false return false;
} }
}; };

14
frontend/src/system/type/type.ts

@ -57,12 +57,14 @@ export interface SystemOptionsCertainly {
contextMenus?: Array<MenuItemConstructorOptions | MenuItem>; contextMenus?: Array<MenuItemConstructorOptions | MenuItem>;
noPassword?: boolean; noPassword?: boolean;
loginCallback?: ( loginCallback?: (
username: string, login_type: string,
password: string, param: {},
loginCode?: { // username: string,
github_code?: string, // password: string,
gitee_code?: string // loginCode?: {
} // github_code?: string,
// gitee_code?: string
// }
) => Promise<boolean>; ) => Promise<boolean>;
} }
export type SystemOptions = SystemOptionsCertainly & { export type SystemOptions = SystemOptionsCertainly & {

32
go.mod

@ -4,7 +4,7 @@ go 1.23
toolchain go1.23.2 toolchain go1.23.2
require github.com/wailsapp/wails/v2 v2.9.1 require github.com/wailsapp/wails/v2 v2.9.2
require ( require (
aead.dev/minisign v0.2.0 // indirect aead.dev/minisign v0.2.0 // indirect
@ -14,37 +14,37 @@ require (
github.com/minio/selfupdate v0.6.0 // indirect github.com/minio/selfupdate v0.6.0 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/tklauser/go-sysconf v0.3.14 // indirect github.com/tklauser/go-sysconf v0.3.14 // indirect
github.com/tklauser/numcpus v0.8.0 // indirect github.com/tklauser/numcpus v0.9.0 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect
) )
require ( require (
github.com/bep/debounce v1.2.1 // indirect github.com/bep/debounce v1.2.1 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-ole/go-ole v1.3.0 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/google/uuid v1.3.0 // indirect github.com/google/uuid v1.6.0 // indirect
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect
github.com/labstack/echo/v4 v4.10.2 // indirect github.com/labstack/echo/v4 v4.13.3 // indirect
github.com/labstack/gommon v0.4.0 // indirect github.com/labstack/gommon v0.4.2 // indirect
github.com/leaanthony/go-ansi-parser v1.6.0 // indirect github.com/leaanthony/go-ansi-parser v1.6.1 // indirect
github.com/leaanthony/gosod v1.0.3 // indirect github.com/leaanthony/gosod v1.0.4 // indirect
github.com/leaanthony/slicer v1.6.0 // indirect github.com/leaanthony/slicer v1.6.0 // indirect
github.com/leaanthony/u v1.1.0 // indirect github.com/leaanthony/u v1.1.1 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-isatty v0.0.20 // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/pkg/errors v0.9.1 // indirect github.com/pkg/errors v0.9.1 // indirect
github.com/rivo/uniseg v0.4.4 // indirect github.com/rivo/uniseg v0.4.7 // indirect
github.com/samber/lo v1.38.1 // indirect github.com/samber/lo v1.47.0 // indirect
github.com/tkrajina/go-reflector v0.5.6 // indirect github.com/tkrajina/go-reflector v0.5.8 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect github.com/valyala/fasttemplate v1.2.2 // indirect
github.com/wailsapp/go-webview2 v1.0.10 // indirect github.com/wailsapp/go-webview2 v1.0.18 // indirect
github.com/wailsapp/mimetype v1.4.1 // indirect github.com/wailsapp/mimetype v1.4.1 // indirect
godo v0.0.1 godo v0.0.1
golang.org/x/crypto v0.31.0 // indirect golang.org/x/crypto v0.31.0 // indirect
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 // indirect golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect
golang.org/x/net v0.25.0 // indirect golang.org/x/net v0.33.0 // indirect
golang.org/x/sys v0.28.0 // indirect golang.org/x/sys v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect golang.org/x/text v0.21.0 // indirect
) )

45
go.sum

@ -9,33 +9,47 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e h1:Q3+PugElBCf4PFpxhErSzU3/PY5sFL5Z6rfv4AbGAck= github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e h1:Q3+PugElBCf4PFpxhErSzU3/PY5sFL5Z6rfv4AbGAck=
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e/go.mod h1:alcuEEnZsY1WQsagKhZDsoPCRoOijYqhZvPwLG0kzVs= github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e/go.mod h1:alcuEEnZsY1WQsagKhZDsoPCRoOijYqhZvPwLG0kzVs=
github.com/labstack/echo/v4 v4.10.2 h1:n1jAhnq/elIFTHr1EYpiYtyKgx4RW9ccVgkqByZaN2M= github.com/labstack/echo/v4 v4.10.2 h1:n1jAhnq/elIFTHr1EYpiYtyKgx4RW9ccVgkqByZaN2M=
github.com/labstack/echo/v4 v4.10.2/go.mod h1:OEyqf2//K1DFdE57vw2DRgWY0M7s65IVQO2FzvI4J5k= github.com/labstack/echo/v4 v4.10.2/go.mod h1:OEyqf2//K1DFdE57vw2DRgWY0M7s65IVQO2FzvI4J5k=
github.com/labstack/echo/v4 v4.13.3 h1:pwhpCPrTl5qry5HRdM5FwdXnhXSLSY+WE+YQSeCaafY=
github.com/labstack/echo/v4 v4.13.3/go.mod h1:o90YNEeQWjDozo584l7AwhJMHN0bOC4tAfg+Xox9q5g=
github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8= github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8=
github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM=
github.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0=
github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU=
github.com/leaanthony/debme v1.2.1 h1:9Tgwf+kjcrbMQ4WnPcEIUcQuIZYqdWftzZkBr+i/oOc= github.com/leaanthony/debme v1.2.1 h1:9Tgwf+kjcrbMQ4WnPcEIUcQuIZYqdWftzZkBr+i/oOc=
github.com/leaanthony/debme v1.2.1/go.mod h1:3V+sCm5tYAgQymvSOfYQ5Xx2JCr+OXiD9Jkw3otUjiA= github.com/leaanthony/debme v1.2.1/go.mod h1:3V+sCm5tYAgQymvSOfYQ5Xx2JCr+OXiD9Jkw3otUjiA=
github.com/leaanthony/go-ansi-parser v1.6.0 h1:T8TuMhFB6TUMIUm0oRrSbgJudTFw9csT3ZK09w0t4Pg= github.com/leaanthony/go-ansi-parser v1.6.0 h1:T8TuMhFB6TUMIUm0oRrSbgJudTFw9csT3ZK09w0t4Pg=
github.com/leaanthony/go-ansi-parser v1.6.0/go.mod h1:+vva/2y4alzVmmIEpk9QDhA7vLC5zKDTRwfZGOp3IWU= github.com/leaanthony/go-ansi-parser v1.6.0/go.mod h1:+vva/2y4alzVmmIEpk9QDhA7vLC5zKDTRwfZGOp3IWU=
github.com/leaanthony/go-ansi-parser v1.6.1 h1:xd8bzARK3dErqkPFtoF9F3/HgN8UQk0ed1YDKpEz01A=
github.com/leaanthony/go-ansi-parser v1.6.1/go.mod h1:+vva/2y4alzVmmIEpk9QDhA7vLC5zKDTRwfZGOp3IWU=
github.com/leaanthony/gosod v1.0.3 h1:Fnt+/B6NjQOVuCWOKYRREZnjGyvg+mEhd1nkkA04aTQ= github.com/leaanthony/gosod v1.0.3 h1:Fnt+/B6NjQOVuCWOKYRREZnjGyvg+mEhd1nkkA04aTQ=
github.com/leaanthony/gosod v1.0.3/go.mod h1:BJ2J+oHsQIyIQpnLPjnqFGTMnOZXDbvWtRCSG7jGxs4= github.com/leaanthony/gosod v1.0.3/go.mod h1:BJ2J+oHsQIyIQpnLPjnqFGTMnOZXDbvWtRCSG7jGxs4=
github.com/leaanthony/gosod v1.0.4 h1:YLAbVyd591MRffDgxUOU1NwLhT9T1/YiwjKZpkNFeaI=
github.com/leaanthony/gosod v1.0.4/go.mod h1:GKuIL0zzPj3O1SdWQOdgURSuhkF+Urizzxh26t9f1cw=
github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY= github.com/leaanthony/slicer v1.5.0/go.mod h1:FwrApmf8gOrpzEWM2J/9Lh79tyq8KTX5AzRtwV7m4AY=
github.com/leaanthony/slicer v1.6.0 h1:1RFP5uiPJvT93TAHi+ipd3NACobkW53yUiBqZheE/Js= github.com/leaanthony/slicer v1.6.0 h1:1RFP5uiPJvT93TAHi+ipd3NACobkW53yUiBqZheE/Js=
github.com/leaanthony/slicer v1.6.0/go.mod h1:o/Iz29g7LN0GqH3aMjWAe90381nyZlDNquK+mtH2Fj8= github.com/leaanthony/slicer v1.6.0/go.mod h1:o/Iz29g7LN0GqH3aMjWAe90381nyZlDNquK+mtH2Fj8=
github.com/leaanthony/u v1.1.0 h1:2n0d2BwPVXSUq5yhe8lJPHdxevE2qK5G99PMStMZMaI= github.com/leaanthony/u v1.1.0 h1:2n0d2BwPVXSUq5yhe8lJPHdxevE2qK5G99PMStMZMaI=
github.com/leaanthony/u v1.1.0/go.mod h1:9+o6hejoRljvZ3BzdYlVL0JYCwtnAsVuN9pVTQcaRfI= github.com/leaanthony/u v1.1.0/go.mod h1:9+o6hejoRljvZ3BzdYlVL0JYCwtnAsVuN9pVTQcaRfI=
github.com/leaanthony/u v1.1.1 h1:TUFjwDGlNX+WuwVEzDqQwC2lOv0P4uhTQw7CMFdiK7M=
github.com/leaanthony/u v1.1.1/go.mod h1:9+o6hejoRljvZ3BzdYlVL0JYCwtnAsVuN9pVTQcaRfI=
github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU=
github.com/matryer/is v1.4.1 h1:55ehd8zaGABKLXQUe2awZ99BD/PTc2ls+KV/dXphgEQ=
github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
@ -47,6 +61,8 @@ github.com/minio/selfupdate v0.6.0 h1:i76PgT0K5xO9+hjzKcacQtO7+MjJ4JKA8Ak8XQ9DDw
github.com/minio/selfupdate v0.6.0/go.mod h1:bO02GTIPCMQFTEvE5h4DjYB58bCoZ35XLeBf0buTDdM= github.com/minio/selfupdate v0.6.0/go.mod h1:bO02GTIPCMQFTEvE5h4DjYB58bCoZ35XLeBf0buTDdM=
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU=
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
@ -54,20 +70,26 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM= github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM=
github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA=
github.com/samber/lo v1.47.0 h1:z7RynLwP5nbyRscyvcD043DWYoOcYRv3mV8lBeqOCLc=
github.com/samber/lo v1.47.0/go.mod h1:RmDH9Ct32Qy3gduHQuKJ3gW1fMHAnE/fAzQuf6He5cU=
github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=
github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZb78yU= github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZb78yU=
github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY= github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY=
github.com/tklauser/numcpus v0.8.0 h1:Mx4Wwe/FjZLeQsK/6kt2EOepwwSl7SmJrK5bV/dXYgY= github.com/tklauser/numcpus v0.9.0 h1:lmyCHtANi8aRUgkckBgoDk1nHCux3n2cgkJLXdQGPDo=
github.com/tklauser/numcpus v0.8.0/go.mod h1:ZJZlAY+dmR4eut8epnzf0u/VwodKmryxR8txiloSqBE= github.com/tklauser/numcpus v0.9.0/go.mod h1:SN6Nq1O3VychhC1npsWostA+oW+VOQTxZrS604NSRyI=
github.com/tkrajina/go-reflector v0.5.6 h1:hKQ0gyocG7vgMD2M3dRlYN6WBBOmdoOzJ6njQSepKdE= github.com/tkrajina/go-reflector v0.5.6 h1:hKQ0gyocG7vgMD2M3dRlYN6WBBOmdoOzJ6njQSepKdE=
github.com/tkrajina/go-reflector v0.5.6/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4= github.com/tkrajina/go-reflector v0.5.6/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4=
github.com/tkrajina/go-reflector v0.5.8 h1:yPADHrwmUbMq4RGEyaOUpz2H90sRsETNVpjzo3DLVQQ=
github.com/tkrajina/go-reflector v0.5.8/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
@ -75,10 +97,14 @@ github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQ
github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
github.com/wailsapp/go-webview2 v1.0.10 h1:PP5Hug6pnQEAhfRzLCoOh2jJaPdrqeRgJKZhyYyDV/w= github.com/wailsapp/go-webview2 v1.0.10 h1:PP5Hug6pnQEAhfRzLCoOh2jJaPdrqeRgJKZhyYyDV/w=
github.com/wailsapp/go-webview2 v1.0.10/go.mod h1:Uk2BePfCRzttBBjFrBmqKGJd41P6QIHeV9kTgIeOZNo= github.com/wailsapp/go-webview2 v1.0.10/go.mod h1:Uk2BePfCRzttBBjFrBmqKGJd41P6QIHeV9kTgIeOZNo=
github.com/wailsapp/go-webview2 v1.0.18 h1:SSSCoLA+MYikSp1U0WmvELF/4c3x5kH8Vi31TKyZ4yk=
github.com/wailsapp/go-webview2 v1.0.18/go.mod h1:qJmWAmAmaniuKGZPWwne+uor3AHMB5PFhqiK0Bbj8kc=
github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs=
github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o=
github.com/wailsapp/wails/v2 v2.9.1 h1:irsXnoQrCpeKzKTYZ2SUVlRRyeMR6I0vCO9Q1cvlEdc= github.com/wailsapp/wails/v2 v2.9.1 h1:irsXnoQrCpeKzKTYZ2SUVlRRyeMR6I0vCO9Q1cvlEdc=
github.com/wailsapp/wails/v2 v2.9.1/go.mod h1:7maJV2h+Egl11Ak8QZN/jlGLj2wg05bsQS+ywJPT0gI= github.com/wailsapp/wails/v2 v2.9.1/go.mod h1:7maJV2h+Egl11Ak8QZN/jlGLj2wg05bsQS+ywJPT0gI=
github.com/wailsapp/wails/v2 v2.9.2 h1:Xb5YRTos1w5N7DTMyYegWaGukCP2fIaX9WF21kPPF2k=
github.com/wailsapp/wails/v2 v2.9.2/go.mod h1:uehvlCwJSFcBq7rMCGfk4rxca67QQGsbg5Nm4m9UnBs=
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@ -88,11 +114,15 @@ golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc= golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1 h1:k/i9J1pBpvlfR+9QsetwPyERsqu1GIbi967PQMq3Ivc=
golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= golang.org/x/exp v0.0.0-20230522175609-2e198f4a06a1/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w=
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 h1:1UoZQm6f0P/ZO0w1Ri+f+ifG/gXhegadRdwBIXEFWDo=
golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67/go.mod h1:qj5a5QZpwLU2NLQudwIN5koi3beDhSAlJwa67PuM98c=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs=
golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@ -106,6 +136,7 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=

Loading…
Cancel
Save