Skip to content

Commit

Permalink
Improve RepoManager messages
Browse files Browse the repository at this point in the history
When referring to the presence of content repos and versions, say
"in your library" instead of "on this server" when running in the OCA.
skieffer committed Jun 2, 2024

Verified

This commit was signed with the committer’s verified signature.
snyk-bot Snyk bot
1 parent 59126d3 commit c0bfd02
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions client/src/trees/RepoManager.js
Original file line number Diff line number Diff line change
@@ -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>`;
@@ -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,`;

0 comments on commit c0bfd02

Please sign in to comment.