Files
view/frontend/auth-config.js
T
0xcathiefish 9812bc7635 Replace custom canvas save/load with built-in save_load_adapter
- Remove custom canvas selector UI (HTML popup, CSS styles, toolbar button)
- Remove all custom canvas JS functions (toggleCanvasSelector, loadCanvas,
  saveCanvas, autoSaveCanvas, startAutoSave, newCanvas, deleteCanvas, etc.)
- Add createSaveLoadAdapter() implementing TradingView's save_load_adapter:
  - Chart layouts: localStorage index + backend API storage (no backend changes)
  - Study/Drawing/Chart templates: pure localStorage
- Enable load_last_chart and auto_save_delay in widget config
- Add DEV_MODE auth bypass for localhost development
- Update auth-config.js with production API URL and OAuth client ID
- Update README.md and README_CN.md feature descriptions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 15:19:27 +00:00

29 lines
855 B
JavaScript

window.API_CONFIG = { baseUrl: 'https://api-view.cathiefish.org' };
/**
* Google OAuth Configuration
* Configure your Google OAuth Client ID here
* Access control is managed via the test users list in GCP Console
*/
const AUTH_CONFIG = {
// Client ID obtained from GCP Console
// Replace with your actual Client ID
clientId: '136939086552-bt28icv34nucmjna8hfndr6bopr5qcp4.apps.googleusercontent.com',
// Authentication success callback
onSuccess: (user) => {
console.log('Authentication successful:', user.email);
// Additional logic can be added here, e.g. logging
},
// Authentication failure callback
onError: (error) => {
console.error('Authentication error:', error);
// Error handling logic can be added here
}
};
// Export configuration
window.AUTH_CONFIG = AUTH_CONFIG;