Skip to content

Commit

Permalink
hide inverted
Browse files Browse the repository at this point in the history
  • Loading branch information
makamekm committed May 19, 2020
1 parent 3af5453 commit 1b1e045
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 63 deletions.
8 changes: 4 additions & 4 deletions git-log-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ teams:
users:
- Dan Abramov
- Maxim Karpov
- invert: true
name: others
- name: others
users:
- Dan Abramov
- Maxim Karpov
- Will Douglas
- Nicolas Gallagher
- Sunil Pai
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "git-activity-team-tracker",
"version": "0.4.1",
"version": "0.4.2",
"private": false,
"description": "The tool visualize git activities, for teams, users, repositories",
"author": "Maxim Karpov <[email protected]>",
Expand Down
20 changes: 10 additions & 10 deletions src/app/Configuration/ConfigurationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const ConfigurationForm = observer(
) : (
<div className="px-3 pb-3 -mt-2">
<div className="flex flex-col md:flex-row">
<div className="md:w-1/5 mx-2 mt-3 pt-2 text-gray-800 dark-mode:text-gray-300 md:text-right">
<div className="md:w-2/5 mx-2 mt-3 pt-2 text-gray-800 dark-mode:text-gray-300 md:text-right">
Password:
</div>
<div className="flex-1 mt-3 mx-2 flex flex-col md:flex-row">
Expand All @@ -43,7 +43,7 @@ export const ConfigurationForm = observer(
</div>
</div>
<div className="flex flex-col md:flex-row">
<div className="md:w-1/5 mx-2 mt-3 pt-2 text-gray-800 dark-mode:text-gray-300 md:text-right">
<div className="md:w-2/5 mx-2 mt-3 pt-2 text-gray-800 dark-mode:text-gray-300 md:text-right">
Default Branch:
</div>
<div className="flex-1 mt-3 mx-2 flex flex-col md:flex-row">
Expand All @@ -60,8 +60,8 @@ export const ConfigurationForm = observer(
</div>
</div>
<div className="flex flex-col md:flex-row">
<div className="md:w-1/5 mx-2 mt-3 pt-2 text-gray-800 dark-mode:text-gray-300 md:text-right">
Collect Function:
<div className="md:w-2/5 mx-2 mt-3 pt-2 text-gray-800 dark-mode:text-gray-300 md:text-right">
Analyze Function [JavaScript]:
</div>
<div className="flex-1 mt-3 mx-2 flex flex-col md:flex-row">
<input
Expand All @@ -77,8 +77,8 @@ export const ConfigurationForm = observer(
</div>
</div>
<div className="flex flex-col md:flex-row">
<div className="md:w-1/5 mx-2 mt-3 pt-2 text-gray-800 dark-mode:text-gray-300 md:text-right">
Collect Interval:
<div className="md:w-2/5 mx-2 mt-3 pt-2 text-gray-800 dark-mode:text-gray-300 md:text-right">
Collect Interval [Minutes]:
</div>
<div className="flex-1 mt-3 mx-2 flex flex-col md:flex-row">
<input
Expand All @@ -96,8 +96,8 @@ export const ConfigurationForm = observer(
</div>
</div>
<div className="flex flex-col md:flex-row">
<div className="md:w-1/5 mx-2 mt-3 text-gray-800 dark-mode:text-gray-300 md:text-right">
Only Registered Users:
<div className="md:w-2/5 mx-2 mt-3 text-gray-800 dark-mode:text-gray-300 md:text-right">
Only Registered Users (Hide unregistered):
</div>
<div className="flex-1 mt-3 mx-2">
<Toggle
Expand All @@ -109,8 +109,8 @@ export const ConfigurationForm = observer(
</div>
</div>
<div className="flex flex-col md:flex-row">
<div className="md:w-1/5 mx-2 mt-3 text-gray-800 dark-mode:text-gray-300 md:text-right">
Collect Messages:
<div className="md:w-2/5 mx-2 mt-3 text-gray-800 dark-mode:text-gray-300 md:text-right">
Collect Messages (Messages will not be displayed):
</div>
<div className="flex-1 mt-3 mx-2">
<Toggle
Expand Down
62 changes: 22 additions & 40 deletions src/app/Configuration/ConfigurationTeams.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
import { Accordion } from "~/components/Accordion/Accordion";
import { Typeahead } from "~/components/Typeahead/Typeahead";
import { Dropdown } from "~/components/Dropdown/Dropdown";
import { Toggle } from "~/components/Toggle/Toggle";

const ConfigurationTableTeams = ConfigurationTable as React.FC<
ConfigurationTableProps<ConfigurationState["config"]["teams"][0]>
Expand Down Expand Up @@ -53,15 +52,14 @@ export const ConfigurationTeams = observer(
items={state.config.teams}
header={
<>
<th className="w-4/12">Name</th>
<th className="text-center w-10">Inverted</th>
<th className="w-6/12">Users</th>
<th className="text-right w-20">Actions</th>
<th className="w-5/12">Name</th>
<th className="">Users</th>
<th className="text-right w-10">Actions</th>
</>
}
render={(team) => (
<>
<td className="align-middle w-4/12">
<td className="align-middle w-5/12">
<input
autoComplete={"off"}
className="ellipsis w-full text-base shadow-sm appearance-none border rounded py-2 px-3 text-grey-darker dark-mode:border-gray-700 dark-mode:text-white dark-mode:bg-gray-800 leading-none focus:outline-none focus:shadow-outline"
Expand All @@ -73,38 +71,25 @@ export const ConfigurationTeams = observer(
placeholder="Name (Required & Unique)..."
/>
</td>
<td className="align-middle text-center w-10">
<Toggle
checked={team.invert}
onChange={() => {
team.invert = !team.invert;
if (team.invert) {
(team.users as any).replace([]);
}
}}
/>
</td>
<td
className="align-middle w-6/12"
className="align-middle"
style={{
maxWidth: "300px",
}}
>
{!team.invert && (
<Typeahead
placeholder="Add users..."
multiple
allowNew
autoFocus
selected={team.users}
onChange={(selected) => {
(team.users as any).replace(selected);
}}
options={state.users}
/>
)}
<Typeahead
placeholder="Add repositories..."
multiple
allowNew
autoFocus
selected={team.repositories}
onChange={(selected) => {
(team.repositories as any).replace(selected);
}}
options={state.repositories}
/>
</td>
<td className="align-middle text-right w-20">
<td className="align-middle text-right w-10">
<Dropdown title={<i className="fas fa-cog"></i>}>
<button
className={
Expand All @@ -126,20 +111,17 @@ export const ConfigurationTeams = observer(
)}
renderAdditional={(team, style, className) => (
<tr style={{ ...style }} className={className}>
<td colSpan={5}>
<td colSpan={4}>
<Typeahead
placeholder="Add repositories..."
placeholder="Add users..."
multiple
allowNew
autoFocus
selected={team.repositories}
selected={team.users}
onChange={(selected) => {
selected = selected.map((s: any) =>
typeof s === "string" ? s : s.label
);
(team.repositories as any).replace(selected);
(team.users as any).replace(selected);
}}
options={state.repositories}
options={state.users}
/>
</td>
</tr>
Expand Down
14 changes: 7 additions & 7 deletions src/app/Settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const SettingsForm = observer(({ state }: { state: SettingsState }) => {
</AccordionToggle>
<div className="flex flex-col md:flex-row">
<div className="md:w-2/5 md:text-right pt-2 mx-2 mt-3 text-gray-800 dark-mode:text-gray-300">
Public Key:
Drive Public Key:
</div>
<div className="flex-1 mt-3 mx-2 flex flex-col md:flex-row">
<input
Expand All @@ -119,7 +119,7 @@ const SettingsForm = observer(({ state }: { state: SettingsState }) => {
</div>
<div className="flex flex-col md:flex-row">
<div className="md:w-2/5 md:text-right pt-2 mx-2 mt-3 text-gray-800 dark-mode:text-gray-300">
Secret Key:
Drive Secret Key:
</div>
<div className="flex-1 mt-3 mx-2 flex flex-col md:flex-row">
<input
Expand Down Expand Up @@ -149,7 +149,7 @@ const SettingsForm = observer(({ state }: { state: SettingsState }) => {
<AccordionToggle value={!!state.settings.secretKey}>
<div className="flex flex-col md:flex-row">
<div className="md:w-2/5 md:text-right mx-2 mt-3 text-gray-800 dark-mode:text-gray-300">
Don't Collect Statistics:
Don't Collect Statistics (Local):
</div>
<div className="flex-1 mt-3 mx-2">
<Toggle
Expand All @@ -164,7 +164,7 @@ const SettingsForm = observer(({ state }: { state: SettingsState }) => {
<AccordionToggle value={!state.settings.dontCollect}>
<div className="flex flex-col md:flex-row">
<div className="md:w-2/5 md:text-right pt-2 mx-2 mt-3 text-gray-800 dark-mode:text-gray-300">
Parallel Job Collecting Limit:
Parallel Job Collecting Limit (Concurrency):
</div>
<div className="flex-1 mt-3 mx-2 flex flex-col md:flex-row">
<input
Expand Down Expand Up @@ -227,7 +227,7 @@ const SettingsForm = observer(({ state }: { state: SettingsState }) => {
</div>
<div className="flex flex-col md:flex-row">
<div className="md:w-2/5 md:text-right pt-2 mx-2 mt-3 text-gray-800 dark-mode:text-gray-300">
Repositories to Collect (If empty then collect from all):
Repositories to Collect (Empty to collect from all):
</div>
<div className="flex-1 mt-3 mx-2 flex flex-col md:flex-row">
<Typeahead
Expand All @@ -248,7 +248,7 @@ const SettingsForm = observer(({ state }: { state: SettingsState }) => {
</AccordionToggle>
<div className="flex flex-col md:flex-row">
<div className="md:w-2/5 md:text-right mx-2 mt-3 text-gray-800 dark-mode:text-gray-300">
Use Swarm:
Use Distributive Drive:
</div>
<div className="flex-1 mt-3 mx-2">
<Toggle
Expand All @@ -261,7 +261,7 @@ const SettingsForm = observer(({ state }: { state: SettingsState }) => {
</div>
<div className="flex flex-col md:flex-row">
<div className="md:w-2/5 md:text-right mx-2 mt-3 text-gray-800 dark-mode:text-gray-300">
Use S3:
Use Amazon S3 Drive:
</div>
<div className="flex-1 mt-3 mx-2">
<Toggle
Expand Down

0 comments on commit 1b1e045

Please sign in to comment.