mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 14:03:42 +00:00
fix: launch_app
not considering explorer
as a special case
This commit is contained in:
parent
e58da265ba
commit
98e69642d0
@ -22,14 +22,14 @@ async function UIWindowShare(items, recipient){
|
||||
return new Promise(async (resolve) => {
|
||||
let h = '';
|
||||
h += `<div style="padding: 30px 40px 20px; border-bottom: 1px solid #ced7e1;">`;
|
||||
h += `<div class="qr-code-window-close-btn generic-close-window-button" style="margin: 5px;"> × </div>`;
|
||||
h += `<div class="generic-close-window-button" style="margin: 5px;"> × </div>`;
|
||||
|
||||
//------------------------------------------------
|
||||
// Icon
|
||||
// Icons
|
||||
//------------------------------------------------
|
||||
|
||||
// 1 item shared
|
||||
h += `<div style="display:flex; justify-content: center; margin-bottom: 10px;">`;
|
||||
h += `<div style="display:flex; justify-content: center; margin-bottom: 10px; disable-user-select">`;
|
||||
// 1 item shared
|
||||
if(items.length === 1)
|
||||
h += `<img src="${items[0].icon}" style="width:70px; height:70px;">`;
|
||||
// 2 items shared
|
||||
@ -58,7 +58,6 @@ async function UIWindowShare(items, recipient){
|
||||
h += `<img src="${items[3].icon}" style="width:70px; height:70px; margin-left:-60px; margin-top: -35px; z-index:2; transform:scale(0.4);">`;
|
||||
h += `<img src="${items[4].icon}" style="width:70px; height:70px; margin-left:-60px; margin-top: -45px; z-index:1; transform:scale(0.2);">`;
|
||||
}
|
||||
|
||||
h += `</div>`;
|
||||
|
||||
// ------------------------------------------------
|
||||
|
@ -36,7 +36,17 @@ const launch_app = async (options)=>{
|
||||
}
|
||||
|
||||
// If the app object is not provided, get it from the server
|
||||
let app_info = options.app_obj ?? await puter.apps.get(options.name);
|
||||
let app_info;
|
||||
|
||||
// explorer is a special case
|
||||
if(options.name === 'explorer'){
|
||||
console.log('explorer');
|
||||
app_info = [];
|
||||
}
|
||||
else if(options.app_obj)
|
||||
app_info = options.app_obj;
|
||||
else
|
||||
app_info = await puter.apps.get(options.name);
|
||||
|
||||
// For backward compatibility reasons we need to make sure that both `uuid` and `uid` are set
|
||||
app_info.uuid = app_info.uuid ?? app_info.uid;
|
||||
|
Loading…
Reference in New Issue
Block a user