Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1950779

Browse files
committed
remove max size
1 parent97b461f commit1950779

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

‎Coder-Desktop/Coder-Desktop/Views/FileSync/FileSyncConfig.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ struct FileSyncConfig<VPN: VPNService, FS: FileSyncDaemon>: View {
2424
.width(min:100, ideal:120)
2525
TableColumn("Status"){ $0.status.column.help($0.statusAndErrors)}
2626
.width(min:80, ideal:100)
27-
TableColumn("Size"){Text($0.maxSize.humanSizeBytes).help($0.sizeDescription)}
27+
TableColumn("Size"){Text($0.localSize.humanSizeBytes).help($0.sizeDescription)}
2828
.width(min:60, ideal:80)
2929
}
3030
.contextMenu(forSelectionType:FileSyncSession.ID.self, menu:{ _in},

‎Coder-Desktop/VPNLib/FileSync/FileSyncSession.swift

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ public struct FileSyncSession: Identifiable {
99
publicletbetaPath:String
1010
publicletstatus:FileSyncStatus
1111

12-
publicletmaxSize:FileSyncSessionEndpointSize
1312
publicletlocalSize:FileSyncSessionEndpointSize
1413
publicletremoteSize:FileSyncSessionEndpointSize
1514

@@ -25,14 +24,14 @@ public struct FileSyncSession: Identifiable {
2524
}else{
2625
"Unknown"
2726
}
28-
if state.session.beta.protocol==Url_Protocol.ssh, !state.session.beta.host.isEmpty{
27+
agentHost=if state.session.beta.protocol==Url_Protocol.ssh, !state.session.beta.host.isEmpty{
2928
// TOOD: We need to either:
3029
// - make this compatible with custom suffixes
3130
// - always strip the tld
3231
// - always keep the tld
33-
agentHost=state.session.beta.host
32+
state.session.beta.host
3433
}else{
35-
agentHost="Unknown"
34+
"Unknown"
3635
}
3736
betaPath=if !state.session.beta.path.isEmpty{
3837
state.session.beta.path
@@ -64,7 +63,6 @@ public struct FileSyncSession: Identifiable {
6463
dirCount: state.betaState.directories,
6564
symLinkCount: state.betaState.symbolicLinks
6665
)
67-
maxSize= localSize.maxOf(other: remoteSize)
6866

6967
errors=accumulateErrors(from: state)
7068
}
@@ -77,9 +75,6 @@ public struct FileSyncSession: Identifiable {
7775

7876
publicvarsizeDescription:String{
7977
varout=""
80-
if localSize!= remoteSize{
81-
out+="Maximum:\n\(maxSize.description(linePrefix:""))\n\n"
82-
}
8378
out+="Local:\n\(localSize.description(linePrefix:""))\n\n"
8479
out+="Remote:\n\(remoteSize.description(linePrefix:""))"
8580
return out
@@ -99,15 +94,6 @@ public struct FileSyncSessionEndpointSize: Equatable {
9994
self.symLinkCount= symLinkCount
10095
}
10196

102-
func maxOf(other:FileSyncSessionEndpointSize)->FileSyncSessionEndpointSize{
103-
FileSyncSessionEndpointSize(
104-
sizeBytes:max(sizeBytes, other.sizeBytes),
105-
fileCount:max(fileCount, other.fileCount),
106-
dirCount:max(dirCount, other.dirCount),
107-
symLinkCount:max(symLinkCount, other.symLinkCount)
108-
)
109-
}
110-
11197
publicvarhumanSizeBytes:String{
11298
humanReadableBytes(sizeBytes)
11399
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp