Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/frontend-shared/src/assets/logos/cursor.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ import Icon from '@cy/components/Icon.vue'
import { useI18n } from '@cy/i18n'
import Select from '@cy/components/Select.vue'
import Input from '@cy/components/Input.vue'
import Cursor from '~icons/logos/cursor'
import VSCode from '~icons/logos/visual-studio-code'
import Atom from '~icons/logos/atom-icon'
import Webstorm from '~icons/logos/webstorm'
Expand All @@ -78,6 +79,7 @@ import type { ChooseExternalEditorFragment } from '../generated/graphql'

const icons: Record<string, FunctionalComponent<SVGAttributes, {}>> = {
'code': VSCode,
'cursor': Cursor,
'webstorm': Webstorm,
'atom': Atom,
'sublimetext': Sublime,
Expand Down
2 changes: 2 additions & 0 deletions packages/frontend-shared/vite.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ const makePlugins = (plugins) => {
customCollections: {
// ~icons/cy/book_x16
cy: FileSystemIconLoader(path.resolve(__dirname, './src/assets/icons')),
// ~icons/logos/cursor
logos: FileSystemIconLoader(path.resolve(__dirname, './src/assets/logos')),
...plugins.iconsOptions?.customCollections,
},
iconCustomizer (collection, icon, props) {
Expand Down
13 changes: 8 additions & 5 deletions packages/frontend-shared/vue-shims.d.ts
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
/* eslint-disable import/no-duplicates */
declare module 'virtual:*' {
import { Component } from 'vue'
const src: Component
export default src
}

declare module 'virtual:icons/*' {
// eslint-disable-next-line no-duplicate-imports
import { FunctionalComponent, SVGAttributes } from 'vue'
const component: FunctionalComponent<SVGAttributes>
export default component
}
declare module '~icons/*' {
// eslint-disable-next-line no-duplicate-imports
import { FunctionalComponent, SVGAttributes } from 'vue'
const component: FunctionalComponent<SVGAttributes>
export default component
}

declare module '~icons/cy/*' {
// eslint-disable-next-line no-duplicate-imports
import { FunctionalComponent, SVGAttributes } from 'vue'
const component: FunctionalComponent<SVGAttributes>
const component: FunctionalComponent<SVGAttributes, {}>
export default component
}

declare module '~icons/logos/*' {
import { FunctionalComponent, SVGAttributes } from 'vue'
const component: FunctionalComponent<SVGAttributes, {}>
export default component
}

declare module '~icons/mdi/*' {
// eslint-disable-next-line no-duplicate-imports
import { FunctionalComponent, SVGAttributes } from 'vue'
const component: FunctionalComponent<SVGAttributes>
export default component
Expand Down
Loading