Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix indentation #58

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 92 additions & 62 deletions components/ExploreTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,26 @@
<div class="col-md-8">
<div class="input-group mb-3">

<input type="text" class="form-control"
id="minEloInput"
v-bind="{value: eloRange[0]}">
<input
type="text"
class="form-control"
id="minEloInput"
v-bind="{value: eloRange[0]}"
>

<input type="text" class="form-control"
id="maxEloInput"
v-bind="{value: eloRange[1]}">
<input
type="text"
class="form-control"
id="maxEloInput"
v-bind="{value: eloRange[1]}"
>

<button class="btn btn-outline-secondary exploreApplyBtn"
type="button"
id="applyEloRangeBtn"
@click="setEloRange">
<button
class="btn btn-outline-secondary exploreApplyBtn"
type="button"
id="applyEloRangeBtn"
@click="setEloRange"
>

Apply
</button>
Expand All @@ -49,18 +57,26 @@
<div class="col-md-8">
<div class="input-group mb-3">

<input type="text" class="form-control"
id="minAccuracyInput"
v-bind="{value: accuracyRange[0]}">
<input
type="text"
class="form-control"
id="minAccuracyInput"
v-bind="{value: accuracyRange[0]}"
>

<input type="text" class="form-control"
id="maxAccuracyInput"
v-bind="{value: accuracyRange[1]}">
<input
type="text"
class="form-control"
id="maxAccuracyInput"
v-bind="{value: accuracyRange[1]}"
>

<button class="btn btn-outline-secondary exploreApplyBtn"
type="button"
id="applyAccuracyRangeBtn"
@click="setAccuracyRange">
<button
class="btn btn-outline-secondary exploreApplyBtn"
type="button"
id="applyAccuracyRangeBtn"
@click="setAccuracyRange"
>

Apply
</button>
Expand All @@ -74,19 +90,26 @@
</div>
<div class="col-md-8">
<div class="input-group mb-3">
<input type="date" class="form-control"
id="minDateInput"
v-bind="{value: dateRange[0]}">
<input
type="date"
class="form-control"
id="minDateInput"
v-bind="{value: dateRange[0]}"
>

<input type="date" class="form-control"
id="maxDateInput"
v-bind="{value: dateRange[1]}">
<input
type="date"
class="form-control"
id="maxDateInput"
v-bind="{value: dateRange[1]}"
>

<button class="btn btn-outline-secondary exploreApplyBtn"
type="button"
id="applyDateRangeBtn"
@click="setDateRange">
Apply
type="button"
id="applyDateRangeBtn"
@click="setDateRange"
>
Apply
</button>
</div>

Expand All @@ -99,18 +122,25 @@
</div>
<div class="col-md-8">
<div class="input-group mb-3">
<input type="text" class="form-control"
id="minMoveInput"
v-bind="{value: moveRange[0]}">
<input
type="text"
class="form-control"
id="minMoveInput"
v-bind="{value: moveRange[0]}"
>

<input type="text" class="form-control"
id="maxMoveInput"
v-bind="{value: moveRange[1]}">
<input
type="text"
class="form-control"
id="maxMoveInput"
v-bind="{value: moveRange[1]}"
>

<button class="btn btn-outline-secondary exploreApplyBtn"
type="button"
id="applyMoveRangeBtn"
@click="setMoveRange">
type="button"
id="applyMoveRangeBtn"
@click="setMoveRange"
>
Apply
</button>
</div>
Expand All @@ -131,35 +161,35 @@
v-show="key !== 'gameUrl'"
>

<button
class="btn dropdown-toggle column-filter-selector"
data-bs-toggle="dropdown"
>
{{ capitalize(key) }}
</button>
<button
class="btn dropdown-toggle column-filter-selector"
data-bs-toggle="dropdown"
>
{{ capitalize(key) }}
</button>

<ul class="dropdown-menu dropdown-menu-end ">
<li v-for="(option, optionIndex) in filterOptions[key] || []"
<ul class="dropdown-menu dropdown-menu-end ">
<li v-for="(option, optionIndex) in filterOptions[key] || []"

class="dropdown-item"
:class="{ active: activeFilters[key].includes(option) }"
:key="'option-' + optionIndex"
@click="filterColumnBy(key, option)"
>
class="dropdown-item"
:class="{ active: activeFilters[key].includes(option) }"
:key="'option-' + optionIndex"
@click="filterColumnBy(key, option)"
>

{{ option }}
{{ option }}

</li>

<li>
<hr class="dropdown-divider">
</li>
</li>
<li>
<hr class="dropdown-divider">
</li>

<li class="dropdown-item" @click="sortBy(key)">
Sort Ascending
</li>
<li class="dropdown-item" @click="sortBy(key)">
Sort Ascending
</li>

</ul>
</ul>

</th>

Expand Down
59 changes: 29 additions & 30 deletions components/InputForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,37 @@
<p style="text-align:center">Enter your chess.com username to generate a full export of your games.</p>

<div class="input-group input-group-lg input-group--username">
<input type="text" placeholder="Username"
list="gmsList"
id="uname"
aria-describedby="u-addon"
autocapitalize="none"
autocorrect="off"
v-model="userName"
class="form-control username-input"
>
<span class="input-group-prepend">
<button type="submit"
class="btn btn-secondary"
id="unameBtn"
@click="submitForm()">
Get Insights
</button>
<button type="button"
class="btn btn-secondary"
id="uploadBtn"
data-bs-toggle="tooltip"
data-bs-placement="top"
title="Upload json file"
@click="uploadFile">
<font-awesome-icon :icon="['fas', 'file-arrow-up']" />
</button>

