Skip to content

Commit d888dd2

Browse files
Thomas StrombergThomas Stromberg
authored andcommitted
Support subdomain-based workspaces
1 parent 219f920 commit d888dd2

File tree

11 files changed

+1196
-392
lines changed

11 files changed

+1196
-392
lines changed

assets/app.js

Lines changed: 138 additions & 158 deletions
Large diffs are not rendered by default.

assets/changelog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ export const Changelog = (() => {
641641
// Show org link only when viewing a specific user in an org
642642
if (username && org) {
643643
show(changelogOrgLink);
644-
changelogOrgLinkAnchor.href = `/changelog/gh/${org}`;
644+
changelogOrgLinkAnchor.href = `https://${org}.ready-to-review.dev/changelog`;
645645
} else {
646646
hide(changelogOrgLink);
647647
}

assets/leaderboard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export const Leaderboard = (() => {
131131
<p class="org-selector-subtitle">Choose from your organizations to see top contributors</p>
132132
<div class="org-list">
133133
${orgs.map(orgName => `
134-
<a href="/leaderboard/gh/${escapeHtml(orgName)}" class="org-list-item">
134+
<a href="https://${escapeHtml(orgName)}.ready-to-review.dev/leaderboard" class="org-list-item">
135135
<div class="org-list-name">${escapeHtml(orgName)}</div>
136136
</a>
137137
`).join('')}

assets/robots.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,12 @@ export const Robots = (() => {
213213
if (goToRobotArmyBtn) {
214214
goToRobotArmyBtn.onclick = () => {
215215
const urlContext = parseURL();
216-
const org = urlContext?.org || orgSelect?.value || "*";
217-
window.location.href = `/robots/gh/${org}`;
216+
const org = urlContext?.org || orgSelect?.value;
217+
if (org && org !== "*") {
218+
window.location.href = `https://${org}.ready-to-review.dev/robots`;
219+
} else {
220+
window.location.href = `/robots`;
221+
}
218222
};
219223
}
220224
};
@@ -447,7 +451,7 @@ export const Robots = (() => {
447451
${orgs
448452
.map(
449453
(orgName) => `
450-
<a href="/robots/gh/${escapeHtml(orgName)}" class="org-list-item">
454+
<a href="https://${escapeHtml(orgName)}.ready-to-review.dev/robots" class="org-list-item">
451455
<div class="org-list-name">${escapeHtml(orgName)}</div>
452456
</a>
453457
`,
@@ -506,11 +510,11 @@ export const Robots = (() => {
506510

507511
const onOrgSelected = (e) => {
508512
selectedOrg = e.target.value;
509-
if (!selectedOrg) {
510-
selectedOrg = "*";
513+
if (!selectedOrg || selectedOrg === "*") {
514+
window.location.href = `/robots`;
515+
} else {
516+
window.location.href = `https://${selectedOrg}.ready-to-review.dev/robots`;
511517
}
512-
513-
window.location.href = `/robots/gh/${selectedOrg}`;
514518
};
515519

516520
const renderRobotCards = (searchTerm = '') => {

assets/stats.js

Lines changed: 78 additions & 72 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)