Skip to content

Commit

Permalink
Feature/patch localhost backend (#35)
Browse files Browse the repository at this point in the history
* fix: use remote url instead of localhost to hit API

* chore: prepare v1.5.1
  • Loading branch information
Tchoupinax authored Oct 7, 2022
1 parent d6c0ac3 commit d8d8d8b
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 12 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 1.5.1 | 2022-10-07

### Fixes

- Compute the real endpoint for hitting the API

## 1.5.0 | 2022-09-30

#### Features
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fuzzy-engine",
"version": "1.5.0",
"version": "1.5.1",
"description": "Docker registry UI made with love",
"author": "Tchoupinax <corentinfiloche@hotmail.fr> (https://corentinfiloche.xyz)",
"licence": "MIT",
Expand Down
20 changes: 13 additions & 7 deletions pages/_name/tags.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
{{ digest.size }}

<div
class="px-2 py-0 ml-2 border rounded-full cursor-pointer infoButton border-theme-default hover:text-red-500">
class="px-2 py-0 ml-2 border rounded-full cursor-pointer infoButton border-theme-default hover:text-red-500"
>
i
</div>
<div class="absolute left-0 z-10 w-48 p-2 px-1 ml-24 bg-black rounded-lg info">
Expand All @@ -48,7 +49,8 @@
{{ timeago(digest.created) }}

<div
class="px-2 py-0 ml-2 border rounded-full cursor-pointer infoButton border-theme-default hover:text-red-500">
class="px-2 py-0 ml-2 border rounded-full cursor-pointer infoButton border-theme-default hover:text-red-500"
>
i
</div>

Expand All @@ -64,29 +66,33 @@
<div
v-for="(architecture, indexArchitecture) of digest.architecures"
:key="indexArchitecture"
class="w-auto p-1 px-2 mx-1 whitespace-no-wrap bg-blue-100 rounded-lg">
class="w-auto p-1 px-2 mx-1 whitespace-no-wrap bg-blue-100 rounded-lg"
>
{{ architecture }}
</div>

<div
v-for="(tag, indexTags) of digest.tags"
:key="indexTags"
class="w-auto p-1 px-2 mx-1 whitespace-no-wrap bg-gray-200 rounded-lg">
class="w-auto p-1 px-2 mx-1 whitespace-no-wrap bg-gray-200 rounded-lg"
>
{{ tag }}
</div>
</div>

<button
v-if="false"
class="flex items-center justify-center p-1 px-2 ml-8 text-center bg-gray-200 border-2 rounded border-theme-default text-theme-default"
@click="deleteImage(digest.fullDigest)">
@click="deleteImage(digest.fullDigest)"
>
<div class="w-4">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
/>
</svg>
</div>
</button>
Expand Down Expand Up @@ -123,7 +129,7 @@ export default {
}
const { data } = await this.$axios({
url: `/api/repositories/${this.$route.params.name}/tags`,
url: `${new URL(window.location).origin}/api/repositories/${this.$route.params.name}/tags`,
method: 'GET',
withCredentials: true,
});
Expand Down
2 changes: 1 addition & 1 deletion pages/list/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export default {
this.$router.push('/list');
}
const { data } = await this.$axios.get('/api/repositories', { withCredentials: true });
const { data } = await this.$axios.get(`${new URL(window.location).origin}/api/repositories`, { withCredentials: true });
this.repositories = data.sort((a, b) => {
if (a.name > b.name) { return 1; }
Expand Down
2 changes: 1 addition & 1 deletion pages/list/last.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export default {
this.$router.push('/list');
}
const { data } = await this.$axios.get('/api/repositories/latest', { withCredentials: true });
const { data } = await this.$axios.get(`${new URL(window.location).origin}/api/repositories/latest`, { withCredentials: true });
this.repositories = data;
},
methods: {
Expand Down

0 comments on commit d8d8d8b

Please sign in to comment.