Skip to content

Commit

Permalink
draft auto import icons
Browse files Browse the repository at this point in the history
  • Loading branch information
clbrge committed Jul 11, 2023
1 parent 5e7a900 commit e1921be
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 19 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"clean": "rimraf .build",
"dev": "vite dev --port 2000 --host localhost",
"build": "npm run clean && vite build",
"update-icons": "node ./update-icons.js",
"preview": "vite preview",
"format": "prettier --ignore-path .gitignore --write --plugin-search-dir=. .",
"lint": "prettier --ignore-path .gitignore --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .",
Expand Down
8 changes: 4 additions & 4 deletions src/components/design/AppMenuPopover.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
href="/"
class:is-active={!/^(\/journey|\/book)/.test($page.url.pathname)}>
<span class="icon-text is-small"
><Icon class="mr-2" name="List" /><span>Event Manager</span></span>
><Icon name="List" class="mr-2" /><span>Event Manager</span></span>
</a>
</li>
<li>
Expand All @@ -70,7 +70,7 @@
href="/book"
class:is-active={/^\/book/.test($page.url.pathname)}>
<span class="icon-text"
><Icon class="mr-2" name="Book" /><span>Tickets book</span></span>
><Icon name="Book" class="mr-2" /><span>Tickets book</span></span>
</a>
</li>
{#if $chainContext.plugins.includes('journey')}
Expand All @@ -80,7 +80,7 @@
href="/journey"
class:is-active={/^\/journey/.test($page.url.pathname)}>
<span class="icon-text"
><Icon class="mr-2" name="Award" /><span>Rouge Journey</span
><Icon name="Award" class="mr-2" /><span>Rouge Journey</span
></span>
</a>
</li>
Expand All @@ -91,7 +91,7 @@
on:click={blockchain.disconnect}
on:keydown={keyDownA11y(blockchain.disconnect)}>
<span class="icon-text"
><Icon class="mr-2" name="Logout" /><span>Disconnect</span></span>
><Icon name="Logout" class="mr-2" /><span>Disconnect</span></span>
</a>
</li>
</ul>
Expand Down
83 changes: 83 additions & 0 deletions src/icons/tabler-icons.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import { IconBook } from '@tabler/icons-svelte'
import { IconBookmark } from '@tabler/icons-svelte'
import { IconAward } from '@tabler/icons-svelte'
import { IconGift } from '@tabler/icons-svelte'
import { IconExternalLink } from '@tabler/icons-svelte'
import { IconRefresh } from '@tabler/icons-svelte'
import { IconSquarePlus } from '@tabler/icons-svelte'
import { IconBookmarkOff } from '@tabler/icons-svelte'
import { IconGridDots } from '@tabler/icons-svelte'
import { IconLogout } from '@tabler/icons-svelte'
import { IconConfetti } from '@tabler/icons-svelte'
import { IconTools } from '@tabler/icons-svelte'
import { IconList } from '@tabler/icons-svelte'
import { IconEdit } from '@tabler/icons-svelte'
import { IconTrash } from '@tabler/icons-svelte'
import { IconEyeOff } from '@tabler/icons-svelte'
import { IconBrandDiscord } from '@tabler/icons-svelte'
import { IconBrandGithub } from '@tabler/icons-svelte'
import { IconUserExclamation } from '@tabler/icons-svelte'
import { IconCheck } from '@tabler/icons-svelte'
import { IconLock } from '@tabler/icons-svelte'
import { IconFilter } from '@tabler/icons-svelte'
import { IconBoxMultiple } from '@tabler/icons-svelte'
import { IconFilterOff } from '@tabler/icons-svelte'
import { IconInfoCircle } from '@tabler/icons-svelte'
import { IconCopy } from '@tabler/icons-svelte'
import { IconThumbDown } from '@tabler/icons-svelte'
import { IconWorld } from '@tabler/icons-svelte'
import { IconMapPin } from '@tabler/icons-svelte'
import { IconBrandTelegram } from '@tabler/icons-svelte'
import { IconBrandWhatsapp } from '@tabler/icons-svelte'
import { IconBrandTwitter } from '@tabler/icons-svelte'
import { IconBrandFacebook } from '@tabler/icons-svelte'
import { IconBrandLinkedin } from '@tabler/icons-svelte'
import { IconChevronsRight } from '@tabler/icons-svelte'
import { IconTicket } from '@tabler/icons-svelte'
import { IconCheckbox } from '@tabler/icons-svelte'
import { IconShieldOff } from '@tabler/icons-svelte'
import { IconShieldCheck } from '@tabler/icons-svelte'
import { IconShieldLock } from '@tabler/icons-svelte'

export {
IconBook,
IconBookmark,
IconAward,
IconGift,
IconExternalLink,
IconRefresh,
IconSquarePlus,
IconBookmarkOff,
IconGridDots,
IconLogout,
IconConfetti,
IconTools,
IconList,
IconEdit,
IconTrash,
IconEyeOff,
IconBrandDiscord,
IconBrandGithub,
IconUserExclamation,
IconCheck,
IconLock,
IconFilter,
IconBoxMultiple,
IconFilterOff,
IconInfoCircle,
IconCopy,
IconThumbDown,
IconWorld,
IconMapPin,
IconBrandTelegram,
IconBrandWhatsapp,
IconBrandTwitter,
IconBrandFacebook,
IconBrandLinkedin,
IconChevronsRight,
IconTicket,
IconCheckbox,
IconShieldOff,
IconShieldCheck,
IconShieldLock
}
28 changes: 13 additions & 15 deletions src/routes/(app)/project/[address]/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
class:is-active={/^\/draft/.test(position)}
href="/project/{address}/draft">
<span class="icon-text"
><Icon class="mr-3" name="Edit" />{#if !collapse}<span
><Icon name="Edit" class="mr-3" />{#if !collapse}<span
>Edit draft</span
>{/if}</span>
</a>
Expand All @@ -320,7 +320,7 @@
class:is-active={/^\/$/.test(position)}
href="/project/{address}/">
<span class="icon-text"
><Icon class="mr-3" name="dashboard" />{#if !collapse}<span
><Icon name="dashboard" class="mr-3" />{#if !collapse}<span
>Dashboard</span
>{/if}</span>
</a>
Expand All @@ -330,7 +330,7 @@
on:click={close}
href="/i/ticket/{$chainData.shortName}:{address}/">
<span class="icon-text"
><Icon class="mr-3" name="ticket" />{#if !collapse}<span
><Icon name="ticket" class="mr-3" />{#if !collapse}<span
>Get tickets{#if p._isDraft}&nbsp;preview{/if}</span
>{/if}</span>
</a>
Expand All @@ -342,7 +342,7 @@
class:is-active={/^\/state/.test(position)}
href="/project/{address}/state">
<span class="icon-text"
><Icon class="mr-3" name="state" />{#if !collapse}<span
><Icon name="state" class="mr-3" />{#if !collapse}<span
>State</span
>{/if}</span
></a>
Expand All @@ -353,7 +353,7 @@
class:is-active={/^\/holdings/.test(position)}
href="/project/{address}/holdings"
><span class="icon-text"
><Icon class="mr-3" name="holdings" />{#if !collapse}<span
><Icon name="holdings" class="mr-3" />{#if !collapse}<span
>Holdings</span
>{/if}</span
></a>
Expand All @@ -364,7 +364,7 @@
class:is-active={/^\/settings/.test(position)}
href="/project/{address}/settings"
><span class="icon-text"
><Icon class="mr-3" name="settings" />{#if !collapse}<span
><Icon name="settings" class="mr-3" />{#if !collapse}<span
>Settings</span
>{/if}</span
></a>
Expand All @@ -384,7 +384,7 @@
class:is-active={/^\/acquisitions/.test(position)}
href="/project/{address}/acquisitions"
><span class="icon-text"
><Icon class="mr-3" name="users" />{#if !collapse}<span
><Icon name="users" class="mr-3" />{#if !collapse}<span
>List</span
>{/if}</span
></a>
Expand All @@ -402,7 +402,7 @@
class:is-active={/^\/scan/.test(position)}
href="/project/{address}/scan"
><span class="icon-text"
><Icon class="mr-3" name="scanQr" />{#if !collapse}<span
><Icon name="scanQr" class="mr-3" />{#if !collapse}<span
>Scanner</span
>{/if}</span
></a>
Expand All @@ -413,7 +413,7 @@
class:is-active={/^\/redemptions/.test(position)}
href="/project/{address}/redemptions"
><span class="icon-text"
><Icon class="mr-3" name="history" />{#if !collapse}<span
><Icon name="history" class="mr-3" />{#if !collapse}<span
>History</span
>{/if}</span
></a>
Expand All @@ -432,7 +432,7 @@
class:is-active={/^\/channels/.test(position)}
href="/project/{address}/channels"
><span class="icon-text"
><Icon class="mr-3" name="details" />{#if !collapse}<span
><Icon name="details" class="mr-3" />{#if !collapse}<span
>Details</span
>{/if}</span
></a>
Expand All @@ -443,7 +443,7 @@
class:is-active={/add-channel/.test(position)}
href="/project/{address}/add-channel/"
><span class="icon-text"
><Icon class="mr-3" name="add" />{#if !collapse}<span
><Icon name="add" class="mr-3" />{#if !collapse}<span
>Add</span
>{/if}</span
></a>
Expand All @@ -467,10 +467,8 @@
}}
><span class="icon-text"
><Icon
class="mr-3"
name={collapse
? 'openCollapse'
: 'closeCollapse'} />{#if !collapse}<span>Collapse</span
name={collapse ? 'openCollapse' : 'closeCollapse'}
class="mr-3" />{#if !collapse}<span>Collapse</span
>{/if}</span
></a>
</li>
Expand Down

0 comments on commit e1921be

Please sign in to comment.