</span>

<input type="text" placeholder="Username"
list="gmsList"
id="uname"
aria-describedby="u-addon"
autocapitalize="none"
autocorrect="off"
v-model="userName"
class="form-control username-input"
>
<span class="input-group-prepend">
<button type="submit"
class="btn btn-secondary"
id="unameBtn"
@click="submitForm()">
Get Insights
</button>
<button type="button"
class="btn btn-secondary"
id="uploadBtn"
data-bs-toggle="tooltip"
data-bs-placement="top"
title="Upload json file"
@click="uploadFile"
>
<font-awesome-icon :icon="['fas', 'file-arrow-up']" />
</button>
</span>
</div>

<div>
</div>
<div>
</div>
</div>
<datalist id="gmsList">
</datalist>
Expand Down
72 changes: 36 additions & 36 deletions components/UserOverview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<div class="row" >
<div class="card" id="eloCard">

<h2 class="card-title font-weight-bold m-1" >
<strong>
{{ userName }}
</strong>
</h2>
<h2 class="card-title font-weight-bold m-1" >
<strong>
{{ userName }}
</strong>
</h2>

<div class="row" id="totalRow">
<h3>
Expand All @@ -17,45 +17,45 @@

<div class="container" id="winLossBar">

<div class="row" id="winLossRow">
<div class="col">
<h4><b>{{ ovWinPercentage }}%</b></h4>
{{ ovWinCount }} Won
<div class="row" id="winLossRow">
<div class="col">
<h4><b>{{ ovWinPercentage }}%</b></h4>
{{ ovWinCount }} Won
</div>
<div div class="col">
<h4><b>{{ ovDrawPercentage }}%</b></h4>
{{ ovDrawCount }} Drawn
</div>
<div div class="col">
<h4><b>{{ ovLossPercentage }}%</b></h4>
{{ ovLossCount }} Lost
</div>
</div>
<div class="col">
<h4><b>{{ ovDrawPercentage }}%</b></h4>
{{ ovDrawCount }} Drawn
</div>
<div class="col">
<h4><b>{{ ovLossPercentage }}%</b></h4>
{{ ovLossCount }} Lost
</div>
</div>


<div class="progress">
<div class="progress-bar" id="progWinds" role="progressbar" :style="{ width: ovWinPercentage + '%' }" :aria-valuenow="ovWinPercentage" aria-valuemin="0" aria-valuemax="100"> </div>
<div class="progress-bar " id="progDraws" role="progressbar" :style="{ width: ovDrawPercentage + '%'}" :aria-valuenow="ovDrawPercentage" aria-valuemin="0" aria-valuemax="100"></div>
<div class="progress-bar " id="progLoss" role="progressbar" :style="{ width: ovLossPercentage + '%'}" :aria-valuenow="ovLossPercentage" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="progress">
<div class="progress-bar" id="progWinds" role="progressbar" :style="{ width: ovWinPercentage + '%' }" :aria-valuenow="ovWinPercentage" aria-valuemin="0" aria-valuemax="100"> </div>
<div class="progress-bar " id="progDraws" role="progressbar" :style="{ width: ovDrawPercentage + '%'}" :aria-valuenow="ovDrawPercentage" aria-valuemin="0" aria-valuemax="100"></div>
<div class="progress-bar " id="progLoss" role="progressbar" :style="{ width: ovLossPercentage + '%'}" :aria-valuenow="ovLossPercentage" aria-valuemin="0" aria-valuemax="100"></div>
</div>

<div class="row" id="timePlayed">
<div class="row" id="timePlayed">

<div class="col">
<h4><b>Time Played</b></h4>
{{ ovTimePlayed }}
<div class="col">
<h4 h4><b>Time Played</b></h4>
{{ ovTimePlayed }}
</div>
</div>
</div>

</div>
<div class="card-body" id="eloCardBody">
<button class="btn btn-primary slicer" :class="{ active: ovTimeClass === 'all' }" v-on:click="updateOverview('all')">All</button>
<button class="btn btn-primary slicer" :class="{ active: ovTimeClass === 'bullet' }" v-on:click="updateOverview('bullet')">Bullet</button>
<button class="btn btn-primary slicer" :class="{ active: ovTimeClass === 'blitz' }" v-on:click="updateOverview('blitz')">Blitz</button>
<button class="btn btn-primary slicer" :class="{ active: ovTimeClass === 'rapid' }" v-on:click="updateOverview('rapid')">Rapid</button>
<button class="btn btn-primary slicer" :class="{ active: ovTimeClass === 'daily' }" v-on:click="updateOverview('daily')">Daily</button>
</div>
</div>
<div class="card-body" id="eloCardBody">
<button class="btn btn-primary slicer" :class="{ active: ovTimeClass === 'all' }" v-on:click="updateOverview('all')">All</button>
<button class="btn btn-primary slicer" :class="{ active: ovTimeClass === 'bullet' }" v-on:click="updateOverview('bullet')">Bullet</button>
<button class="btn btn-primary slicer" :class="{ active: ovTimeClass === 'blitz' }" v-on:click="updateOverview('blitz')">Blitz</button>
<button class="btn btn-primary slicer" :class="{ active: ovTimeClass === 'rapid' }" v-on:click="updateOverview('rapid')">Rapid</button>
<button class="btn btn-primary slicer" :class="{ active: ovTimeClass === 'daily' }" v-on:click="updateOverview('daily')">Daily</button>
</div>
</div>
</div>
</div>

Expand Down