Does some stuff

This commit is contained in:
Alicia Sykes
2023-04-23 15:31:12 +01:00
parent 714a528bce
commit 36246d81b1
4 changed files with 6 additions and 4 deletions

View File

@@ -5,13 +5,15 @@
export let categories: string[];
export let selectedCategories: string[];
export let toggleCategory: (category: string) => void;
const isSelected = (selected: string[], current: string) => selected.map((c) => c.toLocaleLowerCase()).includes(current.toLocaleLowerCase());
</script>
<div class="categories" transition:slide>
{#each Object.keys(categories) as category}
<Button
action={() => toggleCategory(category)}
selected="{selectedCategories.includes(category)}"
selected="{isSelected(selectedCategories, category)}"
>
{category}
</Button>

View File

@@ -46,7 +46,7 @@
const makeRenderData = () => {
const results = [
{ label: 'Pulls', value: formatBigNumber(info.pull_count), icon: 'download' },
{ label: 'Stars', value: formatBigNumber(info.star_count), icon: 'star' },
{ label: 'Stars', value: formatBigNumber(info.star_count) || 'None yet', icon: 'star' },
{ label: 'User', value: info.hub_user, icon: 'user' },
{ label: 'Created', value: formatDate(info.date_registered), icon: 'published' },
{ label: 'Updated', value: timeAgo(info.last_updated), icon: 'updated' },

View File

@@ -68,7 +68,7 @@
</div>
{/if}
{#if dockerRunCommands}
{#if dockerRunCommands && dockerRunCommands.length > 0}
<hr />
<h3>Via Docker Run</h3>
{#each dockerRunCommands as command, index}

View File

@@ -28,7 +28,7 @@ export const generateDockerRunCommand = (template: Template) => {
};
export const generateDockerRunCommands = (stack: Service[]) => {
const commands = stack.map((service) => {
const commands = stack.filter((s) => s.image).map((service) => {
let cmd = `docker run --name ${service.name} -d \\\n`;
if (service.command) {
cmd += ` ${service.command} \\\n`;