添加项目核心文件和 .gitignore
This commit is contained in:
@@ -110,8 +110,8 @@ class MainWindow:
|
||||
btn_frame.pack(fill="x", pady=5)
|
||||
|
||||
self.style.configure("Action.TButton", padding=8)
|
||||
ttk.Button(btn_frame, text="刷新Cursor授权", command=self.reset_machine_id, style="Action.TButton").pack(fill="x", pady=2)
|
||||
ttk.Button(btn_frame, text="实现Cursor0.45.x限制", command=self.dummy_function, style="Action.TButton").pack(fill="x", pady=2)
|
||||
ttk.Button(btn_frame, text="刷新Cursor编辑器授权", command=self.reset_machine_id, style="Action.TButton").pack(fill="x", pady=2)
|
||||
ttk.Button(btn_frame, text="突破Cursor0.45.x限制", command=self.dummy_function, style="Action.TButton").pack(fill="x", pady=2)
|
||||
ttk.Button(btn_frame, text="禁用Cursor版本更新", command=self.dummy_function, style="Action.TButton").pack(fill="x", pady=2)
|
||||
|
||||
def copy_device_id(self):
|
||||
@@ -283,21 +283,13 @@ class MainWindow:
|
||||
messagebox.showinfo("提示", "此功能暂未实现")
|
||||
|
||||
def reset_machine_id(self):
|
||||
"""重置机器码"""
|
||||
# 先检查状态
|
||||
if not self.check_status():
|
||||
return
|
||||
|
||||
"""刷新Cursor编辑器授权"""
|
||||
try:
|
||||
if self.switcher.reset_machine_id():
|
||||
messagebox.showinfo("成功", "机器码重置成功")
|
||||
# 重置后检查一次状态
|
||||
self.check_status()
|
||||
# 刷新授权
|
||||
success, message = self.switcher.refresh_cursor_auth()
|
||||
if success:
|
||||
messagebox.showinfo("成功", "Cursor编辑器授权刷新成功!\n" + message)
|
||||
else:
|
||||
messagebox.showerror("错误", "机器码重置失败,请查看日志")
|
||||
# 失败后也检查状态
|
||||
self.check_status()
|
||||
messagebox.showerror("错误", message)
|
||||
except Exception as e:
|
||||
messagebox.showerror("错误", f"重置失败: {str(e)}")
|
||||
# 出错后也检查状态
|
||||
self.check_status()
|
||||
messagebox.showerror("错误", f"刷新失败: {str(e)}")
|
||||
Reference in New Issue
Block a user