Does some stuff
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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' },
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if dockerRunCommands}
|
||||
{#if dockerRunCommands && dockerRunCommands.length > 0}
|
||||
<hr />
|
||||
<h3>Via Docker Run</h3>
|
||||
{#each dockerRunCommands as command, index}
|
||||
|
||||
@@ -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`;
|
||||
|
||||
Reference in New Issue
Block a user