forked from mikehodgson/tsmt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
112 lines (110 loc) · 6.85 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>The Show Mission Tracker</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/octicons/4.4.0/font/octicons.min.css" type="text/css">
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.0/css/bootstrap.min.css"/>
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/bootstrap-vue.min.css"/>
<link type="text/css" rel="stylesheet" href="css/app.css"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.16/vue.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.26.0/polyfill.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/bootstrap-vue.min.js"></script>
<script src="js/vue-select.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="js/model/Mission.js"></script>
<script src="js/app.min.js"></script>
</head>
<body>
<div id="app" v-cloak>
<b-container fluid class="pt-3">
<b-row v-if="activeMissions.length == 0">
<b-col>
<b-card title="Welcome" class="mb-2">
<p class="card-text">Welcome to The Show Mission Tracker. This app uses cookies and local storage to save your settings. Click the <strong>Add Mission</strong> button to get started.</p>
</b-card>
</b-col>
</b-row>
<b-row v-for="mission in activeMissions" :key="mission.value" class="mb-2">
<b-col>
<div class="card">
<div class="card-header text-truncate pt-1 pb-1">
<div class="row pt-0">
<div class="col-75 text-truncate w-75">{{ mission.label }}</div>
<div class="col-25 w-25 text-right">{{ mission.duration }}</div>
</div>
</div>
<div class="card-body pt-2 pb-2">
<div class="row">
<div class="col-75 w-75">
<b-btn v-for="requirement in mission.requirements" :key="requirement.requirement_type" :class="{'mb-1' : true, 'mr-2' : true, 'btn-success' : isRequirementComplete(requirement), 'btn-warning' : (isRequirementStarted(requirement) && !isRequirementComplete(requirement))}" size="md" @click="requirementIncrease(requirement)">
{{ requirement.requirement_type }} {{ requirement.current }}/{{ requirement.goal }}
</b-btn>
</div>
<div class="col-25 w-25 text-right">
<b-btn :class="{'ml-2': true, 'float-right' : true, 'btn-success' : areAllRequirementsComplete(mission), 'btn-danger' : !areAllRequirementsComplete(mission)}" size="md" @click="removeActiveMission(activeMissions, mission)">
<i :class="{'octicon' : true, 'octicon-check' : areAllRequirementsComplete(mission), 'octicon-x': !areAllRequirementsComplete(mission)}"></i>
</b-btn>
<b-btn :class="{'ml-2': true, 'float-right' : true, 'btn-danger' : true}" size="md" @click="requirementResetAll(mission)">
<i class="octicon octicon-sync"></i>
</b-btn>
<b-btn :class="{'float-right' : true, 'btn-secondary' : true}" size="md" @click="editMission(mission)">
<i class="octicon octicon-pencil"></i>
</b-btn>
</div>
</div>
</div>
</div>
</b-col>
</b-row>
<b-row class="mb-3 mt-2">
<b-col>
<b-btn v-b-modal="'addModal'" class="w-100 mt-1" size="lg" variant="primary">
Add Mission
</b-btn>
</b-col>
</b-row>
<b-row class="mb-3" v-if="(activeMissions.length > 0)">
<b-col>
<b-btn class="w-100" size="lg" variant="secondary" @click="clearActiveMissions()">
Clear All Missions
</b-btn>
</b-col>
</b-row>
<b-row id="pageFooter" class="mt-3">
<b-col>
<p class="text-center">
Created by <a href="https://twitter.com/mhodgson">Mike Hodgson</a> | <a href="https://paypal.me/mhodgson">Send a tip</a> | <a href="https://github.com/mikehodgson/tsmt">github</a> | {{ defaults.version }}<br>
MLB The Show is © 2018 Sony Interactive Entertainment LLC.
</p>
</b-col>
</b-row>
</b-container>
<b-modal id="addModal" size="lg" title="Add Mission" @ok="handleOK">
<b-form-row>
<v-select :options="defaults.program_types" v-model="selectedFilter" placeholder="Select a program type..." class="w-100 mb-3" @select="updateProgramFilter" :value.sync="selectedFilter"></v-select>
<v-select v-if="selectedFilter == 'Team Epic'" :options="defaults.teams" v-model="selectedTeam" placeholder="Select a team..." class="w-100 mb-3" @select="updateTeamFilter" :value.sync="selectedTeam"></v-select>
<v-select :options="filteredMissions" value="id" label="label" id="missionSelect" v-model="selectedMission" placeholder="Select a player mission..." class="w-100"></v-select>
</b-form-row>
</b-modal>
<b-modal ref="editModal" id="editModal" size="lg" :title="editingMission.label" @ok="handleEditOK">
<b-form class="m-3">
<h5>Requirements</h5>
<div class="mb-3 row" v-for="requirement in editingMission.requirements">
<div class="col-25 w-25">
{{ requirement.requirement_type }}
</div>
<div class="col-25 w-25">
{{ requirement.goal }}
</div>
<div class="col-50 w-50">
<b-input class="float-left w-100" type="number" v-model.number="requirement.current"></b-input>
</div>
</div>
</b-form>
</b-modal>
</div>
</body>
</html>