-
Notifications
You must be signed in to change notification settings - Fork 80
Expand file tree
/
Copy pathTorchUI.xaml
More file actions
232 lines (219 loc) · 13.8 KB
/
TorchUI.xaml
File metadata and controls
232 lines (219 loc) · 13.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<Window x:Class="Torch.Server.TorchUI"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Torch.Server"
xmlns:views="clr-namespace:Torch.Server.Views"
xmlns:converters="clr-namespace:Torch.Server.Views.Converters"
mc:Ignorable="d"
Title="Torch"
Name="MainWindow">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources.xaml"/>
</ResourceDictionary.MergedDictionaries>
<converters:InverseBooleanConverter x:Key="InverseBool"/>
</ResourceDictionary>
</Window.Resources>
<!--
<Window.DataContext>
<local:TorchServer/>
</Window.DataContext>
-->
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<!-- Analytics notice banner — only visible when EnableAnalytics=true and banner not hidden -->
<Border x:Name="AnalyticsBanner" Grid.Row="0"
Background="#1a3a1a" BorderBrush="#2e6b2e" BorderThickness="0,0,0,1"
Padding="8,5,8,5" Visibility="Collapsed">
<DockPanel>
<TextBlock DockPanel.Dock="Right" VerticalAlignment="Center" Margin="8,0,0,0">
<Hyperlink x:Name="AnalyticsPrivacyLink" NavigateUri="https://torchapi.com/privacy"
RequestNavigate="AnalyticsPrivacyLink_RequestNavigate">
<Run Text="Privacy Policy" Foreground="#88cc88"/>
</Hyperlink>
<Run Text=" · " Foreground="#557755"/>
<Hyperlink x:Name="AnalyticsHideLink" RequestNavigate="AnalyticsHideLink_RequestNavigate"
NavigateUri="hide">
<Run Text="Hide" Foreground="#88cc88"/>
</Hyperlink>
<Run Text=" · " Foreground="#557755"/>
<Hyperlink x:Name="AnalyticsDisableLink" RequestNavigate="AnalyticsDisableLink_RequestNavigate"
NavigateUri="disable">
<Run Text="Disable" Foreground="#88cc88"/>
</Hyperlink>
</TextBlock>
<TextBlock VerticalAlignment="Center" Foreground="#aaddaa" FontSize="11"
Text="📊 Anonymous usage analytics are enabled." FontWeight="SemiBold"/>
</DockPanel>
</Border>
<StackPanel Grid.Row="2" Margin="5,5,5,5" Orientation="Horizontal">
<Button x:Name="BtnStart" Content="Start" Height="24" Width="75" Margin="5,0,5,0"
HorizontalAlignment="Left" Click="BtnStart_Click">
<Button.IsEnabled>
<MultiBinding Converter="{StaticResource BooleanAndConverter}">
<Binding ElementName="MainWindow" Path="DataContext.CanRun"/>
<Binding ElementName="ConfigControl" Path="ConfigValid"/>
</MultiBinding>
</Button.IsEnabled>
</Button>
<Button x:Name="BtnStop" Content="Stop" Height="24" Width="75" Margin="5,0,5,0" HorizontalAlignment="Left"
Click="BtnStop_Click" IsEnabled="{Binding IsRunning}"/>
<Label>
<Label.Content>
<TextBlock Text="{Binding State, StringFormat=Status: {0}}"></TextBlock>
</Label.Content>
</Label>
<Label x:Name="LabelSimulation">
<Label.Content>
<TextBlock Text="{Binding SimulationRatio, StringFormat=Simulation: {0:0.00}}" />
</Label.Content>
</Label>
<Label x:Name="LabelUptime">
<Label.Content>
<TextBlock Text="{Binding ElapsedPlayTime, StringFormat=Uptime: {0:g}}"/>
</Label.Content>
</Label>
<Label x:Name="LabelPlayers">
<Label.Content>
<TextBlock Text="{Binding OnlinePlayers, StringFormat=Players: {0}}"/>
</Label.Content>
</Label>
</StackPanel>
<TabControl Grid.Row="3" Height="Auto" x:Name="TabControl" Margin="5,10,5,5">
<!-- Override the tab strip panel so the Privacy tab can be pinned to the right -->
<TabControl.ItemsPanel>
<ItemsPanelTemplate>
<DockPanel LastChildFill="False"/>
</ItemsPanelTemplate>
</TabControl.ItemsPanel>
<TabItem Header="Log">
<RichTextBox x:FieldModifier="public" x:Name="ConsoleText" VerticalScrollBarVisibility="Visible" FontFamily="Consolas" IsReadOnly="True" Background="#0c0c0c"/>
</TabItem>
<TabItem Header="Log Event viewer">
<views:LogEventViewer />
</TabItem>
<TabItem Header="Configuration" Name="ConfigTab" />
<TabItem Header="Mods">
<views:ModListControl/>
</TabItem>
<TabItem Header="Chat/Players">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="250"/>
</Grid.ColumnDefinitions>
<local:ChatControl Grid.Column="0" x:Name="Chat" IsEnabled="{Binding IsRunning}"/>
<local:PlayerListControl Grid.Column="1" x:Name="PlayerList" DockPanel.Dock="Right"/>
</Grid>
</TabItem>
<TabItem Header="Entity Manager" Name="EntityManagerTab"/>
<TabItem Header="Plugins">
<views:PluginsControl x:Name="Plugins" />
</TabItem>
<TabItem Header="Themes">
<views:ThemeControl x:Name="Themes" />
</TabItem>
<!-- Privacy Policy tab — pinned to the far right of the tab strip -->
<TabItem DockPanel.Dock="Right" x:Name="PrivacyTab">
<TabItem.Header>
<TextBlock Text="Privacy Policy" Foreground="#888888" FontStyle="Italic"/>
</TabItem.Header>
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"
Background="#0f0f0f" Padding="20">
<StackPanel MaxWidth="760">
<TextBlock Text="Torch Analytics — Privacy Policy" FontSize="18" FontWeight="Bold"
Foreground="#ffffff" Margin="0,0,0,12"/>
<TextBlock Text="Last updated: February 2026" Foreground="#666666"
FontSize="11" Margin="0,0,0,20"/>
<TextBlock Text="What we collect" FontSize="13" FontWeight="SemiBold"
Foreground="#cccccc" Margin="0,0,0,6"/>
<TextBlock TextWrapping="Wrap" Foreground="#aaaaaa" Margin="0,0,0,16" FontSize="12">
When <Run FontFamily="Consolas" Foreground="#88cc88">EnableAnalytics=true</Run> is set in your <Run FontFamily="Consolas" Foreground="#88cc88">Torch.cfg</Run>,
Torch sends the following data to torchapi.com every 5 minutes:
</TextBlock>
<StackPanel Margin="16,0,0,16">
<TextBlock Foreground="#aaaaaa" FontSize="12" Margin="0,2,0,2">• Player count (number of players currently online)</TextBlock>
<TextBlock Foreground="#aaaaaa" FontSize="12" Margin="0,2,0,2">• Server uptime (seconds since process start)</TextBlock>
<TextBlock Foreground="#aaaaaa" FontSize="12" Margin="0,2,0,2">• Simulation speed ratio</TextBlock>
<TextBlock Foreground="#aaaaaa" FontSize="12" Margin="0,2,0,2">• Torch version number</TextBlock>
<TextBlock Foreground="#aaaaaa" FontSize="12" Margin="0,2,0,2">• Space Engineers version number</TextBlock>
<TextBlock Foreground="#aaaaaa" FontSize="12" Margin="0,2,0,2">• Active plugin GUIDs (public marketplace identifiers only)</TextBlock>
</StackPanel>
<TextBlock Text="What we do NOT collect" FontSize="13" FontWeight="SemiBold"
Foreground="#cccccc" Margin="0,0,0,6"/>
<StackPanel Margin="16,0,0,16">
<TextBlock Foreground="#aaaaaa" FontSize="12" Margin="0,2,0,2">• No player names, Steam IDs, or any player-identifiable information</TextBlock>
<TextBlock Foreground="#aaaaaa" FontSize="12" Margin="0,2,0,2">• No IP addresses or network identifiers</TextBlock>
<TextBlock Foreground="#aaaaaa" FontSize="12" Margin="0,2,0,2">• No server passwords, world saves, or configuration details</TextBlock>
<TextBlock Foreground="#aaaaaa" FontSize="12" Margin="0,2,0,2">• No chat messages or in-game actions</TextBlock>
</StackPanel>
<TextBlock Text="Why we collect it" FontSize="13" FontWeight="SemiBold"
Foreground="#cccccc" Margin="0,0,0,6"/>
<TextBlock TextWrapping="Wrap" Foreground="#aaaaaa" Margin="0,0,0,16" FontSize="12">
Usage data helps us understand which Torch versions and plugins are in active use,
identify compatibility issues, and prioritise development effort. Plugin GUID data
is used to surface trending plugins on the Torch marketplace.
</TextBlock>
<TextBlock Text="Your server token" FontSize="13" FontWeight="SemiBold"
Foreground="#cccccc" Margin="0,0,0,6"/>
<TextBlock TextWrapping="Wrap" Foreground="#aaaaaa" Margin="0,0,0,16" FontSize="12">
On first registration a random 64-character token is generated and stored in your
<Run FontFamily="Consolas" Foreground="#88cc88">Torch.cfg</Run>. This token identifies your server record in our database.
It is not linked to any account, Steam identity, or IP address. You can view and copy
your token from the Configuration tab under Torch settings.
</TextBlock>
<TextBlock Text="Right to erasure" FontSize="13" FontWeight="SemiBold"
Foreground="#cccccc" Margin="0,0,0,6"/>
<TextBlock TextWrapping="Wrap" Foreground="#aaaaaa" Margin="0,0,0,16" FontSize="12">
To permanently delete all data associated with your server, send an HTTP DELETE request to:
</TextBlock>
<Border Background="#1a1a1a" BorderBrush="#333333" BorderThickness="1"
Padding="10,6" Margin="0,0,0,16" CornerRadius="3">
<TextBlock FontFamily="Consolas" FontSize="11" Foreground="#88cc88"
Text="DELETE https://torchapi.com/analytics/server/{your-token}"
TextWrapping="Wrap"/>
</Border>
<TextBlock TextWrapping="Wrap" Foreground="#aaaaaa" Margin="0,0,0,16" FontSize="12">
Your token can be found in <Run FontFamily="Consolas" Foreground="#88cc88">Torch.cfg</Run> under the
<Run FontFamily="Consolas" Foreground="#88cc88">AnalyticsToken</Run> key. All snapshots and the server
record are deleted immediately and cannot be recovered.
</TextBlock>
<TextBlock Text="Data retention" FontSize="13" FontWeight="SemiBold"
Foreground="#cccccc" Margin="0,0,0,6"/>
<TextBlock TextWrapping="Wrap" Foreground="#aaaaaa" Margin="0,0,0,16" FontSize="12">
Individual snapshots are automatically purged after 30 days. Server records
are retained while analytics remain enabled.
</TextBlock>
<TextBlock Text="Disabling analytics" FontSize="13" FontWeight="SemiBold"
Foreground="#cccccc" Margin="0,0,0,6"/>
<TextBlock TextWrapping="Wrap" Foreground="#aaaaaa" Margin="0,0,0,16" FontSize="12">
Set <Run FontFamily="Consolas" Foreground="#88cc88">EnableAnalytics=false</Run> in <Run FontFamily="Consolas" Foreground="#88cc88">Torch.cfg</Run>,
or click "Disable" in the banner at the top of this window. No further data will be sent.
Existing data on the server is not automatically deleted when you disable — use the
erasure endpoint above if you wish to remove it.
</TextBlock>
<TextBlock Text="Contact" FontSize="13" FontWeight="SemiBold"
Foreground="#cccccc" Margin="0,0,0,6"/>
<TextBlock TextWrapping="Wrap" Foreground="#aaaaaa" Margin="0,0,0,4" FontSize="12">
For privacy questions or data requests, visit:
</TextBlock>
<TextBlock FontSize="12" Margin="0,0,0,20">
<Hyperlink NavigateUri="https://torchapi.com/privacy"
RequestNavigate="AnalyticsPrivacyLink_RequestNavigate">
<Run Text="https://torchapi.com/privacy" Foreground="#5599ff"/>
</Hyperlink>
</TextBlock>
</StackPanel>
</ScrollViewer>
</TabItem>
</TabControl>
</Grid>
</Window>