Skip to content

Refactor and add libs to local folder #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AspNetCoreHero.ToastNotification.Abstractions
namespace AspNetCoreHero.ToastNotification.Abstractions
{
public interface ITempDataService
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AspNetCoreHero.ToastNotification.Abstractions
namespace AspNetCoreHero.ToastNotification.Abstractions
{
public interface IToastNotificationService
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using AspNetCoreHero.ToastNotification.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AspNetCoreHero.ToastNotification.Abstractions
{
Expand All @@ -13,7 +8,7 @@ public Notification(ToastNotificationType type, string message, int? durationInS
{
Message = message;
Type = type;
Duration = (durationInSeconds == null || durationInSeconds == 0) ? null : durationInSeconds * 1000;
Duration = durationInSeconds == null || durationInSeconds == 0 ? null : durationInSeconds * 1000;
}
public string Message { get; set; }
public string BackgroundColor { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Mukesh Murugan</Authors>
<Authors>Mukesh Murugan, Artem Konkin</Authors>
<Company>aspnetcorehero</Company>
<Product>AspNetCoreHero.ToastNotification</Product>
<Description>Elegant Toast Notifications for ASP.NET Core Applications. Compatilble with ASP.NET Core 3.1 and .NET 5.</Description>
<Copyright>2020</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<AssemblyVersion>1.1.0</AssemblyVersion>
<FileVersion>1.1.0</FileVersion>
<Version>1.1.0</Version>
<PackageIcon>logo-transparent.png</PackageIcon>
<Version>1.1.1</Version>
<PackageProjectUrl>https://github.com/aspnetcorehero/ToastNotification</PackageProjectUrl>
<RepositoryUrl>https://github.com/aspnetcorehero/ToastNotification</RepositoryUrl>
</PropertyGroup>
Expand All @@ -27,13 +26,4 @@
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
</ItemGroup>

<ItemGroup>
<None Include="D:\Photoshop\ANCH\logo-transparent.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>



</Project>
</Project>
4 changes: 0 additions & 4 deletions AspNetCoreHero.ToastNotification/Extensions/EnumExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace AspNetCoreHero.ToastNotification.Extensions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AspNetCoreHero.ToastNotification
{
Expand Down
5 changes: 0 additions & 5 deletions AspNetCoreHero.ToastNotification/Helpers/JsonSerialization.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AspNetCoreHero.ToastNotification.Helpers
{
Expand Down
6 changes: 1 addition & 5 deletions AspNetCoreHero.ToastNotification/Notyf/Models/Config.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace AspNetCoreHero.ToastNotification.Notyf.Models
namespace AspNetCoreHero.ToastNotification.Notyf.Models
{
public class Config
{
Expand Down
8 changes: 2 additions & 6 deletions AspNetCoreHero.ToastNotification/Notyf/Models/Icon.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace AspNetCoreHero.ToastNotification.Notyf.Models
namespace AspNetCoreHero.ToastNotification.Notyf.Models
{
public class Icon
{
public string className { get; set; }
public string tagName { get; set; }
public string text { get; set; }
}
}
}
8 changes: 4 additions & 4 deletions AspNetCoreHero.ToastNotification/Notyf/Models/NotyfEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class NotyfEntity
{
public NotyfEntity(int durationInSeconds = 5, NotyfPosition toastPosition = NotyfPosition.BottomRight, bool isDismissible = true)
{
duration = (durationInSeconds > 0) ? durationInSeconds * 1000 : 5000;
duration = durationInSeconds > 0 ? durationInSeconds * 1000 : 5000;
dismissible = isDismissible;
ripple = true;
try
Expand All @@ -16,8 +16,8 @@ public NotyfEntity(int durationInSeconds = 5, NotyfPosition toastPosition = Noty
var positionArray = description.Split('-');
position = new Position()
{
x = (positionArray is null) ? "right" : positionArray[0],
y = (positionArray is null) ? "bottom" : positionArray[1]
x = positionArray is null ? "right" : positionArray[0],
y = positionArray is null ? "bottom" : positionArray[1]
};
}
catch
Expand Down Expand Up @@ -81,4 +81,4 @@ private static string ToDescriptionString(NotyfPosition val)
return attributes.Length > 0 ? attributes[0].Description : "right-bottom";
}
}
}
}
6 changes: 1 addition & 5 deletions AspNetCoreHero.ToastNotification/Notyf/Models/Position.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace AspNetCoreHero.ToastNotification.Notyf.Models
namespace AspNetCoreHero.ToastNotification.Notyf.Models
{
public class Position
{
Expand Down
6 changes: 1 addition & 5 deletions AspNetCoreHero.ToastNotification/Notyf/NotyfViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using AspNetCoreHero.ToastNotification.Notyf.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AspNetCoreHero.ToastNotification.Notyf
{
Expand All @@ -12,4 +8,4 @@ public class NotyfViewModel
public string Configuration { get; set; }
public IEnumerable<NotyfNotification> Notifications { get; set; }
}
}
}
5 changes: 0 additions & 5 deletions AspNetCoreHero.ToastNotification/Services/TempDataService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AspNetCoreHero.ToastNotification.Services
{
Expand Down
7 changes: 1 addition & 6 deletions AspNetCoreHero.ToastNotification/Toastify/Enums/Gravity.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;

namespace AspNetCoreHero.ToastNotification
{
Expand Down
7 changes: 1 addition & 6 deletions AspNetCoreHero.ToastNotification/Toastify/Enums/Position.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;

namespace AspNetCoreHero.ToastNotification
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
using AspNetCoreHero.ToastNotification.Abstractions;
using AspNetCoreHero.ToastNotification.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AspNetCoreHero.ToastNotification.Toastify.Models
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using AspNetCoreHero.ToastNotification.Abstractions;
using AspNetCoreHero.ToastNotification.Enums;
using AspNetCoreHero.ToastNotification.Toastify.Models;
using System;
using System.Collections.Generic;

namespace AspNetCoreHero.ToastNotification.Toastify
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using AspNetCoreHero.ToastNotification.Toastify.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AspNetCoreHero.ToastNotification.Toastify
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
@model AspNetCoreHero.ToastNotification.Notyf.NotyfViewModel
@using AspNetCoreHero.ToastNotification.Enums
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link rel="stylesheet" href="~/_content/AspNetCoreHero.ToastNotification/notyf.min.css">
<script src="~/_content/AspNetCoreHero.ToastNotification/notyf.min.js"></script>

<link rel="stylesheet" href="~/libs/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link rel="stylesheet" href="~/notyf.min.css">

<script src="~/notyf.min.js"></script>

<script>
const notyf = new Notyf(@Html.Raw(Model.Configuration));
</script>

@{
@if (Model.Notifications != null)
{
Expand Down Expand Up @@ -48,10 +52,9 @@
break;
}
}

}

}

<script type="text/javascript">

function toastNotifySuccess(message, duration) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public IViewComponentResult Invoke()
Configuration = _options.ToJson(),
Notifications = _service.ReadAllNotifications()
};

return View("Default", model);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@model AspNetCoreHero.ToastNotification.Toastify.ToastifyViewModel
@using AspNetCoreHero.ToastNotification.Enums
@using AspNetCoreHero.ToastNotification.Helpers
<link rel="stylesheet" href="~/_content/AspNetCoreHero.ToastNotification/toastify.css">
<script src="~/_content/AspNetCoreHero.ToastNotification/toastify.js"></script>
<link rel="stylesheet" href="~/toastify.css">
<script src="~/toastify.js"></script>
@{
@if (Model.Notifications != null)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
using AspNetCoreHero.ToastNotification.Abstractions;
using AspNetCoreHero.ToastNotification.Helpers;
using AspNetCoreHero.ToastNotification.Toastify;
using AspNetCoreHero.ToastNotification.Toastify.Models;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AspNetCoreHero.ToastNotification.Views.Shared.Components.Toastify
{
Expand Down

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions AspNetCoreHero.ToastNotification/wwwroot/toastify.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
}

.toast-close {

}

.toastify-right {
Expand Down Expand Up @@ -100,4 +100,4 @@
right: 0;
max-width: fit-content;
}
}
}
Loading