feat (Menu Features): Added a port forwarding button and optimized server storage logic (#1092)
* feat (Menu Features): Added a port forwarding button and optimized server storage logic Added the `portForward` option to the `ServerFuncBtn` enumeration to support port forwarding Added duplicate ID checks to `ServerStore` to prevent data conflicts * fix(server): Fixed the update logic for redirect IDs in server storage Prevents updates from being skipped when the ID remains unchanged, ensuring that redirect IDs are mapped correctly * fix(server): Fixed an issue where existing records were not skipped correctly when updating the redirect ID
This commit is contained in:
@@ -175,6 +175,7 @@ class ServerStore extends HiveStore {
|
||||
}
|
||||
|
||||
for (final spi in ss) {
|
||||
if (get(spi.id) == null) continue;
|
||||
if (spi.jumpId != null && idMap.containsKey(spi.jumpId)) {
|
||||
final newJumpId = idMap[spi.jumpId]!;
|
||||
final newSpi = spi.copyWith(jumpId: newJumpId);
|
||||
|
||||
Reference in New Issue
Block a user