Label component for field level help
This commit is contained in:
@ -8,6 +8,7 @@ using Oqtane.Shared;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Oqtane.Infrastructure.Interfaces;
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
|
||||
namespace Oqtane.Infrastructure
|
||||
{
|
||||
@ -15,11 +16,13 @@ namespace Oqtane.Infrastructure
|
||||
{
|
||||
private readonly IHostApplicationLifetime _hostApplicationLifetime;
|
||||
private readonly IWebHostEnvironment _environment;
|
||||
private readonly IMemoryCache _cache;
|
||||
|
||||
public InstallationManager(IHostApplicationLifetime hostApplicationLifetime, IWebHostEnvironment environment)
|
||||
public InstallationManager(IHostApplicationLifetime hostApplicationLifetime, IWebHostEnvironment environment, IMemoryCache cache)
|
||||
{
|
||||
_hostApplicationLifetime = hostApplicationLifetime;
|
||||
_environment = environment;
|
||||
_cache = cache;
|
||||
}
|
||||
|
||||
public void InstallPackages(string folders, bool restart)
|
||||
@ -107,8 +110,15 @@ namespace Oqtane.Infrastructure
|
||||
|
||||
if (install && restart)
|
||||
{
|
||||
// restart application
|
||||
RestartApplication();
|
||||
if (restart)
|
||||
{
|
||||
RestartApplication();
|
||||
}
|
||||
else
|
||||
{
|
||||
_cache.Remove("moduledefinitions");
|
||||
_cache.Remove("jobs");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,7 @@ namespace Oqtane.Repository
|
||||
{
|
||||
_db.Job.Add(job);
|
||||
_db.SaveChanges();
|
||||
_cache.Remove("jobs");
|
||||
return job;
|
||||
}
|
||||
|
||||
@ -38,6 +39,7 @@ namespace Oqtane.Repository
|
||||
{
|
||||
_db.Entry(job).State = EntityState.Modified;
|
||||
_db.SaveChanges();
|
||||
_cache.Remove("jobs");
|
||||
return job;
|
||||
}
|
||||
|
||||
@ -51,6 +53,7 @@ namespace Oqtane.Repository
|
||||
Job job = _db.Job.Find(jobId);
|
||||
_db.Job.Remove(job);
|
||||
_db.SaveChanges();
|
||||
_cache.Remove("jobs");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -110,3 +110,68 @@ app {
|
||||
padding: inherit;
|
||||
vertical-align: inherit;
|
||||
}
|
||||
|
||||
/* Tooltips */
|
||||
.app-tooltip {
|
||||
cursor: help;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.app-tooltip::before,
|
||||
.app-tooltip::after {
|
||||
left: 50%;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
z-index: -100;
|
||||
}
|
||||
|
||||
.app-tooltip:hover::before,
|
||||
.app-tooltip:focus::before,
|
||||
.app-tooltip:hover::after,
|
||||
.app-tooltip:focus::after {
|
||||
opacity: 1;
|
||||
transform: scale(1) translateY(0);
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.app-tooltip::before {
|
||||
border-style: solid;
|
||||
border-width: 1em 0.75em 0 0.75em;
|
||||
border-color: #3E474F transparent transparent transparent;
|
||||
bottom: 100%;
|
||||
content: "";
|
||||
margin-left: -0.5em;
|
||||
transition: all .65s cubic-bezier(.84,-0.18,.31,1.26), opacity .65s .5s;
|
||||
transform: scale(.6) translateY(-90%);
|
||||
}
|
||||
|
||||
.app-tooltip:hover::before,
|
||||
.app-tooltip:focus::before {
|
||||
transition: all .65s cubic-bezier(.84,-0.18,.31,1.26) .2s;
|
||||
}
|
||||
|
||||
.app-tooltip::after {
|
||||
background: #3E474F;
|
||||
border-radius: .25em;
|
||||
bottom: 180%;
|
||||
color: #EDEFF0;
|
||||
content: attr(data-tip);
|
||||
margin-left: -8.75em;
|
||||
padding: 1em;
|
||||
transition: all .65s cubic-bezier(.84,-0.18,.31,1.26) .2s;
|
||||
transform: scale(.6) translateY(50%);
|
||||
width: 17.5em;
|
||||
}
|
||||
|
||||
.app-tooltip:hover::after,
|
||||
.app-tooltip:focus::after {
|
||||
transition: all .65s cubic-bezier(.84,-0.18,.31,1.26);
|
||||
}
|
||||
|
||||
@media (max-width: 760px) {
|
||||
.app-tooltip::after {
|
||||
font-size: .75em;
|
||||
margin-left: -5em;
|
||||
width: 10em;
|
||||
}
|
||||
}
|
BIN
Oqtane.Server/wwwroot/images/help.png
Normal file
BIN
Oqtane.Server/wwwroot/images/help.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 801 B |
Reference in New Issue
Block a user