easy-claude 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # 更新记录
2
2
 
3
+ ## 1.3.0
4
+
5
+ - Add a persistent, editable Subscription day (1–31 or Not set) below automatic usage refresh, visible with settings collapsed.
6
+
3
7
  ## 1.2.0
4
8
 
5
9
  - Add Start Claude proxy (green) and Stop Claude proxy (yellow) below the local proxy address. Save and restore previous proxy fields; require explicit default restoration for legacy settings without a saved baseline. Never restart Claude automatically.
package/README.md CHANGED
@@ -18,14 +18,12 @@ Below Local proxy, click green Start Claude proxy to back up and configure Deskt
18
18
 
19
19
  [Setup, proxy configuration and removal](docs/exit-ip-protection.md) · [Development verification](docs/版本/出口IP保护开发管理.md)
20
20
 
21
- ## v1.2.0 release notes
21
+ ## v1.3.0 release notes
22
22
 
23
- - Add green Start Claude proxy and yellow Stop Claude proxy buttons; save and restore original proxy fields. Legacy settings require confirmation before restoring defaults.
24
- - Enforce a 60-second minimum IP check interval, including manual/network triggers; migrate saved 30-second settings.
25
- - Fall back from ipinfo to ipify on lookup failure or rate limiting, with a ten-minute protection-source cooldown for HTTP 429.
26
- - Keep protection heartbeats alive during menus and confirmations. Updates only inspect settings; they never silently configure proxies or restart Claude.
23
+ - Add a persistent Subscription day row below Automatic usage refresh, visible with settings collapsed. Select day 1–31 or Not set.
24
+ - Subscription day is a personal note; it does not read billing or change usage resets.
27
25
 
28
- [Release history](CHANGELOG.md) · [1.2.0 development and release](docs/版本/1.2.0开发管理.md)
26
+ [Release history](CHANGELOG.md) · [1.3.0 verification](docs/版本/1.3.0开发管理.md)
29
27
 
30
28
  ## Install and run
31
29
 
