GameSentenceMiner 2.8.4__py3-none-any.whl → 2.8.5__py3-none-any.whl

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.
@@ -66,9 +66,7 @@
66
66
 
67
67
  async function saveData() {
68
68
  try {
69
- console.log(data)
70
69
  data.args.replacements = textData;
71
- console.log(data)
72
70
  const response = await fetch('/save-data', {
73
71
  method: 'POST',
74
72
  headers: { 'Content-Type': 'application/json' },
@@ -165,33 +163,35 @@
165
163
  const key = keyInput.value.trim();
166
164
  const value = valueInput.value.trim() || "";
167
165
  const originalKey = originalKeyInput.value;
168
- let keyEdited = false;
169
166
 
170
167
  if (!key) {
171
- alert('Key cannot be empty.');
168
+ // Basic validation
169
+ alert('Key and Value cannot be empty.');
172
170
  return;
173
171
  }
174
172
 
173
+ let keyEdited = false;
175
174
  if (originalKey && originalKey !== key) {
176
175
  delete textData[originalKey];
177
176
  keyEdited = true;
178
177
  }
179
178
 
180
179
  if (originalKey) {
181
- textData = { ...textData, [key]: value };
182
180
  if (keyEdited) {
183
- // No need to re-add, it was just updated
181
+ textData = { [key]: value, ...textData };
182
+ } else {
183
+ textData[key] = value;
184
184
  }
185
185
  } else {
186
186
  if (textData.hasOwnProperty(key)) {
187
187
  alert(`Key "${key}" already exists. Please use the Edit function to modify it.`);
188
188
  return;
189
189
  }
190
- textData = { ...textData, [key]: value };
190
+ textData = { [key]: value, ...textData };
191
191
  }
192
192
 
193
193
  await saveData();
194
- await loadData();
194
+ renderTable();
195
195
  modal.style.display = 'none';
196
196
  });
197
197
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: GameSentenceMiner
3
- Version: 2.8.4
3
+ Version: 2.8.5
4
4
  Summary: A tool for mining sentences from games. Update: Multi-Line Mining! Fixed!
5
5
  Author-email: Beangate <bpwhelan95@gmail.com>
6
6
  License: MIT License
@@ -46,13 +46,13 @@ GameSentenceMiner/web/static/favicon.ico,sha256=7d25r_FBqRSNsAoEHpSzNoT7zyVt2DJR
46
46
  GameSentenceMiner/web/static/favicon.svg,sha256=x305AP6WlXGtrXIZlaQspdLmwteoFYUoe5FyJ9MYlJ8,11517
47
47
  GameSentenceMiner/web/static/site.webmanifest,sha256=kaeNT-FjFt-T7JGzOhXH7YSqsrDeiplZ2kDxCN_CFU4,436
48
48
  GameSentenceMiner/web/static/style.css,sha256=bPZK0NVMuyRl5NNDuT7ZTzVLKlvSsdmeVHmAW4y5FM0,7001
49
- GameSentenceMiner/web/static/text_replacements.html,sha256=LJ2qBEZvyMaBJLLJzDIw0baiTeusplbn4jkpyHM6ZBI,8613
49
+ GameSentenceMiner/web/static/text_replacements.html,sha256=tV5c8mCaWSt_vKuUpbdbLAzXZ3ATZeDvQ9PnnAfqY0M,8598
50
50
  GameSentenceMiner/web/static/utility.html,sha256=58br1whazdfrevWCHEzYNa1_VdBvebDDX2tWlX2QrFs,9964
51
51
  GameSentenceMiner/web/static/web-app-manifest-192x192.png,sha256=EfSNnBmsSaLfESbkGfYwbKzcjKOdzuWo18ABADfN974,51117
52
52
  GameSentenceMiner/web/static/web-app-manifest-512x512.png,sha256=wyqgCWCrLEUxSRXmaA3iJEESd-vM-ZmlTtZFBY4V8Pk,230819
53
- gamesentenceminer-2.8.4.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
54
- gamesentenceminer-2.8.4.dist-info/METADATA,sha256=S3MxkE5od51DTveOhaPwiBa5tGA3UV1jqTGjpUnGXJs,5912
55
- gamesentenceminer-2.8.4.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
56
- gamesentenceminer-2.8.4.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
57
- gamesentenceminer-2.8.4.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
58
- gamesentenceminer-2.8.4.dist-info/RECORD,,
53
+ gamesentenceminer-2.8.5.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
54
+ gamesentenceminer-2.8.5.dist-info/METADATA,sha256=WbjF3XasYQRGfELVCzDOP3NyjG2dLlTawjrdnzRdc98,5912
55
+ gamesentenceminer-2.8.5.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
56
+ gamesentenceminer-2.8.5.dist-info/entry_points.txt,sha256=2APEP25DbfjSxGeHtwBstMH8mulVhLkqF_b9bqzU6vQ,65
57
+ gamesentenceminer-2.8.5.dist-info/top_level.txt,sha256=V1hUY6xVSyUEohb0uDoN4UIE6rUZ_JYx8yMyPGX4PgQ,18
58
+ gamesentenceminer-2.8.5.dist-info/RECORD,,