mirror of
https://github.com/HeyPuter/puter.git
synced 2026-09-26 23:26:04 +00:00
Remove context menu from entries
This commit is contained in:
@@ -237,8 +237,8 @@ section {
|
||||
padding: 10px;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
padding-right: 20px;
|
||||
padding-left: 20px;
|
||||
padding-right: 40px;
|
||||
padding-left: 40px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
#app-list, #website-list, #worker-list {
|
||||
@@ -756,12 +756,13 @@ th.sorted{
|
||||
}
|
||||
|
||||
.my-apps-title, .my-workers-title, .my-websites-title {
|
||||
font-size: 27px;
|
||||
font-size: 22px;
|
||||
margin-top: 0px;
|
||||
float: left;
|
||||
font-weight: 500;
|
||||
margin-bottom: 15px;
|
||||
margin-bottom: 0;
|
||||
color: #394254;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.app-row-toolbar {
|
||||
@@ -956,7 +957,7 @@ ol li:before {
|
||||
|
||||
.create-an-app-btn, .create-a-website-btn{
|
||||
float:right;
|
||||
margin-bottom: 10px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.create-an-app-btn img, .create-a-website-btn img, .create-a-worker-btn img{
|
||||
width: 25px;
|
||||
@@ -967,7 +968,8 @@ ol li:before {
|
||||
margin-right: 4px;
|
||||
}
|
||||
.create-a-worker-btn, .create-a-website-btn{
|
||||
float:right; margin-bottom: 10px;
|
||||
float:right;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.jip-submit-btn{
|
||||
@@ -979,7 +981,12 @@ ol li:before {
|
||||
font-size: 12px; margin-top: 20px; margin-bottom: 0;
|
||||
}
|
||||
.app-list-nav, .worker-list-nav, .website-list-nav{
|
||||
overflow: hidden; margin-bottom: 40px; margin-top: 10px;
|
||||
overflow: hidden;
|
||||
margin-bottom: 40px;
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
.back-to-main-btn{
|
||||
float:right; margin-bottom: 10px;
|
||||
|
||||
@@ -2660,17 +2660,6 @@ $(document).on('click', '.options-icon-app', function(e) {
|
||||
app_context_menu(app_name, app_title, app_uid);
|
||||
})
|
||||
|
||||
$(document).on('contextmenu', '.app-card', function(e) {
|
||||
let app_name = $(this).attr('data-name');
|
||||
let app_title = $(this).attr('data-title');
|
||||
let app_uid = $(this).attr('data-uid');
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
e.stopImmediatePropagation();
|
||||
app_context_menu(app_name, app_title, app_uid);
|
||||
})
|
||||
|
||||
async function attempt_delete_app(app_name, app_title, app_uid) {
|
||||
// get app
|
||||
const app_data = await puter.apps.get(app_name, { icon_size: 16 });
|
||||
|
||||
@@ -286,23 +286,6 @@ $(document).on('click', '.delete-websites-btn', async function (e) {
|
||||
}
|
||||
})
|
||||
|
||||
$(document).on('contextmenu', '.website-card', function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
e.stopImmediatePropagation();
|
||||
puter.ui.contextMenu({
|
||||
items: [
|
||||
{
|
||||
label: 'Delete',
|
||||
type: 'danger',
|
||||
action: () => {
|
||||
attempt_delete_website($(this).attr('data-name'));
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
})
|
||||
|
||||
$(document).on('click', '.options-icon-website', function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
@@ -4,7 +4,14 @@ window.workers = [];
|
||||
let search_query;
|
||||
|
||||
window.create_worker = async (name) => {
|
||||
let worker = await puter.workers.create(name, window.default_worker_file);
|
||||
let worker;
|
||||
|
||||
try {
|
||||
worker = await puter.workers.create(name, window.default_worker_file);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
console.error('Error creating worker:', err.error);
|
||||
}
|
||||
|
||||
return worker;
|
||||
}
|
||||
@@ -309,23 +316,6 @@ $(document).on('click', '.delete-workers-btn', async function (e) {
|
||||
}
|
||||
})
|
||||
|
||||
$(document).on('contextmenu', '.worker-card', function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
e.stopImmediatePropagation();
|
||||
puter.ui.contextMenu({
|
||||
items: [
|
||||
{
|
||||
label: 'Delete',
|
||||
type: 'danger',
|
||||
action: () => {
|
||||
attempt_delete_worker($(this).attr('data-name'));
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
})
|
||||
|
||||
$(document).on('click', '.options-icon-worker', function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
Reference in New Issue
Block a user