diff --git a/package.json b/package.json index b99a285..8a8afc3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "gitako", "version": "1.1.0", - "description": "Awesome GitHub file tree.", + "description": "File tree for GitHub, and more than that.", "repository": "https://github.com/EnixCoda/Gitako", "author": "EnixCoda", "license": "MIT", diff --git a/src/assets/icons/csv.d.ts b/src/assets/icons/csv.d.ts new file mode 100644 index 0000000..7a5ed7f --- /dev/null +++ b/src/assets/icons/csv.d.ts @@ -0,0 +1,4 @@ +declare module '*.csv' { + const content: string + export default content +} diff --git a/src/components/AccessDeniedDescription.tsx b/src/components/AccessDeniedDescription.tsx new file mode 100644 index 0000000..4b334f1 --- /dev/null +++ b/src/components/AccessDeniedDescription.tsx @@ -0,0 +1,37 @@ +import { usePlatform } from 'containers/PlatformContext' +import { GITHUB_OAUTH } from 'env' +import { GitHub } from 'platforms/GitHub' +import * as React from 'react' + +export function AccessDeniedDescription({ hasToken }: { hasToken: boolean }) { + const platform = usePlatform() + return ( +
+ Current access token is either invalid or not granted with permissions to access this + project. +
+ {platform === GitHub && ( ++ You can grant or request access{' '} + + here + {' '} + if you setup Gitako with OAuth. +
+ )} + > + ) : ( ++ Gitako needs access token to read this project. Please setup access token in the settings + panel below. +
+ )} +- Current access token is either invalid or not granted with permissions to access this - project. -
-- You can grant or request access{' '} - - here - {' '} - if you setup Gitako with OAuth. -
- > - ) : ( -- Gitako needs access token to read this project due to{' '} - - GitHub rate limiting - {' '} - and{' '} - - auth needs - - . Please setup access token in the settings panel below. -
- )} -+ Current access token is either invalid or not granted with permissions to access this + project. +
++ You can grant or request access{' '} + + here + {' '} + if you setup Gitako with OAuth. +
+ > + ) : ( ++ Gitako needs access token to read this project due to{' '} + + GitHub rate limiting + {' '} + and{' '} + + auth needs + + . Please setup access token in the settings panel below. +
+ )} +