Skip to content

Commit 9caf683

Browse files
committed
preparing for first customer use
1 parent d6bdca1 commit 9caf683

File tree

4 files changed

+12
-18
lines changed

4 files changed

+12
-18
lines changed

gg.ico

-30.2 KB
Binary file not shown.

src/com/ggtracker/uploader/MainFrame.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,8 @@ public void actionPerformed( final ActionEvent event ) {
129129
contentBox.add( row );
130130
contentBox.add( Box.createVerticalStrut( SPACING ) );
131131
row = Box.createHorizontalBox();
132-
row.add( new JLabel( "User name:" ) );
133-
row.add( Utils.createSettingTextField( Settings.KEY_USER_NAME ) );
134-
contentBox.add( row );
135-
contentBox.add( Box.createVerticalStrut( SPACING ) );
136-
row = Box.createHorizontalBox();
137132
row.add( new JLabel( "Upload key:" ) );
138-
row.add( Utils.createSettingTextField( Settings.KEY_UPLOAD_KEY ) );
133+
row.add( Utils.createSettingTextField( Settings.KEY_AUTH_TOKEN) );
139134
contentBox.add( row );
140135
Utils.formLayoutBox( contentBox, 1 );
141136

@@ -158,7 +153,7 @@ public void actionPerformed( final ActionEvent event ) {
158153

159154
contentBox.add( Box.createVerticalStrut( SPACING ) );
160155
wrapper = new JPanel( new FlowLayout( FlowLayout.RIGHT, 0, 0 ) );
161-
wrapper.add( Utils.createLinkLabel("Online Help", Consts.ONLINE_HELP_LINK));
156+
// wrapper.add( Utils.createLinkLabel("Online Help", Consts.ONLINE_HELP_LINK));
162157
wrapper.add( Box.createHorizontalStrut( 20 ) );
163158
final JButton exitButton = new JButton( "Quit and Stop Uploading Replays" );
164159
exitButton.addActionListener( new ActionListener() {
@@ -169,7 +164,7 @@ public void actionPerformed( final ActionEvent event ) {
169164
} );
170165
wrapper.add( exitButton );
171166
wrapper.add( Box.createHorizontalStrut( 10 ) );
172-
wrapper.add( Utils.createLinkLabel( Consts.APP_VERSION, Consts.ABOUT_UPLOADER_LINK ) );
167+
// wrapper.add( Utils.createLinkLabel( Consts.APP_VERSION, Consts.ABOUT_UPLOADER_LINK ) );
173168
contentBox.add( wrapper );
174169

175170
Utils.alignBox( contentBox, SwingConstants.CENTER );

src/com/ggtracker/uploader/ReplayFolderMonitor.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,9 @@ private File getLastReplay( final File startFolder ) {
145145

146146
/** Name of the request version parameter. */
147147
private static final String PARAM_NAME_REQUEST_VERSION = "requestVersion";
148-
/** Name of the user name parameter. */
149-
private static final String PARAM_NAME_USER_NAME = "userName";
150-
/** Name of the password parameter. */
151-
private static final String PARAM_NAME_PASSWORD = "password";
148+
149+
private static final String PARAM_NAME_AUTH_TOKEN = "accessToken";
150+
152151
/** Name of the description parameter. */
153152
private static final String PARAM_NAME_DESCRIPTION = "description";
154153
/** Name of the file name parameter. */
@@ -197,12 +196,13 @@ private void uploadNewReplay( final File lastReplayFile ) {
197196
paramsMap.put( PARAM_NAME_FILE_NAME , lastReplayFile.getName() );
198197
paramsMap.put( PARAM_NAME_FILE_SIZE , Long.toString( lastReplayFile.length() ) );
199198
paramsMap.put( PARAM_NAME_DESCRIPTION , "" ); // Not used
200-
paramsMap.put( PARAM_NAME_USER_NAME , Settings.get( Settings.KEY_USER_NAME ) );
201-
paramsMap.put( PARAM_NAME_PASSWORD , Settings.get( Settings.KEY_UPLOAD_KEY ) );
199+
// paramsMap.put( PARAM_NAME_USER_NAME , Settings.get( Settings.KEY_USER_NAME ) );
200+
paramsMap.put( PARAM_NAME_AUTH_TOKEN , Settings.get( Settings.KEY_AUTH_TOKEN ) );
201+
// paramsMap.put( PARAM_NAME_PASSWORD , Settings.get( Settings.KEY_UPLOAD_KEY ) );
202202
paramsMap.put( PARAM_NAME_FILE_MD5 , fileMd5 );
203203
paramsMap.put( PARAM_NAME_FILE_CONTENT , fileBase64 );
204204

205-
httpPost = new HttpPost( "http://ggtracker.com/api/upload", paramsMap );
205+
httpPost = new HttpPost( "http://ggtracker.com/replays/drop", paramsMap );
206206

207207
if ( !httpPost.connect() ) {
208208
System.out.println( "Failed to connect!" );

src/com/ggtracker/uploader/Settings.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@ public class Settings {
2525
public static final File SETTINGS_FILE = new File( Consts.FOLDER_USER_CONTENT, "settings.xml" );
2626

2727

28-
/** Replay folder setting. */
2928
public static final String KEY_REPLAY_FOLDER = "replayFolder";
30-
/** User name setting. */
3129
public static final String KEY_USER_NAME = "userName";
32-
/** Upload key setting. */
3330
public static final String KEY_UPLOAD_KEY = "uploadKey";
31+
public static final String KEY_AUTH_TOKEN = "authToken";
32+
3433
/** Saved with version setting. */
3534
public static final String KEY_META_SAVED_WITH_VERSION = "meta.savedWithVersion";
3635
/** Save time setting. */

0 commit comments

Comments
 (0)