-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpopup.html
228 lines (216 loc) · 9.84 KB
/
popup.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<!DOCTYPE html>
<html style="width:500px;min-height:700px;">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Smash Calendar</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css">
<link rel="stylesheet" href="css/balloon.css">
<link rel="stylesheet" href="css/iziToast.min.css">
<link rel="stylesheet" href="css/styles.css">
<script defer src="js/fontawesome.js"></script>
</head>
<body class="has-navbar-fixed-top" >
<div id="app">
<transition name="fade" mode="out-in">
<div class="modal is-active" v-if="addModal">
<div class="modal-background" @click="toggleAddModal()"></div>
<div class="modal-card">
<header class="modal-card-head">
<p class="modal-card-title">Add Event</p>
<button class="delete" aria-label="close" @click="toggleAddModal()"></button>
</header>
<section class="modal-card-body">
<div class="field">
<label class="label">Smash.gg Tournament url</label>
<div class="control">
<input class="input is-info" type="text" placeholder="Url" v-model="eventInput" v-on:keyup.enter="addEvent()">
</div>
<p class="help">Ex: https://smash.gg/tournament/[tournament-slug]/events</p>
</div>
</section>
<footer class="modal-card-foot">
<button class="button is-info" @click="addEvent()">Add</button>
<button class="button" @click="toggleAddModal()">Cancel</button>
</footer>
</div>
</div>
</transition>
<transition name="fade" mode="out-in">
<div class="modal is-active" v-if="exportModal">
<div class="modal-background" @click="toggleExport()"></div>
<div class="modal-card">
<header class="modal-card-head">
<p class="modal-card-title">Export</p>
<button class="delete" aria-label="close" @click="toggleExport()"></button>
</header>
<section class="modal-card-body">
<p>Copy storage file to share events to others.</p>
<code class="export-data">{{JSON.stringify(this.events)}}</code>
</section>
<footer class="modal-card-foot">
<button class="button is-info" @click="copyExport()">Copy</button>
<button class="button" @click="toggleExport()">Cancel</button>
</footer>
</div>
</div>
</transition>
<transition name="fade" mode="out-in">
<div class="modal is-active" v-if="importModal">
<div class="modal-background" @click="toggleImport()"></div>
<div class="modal-card">
<header class="modal-card-head">
<p class="modal-card-title">Import</p>
<button class="delete" aria-label="close" @click="toggleImport()"></button>
</header>
<section class="modal-card-body">
<img class="add-img" src="img/add-events.svg" alt="add-events" />
<p class="has-text-centered">Paste Export Data to upload event information.</p>
<br/>
<div class="field">
<div class="file is-info is-centered is-medium">
<label class="file-label">
<input class="file-input" type="file" name="resume" @change="processFile($event)">
<span class="file-cta">
<span class="file-icon">
<i class="fas fa-upload"></i>
</span>
<span class="file-label">
Choose a file…
</span>
</span>
</label>
</div>
</div>
</section>
<footer class="modal-card-foot">
<button class="button" @click="toggleImport()">Cancel</button>
</footer>
</div>
</div>
</transition>
<transition name="fade" mode="out-in">
<div class="modal is-active" v-if="streamEvent">
<div class="modal-background" @click="toggleStream()"></div>
<div class="modal-card">
<header class="modal-card-head">
<p class="modal-card-title">Find Event Stream Channels</p>
<button class="delete" aria-label="close" @click="toggleStream()"></button>
</header>
<section class="modal-card-body">
<div v-show="streamLoading" class="loader-container">
<div class="loader"></div>
</div>
<img class="no-stream-img" src="img/no-stream.svg" alt="no-events" />
<div class="no-stream" v-show="streamData.length == 0 && streamLoading == false">
<p>No streams are listed for this event at the moment. The TO might update this info later on smash.gg.</p>
</div>
<stream-channel
v-for="stream in streamData"
v-bind:key="stream.id"
v-bind:stream="stream"
></stream-channel>
</section>
<footer class="modal-card-foot">
<button class="button" @click="toggleStream()">Exit</button>
</footer>
</div>
</div>
</transition>
<a class="button add-icon is-info" data-balloon="Add Event" data-balloon-pos="left" @click="toggleAddModal()">
<span class="icon is-large">
<i class="fas fa-plus"></i>
</span>
</a>
<nav class="navbar is-fixed-top has-background-info" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item has-text-white has-text-weight-semibold">
Smash Mini Calendar
</a>
<a @click="toggleMenu" v-bind:class="{ 'is-active': showMenu }" role="button" class="navbar-burger has-text-white" aria-label="menu" aria-expanded="false">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div class="navbar-menu is-active" id="navMenu" v-if="showMenu">
<!-- shown on mobile -->
<a class="navbar-item" @click="toggleImport()" >
Import
</a>
<a class="navbar-item" @click="toggleExport()">
Export
</a>
<a class="navbar-item" @click="deleteAll()">
Clear All
</a>
<a class="navbar-item" @click="github">
<span class="icon">
<i class="fab fa-github"></i>
</span>
<span>GitHub</span>
</a>
</div>
</nav>
<section>
<div class="container">
<div class="field">
<div class="control">
<input class="input is-rounded is-small" type="text" placeholder="Event Name" @input="debounceInput">
</div>
</div>
<div class="tabs is-centered is-small is-boxed">
<ul>
<li v-bind:class="{ 'is-active': tabs.upcomingEvents }">
<a @click="changeTab('upcomingEvents')">
<span>Upcoming Events</span>
</a>
</li>
<li v-bind:class="{ 'is-active': tabs.allEvents }">
<a @click="changeTab('allEvents')">
<span>All Events</span>
</a>
</li>
<li v-bind:class="{ 'is-active': tabs.prevEvents }">
<a @click="changeTab('prevEvents')">
<span>Past Events</span>
</a>
</li>
</ul>
</div>
<div class="container" v-for="(tab, indexTab) in tabs">
<transition name="slide-fade" mode="out-in">
<div class="tab-container" v-if="tab">
<tourney-event
v-for="(event, index) in filteredEvents"
v-bind:key="index"
v-bind:event="event"
v-bind:isupcoming="indexTab=='upcomingEvents'"
v-on:delete-event="deleteEvent(event)"
v-on:toggle-stream="toggleStream(event)"
></tourney-event>
<div v-show="isFiltering" class="filter-loader-container">
<div class="loader"></div>
</div>
<div class="no-events" v-show="filteredEvents && filteredEvents.length == 0">
<img class="no-img" src="img/no-events.svg" alt="no-events" />
<br/>
<p>No events available yet! Get started by adding events.</p>
<br/>
<a class="button is-info is-outlined" @click="toggleAddModal()">Add Events</a>
</div>
</div>
</transition>
</div>
<div style="margin:2.5rem;"></div>
</div>
</section>
</div>
</body>
<script src="js/moment.js"></script>
<script src="js/axios.js"></script>
<script src="js/iziToast.min.js"></script>
<script src="js/vue.min.js"></script>
<script src="js/util.js"></script>
<script src="js/popup.js"></script>
</html>