fin projet
This commit is contained in:
@@ -52,6 +52,7 @@
|
||||
</div>
|
||||
</a>
|
||||
<a if={this.searchs.type === "release"} href={"#/release-details/master/" + item.master_id}><button>master</button></a>
|
||||
<a if={this.searchs.type === "master"} href="#"><button onclick={() => this.MainReleaseDetails(item)}>release</button></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -104,7 +105,7 @@
|
||||
this.searchs.pagination = result.pagination;
|
||||
this.searchs.query = query;
|
||||
this.searchs.type = type;
|
||||
|
||||
console.log()
|
||||
this.update();
|
||||
},
|
||||
|
||||
@@ -141,6 +142,18 @@
|
||||
Logout(){
|
||||
window.logout()
|
||||
this.update();
|
||||
},
|
||||
|
||||
async MainReleaseDetails(item) {
|
||||
const res = await fetch(item.resource_url);
|
||||
const json = await res.json();
|
||||
|
||||
const mainUrl = json.main_release_url;
|
||||
|
||||
const res2 = await fetch(mainUrl);
|
||||
const releaseData = await res2.json();
|
||||
|
||||
window.location.hash = `#/release-details/release/${releaseData.id}`;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user