mirror of
https://github.com/shadowsocks/ShadowsocksX-NG.git
synced 2026-11-19 03:54:59 +00:00
The pre-filled current name in the rename alert only showed on the first presentation: SwiftUI on macOS recycles the alert panel and its TextField does not pick up binding changes made in the same update as re-presenting. Swap the alert for a RenameGroupSheet modeled on NewGroupSheet, presented via sheet(item:) so content state is rebuilt each time and the prefill always matches the target group. As with the creation form, a failed rename now keeps the sheet open with the entered name instead of closing the alert first and losing the input. The NodeContext adapter previously used by the move sheet is shared by both presentations. Add the manual catalog keys 重命名分组 (Rename Group) and 名称 (Name); 保存/取消 already existed.