goldsync 0.1.15 → 0.1.16

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.
Files changed (2) hide show
  1. package/assets/GoldSync.rbxmx +137 -27
  2. package/package.json +1 -1
@@ -22,7 +22,7 @@ local CLIENT_HEADERS = {
22
22
  }
23
23
  local SETTINGS_PREFIX = "GoldSync:v2:"
24
24
  local UI_SETTINGS_PREFIX = "GoldSync:ui:v1:"
25
- local VERSION = "0.1.15"
25
+ local VERSION = "0.1.16"
26
26
  local REQUEST_INTERVAL_SECONDS = 0.15
27
27
  local REQUEST_RETRY_DELAYS = { 1, 2, 4 }
28
28
 
@@ -185,13 +185,13 @@ local searchBox = Instance.new("TextBox")
185
185
  searchBox.BackgroundColor3 = Color3.fromRGB(40, 40, 46)
186
186
  searchBox.BorderSizePixel = 0
187
187
  searchBox.ClearTextOnFocus = false
188
- searchBox.Font = Enum.Font.BuilderSans
189
- searchBox.PlaceholderColor3 = Color3.fromRGB(130, 130, 140)
188
+ searchBox.FontFace = Font.new("rbxasset://fonts/families/BuilderSans.json", Enum.FontWeight.Medium)
189
+ searchBox.PlaceholderColor3 = Color3.fromRGB(195, 195, 205)
190
190
  searchBox.PlaceholderText = "Search files and instances..."
191
191
  searchBox.Size = UDim2.new(1, -132, 1, 0)
192
192
  searchBox.Text = ""
193
193
  searchBox.TextColor3 = Color3.fromRGB(235, 235, 240)
194
- searchBox.TextSize = 12
194
+ searchBox.TextSize = 13
195
195
  searchBox.TextXAlignment = Enum.TextXAlignment.Left
196
196
  searchBox.Parent = controls
197
197
  Instance.new("UICorner", searchBox).CornerRadius = UDim.new(0, 4)
@@ -202,12 +202,12 @@ searchPadding.PaddingRight = UDim.new(0, 8)
202
202
  local unsyncedButton = Instance.new("TextButton")
203
203
  unsyncedButton.BackgroundColor3 = Color3.fromRGB(40, 40, 46)
204
204
  unsyncedButton.BorderSizePixel = 0
205
- unsyncedButton.Font = Enum.Font.BuilderSansBold
205
+ unsyncedButton.FontFace = Font.new("rbxasset://fonts/families/BuilderSans.json", Enum.FontWeight.Medium)
206
206
  unsyncedButton.Position = UDim2.new(1, -126, 0, 0)
207
207
  unsyncedButton.Size = UDim2.fromOffset(92, 28)
208
208
  unsyncedButton.Text = "Unsynced · 0"
209
209
  unsyncedButton.TextColor3 = Color3.fromRGB(190, 190, 198)
210
- unsyncedButton.TextSize = 11
210
+ unsyncedButton.TextSize = 13
211
211
  unsyncedButton.Parent = controls
212
212
  Instance.new("UICorner", unsyncedButton).CornerRadius = UDim.new(0, 4)
213
213
 
@@ -292,12 +292,12 @@ local statusBanner = Instance.new("TextLabel")
292
292
  statusBanner.AutomaticSize = Enum.AutomaticSize.Y
293
293
  statusBanner.BackgroundColor3 = Color3.fromRGB(66, 38, 40)
294
294
  statusBanner.BorderSizePixel = 0
295
- statusBanner.Font = Enum.Font.BuilderSans
295
+ statusBanner.FontFace = Font.new("rbxasset://fonts/families/BuilderSans.json", Enum.FontWeight.Medium)
296
296
  statusBanner.LayoutOrder = 4
297
297
  statusBanner.Size = UDim2.new(1, 0, 0, 0)
298
298
  statusBanner.Text = ""
299
299
  statusBanner.TextColor3 = Color3.fromRGB(255, 205, 205)
300
- statusBanner.TextSize = 11
300
+ statusBanner.TextSize = 14
301
301
  statusBanner.TextWrapped = true
