Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Conn): 修复重构后编辑lagrange自定义签名,会导致签名丢失的问题 #244

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/api/im_connections/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export function postConnectSetData(

export function postSetSignServer(
id: string,
signServerUrl: '' | 'sealdice' | 'lagrange',
signServerUrl: string | 'sealdice' | 'lagrange',
w: boolean,
signServerVersion: string,
) {
Expand Down
7 changes: 3 additions & 4 deletions src/components/PageConnectInfoItems.vue
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@
<el-button @click="dialogSetSignServerVisible = false">取消</el-button>
<el-button
type="primary"
:disabled="form.signServerType === 2 && form.signServerUrl === ''"
:disabled="form.signServerType === 2 && isEmpty(trim(form.signServerUrl))"
@click="doSetSignServer"
>确定</el-button
>
Expand Down Expand Up @@ -1833,6 +1833,7 @@ import {
postSmsCodeSet,
} from '~/api/im_connections';
import { postToolOnebot } from '~/api/others';
import { isEmpty, trim } from 'lodash-es';

dayjs.extend(relativeTime);

Expand Down Expand Up @@ -2176,9 +2177,7 @@ const doSetSignServer = async () => {
}
const ret = await postSetSignServer(
form.endpoint.id,
['sealdice', 'lagrange'].includes(form.signServerUrl)
? (form.signServerUrl as 'sealdice' | 'lagrange')
: '',
trim(form.signServerUrl),
true,
form.signServerVersion,
);
Expand Down