mirror of
https://github.com/status-im/sourcecred.git
synced 2025-01-28 05:15:27 +00:00
Streamline the cred explorer UI (#581)
This commit removes some unecessary text and whitespace from the cred explorer. The result is more minimal. It's not super pretty, but that will come later. Test plan: Visual inspection
This commit is contained in:
parent
48275590ba
commit
56f0b8b1b9
@ -1,7 +1,6 @@
|
|||||||
// @flow
|
// @flow
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import {StyleSheet, css} from "aphrodite/no-important";
|
|
||||||
|
|
||||||
import type {LocalStore} from "../localStore";
|
import type {LocalStore} from "../localStore";
|
||||||
import CheckedLocalStore from "../checkedLocalStore";
|
import CheckedLocalStore from "../checkedLocalStore";
|
||||||
@ -65,15 +64,13 @@ export class App extends React.Component<Props, State> {
|
|||||||
const {graphWithAdapters, pnd} = this.state.data;
|
const {graphWithAdapters, pnd} = this.state.data;
|
||||||
return (
|
return (
|
||||||
<div style={{maxWidth: "66em", margin: "0 auto", padding: "0 10px"}}>
|
<div style={{maxWidth: "66em", margin: "0 auto", padding: "0 10px"}}>
|
||||||
<header className={css(styles.header)}>
|
|
||||||
<h1>Cred Explorer</h1>
|
|
||||||
</header>
|
|
||||||
<div>
|
<div>
|
||||||
|
<div style={{marginBottom: 10}}>
|
||||||
<RepositorySelect
|
<RepositorySelect
|
||||||
localStore={localStore}
|
localStore={localStore}
|
||||||
onChange={(selectedRepo) => this.setState({selectedRepo})}
|
onChange={(selectedRepo) => this.setState({selectedRepo})}
|
||||||
/>
|
/>
|
||||||
<br />
|
</div>
|
||||||
<button
|
<button
|
||||||
disabled={selectedRepo == null}
|
disabled={selectedRepo == null}
|
||||||
onClick={() => this.loadData()}
|
onClick={() => this.loadData()}
|
||||||
@ -102,9 +99,8 @@ export class App extends React.Component<Props, State> {
|
|||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Run basic PageRank
|
Run PageRank
|
||||||
</button>
|
</button>
|
||||||
{graphWithAdapters ? <p>Graph loaded.</p> : <p>Graph not loaded.</p>}
|
|
||||||
<WeightConfig
|
<WeightConfig
|
||||||
localStore={localStore}
|
localStore={localStore}
|
||||||
onChange={(ee) => this.setState({edgeEvaluator: ee})}
|
onChange={(ee) => this.setState({edgeEvaluator: ee})}
|
||||||
@ -139,9 +135,3 @@ export class App extends React.Component<Props, State> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
|
||||||
header: {
|
|
||||||
color: "#090",
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
@ -102,8 +102,7 @@ export class PagerankTable extends React.PureComponent<
|
|||||||
throw new Error("maxEntriesPerList not set");
|
throw new Error("maxEntriesPerList not set");
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div>
|
<div style={{marginTop: 10}}>
|
||||||
<h2>PageRank results</h2>
|
|
||||||
{this.renderFilterSelect()}
|
{this.renderFilterSelect()}
|
||||||
{this.renderTable()}
|
{this.renderTable()}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user