From 4483f70db7b1521196d58d68554ebe1c77e4022e Mon Sep 17 00:00:00 2001 From: abose Date: Thu, 9 Nov 2023 22:19:05 +0530 Subject: [PATCH] chore: rename phcode protcol to phtauri --- src/assets/new-project/assets/js/new-project-more.js | 2 +- src/extensibility/Package.js | 2 +- src/extensions/default/HTMLCodeHints/HTMLJumpToDef.js | 2 +- src/extensions/default/QuickView/ImagePreviewProvider.js | 2 +- src/extensions/default/RemoteFileAdapter/main.js | 6 +++--- src/filesystem/FileSystem.js | 2 +- src/index.html | 6 +++--- src/phoenix/shell.js | 2 +- src/utils/ExtensionLoader.js | 4 ++-- src/utils/ExtensionUtils.js | 2 +- src/view/ThemeManager.js | 2 +- test/SpecRunner.html | 6 +++--- 12 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/assets/new-project/assets/js/new-project-more.js b/src/assets/new-project/assets/js/new-project-more.js index 039d0a46d..ec425e3df 100644 --- a/src/assets/new-project/assets/js/new-project-more.js +++ b/src/assets/new-project/assets/js/new-project-more.js @@ -31,7 +31,7 @@ function _getIconURL(iconURL) { } else if(iconURL === 'appLogo'){ return 'images/logo.png'; } else if(iconURL && (iconURL.startsWith("https://") || iconURL.startsWith("http://") - || iconURL.startsWith("phcode://") || iconURL.startsWith("asset://"))){ + || iconURL.startsWith("phtauri://") || iconURL.startsWith("asset://"))){ return iconURL; } return 'images/tab-img2.png'; // HTML icon diff --git a/src/extensibility/Package.js b/src/extensibility/Package.js index b39954264..587236465 100644 --- a/src/extensibility/Package.js +++ b/src/extensibility/Package.js @@ -179,7 +179,7 @@ define(function (require, exports, module) { return d.promise(); } if (!(parsed.protocol === "http:" || parsed.protocol === "https:" - || parsed.protocol === "phcode:" || parsed.protocol === "asset:")) { + || parsed.protocol === "phtauri:" || parsed.protocol === "asset:")) { d.reject(Errors.UNSUPPORTED_PROTOCOL); return d.promise(); } diff --git a/src/extensions/default/HTMLCodeHints/HTMLJumpToDef.js b/src/extensions/default/HTMLCodeHints/HTMLJumpToDef.js index ff184ec08..c07142ef3 100644 --- a/src/extensions/default/HTMLCodeHints/HTMLJumpToDef.js +++ b/src/extensions/default/HTMLCodeHints/HTMLJumpToDef.js @@ -59,7 +59,7 @@ define(function (require, exports, module) { function _openFile(fileRelativePath, mainDocPath) { if(fileRelativePath.startsWith("http://") || fileRelativePath.startsWith("https://") - || fileRelativePath.startsWith("phcode://") || fileRelativePath.startsWith("asset://")){ + || fileRelativePath.startsWith("phtauri://") || fileRelativePath.startsWith("asset://")){ return FileViewController.openAndSelectDocument(fileRelativePath, FileViewController.PROJECT_MANAGER); } const targetPath = path.resolve(mainDocPath, fileRelativePath); diff --git a/src/extensions/default/QuickView/ImagePreviewProvider.js b/src/extensions/default/QuickView/ImagePreviewProvider.js index 9856100bd..652168f99 100644 --- a/src/extensions/default/QuickView/ImagePreviewProvider.js +++ b/src/extensions/default/QuickView/ImagePreviewProvider.js @@ -41,7 +41,7 @@ define(function (require, exports, module) { extensionlessImagePreview; // Whether to try and preview extensionless URLs // List of protocols which we will support for image preview urls - let validProtocols = ["data:", "http:", "https:", "phcode:", "asset:", "ftp:", "file:"]; + let validProtocols = ["data:", "http:", "https:", "phtauri:", "asset:", "ftp:", "file:"]; prefs = PreferencesManager.getExtensionPrefs("quickview"); diff --git a/src/extensions/default/RemoteFileAdapter/main.js b/src/extensions/default/RemoteFileAdapter/main.js index dd5de9840..7c3982dfc 100644 --- a/src/extensions/default/RemoteFileAdapter/main.js +++ b/src/extensions/default/RemoteFileAdapter/main.js @@ -34,7 +34,7 @@ define(function (require, exports, module) { const HTTP_PROTOCOL = "http:", HTTPS_PROTOCOL = "https:", - TAURI_PROTOCOL = "phcode:", + TAURI_PROTOCOL = "phtauri:", TAURI_ASSET_PROTOCOL = "asset:"; ExtensionUtils.loadStyleSheet(module, "styles.css"); @@ -48,8 +48,8 @@ define(function (require, exports, module) { return "https"; } - if (data.fullPath.startsWith("phcode://")) { - return "phcode"; + if (data.fullPath.startsWith("phtauri://")) { + return "phtauri"; } if (data.fullPath.startsWith("asset://")) { diff --git a/src/filesystem/FileSystem.js b/src/filesystem/FileSystem.js index a686cb076..d41864adb 100644 --- a/src/filesystem/FileSystem.js +++ b/src/filesystem/FileSystem.js @@ -1221,7 +1221,7 @@ define(function (require, exports, module) { // attach remote file handlers var HTTP_PROTOCOL = "http:", HTTPS_PROTOCOL = "https:", - TAURI_PROTOCOL = "phcode:", + TAURI_PROTOCOL = "phtauri:", TAURI_ASSET_PROTOCOL = "asset:"; var protocolAdapter = { diff --git a/src/index.html b/src/index.html index 99c506c63..acd85533b 100644 --- a/src/index.html +++ b/src/index.html @@ -45,7 +45,7 @@ javascript module section only!!-->