Skip to content

Commit d58c6dc

Browse files
committed
chore: login working in the browser
1 parent 2ea367a commit d58c6dc

File tree

9 files changed

+492
-29
lines changed

9 files changed

+492
-29
lines changed

docs/API-Reference/editor/CodeHintManager.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ Test if a hint popup is open.
271271
Register a handler to show hints at the top of the hint list.
272272
This API allows extensions to add their own hints at the top of the standard hint list.
273273

274-
**Kind**: inner method of [<code>CodeHintManager</code>](#module_CodeHintManager)
274+
**Kind**: inner method of [<code>CodeHintManager</code>](#module_CodeHintManager)
275275

276276
| Param | Type | Description |
277277
| --- | --- | --- |
@@ -282,4 +282,4 @@ This API allows extensions to add their own hints at the top of the standard hin
282282
### CodeHintManager.clearHintsAtTop()
283283
Unregister the hints at top handler.
284284

285-
**Kind**: inner method of [<code>CodeHintManager</code>](#module_CodeHintManager)
285+
**Kind**: inner method of [<code>CodeHintManager</code>](#module_CodeHintManager)

src-node/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ const nodeConnector = NodeConnector.createNodeConnector(AUTH_CONNECTOR_ID, {
219219
setVerificationCode
220220
});
221221

222-
const ALLOWED_ORIGIN = 'https://account.phcode.io';
222+
const ALLOWED_ORIGIN = 'https://account.phcode.dev';
223223
function autoAuth(req, res) {
224224
const origin = req.headers.origin;
225225
// localhost dev of loginService is not allowed here to not leak to production. So autoAuth is not available in

src/brackets.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ define(function (require, exports, module) {
139139
require("widgets/InlineMenu");
140140
require("thirdparty/tinycolor");
141141
require("utils/LocalizationUtils");
142-
require("services/login");
142+
require("services/login-desktop");
143+
require("services/login-browser");
143144

144145
// DEPRECATED: In future we want to remove the global CodeMirror, but for now we
145146
// expose our required CodeMirror globally so as to avoid breaking extensions in the

src/config.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"app_title": "Phoenix Code",
44
"app_name_about": "Phoenix Code",
55
"about_icon": "styles/images/phoenix-icon.svg",
6-
"account_url": "https://account.phcode.io/",
6+
"account_url": "https://account.phcode.dev/",
77
"how_to_use_url": "https://github.com/adobe/brackets/wiki/How-to-Use-Brackets",
88
"docs_url": "https://docs.phcode.dev/",
9-
"support_url": "https://account.phcode.io/?returnUrl=https%3A%2F%2Faccount.phcode.io%2F%23support",
9+
"support_url": "https://account.phcode.dev/?returnUrl=https%3A%2F%2Faccount.phcode.dev%2F%23support",
1010
"suggest_feature_url": "https://github.com/phcode-dev/phoenix/discussions/categories/ideas",
1111
"report_issue_url": "https://github.com/phcode-dev/phoenix/issues/new/choose",
1212
"get_involved_url": "https://github.com/phcode-dev/phoenix/discussions/77",
@@ -60,4 +60,4 @@
6060
"url": "https://github.com/phcode-dev/phoenix/blob/master/LICENSE"
6161
}
6262
]
63-
}
63+
}

src/nls/root/strings.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,6 +1607,14 @@ define({
16071607
"ACCOUNT_DETAILS": "Account Details",
16081608
"AI_QUOTA_USED": "AI quota used",
16091609
"LOGIN_REFRESH": "Check Login Status",
1610+
"SIGN_IN_WAITING_TITLE": "Waiting for Sign In",
1611+
"SIGN_IN_WAITING_MESSAGE": "Please complete sign-in in the new tab, then return here.",
1612+
"WAITING_FOR_LOGIN": "Waiting for login\u2026",
1613+
"CHECK_NOW": "Check Now",
1614+
"CHECKING": "Checking\u2026",
1615+
"CHECKING_STATUS": "Checking login status\u2026",
1616+
"NOT_SIGNED_IN_YET": "Not signed in yet. Please complete sign-in in the other tab.",
1617+
"WELCOME_BACK": "Welcome back, {0}!",
16101618

16111619
// Collapse Folders
16121620
"COLLAPSE_ALL_FOLDERS": "Collapse All Folders",
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<div class="browser-login-waiting-dialog modal">
2+
<div class="modal-header">
3+
<h1 class="dialog-title">{{Strings.SIGN_IN_WAITING_TITLE}}</h1>
4+
</div>
5+
<div class="modal-body">
6+
<div class="waiting-content-container">
7+
<p>{{Strings.SIGN_IN_WAITING_MESSAGE}}</p>
8+
<div class="login-status-container" style="margin: 20px 0; text-align: center;">
9+
<div id="login-status" style="color: #666; font-style: italic; font-size: 14px;">
10+
{{Strings.WAITING_FOR_LOGIN}}
11+
</div>
12+
</div>
13+
</div>
14+
</div>
15+
<div class="modal-footer">
16+
<button class="btn" data-button-id="cancel">{{Strings.CANCEL}}</button>
17+
<button class="btn primary" data-button-id="check">{{Strings.CHECK_NOW}}</button>
18+
</div>
19+
</div>

0 commit comments

Comments
 (0)