Skip to content
This repository was archived by the owner on Feb 25, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Pong-Game
Submodule Pong-Game added at 5ac99d
1 change: 1 addition & 0 deletions VisualGit_SE701_2019_3
Submodule VisualGit_SE701_2019_3 added at eed8a4
2 changes: 1 addition & 1 deletion app/components/authenticate/authenticate.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h1>VisualGit</h1>

<br>
<div>
<button type="submit" style="width:280px;" class="btn btn-success" (click)="switchToMainPanel()">Sign In</button>
<button id="signinbut" type="submit" style="width:280px;" class="btn btn-success" (click)="switchToMainPanel()">Sign In</button>
Comment thread
0608jennylee marked this conversation as resolved.
Outdated
<br>
</div>

Expand Down
3 changes: 3 additions & 0 deletions app/components/graphPanel/graph.panel.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ <h4 class="modal-title">Merge branches</h4>
<button type="button" class="btn btn-primary" (click)="mergeBranches()" data-dismiss="modal">Yes</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
</div>
<div>
<img id="img" src='#'>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div>
Expand Down
20 changes: 19 additions & 1 deletion app/misc/authenticate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,22 @@ function getUserInfo(callback) {
var ghme = client.me();
ghme.info(function(err, data, head) {
if (err) {
displayModal(err);
if (err == "Error: Bad credentials" || "Error: Requires authentication"){
$('#username').css('border-color', 'red');
$('#password').css('border-color', 'red');
var username = document.getElementById('username');
var password = document.getElementById('password');
username.classList.add('error');
password.classList.add('error');

// remove the class after the animation completes
setTimeout(function() {
username.classList.remove('error');
password.classList.remove('error');
}, 300);
}else{
displayModal(err);
}
} else {
// assigning the check box to a variable to check the value
let rememberLogin: any = (<HTMLInputElement>document.getElementById("rememberLogin"));
Expand Down Expand Up @@ -238,6 +253,9 @@ function cloneRepo() {
$('#repo-modal').modal('hide');

switchToMainPanel();
let butt = document.getElementById("cloneButton");
butt.innerHTML = 'Clone';
butt.setAttribute('class', 'btn btn-primary');
}

function signInOrOut() {
Expand Down
Binary file added app/misc/pexels-photo-414612.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions app/misc/repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ function downloadFunc(cloneURL, fullLocalPath) {
updateProgressBar(0);
console.log("Repo successfully cloned");
displayModal("Drawing graph, please wait");

// var src = "pexels-photo-414612.jpeg"
// var docs = document.getElementById("img");
// docs.setAttribute("src", src);

Comment thread
0608jennylee marked this conversation as resolved.
Outdated
refreshAll(repository);
updateModalText("Clone Successful, repository saved under: " + fullLocalPath);
addCommand("git clone " + cloneURL + " " + fullLocalPath);
Expand Down
3 changes: 3 additions & 0 deletions app/misc/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ function checkSignedIn() {
$('#repo-name').removeAttr("data-target");
} else {
// Ensure repo modal is connected
let butt = document.getElementById("cloneButton");
butt.innerHTML = 'Clone';
butt.setAttribute('class', 'btn btn-primary');
$('#repo-name').attr("data-target", "#repo-modal");
}
}
Expand Down
1 change: 1 addition & 0 deletions dummy
Submodule dummy added at 6183d6
12 changes: 12 additions & 0 deletions stylesheets/styles.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
.error {
position: relative;
animation: shake .1s linear;
animation-iteration-count: 3;
}

@keyframes shake {
0% { left: -5px; }
100% { right: -5px; }
}


p, h1 {
color: #ccc;
font-family: 'Montserrat', sans-serif;
Expand Down