diff --git a/src/dev-center/js/dev-center.js b/src/dev-center/js/dev-center.js index 3153f958..168c9da8 100644 --- a/src/dev-center/js/dev-center.js +++ b/src/dev-center/js/dev-center.js @@ -23,7 +23,7 @@ let source_path let apps = []; let sortBy = 'created_at'; let sortDirection = 'desc'; -const dev_center_uid = 'app-240a43f4-43b1-49bc-b9fc-c8ae719dab77'; +const dev_center_uid = puter.appID; let developer; let activeTab = 'apps'; let currently_editing_app; @@ -33,14 +33,16 @@ let search_query; const deploying_spinner = ``; const loading_spinner = ``; const drop_area_placeholder = `

Drop your app folder and files here to deploy.

HTML, JS, CSS, ...

`; -const index_missing_error = `Please upload an 'index.html' file or if you're uploading a directory, make sure it contains an 'index.html' file at its root.` +const index_missing_error = `Please upload an 'index.html' file or if you're uploading a directory, make sure it contains an 'index.html' file at its root.`; // authUsername -if (URLParams.has('puter.auth.username')) { - authUsername = URLParams.get('puter.auth.username'); -} else { - //todo error and terminate -} +(async () => { + let user = await puter.auth.getUser(); + + if (user?.username) { + authUsername = user.username; + } +})() // source_path if (URLParams.has('source_path')) {