diff --git a/image-import.js b/image-import.js new file mode 100644 index 0000000..cfd0f5b --- /dev/null +++ b/image-import.js @@ -0,0 +1,26 @@ +/** + * Image Importer + * Owns the Bild → Dienste import workflow via OpenRouter Vision-LLM. + * Loaded AFTER app.js so window.app is available. + */ +class ImageImporter { + constructor(app) { + this.app = app || null; + this.storage = app ? app.storage : null; + this.holidayProvider = app ? app.holidayProvider : null; + this.session = null; + this.abortController = null; + } +} + +// Make available globally +window.ImageImporter = ImageImporter; + +// Auto-instantiate when DOM + app are ready +if (typeof document !== 'undefined') { + document.addEventListener('DOMContentLoaded', () => { + if (window.app) { + window.imageImporter = new ImageImporter(window.app); + } + }); +} diff --git a/index.html b/index.html index 8242828..d3e1d34 100644 --- a/index.html +++ b/index.html @@ -214,5 +214,6 @@ +