-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor UI components using React and TSX and providing new features (…
…#113) * Use react for settings popup * Update options * Update styling * Remove unused type conversions * Remove unused controls function * Update project structure * Delete unused code * Legacy ui components * Refactor files * Update styling * Update UI components * Remove unused code * Remove unused code * Improve theming * Update icon color * Improve custom domains * Update extension * Add delete functionalty for custom domains * Improve icon sizes on screen * Implement icon bindings dialog * Minor improvements * Add tooltips * Support lookup of language ids in manifest * Implement watch mode for development purposes * Improve language id binding customization * Adjust node script * Improve reset functionality * Adjust node script * Minor improvements * Update binding controls with icons * Organize imports * Update error message * Adjust icon binding dialog * Add Info Popover * Update autocomplete behavior * Fix image issue * Minor improvements * Clean up code * Make appbar sticky * Improve project structure * Update info text * Adjust styling * Update styling * Improve adding new bindings * Adjust tsconfig * Support switch of themes for the icon preview * Update watch script * Improve error handling * Move build languages step before build src
- Loading branch information
Showing
55 changed files
with
4,561 additions
and
1,233 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Domain } from '@/models'; | ||
import { getGitProviders } from '@/providers'; | ||
|
||
export function getDomains(): Promise<Domain[]> { | ||
return getGitProviders().then((providers) => [ | ||
{ name: 'default', isCustom: false, isDefault: true }, | ||
...Object.values(providers).flatMap((p) => | ||
p.domains.map((d) => ({ | ||
name: d.host, | ||
isCustom: p.isCustom, | ||
isDefault: false, | ||
})) | ||
), | ||
]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import iconsList from '../../../icon-list.json'; | ||
|
||
const iconsListTyped = iconsList as Record<string, string>; | ||
const blacklist = ['_light', '_highContrast']; | ||
|
||
function isNotBlacklisted(name: string): boolean { | ||
return !blacklist.some((term) => name.includes(term)); | ||
} | ||
|
||
function filterIcons(predicate: (name: string) => boolean): string[] { | ||
return Object.keys(iconsListTyped).filter(predicate).sort(); | ||
} | ||
|
||
export function getIconFileName( | ||
iconName: string, | ||
isLightMode: boolean | ||
): string { | ||
const lightIconName = `${iconName}_light`; | ||
if (isLightMode && iconsListTyped[lightIconName]) { | ||
return iconsListTyped[lightIconName]; | ||
} | ||
return iconsListTyped[iconName]; | ||
} | ||
|
||
export function getListOfFileIcons(): string[] { | ||
return filterIcons( | ||
(name) => !name.startsWith('folder') && isNotBlacklisted(name) | ||
); | ||
} | ||
|
||
export function getListOfFolderIcons(): string[] { | ||
return filterIcons( | ||
(name) => | ||
name.startsWith('folder') && | ||
!name.includes('-open') && | ||
!name.includes('-root') && | ||
isNotBlacklisted(name) | ||
).map((name) => name.replace('folder-', '')); | ||
} |
Oops, something went wrong.