Skip to content

Commit

Permalink
(ui) fix js
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincobain2000 committed May 4, 2024
1 parent 7bb3a1a commit 318bfb4
Showing 1 changed file with 26 additions and 29 deletions.
55 changes: 26 additions & 29 deletions app/frontend/src/components/ReadmeDashboard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const baseURL = import.meta.env.PUBLIC_BASE_URL;
<img
class="inline select-none mt-5 mb-5"
is:raw
:src="`//${types[0].url}/table?org=${types[0].org}&repo=${types[0].repo}&branch=${types[0].branch}&theme=dark`"
:src="`//${url}/table?org=${org}&repo=${repo}&branch=${branch}&theme=dark`"
/>
</template>
<table class="w-full select-none mb-5">
Expand Down Expand Up @@ -168,7 +168,7 @@ const baseURL = import.meta.env.PUBLIC_BASE_URL;
<img
class="inline select-none"
is:raw
:src="`//${t.url}/chart?org=${t.org}&repo=${t.repo}&branch=${t.branch}&type=${t.name}&theme=dark&line=fill&width=120&height=120&output=svg`"
:src="`//${url}/chart?org=${org}&repo=${repo}&branch=${branch}&type=${t.name}&theme=dark&line=fill&width=120&height=120&output=svg`"
/>
</template>
</div>
Expand All @@ -191,13 +191,13 @@ const baseURL = import.meta.env.PUBLIC_BASE_URL;
<div class="pb-2 select-none">
<img
is:raw
:src="`//${t.url}/badge?org=${t.org}&repo=${t.repo}&branch=${t.branch}&type=${t.name}`"
:src="`//${url}/badge?org=${org}&repo=${repo}&branch=${branch}&type=${t.name}`"
/>
</div>
<code class="font-mono text-slate-700 break-words text-sm">
![<span x-text="t.name"></span>](<span x-text="t.url"
></span>/badge?org=<span x-text="t.org"></span>&repo=<span
x-text="t.repo"></span>&branch=<span x-text="t.branch"
![<span x-text="t.name"></span>](<span x-text="url"
></span>/badge?org=<span x-text="org"></span>&repo=<span
x-text="repo"></span>&branch=<span x-text="branch"
></span>&type=<span x-text="t.name"></span>)
</code>
</dd>
Expand All @@ -218,7 +218,7 @@ const baseURL = import.meta.env.PUBLIC_BASE_URL;
<img
class="inline select-none"
is:raw
:src="`//${t.url}/chart?org=${t.org}&repo=${t.repo}&branch=${t.branch}&type=${t.name}&theme=dark&line=fill&width=150&height=150&output=svg`"
:src="`//${url}/chart?org=${org}&repo=${repo}&branch=${branch}&type=${t.name}&theme=dark&line=fill&width=150&height=150&output=svg`"
/>
</template>
</div>
Expand All @@ -229,9 +229,9 @@ const baseURL = import.meta.env.PUBLIC_BASE_URL;
<div class="text-white font-bold select-none pb-2" x-text="t.name">
</div>
<code class="font-mono text-slate-700 break-words text-sm">
![<span x-text="t.name"></span>](<span x-text="t.url"
></span>/chart?org=<span x-text="t.org"></span>&repo=<span
x-text="t.repo"></span>&branch=<span x-text="t.branch"
![<span x-text="t.name"></span>](<span x-text="url"
></span>/chart?org=<span x-text="org"></span>&repo=<span
x-text="repo"></span>&branch=<span x-text="branch"
></span>&type=<span x-text="t.name"
></span>&theme=dark&line=fill&width=175&height=160)
</code>
Expand All @@ -256,13 +256,13 @@ const baseURL = import.meta.env.PUBLIC_BASE_URL;
<div class="pb-2 select-none flex justify-center items-center">
<img
is:raw
:src="`//${t.url}/chart?org=${t.org}&repo=${t.repo}&branch=${t.branch}&type=${t.name}&theme=dark&line=fill`"
:src="`//${url}/chart?org=${org}&repo=${repo}&branch=${branch}&type=${t.name}&theme=dark&line=fill`"
/>
</div>
<code class="font-mono text-slate-700 break-words text-sm">
![<span x-text="t.name"></span>](<span x-text="t.url"
></span>/chart?org=<span x-text="t.org"></span>&repo=<span
x-text="t.repo"></span>&branch=<span x-text="t.branch"
![<span x-text="t.name"></span>](<span x-text="url"
></span>/chart?org=<span x-text="org"></span>&repo=<span
x-text="repo"></span>&branch=<span x-text="branch"
></span>&type=<span x-text="t.name"></span>)
</code>
</dd>
Expand All @@ -288,13 +288,13 @@ const baseURL = import.meta.env.PUBLIC_BASE_URL;
<div class="pb-2 select-none flex justify-center items-center">
<img
is:raw
:src="`//${t.url}/chart?org=${t.org}&repo=${t.repo}&branches=all&type=${t.name}&theme=dark&line=fill`"
:src="`//${url}/chart?org=${org}&repo=${repo}&branches=all&type=${t.name}&theme=dark&line=fill`"
/>
</div>
<code class="font-mono text-slate-700 break-words text-sm">
![<span x-text="t.name"></span>](<span x-text="t.url"
></span>/chart?org=<span x-text="t.org"></span>&repo=<span
x-text="t.repo"></span>&branches=all&type=<span x-text="t.name"
![<span x-text="t.name"></span>](<span x-text="url"
></span>/chart?org=<span x-text="org"></span>&repo=<span
x-text="repo"></span>&branches=all&type=<span x-text="t.name"
></span>)
</code>
</dd>
Expand All @@ -320,13 +320,13 @@ const baseURL = import.meta.env.PUBLIC_BASE_URL;
<div class="pb-2 select-none flex justify-center items-center">
<img
is:raw
:src="`//${t.url}/chart?org=${t.org}&repo=${t.repo}&users=all&type=${t.name}&theme=dark&line=fill`"
:src="`//${url}/chart?org=${org}&repo=${repo}&users=all&type=${t.name}&theme=dark&line=fill`"
/>
</div>
<code class="font-mono text-slate-700 break-words text-sm">
![<span x-text="t.name"></span>](<span x-text="t.url"
></span>/chart?org=<span x-text="t.org"></span>&repo=<span
x-text="t.repo"></span>&branch=<span x-text="t.branch"
![<span x-text="t.name"></span>](<span x-text="url"
></span>/chart?org=<span x-text="org"></span>&repo=<span
x-text="repo"></span>&branch=<span x-text="branch"
></span>&type=<span x-text="t.name"></span>)
</code>
</dd>
Expand All @@ -341,7 +341,7 @@ const baseURL = import.meta.env.PUBLIC_BASE_URL;
const url = new URL(window.location.href);
url.searchParams.set("branch", branch);
window.history.pushState({ path: url.toString() }, "", url.toString());
location.reload();
window.location.reload();
};

const currentURL = window.location.origin;
Expand Down Expand Up @@ -370,12 +370,9 @@ const baseURL = import.meta.env.PUBLIC_BASE_URL;
branch = data.branch;
updateBranch();
}
data.types.map((d) => {
d.org = org;
d.repo = repo;
d.branch = branch;
d.url = baseURL.replace("https://", "").replace("http://", "");
});
data.url = baseURL.replace("https://", "").replace("http://", "");
data.org = org;
data.repo = repo;

document
.getElementById("data")
Expand Down

0 comments on commit 318bfb4

Please sign in to comment.