-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
239 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
{ | ||
"typescript.tsdk": "node_modules/typescript/lib" | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"[typescript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
body, html { | ||
body, | ||
html { | ||
margin: 0; | ||
padding: 0; | ||
height: 100%; | ||
width: 100%; | ||
} | ||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, | ||
"Helvetica Neue", Arial, sans-serif; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<script lang="ts"> | ||
let imports: Promise<Import[]> = loadImports() | ||
interface Import { | ||
id: string | ||
name: string | ||
finishedAt: string | ||
} | ||
async function loadImports() { | ||
const response = await fetch("/api/tracks/imports?state=completed&limit=25") | ||
return (await response.json()) as Import[] | ||
} | ||
</script> | ||
|
||
<div class="container"> | ||
<h3>Recently Imported</h3> | ||
|
||
{#await imports} | ||
<p>Loading...</p> | ||
{:then imports} | ||
{#if imports.length === 0} | ||
<p>No imports found.</p> | ||
{:else} | ||
<table> | ||
<thead> | ||
<tr> | ||
<th>Name</th> | ||
<th>Finished At</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{#each imports as trackImport} | ||
<tr> | ||
<td>{trackImport.name}</td> | ||
<td>{new Date(trackImport.finishedAt).toLocaleString()}</td> | ||
</tr> | ||
{/each} | ||
</tbody> | ||
</table> | ||
{/if} | ||
{/await} | ||
</div> | ||
|
||
<style> | ||
.container { | ||
padding: 1rem; | ||
} | ||
h3 { | ||
margin-top: 0; | ||
} | ||
table { | ||
width: 100%; | ||
border-collapse: collapse; | ||
} | ||
th, | ||
td { | ||
padding: 0.5rem; | ||
text-align: left; | ||
border-bottom: 1px solid #ddd; | ||
} | ||
th { | ||
background-color: #f2f2f2; | ||
} | ||
tr:nth-child(even) { | ||
background-color: #f9f9f9; | ||
} | ||
tr:hover { | ||
background-color: #f5f5f5; | ||
} | ||
</style> |
Oops, something went wrong.