-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dashboard): Add support for applications
- Loading branch information
1 parent
68ce425
commit 4a4bafd
Showing
17 changed files
with
280 additions
and
112 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,5 +1,56 @@ | ||
$amountOfApps: 4; | ||
.App { | ||
width: 100%; | ||
height: 145px; | ||
text-align: center; | ||
cursor: pointer; | ||
// text-shadow: black 0px 0px 15px; | ||
// white-space: nowrap; | ||
// text-overflow: ellipsis; | ||
// font-size: 21px; | ||
// overflow: hidden; | ||
|
||
:local .appWrapper { | ||
width: calc(100% * (1 / #{$amountOfApps})); | ||
-webkit-touch-callout: none; | ||
-webkit-user-select: none; | ||
-khtml-user-select: none; | ||
-moz-user-select: none; | ||
-ms-user-select: none; | ||
user-select: none; | ||
|
||
&-UninstallButton { | ||
position: absolute; | ||
background: white; | ||
color: gray; | ||
border:2px solid gray; | ||
width: 35px; | ||
height: 35px; | ||
border-radius: 50%; | ||
text-align: center; | ||
line-height: 35px; | ||
font-size: 19px; | ||
-webkit-touch-callout: none; | ||
-webkit-user-select: none; | ||
-khtml-user-select: none; | ||
-moz-user-select: none; | ||
-ms-user-select: none; | ||
user-select: none; | ||
cursor: pointer; | ||
} | ||
|
||
&-Title { | ||
position: relative; | ||
z-index: 2; | ||
display: block; | ||
color: #373737; | ||
} | ||
|
||
&-Icon { | ||
// filter: drop-shadow(5px 15px 16px #000000); | ||
position: relative; | ||
z-index: 1; | ||
|
||
img { | ||
width: 100%; | ||
max-height: 100%; | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import * as React from 'react'; | ||
import { connect } from 'react-redux'; | ||
import Typography from '@material-ui/core/Typography'; | ||
import Paper from '@material-ui/core/Paper'; | ||
import Grid from '@material-ui/core/Grid'; | ||
import App from '../../molecules/App'; | ||
import Application from '../../../models/Application'; | ||
// import Folder from '../Folder'; | ||
const styles = require('./AppSection.styles.scss'); | ||
|
||
interface Props { | ||
apps: Application[]; | ||
} | ||
|
||
function AppSection(props: Props) { | ||
return ( | ||
<React.Fragment> | ||
<Paper className={styles['AppSection-Wrapper']}> | ||
<div className={styles.AppSection}> | ||
<div className={styles['AppSection-Apps']}> | ||
<Typography variant="h4" className={styles['AppSection-Title']}>Apps</Typography> | ||
<Grid container spacing={4}> | ||
{props.apps.map((app) => { | ||
if (app.isFolder) { | ||
// return <Folder key={app.id} folder={app} />; | ||
} | ||
|
||
return <App key={app.id} app={app} />; | ||
})} | ||
</Grid> | ||
</div> | ||
</div> | ||
</Paper> | ||
</React.Fragment> | ||
); | ||
} | ||
|
||
const mapStateToProps = (store: any) => { | ||
console.log('[] store -> ', store); | ||
return { | ||
apps: store.ApplicationStore.apps, | ||
}; | ||
}; | ||
|
||
// @ts-ignore | ||
export default connect(mapStateToProps)(AppSection); |
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 |
---|---|---|
@@ -1,5 +1,16 @@ | ||
import IProvider, { PrivateKey } from './providers/IProvider'; | ||
import Configuration from '../Configuration'; | ||
import Application from '../models/Application'; | ||
|
||
class UserService { | ||
static async logout() { | ||
|
||
} | ||
|
||
static async getInstalled(keys: PrivateKey): Promise<Application[]> { | ||
const provider: IProvider = Configuration.get('provider'); | ||
return provider.getInstalledApplications(keys); | ||
} | ||
} | ||
|
||
export default UserService; |
Oops, something went wrong.