mirror of
https://gitee.com/HuLaSpark/HuLa.git
synced 2024-12-01 19:28:07 +08:00
fix(build): 🐛 添加不同编译版本,以修复不同架构安装出错问题
This commit is contained in:
parent
9339ecc11b
commit
19fb138d51
@ -9,5 +9,8 @@ index.html
|
|||||||
src/assets
|
src/assets
|
||||||
.eslintrc.cjs
|
.eslintrc.cjs
|
||||||
**/config
|
**/config
|
||||||
|
/src-tauri/*
|
||||||
|
.gitee
|
||||||
|
.github
|
||||||
commitlint.config.cjs
|
commitlint.config.cjs
|
||||||
auto-imports.d.ts
|
auto-imports.d.ts
|
12
.github/workflows/release.yml
vendored
12
.github/workflows/release.yml
vendored
@ -15,9 +15,17 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
platform: [macos-latest, windows-latest]
|
include:
|
||||||
|
- os: windows-latest
|
||||||
|
target: x86_64-pc-windows-msvc
|
||||||
|
- os: windows-latest
|
||||||
|
target: aarch64-pc-windows-msvc
|
||||||
|
- os: macos-latest
|
||||||
|
target: aarch64-apple-darwin
|
||||||
|
- os: macos-latest
|
||||||
|
target: x86_64-apple-darwin
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
2
src-tauri/Cargo.lock
generated
2
src-tauri/Cargo.lock
generated
@ -2107,7 +2107,7 @@ checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hula"
|
name = "hula"
|
||||||
version = "2.5.0"
|
version = "2.5.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "hula"
|
name = "hula"
|
||||||
version = "2.5.0"
|
version = "2.5.1"
|
||||||
description = "hula"
|
description = "hula"
|
||||||
authors = ["nongyehong"]
|
authors = ["nongyehong"]
|
||||||
license = ""
|
license = ""
|
||||||
|
@ -9,7 +9,9 @@
|
|||||||
"devUrl": "http://127.0.0.1:6130"
|
"devUrl": "http://127.0.0.1:6130"
|
||||||
},
|
},
|
||||||
"bundle": {
|
"bundle": {
|
||||||
"resources": ["tray"],
|
"resources": [
|
||||||
|
"tray"
|
||||||
|
],
|
||||||
"createUpdaterArtifacts": true,
|
"createUpdaterArtifacts": true,
|
||||||
"active": true,
|
"active": true,
|
||||||
"icon": [],
|
"icon": [],
|
||||||
@ -31,7 +33,9 @@
|
|||||||
"installMode": "passive"
|
"installMode": "passive"
|
||||||
},
|
},
|
||||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDk1NkNENEZFNzg1MjVFMEEKUldRS1hsSjQvdFJzbGJXcnNPNXBYZ2RlTmlRRFZYYVI3YXhiWGpYZXFwVUtucThZUnJHUGw5dVUK",
|
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDk1NkNENEZFNzg1MjVFMEEKUldRS1hsSjQvdFJzbGJXcnNPNXBYZ2RlTmlRRFZYYVI3YXhiWGpYZXFwVUtucThZUnJHUGw5dVUK",
|
||||||
"endpoints": ["https://github.com/HuLaSpark/HuLa/releases/latest/download/latest.json"]
|
"endpoints": [
|
||||||
|
"https://github.com/HuLaSpark/HuLa/releases/latest/download/latest.json"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,9 +9,13 @@
|
|||||||
"devUrl": "http://127.0.0.1:6130"
|
"devUrl": "http://127.0.0.1:6130"
|
||||||
},
|
},
|
||||||
"bundle": {
|
"bundle": {
|
||||||
"resources": ["tray"],
|
"resources": [
|
||||||
|
"tray"
|
||||||
|
],
|
||||||
"active": true,
|
"active": true,
|
||||||
"targets": ["app"],
|
"targets": [
|
||||||
|
"app"
|
||||||
|
],
|
||||||
"icon": [
|
"icon": [
|
||||||
"icons/macos/32x32.png",
|
"icons/macos/32x32.png",
|
||||||
"icons/macos/128x128.png",
|
"icons/macos/128x128.png",
|
||||||
|
@ -9,9 +9,13 @@
|
|||||||
"devUrl": "http://127.0.0.1:6130"
|
"devUrl": "http://127.0.0.1:6130"
|
||||||
},
|
},
|
||||||
"bundle": {
|
"bundle": {
|
||||||
"resources": ["tray"],
|
"resources": [
|
||||||
|
"tray"
|
||||||
|
],
|
||||||
"active": true,
|
"active": true,
|
||||||
"targets": ["msi"],
|
"targets": [
|
||||||
|
"msi"
|
||||||
|
],
|
||||||
"icon": [
|
"icon": [
|
||||||
"icons/windows/32x32.png",
|
"icons/windows/32x32.png",
|
||||||
"icons/windows/128x128.png",
|
"icons/windows/128x128.png",
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
@keydown.exact.enter="inputKeyDown"
|
@keydown.exact.enter="inputKeyDown"
|
||||||
@keydown.exact.meta.enter="inputKeyDown"
|
@keydown.exact.meta.enter="inputKeyDown"
|
||||||
@keydown.exact.ctrl.enter="inputKeyDown"></div>
|
@keydown.exact.ctrl.enter="inputKeyDown"></div>
|
||||||
<!-- TODO 这里的在win上会有延迟显示的bug (nyh -> 2024-09-01 23:40:44) -->
|
|
||||||
<span
|
<span
|
||||||
v-if="isEntering"
|
v-if="isEntering"
|
||||||
@click.stop="messageInputDom.focus()"
|
@click.stop="messageInputDom.focus()"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 顶部操作栏和显示用户名 -->
|
<!-- 顶部操作栏和显示用户名 -->
|
||||||
<main
|
<main
|
||||||
|
data-tauri-drag-region
|
||||||
class="relative z-30 flex-y-center border-b-(1px solid [--right-chat-footer-line-color]) justify-between p-[6px_20px_12px] select-none">
|
class="relative z-30 flex-y-center border-b-(1px solid [--right-chat-footer-line-color]) justify-between p-[6px_20px_12px] select-none">
|
||||||
<n-flex align="center">
|
<n-flex align="center">
|
||||||
<span class="color-[--text-color]">{{ activeItem.name }}</span>
|
<span class="color-[--text-color]">{{ activeItem.name }}</span>
|
||||||
|
@ -250,6 +250,10 @@ export const useCommon = () => {
|
|||||||
spaceNode.contentEditable = 'false'
|
spaceNode.contentEditable = 'false'
|
||||||
// 不可以选中
|
// 不可以选中
|
||||||
spaceNode.style.userSelect = 'none'
|
spaceNode.style.userSelect = 'none'
|
||||||
|
// 插入一个br标签节点作为换行
|
||||||
|
const brNode = document.createElement('br')
|
||||||
|
// 将br标签节点插入到光标位置
|
||||||
|
range?.insertNode(brNode)
|
||||||
// 将空格节点插入到光标位置
|
// 将空格节点插入到光标位置
|
||||||
range?.insertNode(spaceNode)
|
range?.insertNode(spaceNode)
|
||||||
range?.collapse(false)
|
range?.collapse(false)
|
||||||
|
@ -8,6 +8,10 @@ export const useLogin = () => {
|
|||||||
* 设置登录状态(系统托盘图标,系统托盘菜单选项)
|
* 设置登录状态(系统托盘图标,系统托盘菜单选项)
|
||||||
*/
|
*/
|
||||||
const setLoginState = async () => {
|
const setLoginState = async () => {
|
||||||
|
// 登录成功后删除本地存储的wsLogin,防止用户在二维码页面刷新出二维码但是不使用二维码登录,导致二维码过期或者登录失败
|
||||||
|
if (localStorage.getItem('wsLogin')) {
|
||||||
|
localStorage.removeItem('wsLogin')
|
||||||
|
}
|
||||||
await emit('login_success')
|
await emit('login_success')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,7 +215,15 @@ export const useMsgInput = (messageInputDom: Ref) => {
|
|||||||
/** 当输入框手动输入值的时候触发input事件(使用vueUse的防抖) */
|
/** 当输入框手动输入值的时候触发input事件(使用vueUse的防抖) */
|
||||||
const handleInput = useDebounceFn(async (e: Event) => {
|
const handleInput = useDebounceFn(async (e: Event) => {
|
||||||
const inputElement = e.target as HTMLInputElement
|
const inputElement = e.target as HTMLInputElement
|
||||||
msgInput.value = inputElement.textContent || ''
|
console.log('input', inputElement)
|
||||||
|
// 如果输入框中只有<br />标签,则清空输入框内容
|
||||||
|
// TODO: 为什么这里输入后会有一个br标签?
|
||||||
|
if (inputElement.innerHTML === '<br>') {
|
||||||
|
inputElement.innerHTML = ''
|
||||||
|
msgInput.value = inputElement.innerHTML
|
||||||
|
return
|
||||||
|
}
|
||||||
|
msgInput.value = inputElement.innerHTML || ''
|
||||||
const { range, selection } = getEditorRange()!
|
const { range, selection } = getEditorRange()!
|
||||||
/** 获取当前光标所在的节点和文本内容 */
|
/** 获取当前光标所在的节点和文本内容 */
|
||||||
if (!range || !selection) {
|
if (!range || !selection) {
|
||||||
|
@ -17,6 +17,9 @@ export const useWindowState = async (label: string) => {
|
|||||||
|
|
||||||
// 监听窗口关闭事件,当窗口是非正常关闭的时候触发
|
// 监听窗口关闭事件,当窗口是非正常关闭的时候触发
|
||||||
await win?.onCloseRequested(async () => {
|
await win?.onCloseRequested(async () => {
|
||||||
|
if (localStorage.getItem('wsLogin')) {
|
||||||
|
localStorage.removeItem('wsLogin')
|
||||||
|
}
|
||||||
await emit(EventEnum.WIN_CLOSE, WebviewWindow.getCurrent().label)
|
await emit(EventEnum.WIN_CLOSE, WebviewWindow.getCurrent().label)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
3
src/typings/auto-imports.d.ts
vendored
3
src/typings/auto-imports.d.ts
vendored
@ -3,7 +3,6 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
// noinspection JSUnusedGlobalSymbols
|
// noinspection JSUnusedGlobalSymbols
|
||||||
// Generated by unplugin-auto-import
|
// Generated by unplugin-auto-import
|
||||||
// biome-ignore lint: disable
|
|
||||||
export {}
|
export {}
|
||||||
declare global {
|
declare global {
|
||||||
const EffectScope: typeof import('vue')['EffectScope']
|
const EffectScope: typeof import('vue')['EffectScope']
|
||||||
@ -88,6 +87,6 @@ declare global {
|
|||||||
// for type re-export
|
// for type re-export
|
||||||
declare global {
|
declare global {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue'
|
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
|
||||||
import('vue')
|
import('vue')
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,6 @@ import { statusItem } from '@/views/homeWindow/onlineStatus/config.ts'
|
|||||||
import { onlineStatus } from '@/stores/onlineStatus.ts'
|
import { onlineStatus } from '@/stores/onlineStatus.ts'
|
||||||
import { WebviewWindow } from '@tauri-apps/api/webviewWindow'
|
import { WebviewWindow } from '@tauri-apps/api/webviewWindow'
|
||||||
import { listen } from '@tauri-apps/api/event'
|
import { listen } from '@tauri-apps/api/event'
|
||||||
import { useWsLoginStore } from '@/stores/ws.ts'
|
|
||||||
import { useSettingStore } from '@/stores/setting.ts'
|
import { useSettingStore } from '@/stores/setting.ts'
|
||||||
|
|
||||||
const appWindow = WebviewWindow.getCurrent()
|
const appWindow = WebviewWindow.getCurrent()
|
||||||
@ -64,8 +63,6 @@ const OLStatusStore = onlineStatus()
|
|||||||
const settingStore = useSettingStore()
|
const settingStore = useSettingStore()
|
||||||
const { lockScreen } = storeToRefs(settingStore)
|
const { lockScreen } = storeToRefs(settingStore)
|
||||||
const isLoginWin = ref(true)
|
const isLoginWin = ref(true)
|
||||||
const loginStore = useWsLoginStore()
|
|
||||||
const loginQrCode = computed(() => loginStore.loginQrCode)
|
|
||||||
|
|
||||||
const division = () => {
|
const division = () => {
|
||||||
return <div class={'h-1px bg-[--line-color] w-full'}></div>
|
return <div class={'h-1px bg-[--line-color] w-full'}></div>
|
||||||
@ -75,7 +72,7 @@ const handleExit = () => {
|
|||||||
/** 退出时关闭锁屏 */
|
/** 退出时关闭锁屏 */
|
||||||
lockScreen.value.enable = false
|
lockScreen.value.enable = false
|
||||||
exit(0)
|
exit(0)
|
||||||
if (loginQrCode.value) {
|
if (localStorage.getItem('wsLogin')) {
|
||||||
localStorage.removeItem('wsLogin')
|
localStorage.removeItem('wsLogin')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user