mirror of
https://git.teknik.io/Teknikode/Teknik.git
synced 2023-08-02 14:16:22 +02:00
Make URL shortener a user only feature
This commit is contained in:
parent
67e3446aa3
commit
aa2bf56361
@ -41,6 +41,11 @@
|
|||||||
<td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td>
|
<td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td>
|
||||||
<td class="text-center"><i class="fa fa-times fa-2x text-danger"></i></td>
|
<td class="text-center"><i class="fa fa-times fa-2x text-danger"></i></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="text-left">Url Shortening</td>
|
||||||
|
<td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td>
|
||||||
|
<td class="text-center"><i class="fa fa-check fa-2x text-danger"></i></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="text-left">Vault and Paste Editing</td>
|
<td class="text-left">Vault and Paste Editing</td>
|
||||||
<td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td>
|
<td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td>
|
||||||
@ -96,11 +101,6 @@
|
|||||||
<td class="text-center">Never</td>
|
<td class="text-center">Never</td>
|
||||||
<td class="text-center">24 Hours</td>
|
<td class="text-center">24 Hours</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td class="text-left">Url Shortening</td>
|
|
||||||
<td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td>
|
|
||||||
<td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="text-left">Vault Creation</td>
|
<td class="text-left">Vault Creation</td>
|
||||||
<td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td>
|
<td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td>
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="@Url.SubRouteUrl("upload", "Upload.Index")">
|
<a href="@Url.SubRouteUrl("upload", "Upload.Index")">
|
||||||
<div class="col-md-2 col-lg-offset-1 text-center">
|
<div class="col-md-3 col-lg-offset-1 text-center">
|
||||||
<br />
|
<br />
|
||||||
<i class="fa fa-lock fa-5x"></i>
|
<i class="fa fa-lock fa-5x"></i>
|
||||||
<div class="caption">
|
<div class="caption">
|
||||||
@ -42,7 +42,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<a href="@Url.SubRouteUrl("paste", "Paste.Index")">
|
<a href="@Url.SubRouteUrl("paste", "Paste.Index")">
|
||||||
<div class="col-md-2 text-center">
|
<div class="col-md-3 text-center">
|
||||||
<br />
|
<br />
|
||||||
<i class="fa fa-code fa-5x"></i>
|
<i class="fa fa-code fa-5x"></i>
|
||||||
<div class="caption">
|
<div class="caption">
|
||||||
@ -51,7 +51,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<a href="@Url.SubRouteUrl("podcast", "Podcast.Index")">
|
<a href="@Url.SubRouteUrl("podcast", "Podcast.Index")">
|
||||||
<div class="col-md-2 text-center">
|
<div class="col-md-3 text-center">
|
||||||
<br />
|
<br />
|
||||||
<i class="fa fa-microphone fa-5x"></i>
|
<i class="fa fa-microphone fa-5x"></i>
|
||||||
<div class="caption">
|
<div class="caption">
|
||||||
@ -59,17 +59,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<a href="@Url.SubRouteUrl("shorten", "Shortener.Index")">
|
|
||||||
<div class="col-md-2 text-center">
|
|
||||||
<br />
|
|
||||||
<i class="fa fa-link fa-5x"></i>
|
|
||||||
<div class="caption">
|
|
||||||
<h3>Url Shortener</h3>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
<a href="@Url.SubRouteUrl("vault", "Vault.NewVault")">
|
<a href="@Url.SubRouteUrl("vault", "Vault.NewVault")">
|
||||||
<div class="col-md-2 text-center">
|
<div class="col-md-3 text-center">
|
||||||
<br />
|
<br />
|
||||||
<i class="fa fa-archive fa-5x"></i>
|
<i class="fa fa-archive fa-5x"></i>
|
||||||
<div class="caption">
|
<div class="caption">
|
||||||
@ -93,7 +84,7 @@
|
|||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<a conditional href="@Url.SubRouteUrl("upload", "Upload.Index")" asp-condition="@User.Identity.IsAuthenticated">
|
<a conditional href="@Url.SubRouteUrl("upload", "Upload.Index")" asp-condition="@User.Identity.IsAuthenticated">
|
||||||
<div class="col-md-3 text-center text-primary">
|
<div class="col-md-2 text-center text-primary">
|
||||||
<br />
|
<br />
|
||||||
<i class="fa fa-clock-o fa-5x"></i>
|
<i class="fa fa-clock-o fa-5x"></i>
|
||||||
<div class="caption">
|
<div class="caption">
|
||||||
@ -102,7 +93,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<a conditional href="@Config.GitConfig.Host" asp-condition="@User.Identity.IsAuthenticated">
|
<a conditional href="@Config.GitConfig.Host" asp-condition="@User.Identity.IsAuthenticated">
|
||||||
<div class="col-md-3 text-center text-primary">
|
<div class="col-md-2 text-center text-primary">
|
||||||
<br />
|
<br />
|
||||||
<i class="fa fa-git fa-5x"></i>
|
<i class="fa fa-git fa-5x"></i>
|
||||||
<div class="caption">
|
<div class="caption">
|
||||||
@ -111,7 +102,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<a conditional href="@Url.SubRouteUrl("blog", "Blog.Blog", new { username = User.Identity.Name })" asp-condition="@User.Identity.IsAuthenticated">
|
<a conditional href="@Url.SubRouteUrl("blog", "Blog.Blog", new { username = User.Identity.Name })" asp-condition="@User.Identity.IsAuthenticated">
|
||||||
<div class="col-md-3 text-center text-primary">
|
<div class="col-md-2 text-center text-primary">
|
||||||
<br />
|
<br />
|
||||||
<i class="fa fa-book fa-5x"></i>
|
<i class="fa fa-book fa-5x"></i>
|
||||||
<div class="caption">
|
<div class="caption">
|
||||||
@ -119,8 +110,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
<a href="@Url.SubRouteUrl("shorten", "Shortener.Index")" asp-condition="@User.Identity.IsAuthenticated">
|
||||||
|
<div class="col-md-2 text-center">
|
||||||
|
<br />
|
||||||
|
<i class="fa fa-link fa-5x"></i>
|
||||||
|
<div class="caption">
|
||||||
|
<h3>Url Shortener</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
<a conditional href="@Url.SubRouteUrl("account", "User.ViewServiceData")" asp-condition="@User.Identity.IsAuthenticated">
|
<a conditional href="@Url.SubRouteUrl("account", "User.ViewServiceData")" asp-condition="@User.Identity.IsAuthenticated">
|
||||||
<div class="col-md-3 text-center text-primary">
|
<div class="col-md-2 text-center text-primary">
|
||||||
<br />
|
<br />
|
||||||
<i class="fa fa-database fa-5x"></i>
|
<i class="fa fa-database fa-5x"></i>
|
||||||
<div class="caption">
|
<div class="caption">
|
||||||
|
@ -24,7 +24,6 @@ namespace Teknik.Areas.Shortener.Controllers
|
|||||||
{
|
{
|
||||||
public ShortenerController(ILogger<Logger> logger, Config config, TeknikEntities dbContext) : base(logger, config, dbContext) { }
|
public ShortenerController(ILogger<Logger> logger, Config config, TeknikEntities dbContext) : base(logger, config, dbContext) { }
|
||||||
|
|
||||||
[AllowAnonymous]
|
|
||||||
[TrackPageView]
|
[TrackPageView]
|
||||||
public IActionResult Index()
|
public IActionResult Index()
|
||||||
{
|
{
|
||||||
@ -49,7 +48,6 @@ namespace Teknik.Areas.Shortener.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[AllowAnonymous]
|
|
||||||
public IActionResult ShortenUrl(string url)
|
public IActionResult ShortenUrl(string url)
|
||||||
{
|
{
|
||||||
if (url.IsValidUrl())
|
if (url.IsValidUrl())
|
||||||
|
Loading…
Reference in New Issue
Block a user