Fetch and sum item quantities from the Torn API for a faction. Stores API key in local storage.
這裡只顯示彼此間有代碼差異的版本。 顯示所有版本。
🔹 Updates in This Version (v1.2.1.1)- Removed cesium from the categories.
🔹 Updates in This Version (v1.2.1)✅ API Key Storage- Now asks for API key only once and stores it in local storage.- If the key is available in local storage, it uses it automatically.- If the API key is missing or invalid, it prompts the user to enter a new one.✅ Error Handling for API Issues- Checks Torn API error codes and provides user-friendly messages.- If the API key is paused (code 18) or incorrect (codes 1, 2), it prompts the user to enter a new key.- If the access level is too low (code 16), it tells the user they need a Minimal Access API Key.- If too many requests (code 5), it tells the user to wait instead of asking for a new key.✅ More Reliable API Fetching- Waits 1 second between requests to prevent rate limiting.- If an API error occurs, it stops further fetching and does not overwrite the results with zeros.✅ Better UI & Button Placement- Places the "Fetch Inventory Sum" button in the correct column.- Uses a modern design with blue color and proper padding.
🔹 Changes & Improvements✅ Stores API Key in browser local storage (retrieved even after page refresh or device restart).✅ Only prompts for API Key if missing in storage.✅ Displays total per category along with the overall sum.✅ UI improvements with a better result display format.