Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve RepoManager messages #78

Merged
merged 1 commit into from
Jun 3, 2024
Merged
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
9 changes: 5 additions & 4 deletions client/src/trees/RepoManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,17 +285,18 @@ export class RepoManager {

handleOpenRepoFailures(repopath, version, resp, buildMgrCallback, fail_silently=false) {
if (fail_silently) return;
const location = this.hub.OCA_version ? 'in your library' : 'on this server';
if (resp.privileged) {
let doClone = false;
let doBuild = false;
let msg;
let question = '';
if (resp.present) {
msg = `<p>Repo <span class="monospace">${repopath}</span> has not been built at <span class="monospace">${version}</span> on this server.</p>`;
msg = `<p>Repo <span class="monospace">${repopath}</span> has not been built at <span class="monospace">${version}</span> ${location}.</p>`;
question = `<p>Do you want to build?</p>`;
doBuild = true;
} else {
msg = `<p>Repo <span class="monospace">${repopath}</span> is not present on this server.</p>`;
msg = `<p>Repo <span class="monospace">${repopath}</span> is not present ${location}.</p>`;
if (resp.clonable) {
if (version === "WIP") {
question = `<p>Do you want to clone the repo?</p>`;
Expand Down Expand Up @@ -348,12 +349,12 @@ export class RepoManager {
switch (hosting) {
case nli:
case "DOES_NOT_OWN":
msg += `<p>Repo <span class="monospace">${repopath}</span> has not been built at <span class="monospace">${version}</span> on this server.</p>`;
msg += `<p>Repo <span class="monospace">${repopath}</span> has not been built at <span class="monospace">${version}</span> ${location}.</p>`;
msg += ownership_msg;
break;
case "MAY_NOT_REQUEST":
case "DENIED":
msg += `<p>Repo <span class="monospace">${repopath}</span> at <span class="monospace">${version}</span> cannot be built on this server.</p>`;
msg += `<p>Repo <span class="monospace">${repopath}</span> at <span class="monospace">${version}</span> cannot be built ${location}.</p>`;
break;
case "MAY_REQUEST":
msg += `<p>If you wish to build <span class="monospace">${repopath}</span> at <span class="monospace">${version}</span>, you can request hosting,`;
Expand Down
Loading