forked from mirrors/cursor-free-vip
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea44218a8a | ||
|
|
fdc8317380 | ||
|
|
523daea54e | ||
|
|
5a4e32f3f4 | ||
|
|
d91485ec75 | ||
|
|
51cef9c2b2 | ||
|
|
6e6180e331 |
@@ -1,5 +1,10 @@
|
|||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## v1.8.05
|
||||||
|
1. Fix: Linux Path Not Found | 修復linuxpath問題
|
||||||
|
2. Add: support for detecting both 150/150 and 50/50 usage limits | 添加偵測50 或者150的使用量
|
||||||
|
3. Improve: usage parsing and validation | 檢測使用量
|
||||||
|
|
||||||
## v1.8.04
|
## v1.8.04
|
||||||
1. Update totally_reset_cursor.py | 更新 totally_reset_cursor.py
|
1. Update totally_reset_cursor.py | 更新 totally_reset_cursor.py
|
||||||
2. Fix: improve Linux Chrome visibility and root user handling | 修復 Linux Chrome 可見性以及 root 用戶處理
|
2. Fix: improve Linux Chrome visibility and root user handling | 修復 Linux Chrome 可見性以及 root 用戶處理
|
||||||
|
|||||||
@@ -419,8 +419,8 @@ class OAuthHandler:
|
|||||||
usage_text = usage_element.text
|
usage_text = usage_element.text
|
||||||
print(f"{Fore.CYAN}{EMOJI['INFO']} {self.translator.get('oauth.usage_count', usage=usage_text) if self.translator else f'Usage count: {usage_text}'}{Style.RESET_ALL}")
|
print(f"{Fore.CYAN}{EMOJI['INFO']} {self.translator.get('oauth.usage_count', usage=usage_text) if self.translator else f'Usage count: {usage_text}'}{Style.RESET_ALL}")
|
||||||
|
|
||||||
# Check if account is expired
|
# Check if account is expired (both 150/150 and 50/50 cases)
|
||||||
if usage_text.strip() == "150 / 150":
|
if usage_text.strip() == "150 / 150" or usage_text.strip() == "50 / 50":
|
||||||
print(f"{Fore.YELLOW}{EMOJI['INFO']} {self.translator.get('oauth.account_has_reached_maximum_usage', creating_new_account='creating new account') if self.translator else 'Account has reached maximum usage, creating new account...'}{Style.RESET_ALL}")
|
print(f"{Fore.YELLOW}{EMOJI['INFO']} {self.translator.get('oauth.account_has_reached_maximum_usage', creating_new_account='creating new account') if self.translator else 'Account has reached maximum usage, creating new account...'}{Style.RESET_ALL}")
|
||||||
|
|
||||||
# Delete current account
|
# Delete current account
|
||||||
@@ -622,8 +622,8 @@ class OAuthHandler:
|
|||||||
usage_text = usage_element.text
|
usage_text = usage_element.text
|
||||||
print(f"{Fore.CYAN}{EMOJI['INFO']} {self.translator.get('oauth.usage_count', usage=usage_text) if self.translator else f'Usage count: {usage_text}'}{Style.RESET_ALL}")
|
print(f"{Fore.CYAN}{EMOJI['INFO']} {self.translator.get('oauth.usage_count', usage=usage_text) if self.translator else f'Usage count: {usage_text}'}{Style.RESET_ALL}")
|
||||||
|
|
||||||
# Check if account is expired
|
# Check if account is expired (both 150/150 and 50/50 cases)
|
||||||
if usage_text.strip() == "150 / 150":
|
if usage_text.strip() == "150 / 150" or usage_text.strip() == "50 / 50":
|
||||||
print(f"{Fore.YELLOW}{EMOJI['INFO']} {self.translator.get('oauth.account_has_reached_maximum_usage', deleting='deleting') if self.translator else 'Account has reached maximum usage, deleting...'}{Style.RESET_ALL}")
|
print(f"{Fore.YELLOW}{EMOJI['INFO']} {self.translator.get('oauth.account_has_reached_maximum_usage', deleting='deleting') if self.translator else 'Account has reached maximum usage, deleting...'}{Style.RESET_ALL}")
|
||||||
|
|
||||||
delete_js = """
|
delete_js = """
|
||||||
@@ -708,8 +708,8 @@ class OAuthHandler:
|
|||||||
usage_text = usage_element.text
|
usage_text = usage_element.text
|
||||||
print(f"{Fore.CYAN}{EMOJI['INFO']} {self.translator.get('oauth.usage_count', usage=usage_text) if self.translator else f'Usage count: {usage_text}'}{Style.RESET_ALL}")
|
print(f"{Fore.CYAN}{EMOJI['INFO']} {self.translator.get('oauth.usage_count', usage=usage_text) if self.translator else f'Usage count: {usage_text}'}{Style.RESET_ALL}")
|
||||||
|
|
||||||
# Check if account is expired
|
# Check if account is expired (both 150/150 and 50/50 cases)
|
||||||
if usage_text.strip() == "150 / 150":
|
if usage_text.strip() == "150 / 150" or usage_text.strip() == "50 / 50":
|
||||||
print(f"{Fore.YELLOW}{EMOJI['INFO']} {self.translator.get('oauth.account_has_reached_maximum_usage', deleting='deleting') if self.translator else 'Account has reached maximum usage, deleting...'}{Style.RESET_ALL}")
|
print(f"{Fore.YELLOW}{EMOJI['INFO']} {self.translator.get('oauth.account_has_reached_maximum_usage', deleting='deleting') if self.translator else 'Account has reached maximum usage, deleting...'}{Style.RESET_ALL}")
|
||||||
|
|
||||||
delete_js = """
|
delete_js = """
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ EMOJI = {
|
|||||||
"SUCCESS": "✅",
|
"SUCCESS": "✅",
|
||||||
"ERROR": "❌",
|
"ERROR": "❌",
|
||||||
"INFO": "ℹ️",
|
"INFO": "ℹ️",
|
||||||
"RESET": "<EFBFBD><EFBFBD>",
|
"RESET": "🔄",
|
||||||
"WARNING": "⚠️",
|
"WARNING": "⚠️",
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ def get_cursor_paths(translator=None) -> Tuple[str, str]:
|
|||||||
default_paths = {
|
default_paths = {
|
||||||
"Darwin": "/Applications/Cursor.app/Contents/Resources/app",
|
"Darwin": "/Applications/Cursor.app/Contents/Resources/app",
|
||||||
"Windows": os.path.join(os.getenv("LOCALAPPDATA", ""), "Programs", "Cursor", "resources", "app"),
|
"Windows": os.path.join(os.getenv("LOCALAPPDATA", ""), "Programs", "Cursor", "resources", "app"),
|
||||||
"Linux": ["/opt/Cursor/resources/app", "/usr/share/cursor/resources/app", os.path.expanduser("~/.local/share/cursor/resources/app")]
|
"Linux": ["/opt/Cursor/resources/app", "/usr/share/cursor/resources/app", os.path.expanduser("~/.local/share/cursor/resources/app"), "/usr/lib/cursor/app/"]
|
||||||
}
|
}
|
||||||
|
|
||||||
# If config doesn't exist, create it with default paths
|
# If config doesn't exist, create it with default paths
|
||||||
@@ -170,7 +170,7 @@ def get_workbench_cursor_path(translator=None) -> str:
|
|||||||
"main": "out/vs/workbench/workbench.desktop.main.js"
|
"main": "out/vs/workbench/workbench.desktop.main.js"
|
||||||
},
|
},
|
||||||
"Linux": {
|
"Linux": {
|
||||||
"bases": ["/opt/Cursor/resources/app", "/usr/share/cursor/resources/app"],
|
"bases": ["/opt/Cursor/resources/app", "/usr/share/cursor/resources/app", "/usr/lib/cursor/app/"],
|
||||||
"main": "out/vs/workbench/workbench.desktop.main.js"
|
"main": "out/vs/workbench/workbench.desktop.main.js"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -299,11 +299,11 @@ def modify_workbench_js(file_path: str, translator=None) -> bool:
|
|||||||
|
|
||||||
if sys.platform == "win32":
|
if sys.platform == "win32":
|
||||||
# Define replacement patterns
|
# Define replacement patterns
|
||||||
CButton_old_pattern = r'$(k,E(Ks,{title:"Upgrade to Pro",size:"small",get codicon(){return F.rocket},get onClick(){return t.pay}}),null)'
|
CButton_old_pattern = r'M(x,I(as,{title:"Upgrade to Pro",size:"small",get codicon(){return $.rocket},get onClick(){return t.pay}}),null)'
|
||||||
CButton_new_pattern = r'$(k,E(Ks,{title:"yeongpin GitHub",size:"small",get codicon(){return F.rocket},get onClick(){return function(){window.open("https://github.com/yeongpin/cursor-free-vip","_blank")}}}),null)'
|
CButton_new_pattern = r'M(x,I(as,{title:"yeongpin GitHub",size:"small",get codicon(){return $.rocket},get onClick(){return function(){window.open("https://github.com/yeongpin/cursor-free-vip","_blank")}}}),null)'
|
||||||
elif sys.platform == "linux":
|
elif sys.platform == "linux":
|
||||||
CButton_old_pattern = r'$(k,E(Ks,{title:"Upgrade to Pro",size:"small",get codicon(){return F.rocket},get onClick(){return t.pay}}),null)'
|
CButton_old_pattern = r'M(x,I(as,{title:"Upgrade to Pro",size:"small",get codicon(){return $.rocket},get onClick(){return t.pay}}),null)'
|
||||||
CButton_new_pattern = r'$(k,E(Ks,{title:"yeongpin GitHub",size:"small",get codicon(){return F.rocket},get onClick(){return function(){window.open("https://github.com/yeongpin/cursor-free-vip","_blank")}}}),null)'
|
CButton_new_pattern = r'M(x,I(as,{title:"yeongpin GitHub",size:"small",get codicon(){return $.rocket},get onClick(){return function(){window.open("https://github.com/yeongpin/cursor-free-vip","_blank")}}}),null)'
|
||||||
elif sys.platform == "darwin":
|
elif sys.platform == "darwin":
|
||||||
CButton_old_pattern = r'M(x,I(as,{title:"Upgrade to Pro",size:"small",get codicon(){return $.rocket},get onClick(){return t.pay}}),null)'
|
CButton_old_pattern = r'M(x,I(as,{title:"Upgrade to Pro",size:"small",get codicon(){return $.rocket},get onClick(){return t.pay}}),null)'
|
||||||
CButton_new_pattern = r'M(x,I(as,{title:"yeongpin GitHub",size:"small",get codicon(){return $.rocket},get onClick(){return function(){window.open("https://github.com/yeongpin/cursor-free-vip","_blank")}}}),null)'
|
CButton_new_pattern = r'M(x,I(as,{title:"yeongpin GitHub",size:"small",get codicon(){return $.rocket},get onClick(){return function(){window.open("https://github.com/yeongpin/cursor-free-vip","_blank")}}}),null)'
|
||||||
@@ -786,4 +786,4 @@ def run(translator=None):
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
from main import translator as main_translator
|
from main import translator as main_translator
|
||||||
run(main_translator)
|
run(main_translator)
|
||||||
|
|||||||
Reference in New Issue
Block a user