import UIWindow from './UIWindow.js' // todo do this using uid rather than item_path, since item_path is way mroe expensive on the DB async function PuterDialog(options) { return new Promise(async (resolve) => { let h = ''; h += `

This website uses Puter to bring you safe, secure, and private AI and Cloud features.

Powered by Puter.js

By clicking 'Continue' you agree to Puter's Terms of Service and Privacy Policy.

`; const el_window = await UIWindow({ title: `Upload`, icon: window.icons[`app-icon-uploader.svg`], uid: null, is_dir: false, body_content: h, draggable_body: false, has_head: false, selectable_body: false, draggable_body: true, allow_context_menu: false, is_resizable: false, is_droppable: false, init_center: true, allow_native_ctxmenu: false, allow_user_select: false, window_class: 'window-puter-dialog window-cover-page', width: '100%', top: '0', dominant: true, window_css:{ height: '100%', width: '100%', top: '0 !important', left: '0 !important', }, body_css: { padding: '22px', width: 'initial', 'background-color': 'rgba(231, 238, 245, .95)', 'backdrop-filter': 'blur(3px)', } }); $(el_window).find('#launch-auth-popup').on('click submit', function (e) { $(el_window).close(); resolve(true); }) $(el_window).find('#launch-auth-popup-cancel').on('click submit', function (e) { $(el_window).close(); resolve(false); }) }) } // export as default export default PuterDialog;