Browse Source

Revert technical example placeholders to hardcoded values

Co-authored-by: cadtoolbox <12723486+cadtoolbox@users.noreply.github.com>
copilot-swe-agent[bot] 3 months ago
parent
commit
466260397e

+ 10 - 10
frontend/src/components/AddSmartPlugModal.tsx

@@ -959,7 +959,7 @@ export function AddSmartPlugModal({ plug, onClose }: AddSmartPlugModalProps) {
                         type="text"
                         value={mqttPowerTopic}
                         onChange={(e) => setMqttPowerTopic(e.target.value)}
-                        placeholder={t('smartPlugs.addSmartPlug.placeholders.mqttPowerTopic')}
+                        placeholder="zigbee2mqtt/shelly-working-room"
                         className="w-full px-3 py-2 bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-lg text-white placeholder-bambu-gray focus:border-bambu-green focus:outline-none"
                       />
                     </div>
@@ -970,7 +970,7 @@ export function AddSmartPlugModal({ plug, onClose }: AddSmartPlugModalProps) {
                           type="text"
                           value={mqttPowerPath}
                           onChange={(e) => setMqttPowerPath(e.target.value)}
-                          placeholder={t('smartPlugs.addSmartPlug.placeholders.mqttPowerPath')}
+                          placeholder="power_l1"
                           className="w-full px-3 py-2 bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-lg text-white placeholder-bambu-gray focus:border-bambu-green focus:outline-none"
                         />
                       </div>
@@ -1011,7 +1011,7 @@ export function AddSmartPlugModal({ plug, onClose }: AddSmartPlugModalProps) {
                           type="text"
                           value={mqttEnergyPath}
                           onChange={(e) => setMqttEnergyPath(e.target.value)}
-                          placeholder={t('smartPlugs.addSmartPlug.placeholders.mqttEnergyPath')}
+                          placeholder="energy_l1"
                           className="w-full px-3 py-2 bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-lg text-white placeholder-bambu-gray focus:border-bambu-green focus:outline-none"
                         />
                       </div>
@@ -1052,7 +1052,7 @@ export function AddSmartPlugModal({ plug, onClose }: AddSmartPlugModalProps) {
                           type="text"
                           value={mqttStatePath}
                           onChange={(e) => setMqttStatePath(e.target.value)}
-                          placeholder={t('smartPlugs.addSmartPlug.placeholders.mqttStatePath')}
+                          placeholder="state_l1"
                           className="w-full px-3 py-2 bg-bambu-dark-secondary border border-bambu-dark-tertiary rounded-lg text-white placeholder-bambu-gray focus:border-bambu-green focus:outline-none"
                         />
                       </div>
@@ -1089,7 +1089,7 @@ export function AddSmartPlugModal({ plug, onClose }: AddSmartPlugModalProps) {
                     setIpAddress(e.target.value);
                     setTestResult(null);
                   }}
-                  placeholder={t('smartPlugs.addSmartPlug.placeholders.ipAddress')}
+                  placeholder="192.168.1.100"
                   className="flex-1 px-3 py-2 bg-bambu-dark border border-bambu-dark-tertiary rounded-lg text-white focus:border-bambu-green focus:outline-none"
                 />
                 <Button
@@ -1143,7 +1143,7 @@ export function AddSmartPlugModal({ plug, onClose }: AddSmartPlugModalProps) {
               type="text"
               value={name}
               onChange={(e) => setName(e.target.value)}
-              placeholder={t('smartPlugs.addSmartPlug.placeholders.name')}
+              placeholder={t('smartPlugs.addSmartPlug.placeholders.plugName')}
               className="w-full px-3 py-2 bg-bambu-dark border border-bambu-dark-tertiary rounded-lg text-white focus:border-bambu-green focus:outline-none"
             />
           </div>
@@ -1158,7 +1158,7 @@ export function AddSmartPlugModal({ plug, onClose }: AddSmartPlugModalProps) {
                     type="text"
                     value={username}
                     onChange={(e) => setUsername(e.target.value)}
-                    placeholder={t('smartPlugs.addSmartPlug.placeholders.username')}
+                    placeholder="admin"
                     className="w-full px-3 py-2 bg-bambu-dark border border-bambu-dark-tertiary rounded-lg text-white focus:border-bambu-green focus:outline-none"
                   />
                 </div>
@@ -1168,7 +1168,7 @@ export function AddSmartPlugModal({ plug, onClose }: AddSmartPlugModalProps) {
                     type="password"
                     value={password}
                     onChange={(e) => setPassword(e.target.value)}
-                    placeholder={t('smartPlugs.addSmartPlug.placeholders.password')}
+                    placeholder="********"
                     className="w-full px-3 py-2 bg-bambu-dark border border-bambu-dark-tertiary rounded-lg text-white focus:border-bambu-green focus:outline-none"
                   />
                 </div>
@@ -1227,7 +1227,7 @@ export function AddSmartPlugModal({ plug, onClose }: AddSmartPlugModalProps) {
                       type="number"
                       value={powerAlertHigh}
                       onChange={(e) => setPowerAlertHigh(e.target.value)}
-                      placeholder={t('smartPlugs.addSmartPlug.placeholders.powerAlertHigh')}
+                      placeholder="e.g. 200"
                       min="0"
                       max="5000"
                       className="w-full px-3 py-2 bg-bambu-dark border border-bambu-dark-tertiary rounded-lg text-white focus:border-bambu-green focus:outline-none"
@@ -1239,7 +1239,7 @@ export function AddSmartPlugModal({ plug, onClose }: AddSmartPlugModalProps) {
                       type="number"
                       value={powerAlertLow}
                       onChange={(e) => setPowerAlertLow(e.target.value)}
-                      placeholder={t('smartPlugs.addSmartPlug.placeholders.powerAlertLow')}
+                      placeholder="e.g. 10"
                       min="0"
                       max="5000"
                       className="w-full px-3 py-2 bg-bambu-dark border border-bambu-dark-tertiary rounded-lg text-white focus:border-bambu-green focus:outline-none"

+ 2 - 31
frontend/src/i18n/locales/de.ts

@@ -2361,10 +2361,6 @@ export default {
     addMoreTags: 'Weitere Tags hinzufügen...',
     matchingTags: 'Übereinstimmend mit "{{query}}"',
     existingTags: 'Vorhandene Tags',
-    placeholders: {
-      copies: '1',
-      sourceUrl: 'https://printables.com/model/...',
-    },
     clickToAdd: '(zum Hinzufügen klicken)',
     status: 'Status',
     failureReason: 'Fehlergrund',
@@ -2666,18 +2662,8 @@ export default {
       searchPowerSensors: 'Leistungssensoren suchen...',
       searchEnergySensors: 'Energiesensoren suchen...',
       placeholders: {
-        mqttTopic: 'zigbee2mqtt/shelly-working-room',
-        mqttPowerPath: 'power_l1',
-        mqttEnergyPath: 'energy_l1',
-        mqttStatePath: 'state_l1',
-        mqttStateOnValue: 'ON, true, 1',
-        mqttMultiplier: '1',
-        ipAddress: '192.168.1.100',
         plugName: 'Wohnzimmer Steckdose',
-        username: 'admin',
-        password: '********',
-        wattThreshold: 'z.B. 200',
-        kwThreshold: 'z.B. 10',
+        mqttStateOnValue: 'ON, true, 1',
         mqttSameAsPower: 'Gleich wie Leistungs-Topic oder anders',
       },
     },
@@ -2704,7 +2690,6 @@ export default {
     removeCustomIcon: 'Benutzerdefiniertes Symbol entfernen',
     placeholders: {
       linkName: 'Mein Link',
-      linkUrl: 'https://example.com',
     },
   },
 
@@ -2835,7 +2820,6 @@ export default {
   // Pending Uploads Panel
   pendingUploads: {
     placeholders: {
-      tags: 'z.B. funktional, Prototyp, Geschenk',
       notes: 'Notizen zu diesem Druck hinzufügen...',
     },
     discardUpload: 'Upload verwerfen',
@@ -2877,21 +2861,12 @@ export default {
     downloadBackup: 'Backup herunterladen',
     restoreBackup: 'Backup wiederherstellen',
     noBackupsYet: 'Noch keine Backups',
-    placeholders: {
-      repoUrl: 'https://github.com/benutzername/bambuddy-backup',
-      branch: 'main',
-    },
   },
 
   // Email Settings
   emailSettings: {
     placeholders: {
-      smtpServer: 'smtp.gmail.com',
-      smtpPort: '587',
-      smtpUser: 'ihre.email@gmail.com',
-      fromAddress: 'ihre@email.com',
       fromName: 'BamBuddy',
-      testEmail: 'test@example.com',
     },
   },
 
@@ -3011,9 +2986,5 @@ export default {
   },
 
   // Spoolman Settings
-  spoolmanSettings: {
-    placeholders: {
-      serverUrl: 'http://192.168.1.100:7912',
-    },
-  },
+  spoolmanSettings: {},
 };

+ 2 - 31
frontend/src/i18n/locales/en.ts

@@ -2370,10 +2370,6 @@ export default {
     photosHelp: 'Click + to add photos of your printed result',
     printResult: 'Print result',
     saving: 'Saving...',
-    placeholders: {
-      copies: '1',
-      sourceUrl: 'https://printables.com/model/...',
-    },
     // Failure reasons
     failureReasons: {
       adhesionFailure: 'Adhesion failure',
@@ -2667,18 +2663,8 @@ export default {
       searchPowerSensors: 'Search power sensors...',
       searchEnergySensors: 'Search energy sensors...',
       placeholders: {
-        mqttTopic: 'zigbee2mqtt/shelly-working-room',
-        mqttPowerPath: 'power_l1',
-        mqttEnergyPath: 'energy_l1',
-        mqttStatePath: 'state_l1',
-        mqttStateOnValue: 'ON, true, 1',
-        mqttMultiplier: '1',
-        ipAddress: '192.168.1.100',
         plugName: 'Living Room Plug',
-        username: 'admin',
-        password: '********',
-        wattThreshold: 'e.g. 200',
-        kwThreshold: 'e.g. 10',
+        mqttStateOnValue: 'ON, true, 1',
         mqttSameAsPower: 'Same as power topic, or different',
       },
     },
@@ -2705,7 +2691,6 @@ export default {
     removeCustomIcon: 'Remove custom icon',
     placeholders: {
       linkName: 'My Link',
-      linkUrl: 'https://example.com',
     },
   },
 
@@ -2836,7 +2821,6 @@ export default {
   // Pending Uploads Panel
   pendingUploads: {
     placeholders: {
-      tags: 'e.g., functional, prototype, gift',
       notes: 'Add notes about this print...',
     },
     discardUpload: 'Discard Upload',
@@ -2878,21 +2862,12 @@ export default {
     downloadBackup: 'Download Backup',
     restoreBackup: 'Restore Backup',
     noBackupsYet: 'No backups yet',
-    placeholders: {
-      repoUrl: 'https://github.com/username/bambuddy-backup',
-      branch: 'main',
-    },
   },
 
   // Email Settings
   emailSettings: {
     placeholders: {
-      smtpServer: 'smtp.gmail.com',
-      smtpPort: '587',
-      smtpUser: 'your.email@gmail.com',
-      fromAddress: 'your@email.com',
       fromName: 'BamBuddy',
-      testEmail: 'test@example.com',
     },
   },
 
@@ -3012,9 +2987,5 @@ export default {
   },
 
   // Spoolman Settings
-  spoolmanSettings: {
-    placeholders: {
-      serverUrl: 'http://192.168.1.100:7912',
-    },
-  },
+  spoolmanSettings: {},
 };

+ 3 - 32
frontend/src/i18n/locales/ja.ts

@@ -2633,10 +2633,6 @@ export default {
     printResult: '印刷結果',
     photosDescription: '+をクリックして印刷結果の写真を追加',
     saving: '保存中...',
-    placeholders: {
-      copies: '1',
-      sourceUrl: 'https://printables.com/model/...',
-    },
   },
 
   // MQTTデバッグ
@@ -3262,18 +3258,8 @@ export default {
       searchPowerSensors: '電力センサーを検索...',
       searchEnergySensors: 'エネルギーセンサーを検索...',
       placeholders: {
-        mqttTopic: 'zigbee2mqtt/shelly-working-room',
-        mqttPowerPath: 'power_l1',
-        mqttEnergyPath: 'energy_l1',
-        mqttStatePath: 'state_l1',
-        mqttStateOnValue: 'ON, true, 1',
-        mqttMultiplier: '1',
-        ipAddress: '192.168.1.100',
         plugName: 'リビングルームプラグ',
-        username: 'admin',
-        password: '********',
-        wattThreshold: '例: 200',
-        kwThreshold: '例: 10',
+        mqttStateOnValue: 'ON, true, 1',
         mqttSameAsPower: '電力トピックと同じ、または異なる',
       },
     },
@@ -3286,7 +3272,6 @@ export default {
     removeCustomIcon: 'カスタムアイコンを削除',
     placeholders: {
       linkName: 'マイリンク',
-      linkUrl: 'https://example.com',
     },
   },
 
@@ -3405,22 +3390,12 @@ export default {
   },
 
   // GitHub Backup Settings (additional keys)
-  githubBackupSettings: {
-    placeholders: {
-      repoUrl: 'https://github.com/username/bambuddy-backup',
-      branch: 'main',
-    },
-  },
+  githubBackupSettings: {},
 
   // Email Settings
   emailSettings: {
     placeholders: {
-      smtpServer: 'smtp.gmail.com',
-      smtpPort: '587',
-      smtpUser: 'your.email@gmail.com',
-      fromAddress: 'your@email.com',
       fromName: 'BamBuddy',
-      testEmail: 'test@example.com',
     },
   },
 
@@ -3528,9 +3503,5 @@ export default {
   },
 
   // Spoolman Settings
-  spoolmanSettings: {
-    placeholders: {
-      serverUrl: 'http://192.168.1.100:7912',
-    },
-  },
+  spoolmanSettings: {},
 };

File diff suppressed because it is too large
+ 0 - 0
static/assets/index-QQNcmTSY.js


+ 1 - 1
static/index.html

@@ -23,7 +23,7 @@
 
     <!-- Splash screens for iOS -->
     <link rel="apple-touch-startup-image" href="/img/android-chrome-512x512.png" />
-    <script type="module" crossorigin src="/assets/index-BA-rHKiq.js"></script>
+    <script type="module" crossorigin src="/assets/index-QQNcmTSY.js"></script>
     <link rel="stylesheet" crossorigin href="/assets/index-BwfbnBQ9.css">
   </head>
   <body>

Some files were not shown because too many files changed in this diff