diff --git a/src/gui/src/UI/UIItem.js b/src/gui/src/UI/UIItem.js
index 494cf302f..48dfd3341 100644
--- a/src/gui/src/UI/UIItem.js
+++ b/src/gui/src/UI/UIItem.js
@@ -25,6 +25,7 @@ import UIPopover from './UIPopover.js';
import UIWindowEmailConfirmationRequired from './UIWindowEmailConfirmationRequired.js';
import UIContextMenu from './UIContextMenu.js'
import UIAlert from './UIAlert.js'
+import UIWindowPublishWorker from './UIWindowPublishWorker.js';
import path from "../lib/path.js"
import truncate_filename from '../helpers/truncate_filename.js';
import launch_app from "../helpers/launch_app.js"
@@ -1137,6 +1138,17 @@ function UIItem(options){
});
}
+ //-------------------------------------------
+ // Publish as Worker
+ // -------------------------------------------
+ if(!is_trashed && !is_trash && !options.is_dir && $(el_item).attr('data-name').toLowerCase().endsWith('.js')){
+ menu_items.push({
+ html: i18n('publish_as_serverless_worker'),
+ onClick: async function(){
+ UIWindowPublishWorker(options.uid, $(el_item).attr('data-name'), $(el_item).attr('data-path'));
+ }
+ });
+ }
// -------------------------------------------
// Deploy As App
// -------------------------------------------
@@ -1158,7 +1170,6 @@ function UIItem(options){
menu_items.push('-');
}
-
// -------------------------------------------
// Empty Trash
// -------------------------------------------
diff --git a/src/gui/src/UI/UIWindowPublishWorker.js b/src/gui/src/UI/UIWindowPublishWorker.js
new file mode 100644
index 000000000..708e898b6
--- /dev/null
+++ b/src/gui/src/UI/UIWindowPublishWorker.js
@@ -0,0 +1,136 @@
+/**
+ * Copyright (C) 2024-present 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