@@ -119,3 +117,7 @@ CLI login can expire while the desktop remains signed in. Official service respo
119
117
  [Version management](https://github.com/UnionSchool/easy-claude/blob/main/docs/版本/README.md)
120
118
 
121
119
  The Network & protection section groups the current exit, allowlist and protection status. With protection on, the displayed exit follows the protection check immediately; failures show unknown instead of an old IP. Expand More settings to edit the allowlist and interval.
120
+
121
+ ## Subscription day
122
+
123
+ A Subscription day row below Automatic usage refresh stays visible with settings collapsed. Choose day 1–31 or Not set; each tool saves its own value. This is a personal note, not a billing lookup or usage reset.
package/README.zh-CN.md CHANGED
@@ -20,14 +20,12 @@ Claude App 与 Claude Code CLI 共用固定本机代理 **http://127.0.0.1:18197
20
20
 
21
21
  [安装、代理配置、关闭与卸载](docs/出口IP保护.md) · [开发验证记录](docs/版本/出口IP保护开发管理.md)
22
22
 
23
- ## v1.2.0 更新说明
23
+ ## v1.3.0 更新说明
24
24
 
25
- - 新增绿色“启动Claude代理”与黄色“停止Claude代理”,用户点击后配置两端代理或按原记录恢复;旧版无记录时须确认恢复默认。
26
- - IP最低复查间隔改为60秒,原30秒设置自动迁移;网络变化仍先阻断,等间隔到点再验证。
27
- - ipinfo失败或限流时使用ipify备用;保护查询源429冷却10分钟,双源失败保持阻断。
28
- - 菜单或确认框期间保持保护心跳。安装/更新只检查代理,不静默配置、不自动重开Claude。
25
+ - 新增“订阅日期”,在“额度自动刷新”下方常驻显示,收起时也可见;支持每月1–31日(如“3日”)或“未设置”,独立保存。
26
+ - 订阅日期仅作个人记录,不读取账单、不改变额度重置。
29
27
 
30
- 历史版本见[CHANGELOG](CHANGELOG.md),本版见[开发与发布记录](docs/版本/1.2.0开发管理.md)。
28
+ 历史见[CHANGELOG](CHANGELOG.md),本版见[开发与发布记录](docs/版本/1.3.0开发管理.md)。
31
29
 
32
30
  ## 安装与使用
33
31
 
@@ -151,3 +149,7 @@ IP地理库的城市与时区可能存在偏差或互相不一致;显示接口
151
149
  额度自动刷新默认关闭,开启后每5分钟查询,重置/提醒到点每分钟确认,关闭后仅手动。服务返回429后先等待10分钟、后最长15分钟,手动刷新遵守冷却,成功后清零。网络与保护合为一个分区,保护开启时当前出口与保护检测同步更新;失败显示未知,白名单和复查周期在更多设置中修改。关闭保护时IP/城市查询每5分钟刷新。
152
150
 
153
151
  [版本管理](https://github.com/UnionSchool/easy-claude/blob/main/docs/版本/README.md)
152
+
153
+ ## 订阅日期
154
+
155
+ 控制面板在“额度自动刷新”下方新增“订阅日期”,收起设置时也显示。可选每月1–31日(如“3日”)或“未设置”,各工具独立保存;只作个人记录,不查询账单、不改变额度重置。
@@ -653,6 +653,7 @@ struct ControlPanelView: View {
653
653
  }
654
654
  Divider()
655
655
  setting(L("额度自动刷新", "Automatic usage refresh"), value: owner.automaticUsageRefresh) { owner.toggleAutomaticUsageRefresh() }
656
+ subscription
656
657
  Divider()
657
658
  HStack(spacing: 7) {
658
659
  Image(systemName: "clock").foregroundStyle(.secondary)
@@ -688,6 +689,19 @@ struct ControlPanelView: View {
688
689
  .preferredColorScheme(.dark)
689
690
  .lineSpacing(2)
690
691
  }
692
+ var subscription: some View {
693
+ HStack {
694
+ Text(L("订阅日期", "Subscription day")).font(.system(size: 12))
695
+ Spacer()
696
+ Picker(L("订阅日期", "Subscription day"), selection: Binding(
697
+ get: { owner.subscriptionDay }, set: { owner.setSubscriptionDay($0) })) {
698
+ Text(L("未设置", "Not set")).tag(0)
699
+ ForEach(1...31, id: \.self) { day in Text(L("\(day)日", "Day \(day)")).tag(day) }
700
+ }
701
+ .labelsHidden().frame(width: 110).controlSize(.small)
702
+ .accessibilityIdentifier("subscriptionDay")
703
+ }.frame(minHeight: 20)
704
+ }
691
705
  func iconButton(_ label: String, _ image: String, action: @escaping () -> Void) -> some View {
692
706
  Button(action: action) { Image(systemName: image).frame(width: 20, height: 20) }
693
707
  .buttonStyle(.plain).help(label).accessibilityLabel(label)
@@ -987,6 +1001,11 @@ final class Overlay: NSObject, NSApplicationDelegate, NSMenuDelegate, UNUserNoti
987
1001
  var ipClockCity: String?
988
1002
  var manualClockZone = TimeZone(identifier: "America/Los_Angeles")!
989
1003
  var manualClockCity = "硅谷"
1004
+ // 仅记录用户指定的每月日期,不读取账号账单或据此推算额度重置。
1005
+ @Published var subscriptionDay: Int = {
1006
+ let day = UserDefaults.standard.integer(forKey: "subscriptionDay")
1007
+ return (1...31).contains(day) ? day : 0
1008
+ }()
990
1009
  @Published var controlRevision = 0
991
1010
  let controlPopover = NSPopover()
992
1011
  var controlsExpanded = false
@@ -994,7 +1013,7 @@ final class Overlay: NSObject, NSApplicationDelegate, NSMenuDelegate, UNUserNoti
994
1013
  var controlHeight: CGFloat {
995
1014
  let state = currentControlState()
996
1015
  let quotaHeight: CGFloat = state.login ? 155 : CGFloat(max(1, state.quotas.count)) * 62 + (state.mode == "ready" ? 0 : 65)
997
- let total = quotaHeight + 310 + (controlsExpanded ? (followIPTimeZone ? 455 : 520) : 0)
1016
+ let total = quotaHeight + 342 + (controlsExpanded ? (followIPTimeZone ? 455 : 520) : 0)
998
1017
  return min(total, max(280, (status?.button?.window?.screen?.visibleFrame.height ?? NSScreen.main?.visibleFrame.height ?? 900) - 65))
999
1018
  }
1000
1019
  var status: NSStatusItem?
@@ -1224,6 +1243,11 @@ final class Overlay: NSObject, NSApplicationDelegate, NSMenuDelegate, UNUserNoti
1224
1243
  status?.button?.setAccessibilityLabel("Easy \(controlProduct) \(state.headline) \(state.text)")
1225
1244
  if controlPopover.isShown { resizeControls() }
1226
1245
  }
1246
+ func setSubscriptionDay(_ day: Int) {
1247
+ guard (0...31).contains(day) else { return }
1248
+ subscriptionDay = day
1249
+ UserDefaults.standard.set(day, forKey: "subscriptionDay")
1250
+ }
1227
1251
  func setLanguage(_ value: String) {
1228
1252
  guard AppLanguage(rawValue: value) != nil else { return }
1229
1253
  UserDefaults.standard.set(value, forKey: "interfaceLanguage")
@@ -5,7 +5,7 @@
5
5
  <key>CFBundleIdentifier</key><string>com.unionschool.easy-claude.overlay</string>
6
6
  <key>CFBundleName</key><string>Easy Claude Overlay</string>
7
7
  <key>CFBundlePackageType</key><string>APPL</string>
8
- <key>CFBundleShortVersionString</key><string>1.2.0</string>
8
+ <key>CFBundleShortVersionString</key><string>1.3.0</string>
9
9
  <key>LSMinimumSystemVersion</key><string>14.0</string>
10
10
  <key>CFBundleLocalizations</key><array><string>en</string><string>zh-Hans</string><string>zh-Hant</string></array>
11
11
  <key>LSUIElement</key><true/>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-claude",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Claude Code quota rings and transparent world clock for Claude desktop",
5
5
  "type": "module",
6
6
  "bin": {
@@ -31,7 +31,8 @@
31
31
  "test:protection": "node --test --test-timeout=15000 scripts/ip-guard-proof/verify.mjs scripts/ip-guard-proof/service-check.mjs",
32
32
  "test:protection-ui": "python3 scripts/test-protection-ui.py",
33
33
  "test:focus": "python3 scripts/test-focus.py",
34
- "test:polling": "python3 scripts/test-polling.py"
34
+ "test:polling": "python3 scripts/test-polling.py",
35
+ "test:subscription": "python3 scripts/test-subscription.py"
35
36
  },
36
37
  "license": "MIT",
37
38
  "author": "UnionSchool",