Skip to content

Commit

Permalink
🦄 New themes and fixes (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
luxonauta authored Dec 10, 2024
2 parents 8e5454a + 58662fc commit d3e5133
Show file tree
Hide file tree
Showing 18 changed files with 54 additions and 25 deletions.
Binary file modified bun.lockb
Binary file not shown.
Binary file removed public/icons/unused/pack-3/license.pdf
Binary file not shown.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
53 changes: 30 additions & 23 deletions src/app/api/cache/installs/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,43 @@ const octokit = new Octokit({
const fetchAndOrganize = async (installs, path) => {
const key = path.params.repo;

const response = await octokit.rest.repos.getContent({
path: "INSTALL.md",
owner: "dracula",
repo: key
});

if (Array.isArray(response.data)) {
throw new Error(
`Expected file content but got directory listing for repo: ${key}`
);
}

if (response.data.type !== "file") {
try {
const response = await octokit.rest.repos.getContent({
path: "INSTALL.md",
owner: "dracula",
repo: key
});

if (Array.isArray(response.data)) {
throw new Error(
`Expected file content but got directory listing for repo: ${key}`
);
}

if (response.data.type !== "file") {
throw new Error(
`Expected file content but got ${response.data.type} for repo: ${key}`
);
}

if (!response.data.content) {
throw new Error(`Content not found for repo: ${key}`);
}

const value = response.data.content;
installs[key] = value;

return value;
} catch (error) {
throw new Error(
`Expected file content but got ${response.data.type} for repo: ${key}`
`Failed to fetch content for repo ${key}: ${error.message}`
);
}

if (!response.data.content) {
throw new Error(`Content not found for repo: ${key}`);
}

const value = response.data.content;

return (installs[key] = value);
};

export async function GET() {
try {
let installs = {};
const installs = {};

await Promise.all(paths.map((path) => fetchAndOrganize(installs, path)));

Expand Down
11 changes: 10 additions & 1 deletion src/components/header/commandMenu/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@
color: var(--color);
}
}

@media (max-width: 60rem) {
.icon {
&.cmdk {
display: none;
}
}
}
}

[cmdk-overlay] {
Expand Down Expand Up @@ -221,7 +229,8 @@
from {
opacity: 0;
}

to {
opacity: 1;
}
}
}
15 changes: 14 additions & 1 deletion src/lib/paths.ts

Large diffs are not rendered by default.

0 comments on commit d3e5133

Please sign in to comment.