perf: 删除安卓手表和二维码登录,因为它很寄

This commit is contained in:
Clansty 2022-08-29 17:22:53 +08:00
parent e01c415b31
commit 9e76ba5070
2 changed files with 4 additions and 19 deletions

View File

@ -4,7 +4,6 @@ import { Api } from 'telegram';
import { getLogger, Logger } from 'log4js';
import { Button } from 'telegram/tl/custom/button';
import setupHelper from '../helpers/setupHelper';
import { Platform } from 'oicq';
import commands from '../constants/commands';
import { WorkMode } from '../types/definitions';
import OicqClient from '../client/OicqClient';
@ -82,19 +81,10 @@ export default class SetupController {
[Button.text('安卓平板', true, true)],
[Button.text('iPad', true, true)],
[Button.text('macOS', true, true)],
[Button.text('安卓手表', true, true)],
]);
const platform = setupHelper.convertTextToPlatform(platformText);
let password = '';
const isPasswordLogin = platform === Platform.Watch ? '' :
await this.setupService.waitForOwnerInput('用密码登录吗?', [
[Button.text('密码登录', true, true)],
[Button.text('二维码登录', true, true)],
]);
if (isPasswordLogin === '密码登录') {
password = await this.setupService.waitForOwnerInput('请输入密码', undefined, true);
password = md5Hex(password);
}
let password = await this.setupService.waitForOwnerInput('请输入密码', undefined, true);
password = md5Hex(password);
this.oicq = await this.setupService.createOicq(uin, password, platform);
await this.setupService.informOwner(`登录成功`);
this.setupService.saveOicqLoginInfo(uin, password, platform);

View File

@ -97,13 +97,8 @@ export default class SetupService {
return await this.waitForOwnerInput(`请输入手机 ${phone} 收到的验证码`);
},
onVerifySlider: async (url) => {
const res = await this.waitForOwnerInput(`收到滑块验证码 <code>${url}</code>\n` +
'请使用<a href="https://github.com/mzdluo123/TxCaptchaHelper/releases">此软件</a>验证并输入 Ticket\n' +
'或者点击下方的按钮切换到扫码登录', [
Button.text('切换到扫码登录', true, true),
]);
if (res === '切换到扫码登录') return '';
return res;
return await this.waitForOwnerInput(`收到滑块验证码 <code>${url}</code>\n` +
'请使用<a href="https://github.com/mzdluo123/TxCaptchaHelper/releases">此软件</a>验证并输入 Ticket');
},
});
}