mirror of
https://github.com/HeyPuter/puter.git
synced 2025-01-24 23:38:40 +08:00
82 lines
17 KiB
JavaScript
82 lines
17 KiB
JavaScript
/**
|
|
* Copyright (C) 2024 Puter Technologies Inc.
|
|
*
|
|
* This file is part of Puter.
|
|
*
|
|
* Puter is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Affero General Public License as published
|
|
* by the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Affero General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
import UIWindow from './UIWindow.js'
|
|
|
|
async function PuterDialog(options) {
|
|
return new Promise(async (resolve) => {
|
|
let h = '';
|
|
h += `<div class="puter-auth-dialog-content">
|
|
<a href="https://puter.com" target="_blank" style="border:none; outline:none; display: block; width: 70px; height: 70px; margin: 0 auto; border-radius: 4px;"><img style="display: block; width: 70px; height: 70px; margin: 0 auto; border-radius: 4px;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAIAAADTED8xAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAKCJJREFUeJztnQl0U3X2x5VNFFGBAqVUFlkEZAcFFdlUkEHcYEYcBQSVRREEUUQZt1EUBGEQBxUYFkFZZF+KQBfovqfN9rK2TZq9SbM3SeGc/23zFzHvJU1Km/te+3vnczzYNnnfd9+9v9/97bfccg9FIDRf8BUQCIjgKyAQEMFXQCAggq+AQEAEXwGBgAi+AgIBEXwFBAIi+AoIBETwFRAIiOArIBAQwVdAICCCr4BAQARfAYGACL4CAgERfAUEAiL4CggERPAVEAiI4CsgEBDBV0AgIIKvgEBABF8BgYAIvgICARF8BQQCIvgKCARE8BUQC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z9JfSdcdO1W+fnPJ3+dJ+o4Qhz7+jNDw4CsgEBDBV0AgIIKvgEBABF8BgYAIvgICARF8BQQCIvgKCARE8BUQCIjgKyAQEMFXQCAggq+AQEAEXwGBgAi+AgIBEXwFBAIi+AoIBETwFRAIiOArIBAQwVdAICCCr4BAQARfAYGACL4CAgERfAUEAiL4CggERPAVEAiI4CsgEBDBV0AgIIKvgEBABF8BgYAIvgICARF8BQQCIvgKCARE8BUQCIjgKyAQEMFXQCAggq+AQEAEXwGBgAi+AgIBEXwFBAIi+AoIBETwFRAIiOArIBAQwVdAIODxf/VVGcawPhaZAAAAAElFTkSuQmCC"/></a>
|
|
<p class="about">This website uses Puter to bring you safe, secure, and private AI and Cloud features.</p>
|
|
<div class="buttons">
|
|
<button class="button button-auth" id="launch-auth-popup-cancel">${i18n('cancel')}</button>
|
|
<button class="button button-primary button-auth" id="launch-auth-popup" style="margin-left:10px;">${i18n('continue')}</button>
|
|
</div>
|
|
<p style="text-align: center; font-size: 14px;">${i18n('powered_by_puter_js', [], false)}</p>
|
|
<p class="launch-auth-popup-footnote">${i18n('tos_fineprint')}</p>
|
|
</div>`;
|
|
|
|
const el_window = await UIWindow({
|
|
title: `Upload`,
|
|
icon: window.icons[`app-icon-uploader.svg`],
|
|
uid: null,
|
|
is_dir: false,
|
|
body_content: h,
|
|
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;
|