mirror of
https://github.com/HeyPuter/puter.git
synced 2026-08-28 08:56:58 +00:00
fix: made protocol dynamic in the publishURL displayed on 'Publish As Website' dialogbox (#1170)
Docker Image CI / build-and-push-image (push) Waiting to run
Maintain Release Merge PR / update-release-pr (push) Waiting to run
release-please / release-please (push) Waiting to run
test / test (18.x) (push) Waiting to run
test / test (20.x) (push) Waiting to run
test / test (22.x) (push) Waiting to run
Docker Image CI / build-and-push-image (push) Waiting to run
Maintain Release Merge PR / update-release-pr (push) Waiting to run
release-please / release-please (push) Waiting to run
test / test (18.x) (push) Waiting to run
test / test (20.x) (push) Waiting to run
test / test (22.x) (push) Waiting to run
* change https to http on UIWindowPublishWebsite * fix: made protocol string dynamic in the publish as website dialogbox
This commit is contained in:
@@ -36,8 +36,9 @@ async function UIWindowPublishWebsite(target_dir_uid, target_dir_name, target_di
|
||||
h += `<div class="publish-website-error-msg"></div>`;
|
||||
// subdomain
|
||||
h += `<div style="overflow: hidden;">`;
|
||||
h += `<label style="margin-bottom: 10px;">${i18n('pick_name_for_website')}</label>`;
|
||||
h += `<div style="font-family: monospace;">https://<input class="publish-website-subdomain" style="width:235px;" type="text" autocomplete="subdomain" spellcheck="false" autocorrect="off" autocapitalize="off" data-gramm_editor="false"/>.${html_encode(window.hosting_domain)}</div>`;
|
||||
h += `<label style="margin-bottom: 10px;">${i18n('pick_name_for_website')}</label>`;
|
||||
|
||||
h += `<div style="font-family: monospace;">${html_encode(window.extractProtocol(window.url))}://<input class="publish-website-subdomain" style="width:235px;" type="text" autocomplete="subdomain" spellcheck="false" autocorrect="off" autocapitalize="off" data-gramm_editor="false"/>.${html_encode(window.hosting_domain)}</div>`;
|
||||
h += `</div>`;
|
||||
// uid
|
||||
h += `<input class="publishWebsiteTargetDirUID" type="hidden" value="${html_encode(target_dir_uid)}"/>`;
|
||||
|
||||
@@ -2224,6 +2224,10 @@ window.extractSubdomain = function(url) {
|
||||
return subdomain;
|
||||
}
|
||||
|
||||
window.extractProtocol = function (url) {
|
||||
var protocol = url.split('://')[0];
|
||||
return protocol;
|
||||
}
|
||||
window.sleep = function(ms){
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user