Skip to content
This repository was archived by the owner on Dec 8, 2022. It is now read-only.

Commit 3f2b16a

Browse files
authored
Merge pull request #159 from hackuci/develop
Merging the home page button and lottery fixes
2 parents a816a7f + 86e41a1 commit 3f2b16a

File tree

9 files changed

+7621
-17228
lines changed

9 files changed

+7621
-17228
lines changed

app/.DS_Store

0 Bytes
Binary file not shown.

app/client/src/constants.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ angular.module('reg')
1313
.constant('DASHBOARD', {
1414
UNVERIFIED: 'You should have received an email asking you verify your email. Click the link in the email and you can start your application!',
1515
INCOMPLETE_TITLE: 'You still need to complete your application!',
16-
INCOMPLETE: 'If you do not complete your application before the [APP_DEADLINE], you will not be considered for the admissions lottery!',
16+
INCOMPLETE: 'If you do not complete your application before the [APP_DEADLINE], you will not be considered for admissions!',
1717
SUBMITTED_TITLE: 'Your application has been submitted!',
1818
SUBMITTED: 'Feel free to edit it at any time. However, once registration is closed, you will not be able to edit it any further.\nPlease make sure your information is accurate before registration is closed!',
19-
CLOSED_AND_INCOMPLETE_TITLE: 'Unfortunately, registration has closed, and the lottery process has begun.',
20-
CLOSED_AND_INCOMPLETE: 'Because you have not completed your profile in time, you will not be eligible for the lottery process.',
19+
CLOSED_AND_INCOMPLETE_TITLE: 'Unfortunately, registration has closed, and the admissions process has begun.',
20+
CLOSED_AND_INCOMPLETE: '',
2121
ADMITTED_AND_CAN_CONFIRM_TITLE: 'You must confirm by [CONFIRM_DEADLINE].',
2222
ADMITTED_AND_CANNOT_CONFIRM_TITLE: 'Your confirmation deadline of [CONFIRM_DEADLINE] has passed.',
2323
ADMITTED_AND_CANNOT_CONFIRM: 'Although you were accepted, you did not complete your confirmation in time.\nUnfortunately, this means that you will not be able to attend the event, as we must begin to accept other applicants on the waitlist.\nWe hope to see you again next year!',

app/client/stylesheets/_dashboard.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,10 @@
7676
}
7777
}
7878
}
79+
80+
#closed-and-incomplete {
81+
display: flex;
82+
flex-direction: column;
83+
align-items: center;
84+
}
7985
}

app/client/views/dashboard/dashboard.html

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

110110
</div>
111111

112-
<div
112+
<div id="closed-and-incomplete"
113113
ng-if="dashState('closedAndIncomplete')">
114114
<p>
115115
<strong>

app/client/views/home/home.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
<span class="hero-description">COMING SOON</span>
1616
</div>
1717
<div class="hero-button-container">
18-
<a href="http://eepurl.com/duUhsD" target="_blank" class="btn">
18+
<a href="" target="_blank" class="btn">
1919
<i class="fa fa-flag" aria-hidden="true"></i>
20-
STAY NOTIFIED
20+
COMING SOON
2121
</a>
2222
<!-- <a ui-sref="app.recruit" class="btn">
2323
<i class="fa fa-rocket" aria-hidden="true"></i>
@@ -48,7 +48,7 @@
4848
<section id="info" class="center">
4949
<div id="info-content">
5050
<span class="headline">
51-
<span class="bold">400</span> Hackers.
51+
<span class="bold">450</span> Hackers.
5252
</span>
5353
<span class="headline">
5454
<span class="bold">36</span> Hours.
@@ -202,4 +202,4 @@
202202
<a href="https://twitter.com/HackUCI"><i class="fa fa-twitter" aria-hidden="true"></i></a>
203203
</div>
204204
</section>
205-
</div>
205+
</div>

app/server/routes/api.js

Lines changed: 65 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -544,73 +544,73 @@ module.exports = function(router) {
544544
});
545545