302
302
  statusBanner.TextXAlignment = Enum.TextXAlignment.Left
303
303
  statusBanner.Visible = false
@@ -309,13 +309,66 @@ statusBannerPadding.PaddingLeft = UDim.new(0, 8)
309
309
  statusBannerPadding.PaddingRight = UDim.new(0, 8)
310
310
  statusBannerPadding.PaddingTop = UDim.new(0, 7)
311
311
 
312
+ local attentionBox = Instance.new("Frame")
313
+ attentionBox.Name = "AttentionBox"
314
+ attentionBox.AutomaticSize = Enum.AutomaticSize.Y
315
+ attentionBox.BackgroundColor3 = Color3.fromRGB(43, 42, 38)
316
+ attentionBox.BorderSizePixel = 0
317
+ attentionBox.LayoutOrder = 5
318
+ attentionBox.Size = UDim2.fromScale(1, 0)
319
+ attentionBox.Visible = false
320
+ attentionBox.Parent = content
321
+ Instance.new("UICorner", attentionBox).CornerRadius = UDim.new(0.04, 0)
322
+ local attentionBoxLayout = Instance.new("UIListLayout")
323
+ attentionBoxLayout.SortOrder = Enum.SortOrder.LayoutOrder
324
+ attentionBoxLayout.Parent = attentionBox
325
+
326
+ local attentionActions = Instance.new("Frame")
327
+ attentionActions.BackgroundTransparency = 1
328
+ attentionActions.LayoutOrder = 1
329
+ attentionActions.Size = UDim2.new(1, 0, 0, 30)
330
+ attentionActions.Parent = attentionBox
331
+ local attentionBulkButtons = {}
332
+ for index, text in { "Push All →", "← Pull All" } do
333
+ local button = Instance.new("ImageButton")
334
+ button.AnchorPoint = Vector2.new(0.5, 0.5)
335
+ button.BackgroundColor3 = Color3.fromRGB(57, 57, 67)
336
+ button.BorderSizePixel = 0
337
+ button.Position = UDim2.fromScale(0.25 + (index - 1) * 0.5, 0.5)
338
+ button.Size = UDim2.fromScale(0.47, 0.8)
339
+ button.Parent = attentionActions
340
+ Instance.new("UICorner", button).CornerRadius = UDim.new(0.22, 0)
341
+ local label = Instance.new("TextLabel")
342
+ label.BackgroundTransparency = 1
343
+ label.Position = UDim2.fromScale(0.12, 0.18)
344
+ label.Size = UDim2.fromScale(0.76, 0.64)
345
+ label.Font = Enum.Font.BuilderSansBold
346
+ label.Text = text
347
+ label.TextColor3 = Color3.fromRGB(215, 225, 240)
348
+ label.TextScaled = true
349
+ label.Parent = button
350
+ attentionBulkButtons[index] = button
351
+ end
352
+
353
+ local attentionList = Instance.new("Frame")
354
+ attentionList.Name = "AttentionList"
355
+ attentionList.AutomaticSize = Enum.AutomaticSize.Y
356
+ attentionList.BackgroundTransparency = 1
357
+ attentionList.LayoutOrder = 5
358
+ attentionList.Size = UDim2.fromScale(1, 0)
359
+ attentionList.Visible = false
360
+ attentionList.Parent = attentionBox
361
+ local attentionLayout = Instance.new("UIListLayout")
362
+ attentionLayout.SortOrder = Enum.SortOrder.LayoutOrder
363
+ attentionLayout.Parent = attentionList
364
+
312
365
  local directionLegend = Instance.new("TextLabel")
313
366
  directionLegend.BackgroundTransparency = 1
314
- directionLegend.Font = Enum.Font.BuilderSans
315
- directionLegend.LayoutOrder = 5
367
+ directionLegend.FontFace = Font.new("rbxasset://fonts/families/BuilderSans.json", Enum.FontWeight.Medium)
368
+ directionLegend.LayoutOrder = 6
316
369
  directionLegend.Size = UDim2.new(1, 0, 0, 18)
317
370
  directionLegend.Text = "→ Studio to file ← File to Studio"
