@@ -16,52 +16,145 @@ function App() {
16
16
const [ currentService , setCurrentService ] = useState ( "" ) ;
17
17
const [ results , setResults ] = useState ( [ ] ) ;
18
18
const [ theme , setTheme ] = useState ( 'light' ) ;
19
-
19
+
20
+ const [ ratingMap ] = useState ( {
21
+ neutral : '📋' ,
22
+ warning : '⚠️' ,
23
+ positive : '✅' ,
24
+ negative : '❌'
25
+ } )
20
26
// Stores tosdr points by category so they can be selected in the menu
21
27
const [ queryCategories , setQueryCategories ] = useState (
22
28
[
23
29
{
24
30
'name' : '📒 Account policies' ,
25
31
'cases' : [
26
- 'This service can delete your account without prior notice and without a reason' ,
27
- 'You must provide your legal name, pseudonyms are not allowed' ,
28
- 'User accounts can be terminated after having been in breach of the terms of service repeatedly'
32
+ {
33
+ 'text' : 'This service can delete your account without prior notice and without a reason' ,
34
+ 'rating' : 'neutral'
35
+ } ,
36
+ {
37
+ 'text' : 'You must provide your legal name, pseudonyms are not allowed' ,
38
+ 'rating' : 'negative'
39
+ } ,
40
+ {
41
+ 'text' : 'User accounts can be terminated after having been in breach of the terms of service repeatedly' ,
42
+ 'rating' : 'neutral'
43
+ } ,
44
+ {
45
+ 'text' : 'This service can be used without providing a user profile' ,
46
+ 'rating' : 'good'
47
+ }
29
48
] ,
30
49
'checked' : false
31
50
} ,
32
51
{
33
52
'name' : '👁️ Tracking and data collection' ,
34
53
'cases' : [
35
- 'This service tracks you on other websites' ,
36
- 'This service may collect, use, and share location data' ,
37
- 'Third party cookies are used for advertising' ,
38
- 'Tracking via third-party cookies for other purposes without your consent' ,
39
- 'The service may use tracking pixels, web beacons, browser fingerprinting, and/or device fingerprinting on users' ,
40
- 'This service receives your precise location through GPS coordinates' ,
41
- 'Your biometric data is collected' ,
42
- 'This service still tracks you even if you opted out from tracking'
54
+ {
55
+ 'text' : 'This service tracks you on other websites' ,
56
+ 'rating' : 'negative'
57
+ } ,
58
+ {
59
+ 'text' : 'This service may collect, use, and share location data' ,
60
+ 'rating' : 'negative'
61
+ } ,
62
+ {
63
+ 'text' : 'Third party cookies are used for advertising' ,
64
+ 'rating' : 'warning'
65
+ } ,
66
+ {
67
+ 'text' : 'Tracking via third-party cookies for other purposes without your consent' ,
68
+ 'rating' : 'negative'
69
+ } ,
70
+ {
71
+ 'text' : 'The service may use tracking pixels, web beacons, browser fingerprinting, and/or device fingerprinting on users' ,
72
+ 'rating' : 'negative'
73
+ } ,
74
+ {
75
+ 'text' : 'This service receives your precise location through GPS coordinates' ,
76
+ 'rating' : 'negative'
77
+ } ,
78
+ {
79
+ 'text' : 'Your biometric data is collected' ,
80
+ 'rating' : 'negative'
81
+ } ,
82
+ {
83
+ 'text' : 'This service still tracks you even if you opted out from tracking' ,
84
+ 'rating' : 'negative'
85
+ } ,
86
+ {
87
+ 'text' : 'The cookies used only collect anonymous, aggregated data that cannot be linked to a unique identity.' ,
88
+ 'rating' : 'positive'
89
+ }
43
90
] ,
44
91
'checked' : false
45
92
} ,
46
93
{
47
94
'name' : '📁 Data storage and retention' ,
48
95
'cases' : [
49
- 'This service stores your data whether you have an account or not' ,
50
- 'This service stores data on you even if you did not interact with the service' ,
51
- 'The service can sell or otherwise transfer your personal data as part of a bankruptcy proceeding or other type of financial transaction.' ,
52
- 'This service may keep personal data after a request for erasure for business interests or legal obligations'
96
+ {
97
+ 'text' : 'This service stores your data whether you have an account or not' ,
98
+ 'rating' : 'negative'
99
+ } ,
100
+ {
101
+ 'text' : 'This service stores data on you even if you did not interact with the service' ,
102
+ 'rating' : 'negative'
103
+ } ,
104
+ {
105
+ 'text' : 'The service can sell or otherwise transfer your personal data as part of a bankruptcy proceeding or other type of financial transaction.' ,
106
+ 'rating' : 'negative'
107
+ } ,
108
+ {
109
+ 'text' : 'This service may keep personal data after a request for erasure for business interests or legal obligations' ,
110
+ 'rating' : 'negative'
111
+ } ,
112
+ {
113
+ 'text' : 'The service may keep a secure, anonymized record of your data for analytical purposes even after the data retention period' ,
114
+ 'rating' : 'negative'
115
+ }
53
116
] ,
54
117
'checked' : false
55
118
} ,
56
119
{
57
120
'name' : '⚖️ Legal rights' ,
58
121
'cases' : [
59
- 'You waive your moral rights' ,
60
- 'This service retains rights to your content even after you stop using your account' ,
61
- 'You waive your right to a class action.' ,
62
- 'You have the right to leave this service at any time' ,
63
- 'You agree to defend, indemnify, and hold the service harmless in case of a claim related to your use of the service' ,
64
- 'This service forces users into binding arbitration in the case of disputes'
122
+ {
123
+ 'text' : 'Terms may be changed any time at their discretion, without notice to you' ,
124
+ 'rating' : 'warning'
125
+ } ,
126
+ {
127
+ 'text' : 'You waive your moral rights' ,
128
+ 'rating' : 'negative'
129
+ } ,
130
+ {
131
+ 'text' : 'This service retains rights to your content even after you stop using your account' ,
132
+ 'rating' : 'negative'
133
+ } ,
134
+ {
135
+ 'text' : 'You waive your right to a class action.' ,
136
+ 'rating' : 'negative'
137
+ } ,
138
+ {
139
+ 'text' : 'You have the right to leave this service at any time' ,
140
+ 'rating' : 'positive'
141
+ } ,
142
+ {
143
+ 'text' : 'The service will resist legal requests for your information where reasonably possible' ,
144
+ 'rating' : 'positive'
145
+ } ,
146
+ {
147
+ 'text' : 'You agree to defend, indemnify, and hold the service harmless in case of a claim related to your use of the service' ,
148
+ 'rating' : 'negative'
149
+ } ,
150
+ {
151
+ 'text' : 'This service forces users into binding arbitration in the case of disputes' ,
152
+ 'rating' : 'negative'
153
+ } ,
154
+ {
155
+ 'text' : 'Any liability on behalf of the service is only limited to the fees you paid as a user' ,
156
+ 'rating' : 'negative'
157
+ }
65
158
] ,
66
159
'checked' : false
67
160
}
@@ -82,7 +175,7 @@ function App() {
82
175
setIsLoading ( false ) ;
83
176
setBackendResponse ( msg ) ;
84
177
setShowAlert ( true ) ;
85
- if ( msg . error === false && ( msg . type === 'upload_content' || msg . type === 'upload_url' || msg . type === 'upload' ) ) {
178
+ if ( msg . error === false && ( msg . type === 'upload_content' || msg . type === 'upload_url' ) ) {
86
179
// Handle manual content upload success
87
180
// if we successfully uploaded then add to the list of services and docs
88
181
setServices ( prevServices => {
@@ -177,9 +270,8 @@ function App() {
177
270
return ;
178
271
}
179
272
180
- function clearData ( ) {
273
+ function clearResults ( ) {
181
274
setResults ( [ ] ) ;
182
- setServices ( { } ) ;
183
275
}
184
276
185
277
return (
@@ -239,7 +331,7 @@ function App() {
239
331
240
332
{ /* <button className="btn btn-lg btn-secondary btn-wide btn-active w-full" onClick={handleAnalyze}> 👁️ Analyze current page</button> */ }
241
333
< button className = "btn btn-lg btn-secondary btn-wide btn-active w-full" onClick = { handleAutoAnalyze } > 🔍 Discover documents</ button >
242
- < button className = "btn btn-lg btn-accent btn-wide btn-active w-full" onClick = { clearData } > 🗑️ Clear data </ button >
334
+ < button className = "btn btn-lg btn-accent btn-wide btn-active w-full" onClick = { clearResults } > 🗑️ Clear results </ button >
243
335
</ div >
244
336
{
245
337
results . length > 0 && (
@@ -254,7 +346,7 @@ function App() {
254
346
< div className = "collapse collapse-arrow" >
255
347
< input type = "checkbox" />
256
348
< div className = "collapse-title text-xl font-bold" >
257
- ⚠️ { item . tosdr_case }
349
+ { ratingMap [ item . tosdr_case . rating ] } { item . tosdr_case . text }
258
350
</ div >
259
351
< div className = "collapse-content" >
260
352
< div className = "divider divider-error" >
0 commit comments