Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/API-Reference/features/TaskManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Methods for managing the task's state and UI representation in the TaskManager.
| getProgressPercent | <code>function</code> | Returns the task's current progress percentage. |
| setFailed | <code>function</code> | Marks the task as failed. |
| isFailed | <code>function</code> | Returns true if the task is marked as failed. |
| setSucceded | <code>function</code> | Marks the task as succeeded. |
| setSucceeded | <code>function</code> | Marks the task as succeeded. |
| isSucceded | <code>function</code> | Returns true if the task is marked as succeeded. |
| showStopIcon | <code>function</code> | Shows the stop icon with an optional tooltip message. |
| hideStopIcon | <code>function</code> | Hides the stop icon. |
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/default/PHPSupport/ServerInstaller.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ define(function (require, exports, module) {
}
task.setProgressPercent(100);
task.setMessage(Strings.PHP_INSTALL_DONE);
task.setSucceded(); // (sic - TaskManager's exported name)
task.setSucceeded();
setTimeout(task.close, 4000);
Metrics.countEvent("lsp", "phpInst", upgrading ? "upOk" : "ok");
return { entryPath: getEntryPlatformPath(), upgraded: upgrading };
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/default/PythonSupport/ServerInstaller.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ define(function (require, exports, module) {
currentUnit = null;
task.setProgressPercent(100);
task.setMessage(Strings.PYTHON_INSTALL_DONE);
task.setSucceded(); // (sic - TaskManager's exported name)
task.setSucceeded();
setTimeout(task.close, 4000);
Metrics.countEvent("lsp", "pyInst", upgrading ? "upOk" : "ok");
return { binaryPath: getBinaryPlatformPath(), upgraded: upgrading };
Expand Down
18 changes: 14 additions & 4 deletions src/extensionsIntegrated/MigrateAssist/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ define(function (require, exports, module) {
const NEW_ORIGIN = "https://web.phcode.dev";

/**
* Human readable form of the above, used inside translated sentences via StringUtils.format.
* Human readable form of the new origin, used inside translated sentences via StringUtils.format.
* The legacy equivalent is derived from the origin instead, see getLegacyDomainName.
*/
const LEGACY_DOMAIN_NAME = "phcode.dev";
const NEW_DOMAIN_NAME = "web.phcode.dev";

/**
* The day the legacy origin stops serving. Month is 0 based, so 8 is September.
* @type {number}
*/
const SUNSET_DATE = Date.UTC(2026, 8, 1);
const SUNSET_DATE = Date.UTC(2026, 8, 10);

/**
* Android/ChromeOS Trusted Web Activity that wraps the legacy origin. Users launched from this
Expand Down Expand Up @@ -135,6 +135,16 @@ define(function (require, exports, module) {
return !Phoenix.isNativeApp && location.origin === getNewOrigin();
}

/**
* Hostname of the origin being retired, for use inside user facing sentences. Derived from the
* origin rather than written out separately so the two can never disagree, which matters while
* the legacy origin still points at staging.
* @return {string}
*/
function getLegacyDomainName() {
return new URL(getLegacyOrigin()).hostname;
}

/**
* URL of the helper page on the legacy origin.
*
Expand Down Expand Up @@ -189,13 +199,13 @@ define(function (require, exports, module) {
return (typeof now === "number" ? now : Date.now()) >= SUNSET_DATE;
}

exports.LEGACY_DOMAIN_NAME = LEGACY_DOMAIN_NAME;
exports.NEW_DOMAIN_NAME = NEW_DOMAIN_NAME;
exports.SUNSET_DATE = SUNSET_DATE;
exports.TWA_STORE_URL = TWA_STORE_URL;
exports.MIGRATION_DONE_KEY = MIGRATION_DONE_KEY;
exports.getLegacyOrigin = getLegacyOrigin;
exports.getMigrateAssistURL = getMigrateAssistURL;
exports.getLegacyDomainName = getLegacyDomainName;
exports.getNewOrigin = getNewOrigin;
exports.isLegacyOrigin = isLegacyOrigin;
exports.isNewOrigin = isNewOrigin;
Expand Down
25 changes: 0 additions & 25 deletions src/extensionsIntegrated/MigrateAssist/html/migrate-progress.html

This file was deleted.

5 changes: 4 additions & 1 deletion src/extensionsIntegrated/MigrateAssist/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ define(function (require, exports, module) {
Commands = require("command/Commands"),
Menus = require("command/Menus"),
Strings = require("strings"),
StringUtils = require("utils/StringUtils"),
Constants = require("./constants"),
SunsetDialog = require("./sunset-dialog"),
Migrator = require("./migrator");
Expand All @@ -54,7 +55,9 @@ define(function (require, exports, module) {
// desktop. It is also skipped on Safari/iOS, where the migration is deliberately not
// implemented: offering an action we do not honour would be worse than not offering it.
if (!Phoenix.isTestWindow && Constants.isMigrationSupportedBrowser()) {
CommandManager.register(Strings.CMD_MIGRATE_DATA, Commands.HELP_MIGRATE_DATA, function () {
CommandManager.register(
StringUtils.format(Strings.CMD_MIGRATE_DATA, Constants.getLegacyDomainName()),
Commands.HELP_MIGRATE_DATA, function () {
Migrator.runManually();
});
// Anchored to About rather than to Check for Updates: the updater only registers its
Expand Down
Loading
Loading