forked from terrychen1122/JClient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile.html
159 lines (143 loc) · 9.54 KB
/
profile.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
<!DOCTYPE html>
<html lang="en" ng-app="jackalApp">
<head>
<title>Profile</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="/resources/bootstrap/css/bootstrap.css" />
<link type="text/css" rel="stylesheet" href="/resources/bootstrap/css/bootstrap.min.css" />
<link type="text/css" rel="stylesheet" href="/resources/profile/profile.css" />
<style>
@import url(https://fonts.googleapis.com/css?family=Lato:300italic,700italic,300,700);
</style>
</head>
<body ng-controller="DatabaseCtrl">
<div class="navbar navbar-inverse navbar-static-top ui-nav">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">Jackal</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="#" ng-show="user">Welcome, {{user.username}}!</a></li>
<li><a ng-click="login()" ng-hide="user">Login with Github</a></li>
<li><a ng-click="logout()" style="font-size: 1em;">Log out</a></li>
</ul>
</div>
</div>
</div>
<div class="container" >
<div class="row">
<div class="well col-md-3 side-bar">
<ul class="side-bar-items">
<li><a href="javascript:void(0)" id="myCode">My Code <span class="glyphicon glyphicon-chevron-right"></span></a></li>
<li><a href="javascript:void(0)" id="sharedCode">Shared Code <span class="glyphicon glyphicon-chevron-right"></span></a></li>
<li><a href="javascript:void(0)" id="help">Help <span class="glyphicon glyphicon-chevron-right"></span></a></li>
</ul>
</div>
<div class="col-md-9 main-section">
<div class="tools">
<a href="console.html" class="btn btn-default" id="createSession"><span class="glyphicon glyphicon-file"></span> Create new session</a>
<!-- <form role="form" class="search-bar col-md-4">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search your code">
<span class="input-group-btn">
<button class="btn btn-default" type="button">Search</button>
</span>
</div>
</form>-->
</div>
<div class="" id="myCodeSession">
<h2>My Code</h2>
<hr>
<div class="file-row row" ng-repeat="session in myPrivateSessions">
<p class="col-md-2 title"><a href="console.html?{{session.$id}}?{{user.uid}}">{{session.title}}</a></p>
<p class="col-md-3">Last edited {{session.lastChanged | date:'short'}}</p>
<p class="col-md-6 fork-detail" ng-hide="session.forkedFrom">Created {{session.created | date:'short'}}</p>
<p class="col-md-6 fork-detail" ng-show="session.forkedFrom">
<a href="console.html?{{session.forkedFrom.split('|')[1]}}?{{session.forkedFrom.split('|')[0]}}">
Forked from {{session.forkedFrom.split('|')[0]}}: {{session.forkedFrom.split('|')[1]}}
</a>
</p>
<button type="button" data-toggle="modal" data-target="#editModal" class="btn btn-default btn-sm" ng-click="setActive(session.$id, session, false)">
<span class="glyphicon glyphicon-info-sign" ></span>
</button>
</div>
<div class="file-row row" ng-repeat="session in myPublicSessions">
<p class="col-md-2 title"><a href="console.html?{{session.$id}}?{{user.uid}}">{{session.title}}</a></p>
<p class="col-md-3">Last edited {{session.lastChanged | date:'short'}}</p>
<p class="col-md-6 fork-detail" ng-hide="session.forkedFrom">Created {{session.created | date:'short'}}</p>
<p class="col-md-6 fork-detail" ng-show="session.forkedFrom">
<a href="console.html?{{session.forkedFrom.split('|')[1]}}?{{session.forkedFrom.split('|')[0]}}">
Forked from {{session.forkedFrom.split('|')[0]}}: {{session.forkedFrom.split('|')[1]}}
</a>
</p>
<button type="button" data-toggle="modal" data-target="#editModal" class="btn btn-default btn-sm" ng-click="setActive(session.$id, session, true)">
<span class="glyphicon glyphicon-info-sign" ></span>
</button>
</div>
</div>
<div class="" id="sharedCodeSession">
<h2>Shared Code</h2>
<hr>
<div class="file-row row" ng-repeat="session in myPublicSessions">
<p class="col-md-2 title"><a href="console.html?{{session.$id}}?{{user.uid}}">{{session.title}}</a></p>
<p class="col-md-3">Last edited {{session.lastChanged | date:'short'}}</p>
<p class="col-md-6 fork-detail" ng-hide="session.forkedFrom">Created {{session.created | date:'short'}}</p>
<p class="col-md-6 fork-detail" ng-show="session.forkedFrom">
<a href="console.html?{{session.forkedFrom.split('|')[1]}}?{{session.forkedFrom.split('|')[0]}}">
Forked from {{session.forkedFrom.split('|')[0]}}: {{session.forkedFrom.split('|')[1]}}
</a>
</p>
<button type="button" data-toggle="modal" data-target="#editModal" class="btn btn-default btn-sm" ng-click="setActive(session.$id, session, true)">
<span class="glyphicon glyphicon-info-sign" ></span>
</button>
</div>
</div>
<div class="" id="helpSession">
<h2>Help</h2>
<hr>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="editModal" tabindex="-1" role="dialog" >
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 class="modal-title">Edit</h3>
</div>
<div class="modal-body">
<div class="input-group">
<span class="input-group-addon">Title</span>
<input type="text" class="form-control" ng-model="active.title">
</div>
<input type="checkbox" ng-model="active.public"> Public
</div>
<div class="modal-footer">
<button type="button" class="btn btn-defualt btn-sm" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary btn-sm" ng-click="saveSession()" data-dismiss="modal">Save</button>
<button type="button" class="btn btn-danger btn-sm" ng-click="removeSession()" data-dismiss="modal">Delete</button>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="application/javascript" src="/resources/bootstrap/js/jquery.js" ></script>
<script type="application/javascript" src="/resources/bootstrap/js/bootstrap.js" ></script>
<script type="application/javascript" src="/resources/bootstrap/js/bootstrap.min.js"></script>
<script type="application/javascript" src="/resources/profile/profile.js" ></script>
<script type="application/javascript" src="/resources/server/angular.js"></script>
<script src='https://cdn.firebase.com/v0/firebase.js'></script>
<script src="https://cdn.firebase.com/v0/firebase-simple-login.js"></script>
<script src='https://cdn.firebase.com/libs/angularfire/0.3.0/angularfire.min.js'></script>
<script type="application/javascript" src="/resources/server/app.js"></script>
<script>
</script>
</body>
</html>