546546
// multer S3 object to upload resumes
547-
var upload = multer({
548-
storage: multerS3({
549-
s3: s3,
550-
bucket: s3BucketName,
551-
key: function (req, file, cb) {
552-
var authToken = req.headers['x-access-token'];
553-
jwt.verify(authToken, JWT_SECRET, (err, id) => {
554-
cb(err, id + '.pdf');
555-
});
556-
},
557-
limits: {
558-
fileSize: 512 * 1024, // max upload size is 512kb
559-
}
560-
})
561-
});
547+
// var upload = multer({
548+
// storage: multerS3({
549+
// s3: s3,
550+
// bucket: s3BucketName,
551+
// key: function (req, file, cb) {
552+
// var authToken = req.headers['x-access-token'];
553+
// jwt.verify(authToken, JWT_SECRET, (err, id) => {
554+
// cb(err, id + '.pdf');
555+
// });
556+
// },
557+
// limits: {
558+
// fileSize: 512 * 1024, // max upload size is 512kb
559+
// }
560+
// })
561+
// });
562562

563563
// upload the resume to AWS S3 using the multer object defined above
564-
router.post('/resume/upload', upload.single('file'), (req, res) => {
565-
res.send(200);
566-
});
567-
568-
// get the resume of a given user
569-
router.get('/resume/:id', isOwnerOrAdmin, (req, res) => {
570-
// check to see if you can access this shiz and
571-
// check if the file exists in s3 anddd
572-
// take the id and put it in a jwt with 30 seconds of validity
573-
574-
var id = req.params.id;
575-
var fileName = id + '.pdf';
576-
577-
var s3Params = {
578-
Bucket: s3BucketName,
579-
Key: fileName
580-
};
581-
582-
s3.headObject(s3Params, (err, data) => {
583-
if (err) {
584-
res.sendStatus(404);
585-
} else {
586-
var token = jwt.sign({fileName: fileName}, JWT_SECRET, {expiresIn: '30s'});
587-
res.json({
588-
token: token
589-
});
590-
}
591-
});
592-
});
593-
594-
router.get('/resume/view/:token', (req, res) => {
595-
// get a token returned by the above object
596-
// extract the filename then return the file
597-
598-
var token = req.params.token
599-
jwt.verify(token, JWT_SECRET, (err, data) => {
600-
601-
if (err) {
602-
res.sendStatus(401)
603-
} else {
604-
var s3Params = {
605-
Bucket: s3BucketName,
606-
Key: data.fileName
607-
};
608-
609-
res.setHeader('Content-type', 'application/pdf');
610-
s3.getObject(s3Params).createReadStream().pipe(res);
611-
}
612-
})
613-
});
564+
// router.post('/resume/upload', upload.single('file'), (req, res) => {
565+
// res.send(200);
566+
// });
567+
568+
// // get the resume of a given user
569+
// router.get('/resume/:id', isOwnerOrAdmin, (req, res) => {
570+
// // check to see if you can access this shiz and
571+
// // check if the file exists in s3 anddd
572+
// // take the id and put it in a jwt with 30 seconds of validity
573+
574+
// var id = req.params.id;
575+
// var fileName = id + '.pdf';
576+
577+
// var s3Params = {
578+
// Bucket: s3BucketName,
579+
// Key: fileName
580+
// };
581+
582+
// s3.headObject(s3Params, (err, data) => {
583+
// if (err) {
584+
// res.sendStatus(404);
585+
// } else {
586+
// var token = jwt.sign({fileName: fileName}, JWT_SECRET, {expiresIn: '30s'});
587+
// res.json({
588+
// token: token
589+
// });
590+
// }
591+
// });
592+
// });
593+
594+
// router.get('/resume/view/:token', (req, res) => {
595+
// // get a token returned by the above object
596+
// // extract the filename then return the file
597+
598+
// var token = req.params.token
599+
// jwt.verify(token, JWT_SECRET, (err, data) => {
600+
601+
// if (err) {
602+
// res.sendStatus(401)
603+
// } else {
604+
// var s3Params = {
605+
// Bucket: s3BucketName,
606+
// Key: data.fileName
607+
// };
608+
609+
// res.setHeader('Content-type', 'application/pdf');
610+
// s3.getObject(s3Params).createReadStream().pipe(res);
611+
// }
612+
// })
613+
// });
614614

615615
/* [ADMIN ONLY]
616616
* {

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "JAFRS",
2+
"name": "jafrs",
33
"version": "0.0.0",
44
"homepage": "https://github.com/techx/hackmit-registration",
55
"authors": [

0 commit comments

Comments
 (0)