318
- directionLegend.TextColor3 = Color3.fromRGB(145, 145, 155)
371
+ directionLegend.TextColor3 = Color3.fromRGB(195, 195, 205)
319
372
  directionLegend.TextSize = 11
320
373
  directionLegend.TextXAlignment = Enum.TextXAlignment.Right
321
374
  directionLegend.Parent = content
@@ -323,7 +376,7 @@ directionLegend.Parent = content
323
376
  local rootsContainer = Instance.new("Frame")
324
377
  rootsContainer.AutomaticSize = Enum.AutomaticSize.Y
325
378
  rootsContainer.BackgroundTransparency = 1
326
- rootsContainer.LayoutOrder = 6
379
+ rootsContainer.LayoutOrder = 7
327
380
  rootsContainer.Size = UDim2.new(1, 0, 0, 0)
328
381
  rootsContainer.Parent = content
329
382
 
@@ -354,6 +407,34 @@ local resolveGitConflict
354
407
  local applyTreeFilter
355
408
  local resetInstanceTrees
356
409
 
410
+ for index, button in attentionBulkButtons do
411
+ button.Activated:Connect(function()
412
+ if bulkRunning or not serverConfig or not serverConfig.rojoConnected then
413
+ return
414
+ end
415
+ local affected = {}
416
+ for _, state in states do
417
+ if state.statusKind == "issue" and not state.manifest.gitConflict then
418
+ table.insert(affected, state)
419
+ end
420
+ end
421
+ bulkRunning = true
422
+ refreshStatusSummary()
423
+ for _, state in affected do
424
+ if states[state.manifest.id] ~= state or state.manifest.gitConflict then
425
+ continue
426
+ end
427
+ if index == 1 then
428
+ upload(state, true)
429
+ else
430
+ pull(state)
431
+ end
432
+ end
433
+ bulkRunning = false
434
+ refreshStatusSummary()
435
+ end)
436
+ end
437
+
357
438
  local function collectSplitPaths(root, depth)
358
439
  local paths = {}
359
440
  local function visit(instance, remainingDepth, relativePath)
@@ -1753,6 +1834,7 @@ updateGroupSummaries = function()
1753
1834
  local total = 0
1754
1835
  local synced = 0
1755
1836
  local issues = 0
1837
+ local issueColor = Color3.fromRGB(244, 194, 92)
1756
1838
  local pending = 0
1757
1839
  local paused = 0
1758
1840
  for _, state in states do
@@ -1762,6 +1844,9 @@ updateGroupSummaries = function()
1762
1844
  synced += 1
1763
1845
  elseif state.statusKind == "issue" then
1764
1846
  issues += 1
1847
+ if state.status.TextColor3 == Color3.fromRGB(245, 106, 106) then
1848
+ issueColor = state.status.TextColor3
1849
+ end
1765
1850
  elseif state.statusKind == "paused" then
1766
1851
  paused += 1
1767
1852
  else
@@ -1784,7 +1869,7 @@ updateGroupSummaries = function()
1784
1869
  group.bulkPush.Visible = true
1785
1870
  group.bulkPull.Visible = true
1786
1871
  group.statusDot.TextColor3 = if issues > 0
1787
- then Color3.fromRGB(245, 106, 106)
1872
+ then issueColor
1788
1873
  elseif synced == total then Color3.fromRGB(102, 214, 139)
1789
1874
  elseif pending > 0 or paused > 0 then Color3.fromRGB(244, 194, 92)
1790
1875
  else Color3.fromRGB(180, 180, 190)
@@ -1820,7 +1905,7 @@ refreshUnsyncedButton = function()
1820
1905
  then Color3.fromRGB(40, 40, 46)
1821
1906
  else Color3.fromRGB(78, 66, 38)
1822
1907
  unsyncedButton.TextColor3 = if showSynced
1823
- then Color3.fromRGB(190, 190, 198)
1908
+ then Color3.fromRGB(220, 220, 230)
1824
1909
  else Color3.fromRGB(255, 218, 126)
1825
1910
  end
1826
1911
 
