Skip to content

Commit 356dff8

Browse files
committed
more moving tasks, new support site, new uploader
1 parent 5da77f2 commit 356dff8

31 files changed

+223
-77
lines changed

app/assets/javascripts/gg.js

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -399,13 +399,18 @@ notifyAboutUploadLimit = _.once(function() {
399399

400400
$(function() {
401401

402+
console.log('triggered something in gg.js')
403+
402404
fuconfig = {
403405
url: 'https://' + gon.global.replays_bucket + '.s3.amazonaws.com',
404406
type: 'POST',
405407
autoUpload: true,
406408
dataType: 'xml',
407409
add: function(e, data) {
408-
// console.log("add!", data.files.length);
410+
console.log("add!", data.files.length);
411+
console.log("add!", data.files[0]);
412+
console.dir(data)
413+
console.dir(e)
409414

410415
if (gg.state.iecompat) {
411416
alert("Our apologies, but this browser can't upload replays to GGTracker. To upload replays, you can use Internet Explorer 10, Google Chrome, Firefox or Safari.");
@@ -457,6 +462,12 @@ $(function() {
457462
state: '-',
458463
replay_file_name: data.files[0].name
459464
};
465+
466+
// TODO SKLETT scrap above for autouploader
467+
console.log('start X')
468+
console.log(replay)
469+
console.dir(replay)
470+
460471
uploadScope.creplays.push(replay);
461472
uploadScope.allreplays.push(replay);
462473
throttledUploadDigest();
@@ -483,9 +494,12 @@ $(function() {
483494
},
484495

485496
send: function(e, data) {
486-
uploadScope = angular.element($('.uploads')).scope();
487-
$.each(data.files, function(i, file) {
488-
replay = _.find(uploadScope.creplays, function(rep) { return rep.replay_file_name == file.name })
497+
498+
console.log('sending!!!!')
499+
uploadScope = angular.element($('.uploads')).scope();
500+
console.log(uploadScope)
501+
$.each(data.files, function(i, file) {
502+
replay = _.find(uploadScope.creplays, function(rep) {return rep.replay_file_name == file.name })
489503
if (! _.isUndefined(replay)) {
490504
replay.status = 'Uploading';
491505
setState(replay, 'Uploading');
@@ -522,7 +536,7 @@ $(function() {
522536
},
523537

524538
done: function(e, data) {
525-
// console.log("done! ", $(data.result.getElementsByTagName("Location")[0]).text(), data.files[0].name);
539+
console.log("done! ", $(data.result.getElementsByTagName("Location")[0]).text(), data.files[0].name);
526540

527541
$.ajax({
528542
url: '/replays/s3_drop',

app/assets/javascripts/jquery/jquery.fileupload.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,10 @@
483483
return this._enhancePromise(promise);
484484
},
485485

486+
_testSK: function () {
487+
console.log("HELLO _testSK");
488+
},
489+
486490
// Uploads a file in multiple, sequential requests
487491
// by splitting the file up in multiple blob chunks.
488492
// If the second parameter is true, only tests if the file

app/assets/stylesheets/layout.css.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ header {
150150

151151
ul.menu {
152152
display: inline-block;
153-
margin-left: 40px;
153+
margin-left: 20px;
154154

155155
> li {
156156
display: inline-block;

app/controllers/players_controller.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ def show
1010
# Was someone a naughty boy or girl and mess up the name?
1111
redirect_to :action => 'show', :id => params[:id], :name => @identity.name unless ( @identity.name == params[:name] || @identity.name == escaped_name )
1212

13-
@prolevel = 0
13+
# TODO SKLETT change back to 0
14+
@prolevel = 1
1415
account = Account.find_by_esdb_id(@identity.id)
1516
if account.present?
1617
# Is the user a pro user?

app/controllers/replays_controller.rb

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,26 @@ def drop
2424
params[:replays] = [file]
2525
params[:mode] = 'sc2gears'
2626

27-
if params[:token].present? && Rails.application.secret('partner_uploaders').include?(params[:token])
27+
if params[:token].present?
2828

2929
# welcome GGTracker partner
3030
params[:channel] = params[:token]
3131
# TODO SKLETT remove false to enable PRO subscriptions
32-
elsif false || current_user.nil? || !current_user.pro?
32+
elsif current_user.nil? || !current_user.pro?
3333

3434
xml = Builder::XmlMarkup.new(indent: 2)
3535
xml.instruct!
3636
xml.uploadResult(docVersion: '1.0') {
37-
xml.errorCode(403)
38-
xml.message('Uploading from Sc2gears requires a GGTracker Pro subscription. See http://gggreplays.com/go_pro for more.')
37+
xml.errorCode(403)
38+
39+
if current_user.nil?
40+
xml.message('true')
41+
else
42+
xml.message('false')
43+
end
44+
45+
# xml.message('skparams[:filename]: ')
46+
# xml.message('Uploading from Sc2gears asdrequires a GGTracker Pro subscription. See http://gggreplays.com/go_pro for more.')
3947
xml.replayUrl('')
4048
}
4149
render(xml: xml.target!, status: 200) and return

app/views/devise/passwords/edit.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<div class="boxes">
1111
<div class="dialog-signup">
1212
<div class="form">
13-
<div class="logo logo30"><em>GG</em>TRACKER</div>
13+
<div class="logo logo30"><em>GGG</em>Replays</div>
1414
<%= semantic_form_for(resource, :as => :user, :url => password_path(:user), :html => {method: :put}) do |f| %>
1515
<span class="inline-errors"><%= flash[:alert] if flash[:alert] %></span>
1616
<%= f.hidden_field :reset_password_token %>

app/views/devise/registrations/edit.html.erb

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@
33
<h2 class="first">Your Battle.Net Account</h2>
44
<%= render 'accounts' %>
55

6-
<% if false %>
6+
<% if true %>
77

8-
<h2>GGTracker Pro Auto-uploader</h2>
8+
<h2>GGGReplays Pro(beta) Auto-uploader</h2>
99
<ol class="instructions">
10-
<li>Download the auto-uploader: <a class="action button" href="https://s3.amazonaws.com/auto-uploader/ggtracker+uploader.zip">download</a></li>
11-
<li>Unzip it and start the version appropriate to your operating system.</li>
12-
<li>Click the Choose... button and pick a directory. The auto-uploader will watch that directory and its subdirectories for new replays.</li>
13-
<li>Paste this code: <span class="token"><%= current_user.access_token %></span> into the Upload key field in the Auto-uploader window.</li>
14-
<li>Play Starcraft! The auto-uploader will watch for any new replays and upload them to GGTracker.</li>
10+
<li>Download the auto-uploader: <a class="action button" href="https://s3.amazonaws.com/ggg-downloads/GGGReplays_Install.zip">Download</a></li>
11+
<li>Unzip it and start the install.bat (only once, it will start even when you restart your computer. you can see the process as "autouploader.exe" in your taskmanager)</li>
12+
<!--li>Paste this code: <span class="token"><%= current_user.access_token %></span> into the Upload key field in the Auto-uploader window.</li-->
13+
<li>Play Starcraft! The auto-uploader will watch for any new replays and upload them to GGGReplays.</li>
1514
<% end %>
1615

1716

18-
<% if true %>
17+
<% if false %>
1918

2019

2120
</ol>

app/views/dialogs/_join_aio.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="form form-join">
2-
<div class="logo logo30"><em>GG</em>TRACKER</div>
2+
<div class="logo logo30"><em>GGG</em>Replays</div>
33

44
<%= semantic_form_for(resource, :method => 'post', :url => registration_path(:user)) do |f| %>
55
<%= f.inputs do %>
@@ -14,7 +14,7 @@
1414
</div>
1515

1616
<div class="form form-login">
17-
<div class="logo logo30"><em>GG</em>TRACKER</div>
17+
<div class="logo logo30"><em>GGG</em>Replays</div>
1818
<%= semantic_form_for(resource, :as => :user, :url => session_path(:user)) do |f| %>
1919
<span class="inline-errors"><%= flash[:alert] if flash[:alert] %></span>
2020

@@ -37,7 +37,7 @@
3737
</div>
3838

3939
<div class="form form-password">
40-
<div class="logo logo30"><em>GG</em>TRACKER</div>
40+
<div class="logo logo30"><em>GGG</em>Replays</div>
4141

4242
<%= semantic_form_for(resource, :url => password_path(:user), :html => { :method => :post }) do |f| %>
4343
<%= f.inputs do %>

app/views/home/_support.html

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<style>
2+
body{
3+
margin:1em auto;
4+
//max-width:40em;
5+
padding:0.62em;
6+
}
7+
article {
8+
font:1.2em/1.62 sans-serif;
9+
}
10+
11+
h15,h25,h35 {
12+
line-height:1.2;
13+
}
14+
@media print2{
15+
body{
16+
max-width:none
17+
}
18+
}
19+
</style>
20+
21+
<article>
22+
<p>Hello!<br> Thanks for clicking Support! There are many ways to support us, as you can see from this and some other badly formatted pages here, we don't have a lot of
23+
manpower, but we have a lot of work. We want to make sure that the site works as well as possible, so styling comes later.
24+
<br>If you have html, css or other helpful skills,
25+
please contact us at [email protected] !
26+
<br> Another good way to help is to submit errors on this site, testing the site, thinking or programming new features and so on.
27+
<br>And of course, money also helps a lot. We are small startup and every cent will make things go faster and more reliable. The server for now is not that expensive, but if more users,
28+
as we hope, will come to this site, we will need to upgrade. So, for anything you can spare, thank you very much!
29+
<br>The green button will take you to Paypal, where you can enter any amount you want.
30+
<br><br>
31+
Best,<br>
32+
Soeren Klett (founder of GeeGeeGaming)
33+
<br><br>
34+
<a class="action button" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9N9BR2GZMFJVC">Support GGGReplays via Paypal</a></li>
35+
36+
<% if false %>
37+
38+
<br><br>
39+
<ul class="instructions">
40+
<li>asdasdsc2gears auto-upload<a href="https://twitter.com/Dougcope" class="ggtipper2 tiny" style="vertical-align:super" title="thanks to Doug Copestake">*</a></li>
41+
<li>multiple battle.net accounts</li>
42+
<li>unlimited web replay uploads</li>
43+
<li>a <span class="tooltipped icon icon-star-32"></span> on your GGGReplays profile</li>
44+
<li>your clan logo or graphic on your GGGReplays profile if you want</li>
45+
<li>the satisfaction of knowing you're making eSports more awesome</li>
46+
<br>
47+
<li>private replays? <span class="tiny">if you would like this, let me know and I will add the capability to the site.</span></li>
48+
</ul>
49+
</p>
50+
<br><br>
51+
<p>
52+
</p>
53+
<br><br><br><br><br><br><br>
54+
<p class="small">Players who are currently Grandmaster are entitled to GGGReplays Pro for free. Just email us at [email protected] or <a href="http://twitter.com/GGGReplays_SC2">tweet</a>.</p><br>
55+
<!-- https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=88MLJG4NCAELL -->
56+
<!--p class="small">We also offer an <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=88MLJG4NCAELL&custom=<% if current_user.present? %>custom=<%= current_user.id %><% end %>">Annual Subscription</a> for $40/year.</p><br-->
57+
<p class="small">If GGTracker Pro isn't for you, you can still help by telling three friends. &nbsp;&nbsp; (Hat tip <a href="http://www.twitch.tv/tumescentpie">TumescentPie</a>)</p>
58+
<% end %>
59+
</article>

app/views/home/arium.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<div id="static">
77
<div class="content spending_skill">
8-
<p>GGTracker is proud to showcase <a href="https://twitter.com/SEEDArium">SEEDArium</a>'s <a href="players/722580">Grandmaster ladder matches</a> for you to study and learn from.</p>
8+
<p>GGGReplays is proud to showcase <a href="https://twitter.com/SEEDArium">SEEDArium</a>'s <a href="players/722580">Grandmaster ladder matches</a> for you to study and learn from.</p>
99
<p><a href="players/722580">Check them out!</a></p>
1010
<br><br>
1111
<p>And here's one of his recent VODs.</p>

0 commit comments

Comments
 (0)