revert async method, its stopping the code from working, more reading/research needed!

improved login dialog.
fixed overflow on pages caused by the footer
got rid of GetType() methods in interfaces.
some general code tidying
This commit is contained in:
chris.watts90@outlook.com 2017-06-22 22:39:08 +01:00
parent c985aae677
commit 14e82f65c3
8 changed files with 31 additions and 50 deletions

View File

@ -1,14 +1,8 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Interfaces
namespace Interfaces
{
public interface INotifierProvider
{
string GetDisplayName();
string GetNotifierType();
void NotifyRaceStarted(NotificationEventArgs args);
void NotifyRaceStarting(NotificationEventArgs args);
void NotifyRaceLapEvent(NotificationEventArgs args, Pilot pilot);

View File

@ -1,14 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Interfaces
namespace Interfaces
{
public interface INotifierProviderFactory
{
INotifierProvider CreateProvider();
string GetType();
}
}

View File

@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;
namespace Interfaces
{

View File

@ -28,11 +28,11 @@ namespace RaceLapTimer
// We don't call "base" here to prevent auto-discovery of
// types/dependencies
// Configure things for a wider purpose, non-requestcontroller based.
container.Bind<IPluginPathProvider>().To<PluginPathProvider>();
container.Bind<IConfigFilePathProvider>().To<ConfigFilePathProvider>();
container.Bind<IContainerHelper>().To<ContainerHelper>();
container.Bind<IDbProvider>().To<TestProvider>().InSingletonScope();
container.Bind<IPluginPathProvider>().To<PluginPathProvider>();
container.Bind<IPluginLocator>().To<PluginLocator>();
container.Bind<IConfigFilePathProvider>().To<ConfigFilePathProvider>();
container.Bind<IDbProvider>().To<TestProvider>().InSingletonScope();
//load dynamic plugins..:
var cfgFilePath = Path.Combine(container.Get<IConfigFilePathProvider>().GetPath, "NinjectConfig.xml");
@ -41,8 +41,8 @@ namespace RaceLapTimer
container.Bind<INotifierManager>().To<NotificationManager>().InSingletonScope();
var nM = container.Get<INotifierManager>();
nM.NotifyRaceStarted(new NotificationEventArgs());
//var nM = container.Get<INotifierManager>();
//nM.NotifyRaceStarted(new NotificationEventArgs());
}
protected override void ConfigureRequestContainer(IKernel container, NancyContext context)

View File

@ -20,12 +20,12 @@ namespace RaceLapTimer.Extensions
_pluginPath = pluginPath;
}
public async Task<List<T>> LocateAsync<T>()
{
return await Task.Run(()=> Locate<T>());
}
//public async List<T> Locate<T>()
//{
// return await Task.Run(()=> Locate<T>());
//}
private List<T> Locate<T>()
public List<T> Locate<T>()
{
if (!Directory.Exists(_pluginPath.GetPluginPath)) return new List<T>();
var files = Directory.GetFiles(_pluginPath.GetPluginPath);

View File

@ -3,7 +3,7 @@
Layout = "razor-layout.cshtml";
}
<link href="/css/login.css" rel="stylesheet" />
<div class="container loginContainer col-md-offset-4 col-md-4">
<div class="container well well-lg col-md-offset-4 col-md-4">
<form method="POST">
Username <input type="text" class="form-control input-sm" name="Username" />
<br />
@ -23,6 +23,6 @@
@if (Model.Errored)
{
<br />
<div id="errorBox" class="alert alert-danger row">Invalid Username or Password</div>
<div id="errorBox" class="alert alert-danger row" style="margin-bottom: 0;">Invalid Username or Password</div>
}
</div>

View File

@ -88,22 +88,20 @@
</div>
</div>
<footer class="footer">
<div class="row">
<div class="col-lg-12">
<ul class="list-unstyled">
<li class="pull-right">
<a class="backtotop" href="#top">Back to top</a>
</li>
</ul>
<p>
Made & Sponsored by
<a href="http://www.airbirds.de" rel="nofollow">AirBirds</a>.
</p>
<p>
Code released under the
<a href="http://www.gnu.org/licenses/gpl-3.0.de.html">GPL V3</a>.
</p>
</div>
<div class="col-lg-12">
<ul class="list-unstyled">
<li class="pull-right">
<a class="backtotop" href="#top">Back to top</a>
</li>
</ul>
<p>
Made & Sponsored by
<a href="http://www.airbirds.de" rel="nofollow">AirBirds</a>.
</p>
<p>
Code released under the
<a href="http://www.gnu.org/licenses/gpl-3.0.de.html">GPL V3</a>.
</p>
</div>
</footer>
</body>

View File

@ -4,13 +4,13 @@
}
body {
/* Margin bottom by footer height */
margin-bottom: 60px;
margin-bottom: 70px;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 60px;
height: 70px;
background-color: #f5f5f5;
}