Skip to content

Commit e67228f

Browse files
committed
Downloading the projects to App_Data
- Minor changes in CSS - Fix for the flickering issue when starting(KnockoutJs issue
1 parent 58da4da commit e67228f

File tree

5 files changed

+24
-7
lines changed

5 files changed

+24
-7
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ obj
99

1010
packages/
1111
logs/
12-
Projects/
12+
App_Data/

SourceCodeReader.Web/Content/Site.css

+15-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,17 @@ body {
2121

2222
.centerstage
2323
{
24-
margin: auto 0;
24+
position: absolute;
25+
top:0;
26+
bottom:0;
27+
width: 100%;
28+
}
29+
30+
.loginscreen {
31+
position: absolute;
32+
top: 30%;
33+
left: 30%;
34+
width: 50%;
2535
}
2636

2737
.projectheader .dockrow
@@ -93,3 +103,7 @@ body {
93103
width: 15px;
94104
}
95105

106+
.hide
107+
{
108+
display: none;
109+
}

SourceCodeReader.Web/Infrastructure/ApplicationConfigurationProvider.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Web;
55
using System.Configuration;
66
using System.IO;
7+
using System.Web.Hosting;
78

89
namespace SourceCodeReader.Web.Infrastructure
910
{
@@ -37,7 +38,7 @@ public string ApplicationRoot
3738
{
3839
get
3940
{
40-
return System.IO.Directory.GetParent(AppDomain.CurrentDomain.BaseDirectory).Parent.FullName;
41+
return Path.Combine(HostingEnvironment.ApplicationPhysicalPath, "App_Data");
4142
}
4243
}
4344

SourceCodeReader.Web/Scripts/App/Application.js

+2
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ function projectInfoViewModel() {
154154
function appViewModel() {
155155
var self = this;
156156

157+
self.isReady = ko.observable(false);
157158
self.projectInfo = ko.observable();
158159
self.project = ko.observable();
159160
self.projectIsActive = ko.observable();
@@ -219,6 +220,7 @@ function appViewModel() {
219220
}).run();
220221

221222
$.connection.hub.start();
223+
self.isReady(true);
222224
};
223225

224226
$(function () {

SourceCodeReader.Web/Views/Home/Index.cshtml

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
<div class="centerstage" id="main">
99

10-
<div data-bind="with: projectInfo">
11-
<label for="projectUrl">Please enter GitHub project Url:</label>
10+
<div data-bind="with: projectInfo" class="loginscreen">
11+
<label for="projectUrl">Enter GitHub Project link (e.g. https://github.com/cvrajeesh/SourceCodeReader)</label>
1212
<input type="text" name="projectUrl" data-bind="value: url, valueUpdate: 'afterkeydown'" class="input-large" />
1313
<span data-bind="visible: hasError">Please enter valid url</span>
1414
<div> <button type="submit" class="btn btn-large" data-bind="click: open, css: { disabled: hasError }, attr: {disabled: hasError}">Open project</button></div>
1515
</div>
16-
<div data-bind="with: project">
16+
<div data-bind="with: project, visible: isReady">
1717
<div class="projectheader dockrow ">
1818
<h3><span data-bind="text: username"></span>/<span data-bind="text: name"></span></h3>
1919
<ul class="breadcrumb" data-bind="foreach: breadcrumbs">
@@ -62,7 +62,7 @@
6262
<div class="statusbar dockrow" data-bind="text: $root.projectStatus">
6363
</div>
6464
</div>
65-
<div data-bind="foreach: findResult">
65+
<div data-bind="foreach: findResult, visible: isReady">
6666
<div><span data-bind="text: FileName"></span> at <span data-bind="text: Position"></span></div>
6767
</div>
6868

0 commit comments

Comments
 (0)