Skip to content

Commit

Permalink
chore: update sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTaylor3D committed Oct 31, 2024
1 parent d9c7647 commit 099d9df
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 11 deletions.
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 @@ -26,7 +26,7 @@
],
"dependencies": {
"@dignetwork/datalayer-driver": "^0.1.28",
"@dignetwork/dig-sdk": "^0.0.1-alpha.180",
"@dignetwork/dig-sdk": "^0.0.1-alpha.181",
"add": "^2.0.6",
"cheerio": "^1.0.0",
"cookie-parser": "^1.4.6",
Expand Down
27 changes: 21 additions & 6 deletions src/views/indexView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export const renderIndexView = (
formattedBytes: string,
host: string
) => {

const urn = udi.toUrn();
const isSyncing = !state; // Check if state is null
const toastId = `toast-${urn}`; // Unique ID for the toast
Expand All @@ -17,11 +16,19 @@ export const renderIndexView = (
<div style="display: flex; justify-content: space-between; align-items: center;">
<div style="max-width: 70%;">
<h2 style="margin: 0; font-size: 1.5em; color: #333;">
${isSyncing ? "Syncing..." : (state.metadata.label || "No Label")}
${isSyncing ? '<span class="spinner" style="display: inline-block; width: 16px; height: 16px; border: 2px solid #007BFF; border-radius: 50%; border-top: 2px solid transparent; animation: spin 1s linear infinite;"></span>' : ""}
${isSyncing ? "Syncing..." : state.metadata.label || "No Label"}
${
isSyncing
? '<span class="spinner" style="display: inline-block; width: 16px; height: 16px; border: 2px solid #007BFF; border-radius: 50%; border-top: 2px solid transparent; animation: spin 1s linear infinite;"></span>'
: ""
}
</h2>
<p style="margin: 5px 0 10px 0; color: #777;">
${isSyncing ? "Syncing data, please wait..." : (state.metadata.description || "No Description Available")}
${
isSyncing
? "Syncing data, please wait..."
: state.metadata.description || "No Description Available"
}
</p>
<p style="margin: 0; font-size: 0.9em; color: #555;">
Store: <a href="/${urn}" style="color: #007BFF; text-decoration: none;">${urn}</a>
Expand All @@ -30,14 +37,22 @@ export const renderIndexView = (
<path d="M20.9983 10C20.9862 7.82497 20.8897 6.64706 20.1213 5.87868C19.2426 5 17.8284 5 15 5H12C9.17157 5 7.75736 5 6.87868 5.87868C6 6.75736 6 8.17157 6 11V16C6 18.8284 6 20.2426 6.87868 21.1213C7.75736 22 9.17157 22 12 22H15C17.8284 22 19.2426 22 20.1213 21.1213C21 20.2426 21 18.8284 21 16V15" stroke="#1C274C" stroke-width="1.5" stroke-linecap="round"/>
<path d="M3 10V16C3 17.6569 4.34315 19 6 19M18 5C18 3.34315 16.6569 2 15 2H11C7.22876 2 5.34315 2 4.17157 3.17157C3.51839 3.82475 3.22937 4.69989 3.10149 6" stroke="#1C274C" stroke-width="1.5" stroke-linecap="round"/>
</svg>
<a href="//${udi.chainName}.${udi.storeIdBase32}.${host}">View as Webapp</a>
<div>
<a href="//${udi.chainName}.${
udi.storeIdBase32
}.${host}">View as Webapp</a>
</div>
</span>
</p>
</div>
<div style="text-align: right; min-width: 100px;">
<p style="margin: 0; font-size: 1.2em; color: #333;">
${isSyncing ? "Syncing..." : formattedBytes}
${isSyncing ? '<span class="spinner" style="display: inline-block; width: 16px; height: 16px; border: 2px solid #007BFF; border-radius: 50%; border-top: 2px solid transparent; animation: spin 1s linear infinite;"></span>' : ""}
${
isSyncing
? '<span class="spinner" style="display: inline-block; width: 16px; height: 16px; border: 2px solid #007BFF; border-radius: 50%; border-top: 2px solid transparent; animation: spin 1s linear infinite;"></span>'
: ""
}
</p>
</div>
</div>
Expand Down

0 comments on commit 099d9df

Please sign in to comment.