Skip to content

Commit

Permalink
Merge pull request #128 from artem-solovev/bugfix/#127-bug-with-broke…
Browse files Browse the repository at this point in the history
…n-commits-history

bugfix/#127 Fix for broken commits history and a few other improvements
  • Loading branch information
kas-elvirov authored May 31, 2021
2 parents e50c2f1 + 17703eb commit a7beaae
Show file tree
Hide file tree
Showing 20 changed files with 7,041 additions and 11,961 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
APP_VERSION=8.2.48
APP_VERSION=8.2.58
PAYPAL_URL=https://www.paypal.me/ArtemSolovev
OPENCOLLECTIVE_URL=https://opencollective.com/artem-solovev
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"short_name": "__MSG_shortName__",
"author": "__MSG_author__",
"description": "__MSG_description__",
"version": "8.2.48",
"version": "8.2.58",
"browser_action": {
"default_icon": "img/icon128.png",
"default_popup": "index.html",
Expand Down
11,939 changes: 0 additions & 11,939 deletions package-lock.json

This file was deleted.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gloc",
"version": "8.2.48",
"version": "8.2.58",
"description": "Browser extension - counts locs on GitHub pages",
"authors": [
"Artem Vadimovich Solovev <[email protected]> (https://github.com/artem-solovev)"
Expand All @@ -27,14 +27,16 @@
"zip": "grunt",
"build:prod": "webpack --config webpack.config.prod && grunt",
"build:dev": "webpack --config webpack.config.dev && grunt",
"version:up": "npm version patch --no-git-tag-version --force && node ./scripts/upAppVersion.js && git add package.json package-lock.json .env manifest.json"
"version:up": "npm version patch --no-git-tag-version --force && node ./scripts/upAppVersion.js && git add package.json .env manifest.json"
},
"husky": {
"hooks": {
"pre-commit": "npm run version:up"
}
},
"dependencies": {
"@material-ui/core": "^4.11.4",
"@material-ui/styles": "^4.11.4",
"@types/node": "^12.12.14",
"@types/react": "^16.9.13",
"@types/react-dom": "^16.9.4",
Expand Down
21 changes: 16 additions & 5 deletions src/configs/parametersToMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,22 @@ const currentUserLocation = window.location.pathname.replace('/', '');
export const parametersToMap: ParameterToMap[] = [
{
/*
for example: https://github.com/artem-solovev?tab=repositories
https://github.com/artem-solovev
*/
locationName: LOCATION.USER,
locationName: LOCATION.PINNED_REPOS,
selector: 'querySelectorAll',
pathToSelect: '.js-pinned-items-reorder-list .pinned-item-list-item-content div a',
pathToInsert: '.wb-break-all',
existenceChecker: (entity: HTMLAnchorElement[]) => entity && entity.length > 0,
wrapper: (entity) => Array.prototype.slice.call(entity),
},
{
/*
https://github.com/torvalds
*/
locationName: LOCATION.POPULAR_REPOS,
selector: 'querySelectorAll',
pathToSelect: 'ol li div div div a',
pathToSelect: '.js-pinned-items-reorder-container ol li div div div a',
pathToInsert: '.wb-break-all',
existenceChecker: (entity: HTMLAnchorElement[]) => entity && entity.length > 0,
wrapper: (entity) => Array.prototype.slice.call(entity),
Expand Down Expand Up @@ -69,9 +80,9 @@ export const parametersToMap: ParameterToMap[] = [
},
{
/*
for example: https://github.com/artem-solovev
https://github.com/artem-solovev?tab=repositories
*/
locationName: LOCATION.PINNED_REPOS,
locationName: LOCATION.USER_REPOSITORIES,
selector: 'querySelectorAll',
pathToSelect: '#user-repositories-list ul li h3 a',
existenceChecker: (entity: HTMLAnchorElement[]) => entity && entity.length > 0,
Expand Down
8 changes: 0 additions & 8 deletions src/modules/Popup/components/Footer/decorationProps.ts

This file was deleted.

52 changes: 52 additions & 0 deletions src/modules/Popup/components/Header/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import * as React from 'react';

import Grid from '@material-ui/core/Grid';
import Typography from '@material-ui/core/Typography';

import appConfig from '../../../Common/helpers/appConfig';

export default class PopupPage extends React.PureComponent {
render() {
const gloc = chrome.i18n.getMessage('shortName');
const github = chrome.i18n.getMessage('github');

return (
<Grid
container
direction="row"
justify="space-between"
>
<Grid item>
<img
src='img/icon128.png'
width='50'
style={{
verticalAlign: 'middle',
marginRight: '2px',
}}
/>
</Grid>

<Grid item>
<Typography
variant={'h5'}
>
{github}
&nbsp;
{gloc}
</Typography>

<Typography
variant={'caption'}
>
Version: {appConfig.appVersion}
</Typography>
</Grid>

<Grid item>
header
</Grid>
</Grid>
);
}
}
7 changes: 7 additions & 0 deletions src/modules/Popup/components/Header/styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Theme, createStyles } from '@material-ui/core';

export default (theme: Theme): ReturnType<typeof createStyles> => createStyles({
card: {
padding: theme.spacing(3),
},
});
5 changes: 5 additions & 0 deletions src/modules/Popup/components/Header/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { WithStyles } from '@material-ui/core';

import styles from './styles';

export type IProps = WithStyles<typeof styles>;
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable */

import * as React from 'react';
import Iframe from 'react-iframe';

Expand Down
11 changes: 11 additions & 0 deletions src/modules/Popup/components/_Footer/decorationProps.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { IIframe } from 'react-iframe/types';

export const decorationProps = {
githubFrame: {
scrolling: 'no',
width: '84px',
height: '19px',
align: 'middle',
url: 'https://ghbtns.com/github-btn.html?user=artem-solovev&repo=gloc&type=star&count=true',
} as IIframe,
};
6 changes: 3 additions & 3 deletions src/modules/Popup/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as React from 'react';

import { Header } from './components/Header/index';
import { Footer } from './components/Footer/index';
import { Body } from './components/Body/index';
import { Header } from './components/_Header/index';
import { Footer } from './components/_Footer/index';
import { Body } from './components/_Body/index';

export default class PopupPage extends React.PureComponent {
render() {
Expand Down
3 changes: 2 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ export interface InitialData {
}

export enum LOCATION {
USER = 'USER',
USER_REPOSITORIES = 'USER_REPOSITORIES',
POPULAR_REPOS = 'POPULAR_REPOS',
PINNED_REPOS = 'PINNED_REPOS',
LIKED_REPOS = 'LIKED_REPOS',
ORGANIZATION = 'ORGANIZATION',
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"outDir": "./dist/",
"noImplicitAny": true,
"module": "ESNext",
"module": "ES6",
"target": "es5",
"baseUrl": "types",
"typeRoots": ["types"],
Expand All @@ -12,6 +12,8 @@
"lib": ["es2015.core", "dom", "es6"],
"sourceMap": true,
"jsx": "react",
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"plugins": [
{
"name": "typescript-tslint-plugin",
Expand Down
Loading

0 comments on commit a7beaae

Please sign in to comment.