Skip to content
This repository has been archived by the owner on Jun 6, 2022. It is now read-only.

Commit

Permalink
Rewrite asset managment
Browse files Browse the repository at this point in the history
  • Loading branch information
doZennn committed Dec 2, 2019
1 parent b8ec847 commit 23f3a29
Show file tree
Hide file tree
Showing 12 changed files with 465 additions and 532 deletions.
Binary file added src/img/capsule_none.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/img/capsule_vertical_none.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/img/hero_none.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/js/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ import ToastHandler from './Components/toastHandler';

import UWPNoise from '../img/uwp-noise.png';
import '../css/App.css';
import Search from './Search';
import Games from './games';
import Game from './Game';
import Import from './Import';
import Search from './Search';

import Steam from './Steam';

Expand Down Expand Up @@ -178,6 +179,7 @@ class App extends React.Component {

<Route exact path="/" component={Games} />
<Route exact path="/import" component={Import} />
<Route exact path="/game" component={Game} />
<Route exact path="/search" component={Search} />
</div>
</NavigationView>
Expand Down
61 changes: 61 additions & 0 deletions src/js/Components/Games/GameListItem.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import React from 'react';
import PropTypes from 'prop-types';
import ListView from 'react-uwp/ListView';

class GameListItem extends React.Component {
constructor(props) {
super(props);

const { platform } = this.props;

this.platform = platform;
this.handleClick = this.handleClick.bind(this);
}

handleClick(index) {
const { onItemClick } = this.props;
onItemClick(this.platform, index);
}

render() {
const { platform, platformName, listSource } = this.props;
const { theme } = this.context;

return (
<div key={platform} style={{ paddingLeft: 10 }}>
<div style={{
...theme.typographyStyles.subTitleAlt,
display: 'inline-block',
position: 'sticky',
zIndex: 3,
marginLeft: 10,
top: -22,
}}
>
{platformName}
</div>
<ListView
style={{ border: 0, width: '100%' }}
background="transparent"
onChooseItem={this.handleClick}
listSource={listSource}
/>
</div>
);
}
}

GameListItem.propTypes = {
platform: PropTypes.string.isRequired,
listSource: PropTypes.arrayOf(PropTypes.node).isRequired,
platformName: PropTypes.string.isRequired,
onItemClick: PropTypes.func,
};

GameListItem.defaultProps = {
onItemClick: () => {},
};

GameListItem.contextTypes = { theme: PropTypes.object };

export default GameListItem;
38 changes: 0 additions & 38 deletions src/js/Components/Grid.jsx

This file was deleted.

163 changes: 0 additions & 163 deletions src/js/Components/gridImage.jsx

This file was deleted.

9 changes: 7 additions & 2 deletions src/js/Components/spinner.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ProgressCircle } from 'react-desktop/windows';

const Spinner = (props, context) => {
const { theme } = context;
const { text } = props;
const { text, size, style } = props;

return (
<div
Expand All @@ -15,20 +15,25 @@ const Spinner = (props, context) => {
justifyContent: 'center',
width: '100%',
height: '100%',
...style,
}}
>
<ProgressCircle size="100" color={theme.accent} />
<ProgressCircle size={size} color={theme.accent} />
<p style={{ marginTop: 15 }}>{text}</p>
</div>
);
};

Spinner.propTypes = {
text: PropTypes.string,
size: PropTypes.number,
style: PropTypes.object,
};

Spinner.defaultProps = {
text: '',
size: 100,
style: {},
};

Spinner.contextTypes = { theme: PropTypes.object };
Expand Down
Loading

0 comments on commit 23f3a29

Please sign in to comment.