Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
noatgnu committed Nov 24, 2024
1 parent 718be44 commit eca7b72
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
<body>
<app-root></app-root>
<noscript>Please enable JavaScript to continue using this application.</noscript>
<script src="runtime.04dda3f52c76e240.js" type="module"></script><script src="polyfills.54ceafa6c8d51deb.js" type="module"></script><script src="scripts.dfd002a3f97f1569.js" defer></script><script src="main.20424d926ebae231.js" type="module"></script></body>
<script src="runtime.04dda3f52c76e240.js" type="module"></script><script src="polyfills.54ceafa6c8d51deb.js" type="module"></script><script src="scripts.dfd002a3f97f1569.js" defer></script><script src="main.ef0640f16baddadc.js" type="module"></script></body>
</html>

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/ngsw.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"configVersion": 1,
"timestamp": 1732477102120,
"timestamp": 1732480737688,
"index": "/index.html",
"assetGroups": [
{
Expand All @@ -15,7 +15,7 @@
"/55.7063ba82ffafcfc6.js",
"/favicon.ico",
"/index.html",
"/main.20424d926ebae231.js",
"/main.ef0640f16baddadc.js",
"/manifest.webmanifest",
"/polyfills.54ceafa6c8d51deb.js",
"/runtime.04dda3f52c76e240.js",
Expand Down Expand Up @@ -129,8 +129,8 @@
"/bootstrap-icons.70a9dee9e5ab72aa.woff": "d5831fd39baf13aff7626e483b9a089730f18604",
"/bootstrap-icons.bfa90bda92a84a6a.woff2": "020c3c6f9280a315e8425d7f92e15bcd0cdda1b2",
"/favicon.ico": "22f6a4a3bcaafafb0254e0f2fa4ceb89e505e8b2",
"/index.html": "8f0696a9195eef662c9b1886ad832c66237f11a3",
"/main.20424d926ebae231.js": "af4d8cfaf652366abc4e5f145da9fcbe407c7347",
"/index.html": "00e2f9a94386c737f9bfd0826247b0ffcded6eb5",
"/main.ef0640f16baddadc.js": "aaddd9120f9c699e9d45ec8af5ba8855fec2115d",
"/manifest.webmanifest": "0f6d8f1c753e9f503daf4cd303ebecc6b0b0a04b",
"/polyfills.54ceafa6c8d51deb.js": "bf3ba7612b763789aaac4865ae3671d83d77f8fb",
"/runtime.04dda3f52c76e240.js": "0bac40a792503167829a4ee004a113c9d1587b1b",
Expand Down
8 changes: 4 additions & 4 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
Expand Up @@ -35,7 +35,7 @@
"bootstrap": "^5.3.2",
"bootstrap-icons": "^1.11.2",
"chroma-js": "^2.4.2",
"curtain-web-api": "^1.0.55",
"curtain-web-api": "^1.0.56",
"cytoscape": "^3.21.1",
"cytoscape-cxtmenu": "^3.5.0",
"cytoscape-fcose": "^2.2.0",
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/datacite/datacite.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class DataciteComponent {
private baseURL: string = environment.apiURL
@Input() set linkID(value: string) {
this._linkID = value
this.dataCiteForm.controls.alternateIdentifiers.at(0).controls.alternateIdentifier.setValue(`${this.baseURL}/curtain/${this._linkID}/download/token=/`)
this.dataCiteForm.controls.alternateIdentifiers.at(0).controls.alternateIdentifier.setValue(`${this.baseURL}curtain/${this._linkID}/download/token=/`)
}
get linkID(): string {
return this._linkID
Expand Down Expand Up @@ -310,7 +310,7 @@ export class DataciteComponent {
"linkID": this.linkID,
}
this.accountsService.curtainAPI.submitDataCite(payload).then((value) => {

this.toastService.show("DOI Created", `Your ${value.data["doi"]} has been created`, 5000, "success").then()
})

}
Expand Down
19 changes: 19 additions & 0 deletions src/app/components/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ export class HomeComponent implements OnInit {
console.log(data)
this.loadingDataCite = false
this.doiMetadata = data
if (data.data.attributes.alternateIdentifiers.length > 0) {
this.getDOISessionData(data.data.attributes.alternateIdentifiers[0]["alternateIdentifier"], params["settings"]).then()
}

})

return
Expand Down Expand Up @@ -178,6 +182,21 @@ export class HomeComponent implements OnInit {


}

async getDOISessionData(url: string, doiLink: string) {

const data = await this.accounts.curtainAPI.postSettings("", "", this.onDownloadProgress, url)
if (data.data) {
this.restoreSettings(data.data).then(() => {
this.uniqueLink = location.origin + "/#/" + encodeURIComponent(doiLink)
this.settings.settings.currentID = doiLink
this.permanent = true
this.data.session = {permanent: true}
this.data.restoreTrigger.next(true)
})
}
}

async getSessionData(id: string, token: string = "") {
const d = await this.accounts.curtainAPI.getSessionSettings(id)
this.data.session = d.data
Expand Down
5 changes: 4 additions & 1 deletion src/app/data-cite-metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ export interface DataCiteMetadata {
"prefix": string,
"suffix": string,
"identifiers": string[],
"alternateIdentifiers": string[],
"alternateIdentifiers": {
alternateIdentifier: string,
alternateIdentifierType: string
}[],
"creators": DataCiteMetadataCreator[],
"titles": DataCiteMetadataTitle[],
"publisher": string,
Expand Down
4 changes: 4 additions & 0 deletions src/app/web.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,8 @@ export class WebService {

}

getDataFromDataCiteAlternateID(alternateID: string) {
return this.http.get(alternateID, {responseType: "json", observe: "events"})
}

}

0 comments on commit eca7b72

Please sign in to comment.