@@ -1831,13 +1916,29 @@ refreshStatusSummary = function()
1831
1916
  local entry = {
1832
1917
  path = table.concat(state.manifest.studioPath, "."),
1833
1918
  status = state.status.Text,
1919
+ state = state,
1834
1920
  }
1835
1921
  if state.statusKind == "issue" then
1836
1922
  table.insert(issues, entry)
1837
- elseif state.statusKind == "working" then
1838
- table.insert(working, entry)
1923
+ else
1924
+ if state.row.Parent == attentionList then
1925
+ state.row.Parent = state.group.list
1926
+ state.connector.Visible = true
1927
+ state.row.LayoutOrder = state.treeOrder
1928
+ state.title.Text = state.manifest.studioPath[#state.manifest.studioPath]
1929
+ setRootExpanded(state, state.expandedBeforeAttention)
1930
+ end
1931
+ if state.statusKind == "working" then
1932
+ table.insert(working, entry)
1933
+ end
1839
1934
  end
1840
1935
  end
1936
+ attentionList.Visible = #issues > 0
1937
+ attentionBox.Visible = #issues > 0
1938
+ for _, button in attentionBulkButtons do
1939
+ button.Active = serverConfig.rojoConnected and not bulkRunning
1940
+ button.AutoButtonColor = button.Active
1941
+ end
1841
1942
  local entries = if #issues > 0 then issues else working
1842
1943
  if #entries == 0 then
1843
1944
  statusBanner.Visible = false
@@ -1851,19 +1952,25 @@ refreshStatusSummary = function()
1851
1952
  then string.format("%d need attention", #issues)
1852
1953
  else string.format("%d still syncing", #working),
1853
1954
  }
1854
- for index = 1, math.min(#entries, 3) do
1855
- local entry = entries[index]
1856
- table.insert(lines, entry.path .. " — " .. entry.status)
1857
- end
1858
- if #entries > 3 then
1859
- table.insert(lines, string.format("+%d more", #entries - 3))
1955
+ for index, entry in entries do
1956
+ if #issues > 0 then
1957
+ local state = entry.state
1958
+ if state.row.Parent ~= attentionList then
1959
+ state.expandedBeforeAttention = state.expanded
1960
+ state.row.Parent = attentionList
1961
+ state.connector.Visible = false
1962
+ setRootExpanded(state, false)
1963
+ end
1964
+ state.row.LayoutOrder = index
1965
+ state.title.Text = entry.path
1966
+ else
1967
+ table.insert(lines, entry.path .. " — " .. entry.status)
1968
+ end
1860
1969
  end
1861
1970
  statusBanner.BackgroundColor3 = if #issues > 0
1862
- then Color3.fromRGB(66, 38, 40)
1863
- else Color3.fromRGB(66, 56, 34)
1864
- statusBanner.TextColor3 = if #issues > 0
1865
- then Color3.fromRGB(255, 205, 205)
1866
- else Color3.fromRGB(255, 224, 145)
1971
+ then Color3.fromRGB(49, 46, 38)
1972
+ else Color3.fromRGB(43, 42, 38)
1973
+ statusBanner.TextColor3 = Color3.fromRGB(230, 222, 200)
1867
1974
  statusBanner.Text = table.concat(lines, "\n")
1868
1975
  statusBanner.Visible = true
1869
1976
  end
@@ -2272,6 +2379,8 @@ local function createRootRow(manifest, order)
2272
2379
  manifest = manifest,
2273
2380
  group = group,
2274
2381
  row = row,
2382
+ treeOrder = order,
2383
+ connector = connector,
2275
2384
  title = title,
2276
2385
  icon = icon,
2277
2386
  iconClass = if rootInstance then rootInstance.ClassName else "Model",
@@ -2582,6 +2691,7 @@ refreshConfig = function()
2582
2691
  for _, state in states do
2583
2692
  disconnectRoot(state)
2584
2693
  destroyConflictWorkspace(state)
2694
+ state.row:Destroy()
2585
2695
  end
2586
2696
  disconnectSplitRoots()
2587
2697
  table.clear(states)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "goldsync",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "description": "Automatic native Roblox asset synchronization for Rojo projects.",
5
5
  "author": "tay",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",