diff --git a/packages/console/app/public/opencode-brand-assets.zip b/packages/console/app/public/opencode-brand-assets.zip new file mode 100644 index 00000000..1a145bbe Binary files /dev/null and b/packages/console/app/public/opencode-brand-assets.zip differ diff --git a/packages/console/app/src/routes/brand/index.tsx b/packages/console/app/src/routes/brand/index.tsx index 2e17087d..4570c73c 100644 --- a/packages/console/app/src/routes/brand/index.tsx +++ b/packages/console/app/src/routes/brand/index.tsx @@ -21,17 +21,33 @@ import wordmarkLightSvg from "../../asset/brand/opencode-wordmark-light.svg" import wordmarkDarkSvg from "../../asset/brand/opencode-wordmark-dark.svg" import wordmarkSimpleLightSvg from "../../asset/brand/opencode-wordmark-simple-light.svg" import wordmarkSimpleDarkSvg from "../../asset/brand/opencode-wordmark-simple-dark.svg" -import brandAssets from "../../asset/brand/opencode-brand-assets.zip" - +const brandAssets = "/opencode-brand-assets.zip" export default function Brand() { - const downloadFile = (url: string, filename: string) => { - const link = document.createElement("a") - link.href = url - link.download = filename - document.body.appendChild(link) - link.click() - document.body.removeChild(link) + const downloadFile = async (url: string, filename: string) => { + try { + const response = await fetch(url) + const blob = await response.blob() + const blobUrl = window.URL.createObjectURL(blob) + + const link = document.createElement("a") + link.href = blobUrl + link.download = filename + document.body.appendChild(link) + link.click() + document.body.removeChild(link) + + window.URL.revokeObjectURL(blobUrl) + } catch (error) { + console.error("Download failed:", error) + const link = document.createElement("a") + link.href = url + link.target = "_blank" + link.rel = "noopener noreferrer" + document.body.appendChild(link) + link.click() + document.body.removeChild(link) + } } return ( @@ -44,182 +60,283 @@ export default function Brand() {

Brand guidelines

-

Resources and assets to help you work with the OpenCode - brand.

- -
- OpenCode brand guidelines + OpenCode brand guidelines
- -
- OpenCode brand guidelines + OpenCode brand guidelines
- -
- OpenCode brand guidelines + OpenCode brand guidelines
- OpenCode brand guidelines + OpenCode brand guidelines
- OpenCode brand guidelines + OpenCode brand guidelines
- OpenCode brand guidelines + OpenCode brand guidelines
@@ -227,9 +344,9 @@ export default function Brand() {
-