Compare commits
10 Commits
0dcc8483ac
...
6ad26b162a
| Author | SHA1 | Date | |
|---|---|---|---|
| 6ad26b162a | |||
| be1ee71f32 | |||
| c0823d6641 | |||
| abd71db13d | |||
| 436d4cb1d1 | |||
| e33a7dd367 | |||
| fd9998c978 | |||
| bed4899c0b | |||
| ab8de02610 | |||
| be4f4a3da5 |
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -10,7 +10,7 @@
|
||||
"request": "launch",
|
||||
"preLaunchTask": "build",
|
||||
// If you have changed target frameworks, make sure to update the program path.
|
||||
"program": "${workspaceRoot}/bin/Debug/netcoreapp2.1/pecklist.dll",
|
||||
"program": "${workspaceRoot}/bin/Debug/net5.0/pecklist.dll",
|
||||
"args": [],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"stopAtEntry": false,
|
||||
|
||||
15
.vscode/tasks.json
vendored
15
.vscode/tasks.json
vendored
@@ -1,16 +1,21 @@
|
||||
{
|
||||
"version": "0.1.0",
|
||||
"version": "2.0.0",
|
||||
"command": "dotnet",
|
||||
"isShellCommand": true,
|
||||
"args": [],
|
||||
"tasks": [
|
||||
{
|
||||
"taskName": "build",
|
||||
"label": "build",
|
||||
"type": "shell",
|
||||
"command": "dotnet",
|
||||
"args": [
|
||||
"build",
|
||||
"${workspaceRoot}/pecklist.csproj"
|
||||
],
|
||||
"isBuildCommand": true,
|
||||
"problemMatcher": "$msCompile"
|
||||
"problemMatcher": "$msCompile",
|
||||
"group": {
|
||||
"_id": "build",
|
||||
"isDefault": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
47
Program.cs
47
Program.cs
@@ -1,30 +1,47 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
|
||||
namespace GZTW.Pecklist
|
||||
{
|
||||
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
BuildWebHost(args).Run();
|
||||
CreateHostBuilder(args).Build().Run();
|
||||
}
|
||||
|
||||
public static IWebHost BuildWebHost(string[] args) =>
|
||||
WebHost.CreateDefaultBuilder(args)
|
||||
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
||||
Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.UseStartup<Startup>()
|
||||
.UseUrls("http://*:3000")
|
||||
.CaptureStartupErrors(true)
|
||||
.UseSetting("detailedErrors", "true")
|
||||
.UseKestrel()
|
||||
.UseContentRoot(System.IO.Directory.GetCurrentDirectory())
|
||||
.UseStartup<Startup>()
|
||||
.Build();
|
||||
.UseContentRoot(System.IO.Directory.GetCurrentDirectory());
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// public class Program
|
||||
// {
|
||||
// public static void Main(string[] args)
|
||||
// {
|
||||
// BuildWebHost(args).Run();
|
||||
// }
|
||||
|
||||
// public static IWebHost BuildWebHost(string[] args) =>
|
||||
// WebHost.CreateDefaultBuilder(args)
|
||||
// .UseUrls("http://*:3000")
|
||||
// .CaptureStartupErrors(true)
|
||||
// .UseSetting("detailedErrors", "true")
|
||||
// .UseKestrel()
|
||||
// .UseContentRoot(System.IO.Directory.GetCurrentDirectory())
|
||||
// .UseStartup<Startup>()
|
||||
// .Build();
|
||||
// }
|
||||
}
|
||||
|
||||
195
Startup.cs
195
Startup.cs
@@ -1,54 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.HttpOverrides;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using GZTW.Pecklist.Models;
|
||||
using GZTW.Pecklist.Util;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
|
||||
|
||||
|
||||
|
||||
namespace GZTW.Pecklist
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public Startup(IHostingEnvironment env)
|
||||
public Startup(IConfiguration configuration)
|
||||
{
|
||||
var builder = new ConfigurationBuilder()
|
||||
.SetBasePath(env.ContentRootPath)
|
||||
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
|
||||
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
|
||||
.AddEnvironmentVariables();
|
||||
Configuration = builder.Build();
|
||||
Configuration = configuration;
|
||||
}
|
||||
|
||||
public IConfigurationRoot Configuration { get; }
|
||||
public IConfiguration Configuration { get; }
|
||||
|
||||
// This method gets called by the runtime. Use this method to add services to the container.
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddControllers().AddNewtonsoftJson();
|
||||
services.AddDbContext<PecklistContext>(options =>
|
||||
{
|
||||
options.UseSqlite(Configuration.GetConnectionString("thedb")).EnableSensitiveDataLogging(false);
|
||||
|
||||
services.AddDbContext<PecklistContext>(options => options.UseSqlite(Configuration.GetConnectionString("thedb")));
|
||||
|
||||
//Added this so that can access configuration from anywhere else
|
||||
//See authcontroller for usage
|
||||
services.AddSingleton<IConfiguration>(Configuration);
|
||||
|
||||
services.AddMvc();
|
||||
});
|
||||
|
||||
|
||||
|
||||
//get the key from the appsettings.json file
|
||||
var secretKey = Configuration.GetSection("JWT").GetValue<string>("secret");
|
||||
var signingKey = new SymmetricSecurityKey(System.Text.Encoding.ASCII.GetBytes(secretKey));
|
||||
|
||||
@@ -58,8 +44,6 @@ namespace GZTW.Pecklist
|
||||
options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
|
||||
}).AddJwtBearer(options =>
|
||||
{
|
||||
// options.AutomaticAuthenticate = true;
|
||||
// options.AutomaticChallenge = true;
|
||||
options.TokenValidationParameters = new TokenValidationParameters
|
||||
{
|
||||
// Token signature will be verified using a private key.
|
||||
@@ -69,53 +53,174 @@ namespace GZTW.Pecklist
|
||||
ValidateIssuer = true,
|
||||
ValidIssuer = "GZTW_Pecklist",
|
||||
ValidateAudience = false,
|
||||
// ValidAudience = "https://yourapplication.example.com",
|
||||
|
||||
// Token will only be valid if not expired yet, with 5 minutes clock skew.
|
||||
//Note: these are all enabled in AyaNOva but were origionally disabled in rf
|
||||
// // Token will only be valid if not expired yet, with 5 minutes clock skew.
|
||||
// ValidateLifetime = true,
|
||||
// RequireExpirationTime = true,
|
||||
// ClockSkew = new TimeSpan(0, 5, 0),
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, PecklistContext dbContext)
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, PecklistContext dbContext)
|
||||
{
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
}
|
||||
|
||||
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
|
||||
loggerFactory.AddDebug();
|
||||
|
||||
|
||||
app.UseForwardedHeaders(new ForwardedHeadersOptions
|
||||
{
|
||||
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
|
||||
});
|
||||
|
||||
app.UseDefaultFiles();
|
||||
app.UseStaticFiles(new StaticFileOptions
|
||||
{
|
||||
OnPrepareResponse = context =>
|
||||
{
|
||||
if (context.File.Name == "index.html")
|
||||
if (context.File.Name == "default.htm")
|
||||
{
|
||||
context.Context.Response.Headers.Add("Cache-Control", "no-cache, no-store");
|
||||
context.Context.Response.Headers.Add("Expires", "-1");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
app.UseAuthentication();
|
||||
app.UseMvc();
|
||||
|
||||
//Check schema
|
||||
Schema.CheckAndUpdate(dbContext);
|
||||
|
||||
// app.UseHttpsRedirection();
|
||||
|
||||
app.UseRouting();
|
||||
|
||||
app.UseAuthorization();
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapControllers();
|
||||
|
||||
});
|
||||
|
||||
//server ready
|
||||
System.Diagnostics.Debug.WriteLine("BOOT COMPLETED - OPEN");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// using Microsoft.AspNetCore.Builder;
|
||||
// using Microsoft.IdentityModel.Tokens;
|
||||
// using Microsoft.AspNetCore.HttpOverrides;
|
||||
// using Microsoft.Extensions.Configuration;
|
||||
// using Microsoft.Extensions.DependencyInjection;
|
||||
// using Microsoft.Extensions.Logging;
|
||||
// using Microsoft.EntityFrameworkCore;
|
||||
// using Microsoft.Extensions.Hosting;
|
||||
// using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
// using GZTW.Pecklist.Models;
|
||||
// using GZTW.Pecklist.Util;
|
||||
|
||||
|
||||
|
||||
// namespace GZTW.Pecklist
|
||||
// {
|
||||
// public class Startup
|
||||
// {
|
||||
// public Startup(Microsoft.AspNetCore.Hosting.IWebHostEnvironment env)
|
||||
// {
|
||||
// var builder = new ConfigurationBuilder()
|
||||
// .SetBasePath(env.ContentRootPath)
|
||||
// .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
|
||||
// .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
|
||||
// .AddEnvironmentVariables();
|
||||
// Configuration = builder.Build();
|
||||
// }
|
||||
|
||||
// public IConfigurationRoot Configuration { get; }
|
||||
|
||||
// // This method gets called by the runtime. Use this method to add services to the container.
|
||||
// public void ConfigureServices(IServiceCollection services)
|
||||
// {
|
||||
|
||||
// services.AddDbContext<PecklistContext>(options => options.UseSqlite(Configuration.GetConnectionString("thedb")));
|
||||
|
||||
// //Added this so that can access configuration from anywhere else
|
||||
// //See authcontroller for usage
|
||||
// services.AddSingleton<IConfiguration>(Configuration);
|
||||
|
||||
// services.AddMvc();
|
||||
|
||||
|
||||
|
||||
// //get the key from the appsettings.json file
|
||||
// var secretKey = Configuration.GetSection("JWT").GetValue<string>("secret");
|
||||
// var signingKey = new SymmetricSecurityKey(System.Text.Encoding.ASCII.GetBytes(secretKey));
|
||||
|
||||
// services.AddAuthentication(options =>
|
||||
// {
|
||||
// options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
|
||||
// options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
|
||||
// }).AddJwtBearer(options =>
|
||||
// {
|
||||
// // options.AutomaticAuthenticate = true;
|
||||
// // options.AutomaticChallenge = true;
|
||||
// options.TokenValidationParameters = new TokenValidationParameters
|
||||
// {
|
||||
// // Token signature will be verified using a private key.
|
||||
// ValidateIssuerSigningKey = true,
|
||||
// RequireSignedTokens = true,
|
||||
// IssuerSigningKey = signingKey,
|
||||
// ValidateIssuer = true,
|
||||
// ValidIssuer = "GZTW_Pecklist",
|
||||
// ValidateAudience = false,
|
||||
// // ValidAudience = "https://yourapplication.example.com",
|
||||
|
||||
// // Token will only be valid if not expired yet, with 5 minutes clock skew.
|
||||
// // ValidateLifetime = true,
|
||||
// // RequireExpirationTime = true,
|
||||
// // ClockSkew = new TimeSpan(0, 5, 0),
|
||||
// };
|
||||
// });
|
||||
|
||||
// }
|
||||
|
||||
// public void Configure(IApplicationBuilder app, IHostEnvironment env, PecklistContext dbContext)
|
||||
// {//ILoggerFactory loggerFactory,
|
||||
// if (env.IsDevelopment())
|
||||
// {
|
||||
// app.UseDeveloperExceptionPage();
|
||||
// }
|
||||
// var loggerFactory = LoggerFactory.Create(builder => builder.AddConsole());
|
||||
// // loggerFactory.AddConsole(Configuration.GetSection("Logging"));
|
||||
// // loggerFactory.AddDebug();
|
||||
|
||||
|
||||
// app.UseForwardedHeaders(new ForwardedHeadersOptions
|
||||
// {
|
||||
// ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
|
||||
// });
|
||||
|
||||
// app.UseDefaultFiles();
|
||||
// app.UseStaticFiles(new StaticFileOptions
|
||||
// {
|
||||
// OnPrepareResponse = context =>
|
||||
// {
|
||||
// if (context.File.Name == "index.html" || context.File.Name == "sw.js")
|
||||
// {
|
||||
// context.Context.Response.Headers.Add("Cache-Control", "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0");
|
||||
// // context.Context.Response.Headers.Add("Expires", "-1");
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
// app.UseAuthentication();
|
||||
// //app.UseMvc();
|
||||
|
||||
// //Check schema
|
||||
// Schema.CheckAndUpdate(dbContext);
|
||||
|
||||
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
Binary file not shown.
23
notes/notes
23
notes/notes
@@ -37,27 +37,42 @@ Joyce s7 360px wide (dp)
|
||||
|
||||
|
||||
***********************
|
||||
HOW TO DEPLOY TO IIS
|
||||
https://stackify.com/how-to-deploy-asp-net-core-to-iis/
|
||||
HOW TO DEPLOY
|
||||
|
||||
0) Inject fresh manifest for workbox:
|
||||
"When you make a change to your project, run the inject manifest command and you'll have an up to date service worker with precache support."
|
||||
|
||||
workbox injectManifest
|
||||
|
||||
https://developers.google.com/web/tools/workbox/guides/precache-files/cli
|
||||
|
||||
1) SET VERSION
|
||||
|
||||
RENAME ?plvx.x parameter in index.html to the new version so all files update on mobile
|
||||
|
||||
2) PUBLISH
|
||||
publish command line from rockfishCore folder:
|
||||
publish command line from pecklist folder:
|
||||
|
||||
//this will build a release version which is what we use on the server now
|
||||
dotnet publish -c Release -o ./../publish/
|
||||
//DEPRECATED dotnet publish -c Release -o ./../publish/
|
||||
//this will build for our ubunutu linux server
|
||||
dotnet publish -c Release -o ./../publish/ --no-self-contained -r linux-x64
|
||||
|
||||
//This is what I have seen online, not sure why the -f is necessary or useful, the build is the exact same size as above, have a question in to stackoverflow about it
|
||||
//#### netcoreapp2?? This can't be right:
|
||||
dotnet publish -f netcoreapp2.1 -c Release -o ./../publish/
|
||||
|
||||
//if need a debug version
|
||||
dotnet publish -o ./../publish/
|
||||
|
||||
3) COPY
|
||||
|
||||
## MAKE BACKUP FIRST: cp -R pecklist pecklist_backup
|
||||
|
||||
Copy over to production server, only need the .dll and the wwwroot folder contents,
|
||||
remember not to delete the folders on the server only replace their contents because there are Windows file permissions set
|
||||
|
||||
|
||||
|
||||
|
||||
test test test
|
||||
71
notes/serverconfig/default.conf
Normal file
71
notes/serverconfig/default.conf
Normal file
@@ -0,0 +1,71 @@
|
||||
########## allow let's Encrypt on port 80 for all domains
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name ~. ;
|
||||
|
||||
location /.well-known/acme-challenge {
|
||||
root /var/www/html;
|
||||
default_type text/plain;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://$host$uri;
|
||||
}
|
||||
}
|
||||
|
||||
###################### AyaNova website
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name gztechworks.com www.gztechworks.com; # replace with your domain
|
||||
|
||||
# replace your domain in both paths (subdomains use same cert and path)
|
||||
ssl_certificate /etc/letsencrypt/live/gztechworks.com/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/gztechworks.com/privkey.pem;
|
||||
|
||||
location / {
|
||||
root /var/www/html/ayanova.com;
|
||||
index index.htm index.html;
|
||||
}
|
||||
}
|
||||
|
||||
#################### API site
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name api.gztechworks.com; # replace with your domain
|
||||
|
||||
# replace your domain in both paths (subdomains use same cert)
|
||||
ssl_certificate /etc/letsencrypt/live/gztechworks.com/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/gztechworks.com/privkey.pem;
|
||||
|
||||
location / {
|
||||
root /var/www/html/api.ayanova.com;
|
||||
index index.htm index.html;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
################### PECKLIST
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name peck.gztechworks.com;
|
||||
|
||||
# replace your domain in both paths (subdomains use same cert)
|
||||
ssl_certificate /etc/letsencrypt/live/gztechworks.com/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/gztechworks.com/privkey.pem;
|
||||
|
||||
location / {
|
||||
proxy_pass http://gztechworks.com:3000;# NOTE Will only work if has domain, localhost will not work, no idea why
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection keep-alive;
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,2 +1,5 @@
|
||||
Add serviceworker so can use offline
|
||||
Localize all the files required to our server, not CDN
|
||||
|
||||
|
||||
Not working on android desktop pwa offline, maybe something like this will help:
|
||||
https://stackoverflow.com/questions/45733419/progressive-web-app-offline-cache-does-not-work-on-android-it-works-on-chrome
|
||||
@@ -1,17 +1,20 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="wwwroot\" />
|
||||
<Content Remove="wwwroot\js\templates\*.handlebars" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.0" />
|
||||
<!-- <PackageReference Include="Newtonsoft.Json" Version="10.0.3" /> -->
|
||||
<PackageReference Include="jose-jwt" Version="2.4.0" />
|
||||
<!-- <PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0" /> -->
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.0" />
|
||||
<PackageReference Include="jose-jwt" Version="2.6.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" />
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
|
||||
8
workbox-config.js
Normal file
8
workbox-config.js
Normal file
@@ -0,0 +1,8 @@
|
||||
module.exports = {
|
||||
"globDirectory": "wwwroot/",
|
||||
"globPatterns": [
|
||||
"**/*.{xml,css,eot,ttf,woff,woff2,png,ico,html,js,json}"
|
||||
],
|
||||
"swDest": "wwwroot\\sw.js",
|
||||
"swSrc": "wwwroot/INPUTsw.js"
|
||||
};
|
||||
9
wwwroot/INPUTsw.js
Normal file
9
wwwroot/INPUTsw.js
Normal file
@@ -0,0 +1,9 @@
|
||||
importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.6.1/workbox-sw.js');
|
||||
|
||||
if (workbox) {
|
||||
// console.log(`3 Yay! Workbox is loaded 🎉`);
|
||||
workbox.precaching.precacheAndRoute([]);
|
||||
|
||||
} else {
|
||||
console.log(`Boo! Workbox didn't load 😬`);
|
||||
}
|
||||
7
wwwroot/css/bootstrap.min.css
vendored
Normal file
7
wwwroot/css/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
wwwroot/css/bootstrap.min.css.map
Normal file
1
wwwroot/css/bootstrap.min.css.map
Normal file
File diff suppressed because one or more lines are too long
@@ -6,10 +6,20 @@
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
|
||||
<title>Pecklist loading....</title>
|
||||
|
||||
<script>
|
||||
// Check that service workers are registered
|
||||
if ('serviceWorker' in navigator) {
|
||||
// Use the window load event to keep the page load performant
|
||||
window.addEventListener('load', () => {
|
||||
navigator.serviceWorker.register('/sw.js');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<!-- ICONS / MANIFEST -->
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||||
@@ -21,39 +31,39 @@
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<!-- 3rd party components fonts and icons -->
|
||||
<link href="css/materialdesignicons.min.css?plv=1.4" media="all" rel="stylesheet" type="text/css" />
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M"
|
||||
crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="css/mdi-bs4-compat.css?plv=1.4" type="text/css" />
|
||||
<link rel="stylesheet" href="css/app.css?plv=1.4" type="text/css" />
|
||||
<link href="css/materialdesignicons.min.css" media="all" rel="stylesheet" type="text/css" />
|
||||
<!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous"> -->
|
||||
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css" />
|
||||
<link rel="stylesheet" href="css/mdi-bs4-compat.css" type="text/css" />
|
||||
<link rel="stylesheet" href="css/app.css" type="text/css" />
|
||||
|
||||
|
||||
|
||||
<!-- third-party javascript -->
|
||||
<script src="js/lib/jquery-3.2.1.min.js"></script>
|
||||
<script src="js/lib/jquery.event.gevent.js?plv=1.4"></script>
|
||||
<script src="js/lib/jquery.gzserialize.js?plv=1.4"></script>
|
||||
<script src="js/lib/jquery.autocomplete.min.js?plv=1.4"></script>
|
||||
<script src="js/lib/page.js?plv=1.4"></script>
|
||||
<script src="js/lib/handlebars.runtime-v4.0.5.js?plv=1.4"></script>
|
||||
<script src="js/lib/store.min.js?plv=1.4"></script>
|
||||
<script src="js/lib/moment.min.js?plv=1.4"></script>
|
||||
<script src="js/lib/lodash.min.js?plv=1.4"></script>
|
||||
<script src="js/lib/jquery.event.gevent.js"></script>
|
||||
<script src="js/lib/jquery.gzserialize.js"></script>
|
||||
<script src="js/lib/jquery.autocomplete.min.js"></script>
|
||||
<script src="js/lib/page.js"></script>
|
||||
<script src="js/lib/handlebars.runtime-v4.0.5.js"></script>
|
||||
<script src="js/lib/store.min.js"></script>
|
||||
<script src="js/lib/moment.min.js"></script>
|
||||
<script src="js/lib/lodash.min.js"></script>
|
||||
|
||||
<!-- our javascript -->
|
||||
<script src="js/index.js?plv=1.4"></script>
|
||||
<script src="js/app.util.js?plv=1.4"></script>
|
||||
<script src="js/app.api.js?plv=1.4"></script>
|
||||
<script src="js/app.utilB.js?plv=1.4"></script>
|
||||
<script src="js/app.nav.js?plv=1.4"></script>
|
||||
<script src="js/app.shell.js?plv=1.4"></script>
|
||||
<script src="js/app.fourohfour.js?plv=1.4"></script>
|
||||
<script src="js/app.authenticate.js?plv=1.4"></script>
|
||||
<script src="js/app.main.js?plv=1.4"></script>
|
||||
<script src="js/app.settings.js?plv=1.4"></script>
|
||||
<script src="js/index.js"></script>
|
||||
<script src="js/app.util.js"></script>
|
||||
<script src="js/app.api.js"></script>
|
||||
<script src="js/app.utilB.js"></script>
|
||||
<script src="js/app.nav.js"></script>
|
||||
<script src="js/app.shell.js"></script>
|
||||
<script src="js/app.fourohfour.js"></script>
|
||||
<script src="js/app.authenticate.js"></script>
|
||||
<script src="js/app.main.js"></script>
|
||||
<script src="js/app.settings.js"></script>
|
||||
|
||||
<!-- handlebars templates -->
|
||||
<script src="js/templates/templates.js?plv=1.4"></script>
|
||||
<script src="js/templates/templates.js"></script>
|
||||
|
||||
|
||||
<script>
|
||||
@@ -65,10 +75,10 @@
|
||||
|
||||
<body class="gz-body">
|
||||
<div id="app" class="container"></div>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1"
|
||||
crossorigin="anonymous"></script>
|
||||
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script> -->
|
||||
<script src="js/lib/popper.min.js"></script>
|
||||
<script src="js/lib/bootstrap.min.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -24,7 +24,7 @@ app.api = (function () {
|
||||
;
|
||||
|
||||
|
||||
GZAppVersion = "1.4";
|
||||
GZAppVersion = "2.0";
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -89,7 +89,11 @@ app.settings = (function () {
|
||||
|
||||
//Context menu
|
||||
app.nav.contextClear();
|
||||
////app.nav.setContextTitle("Search");
|
||||
$("#about").append(
|
||||
"<p>Pecklist client version: " +
|
||||
app.api.GZAppVersion +
|
||||
"</p>"
|
||||
);
|
||||
|
||||
};
|
||||
|
||||
|
||||
7
wwwroot/js/lib/bootstrap.min.js
vendored
Normal file
7
wwwroot/js/lib/bootstrap.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
wwwroot/js/lib/bootstrap.min.js.map
Normal file
1
wwwroot/js/lib/bootstrap.min.js.map
Normal file
File diff suppressed because one or more lines are too long
5
wwwroot/js/lib/popper.min.js
vendored
Normal file
5
wwwroot/js/lib/popper.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
3
wwwroot/js/lib/workbox-sw-3.6.1.js
Normal file
3
wwwroot/js/lib/workbox-sw-3.6.1.js
Normal file
@@ -0,0 +1,3 @@
|
||||
var workbox=function(){"use strict";try{self.workbox.v["workbox:sw:3.6.1"]=1}catch(t){}const t="https://storage.googleapis.com/workbox-cdn/releases/3.6.1",e={backgroundSync:"background-sync",broadcastUpdate:"broadcast-cache-update",cacheableResponse:"cacheable-response",core:"core",expiration:"cache-expiration",googleAnalytics:"google-analytics",navigationPreload:"navigation-preload",precaching:"precaching",rangeRequests:"range-requests",routing:"routing",strategies:"strategies",streams:"streams"};return new class{constructor(){return this.v={},this.t={debug:"localhost"===self.location.hostname,modulePathPrefix:null,modulePathCb:null},this.e=this.t.debug?"dev":"prod",this.s=!1,new Proxy(this,{get(t,s){if(t[s])return t[s];const o=e[s];return o&&t.loadModule(`workbox-${o}`),t[s]}})}setConfig(t={}){if(this.s)throw new Error("Config must be set before accessing workbox.* modules");Object.assign(this.t,t),this.e=this.t.debug?"dev":"prod"}skipWaiting(){self.addEventListener("install",()=>self.skipWaiting())}clientsClaim(){self.addEventListener("activate",()=>self.clients.claim())}loadModule(t){const e=this.o(t);try{importScripts(e),this.s=!0}catch(s){throw console.error(`Unable to import module '${t}' from '${e}'.`),s}}o(e){if(this.t.modulePathCb)return this.t.modulePathCb(e,this.t.debug);let s=[t];const o=`${e}.${this.e}.js`,r=this.t.modulePathPrefix;return r&&""===(s=r.split("/"))[s.length-1]&&s.splice(s.length-1,1),s.push(o),s.join("/")}}}();
|
||||
|
||||
//# sourceMappingURL=workbox-sw.js.map
|
||||
@@ -1,4 +1,6 @@
|
||||
<div>
|
||||
<div class="alert alert-success mb-5" id="about" />
|
||||
|
||||
<form id="frm" method="post" action="index.html">
|
||||
|
||||
<div class="form-group mb-5">
|
||||
@@ -9,8 +11,10 @@
|
||||
|
||||
<div class="form-group">
|
||||
<label for="oldpassword">Change password</label>
|
||||
<input class="form-control" type="text" id="oldpassword" name="oldpassword" placeholder="current password" value="">
|
||||
<input class="form-control" type="text" id="newpassword" name="newpassword" placeholder="new password" value="">
|
||||
<input class="form-control" type="text" id="oldpassword" name="oldpassword" placeholder="current password"
|
||||
value="">
|
||||
<input class="form-control" type="text" id="newpassword" name="newpassword" placeholder="new password"
|
||||
value="">
|
||||
<div class="app-frm-buttons">
|
||||
<button id="btn-change-password">Update</button>
|
||||
</div>
|
||||
|
||||
182
wwwroot/sw.js
Normal file
182
wwwroot/sw.js
Normal file
@@ -0,0 +1,182 @@
|
||||
importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.6.1/workbox-sw.js');
|
||||
|
||||
if (workbox) {
|
||||
// console.log(`3 Yay! Workbox is loaded 🎉`);
|
||||
workbox.precaching.precacheAndRoute([
|
||||
{
|
||||
"url": "browserconfig.xml",
|
||||
"revision": "cffdb90c1913eda3122a23644b9cdf0d"
|
||||
},
|
||||
{
|
||||
"url": "css/app.css",
|
||||
"revision": "857c9ee3dcd7d9ddcbcd3ba39e3aae33"
|
||||
},
|
||||
{
|
||||
"url": "css/bootstrap.min.css",
|
||||
"revision": "04aca1f4cd3ec3c05a75a879f3be75a3"
|
||||
},
|
||||
{
|
||||
"url": "css/materialdesignicons.min.css",
|
||||
"revision": "bdf30eb2a783b0641bb57ec40218bf67"
|
||||
},
|
||||
{
|
||||
"url": "css/mdi-bs4-compat.css",
|
||||
"revision": "6bd12caf5c54415e83ba654f4bad6b5c"
|
||||
},
|
||||
{
|
||||
"url": "fonts/materialdesignicons-webfont.eot",
|
||||
"revision": "3bd364e5b4f5c3e57a7376091996d4b4"
|
||||
},
|
||||
{
|
||||
"url": "fonts/materialdesignicons-webfont.ttf",
|
||||
"revision": "3ef6639a4cce5b903e4031b1b0102675"
|
||||
},
|
||||
{
|
||||
"url": "fonts/materialdesignicons-webfont.woff",
|
||||
"revision": "eec7f0f7c8944b878af8fb7fcc091ade"
|
||||
},
|
||||
{
|
||||
"url": "fonts/materialdesignicons-webfont.woff2",
|
||||
"revision": "9b9f2c447d27a622fcb78f6b7f38a095"
|
||||
},
|
||||
{
|
||||
"url": "img/android-chrome-192x192.png",
|
||||
"revision": "732ff683403fb1f99c82dda40a8be880"
|
||||
},
|
||||
{
|
||||
"url": "img/android-chrome-512x512.png",
|
||||
"revision": "b00b7ee363168d0a2e212661a9e12c9f"
|
||||
},
|
||||
{
|
||||
"url": "img/apple-touch-icon.png",
|
||||
"revision": "325e7e09fad8159b2f6403e83e07b462"
|
||||
},
|
||||
{
|
||||
"url": "img/favicon-16x16.png",
|
||||
"revision": "b997fd62106dd3f26061bfc07deadd0b"
|
||||
},
|
||||
{
|
||||
"url": "img/favicon-32x32.png",
|
||||
"revision": "61715a34b836d9b48c70a2cd5437c566"
|
||||
},
|
||||
{
|
||||
"url": "img/favicon.ico",
|
||||
"revision": "a2e0ac52d2cc8bcc9911587c3fa86dfa"
|
||||
},
|
||||
{
|
||||
"url": "img/mstile-150x150.png",
|
||||
"revision": "0d1808110ae641a9bad17709dcefd43c"
|
||||
},
|
||||
{
|
||||
"url": "index.html",
|
||||
"revision": "d3513908a51bcb9ce990ca962db928ed"
|
||||
},
|
||||
{
|
||||
"url": "INPUTsw.js",
|
||||
"revision": "a782991af0c05dc7ad8d34cf47fb309d"
|
||||
},
|
||||
{
|
||||
"url": "js/app.api.js",
|
||||
"revision": "bd87c6eb82254018841388b8cf5c63e3"
|
||||
},
|
||||
{
|
||||
"url": "js/app.authenticate.js",
|
||||
"revision": "e70ff28ec4b88f4cab019844a92a3907"
|
||||
},
|
||||
{
|
||||
"url": "js/app.fourohfour.js",
|
||||
"revision": "c7e05e3e0f08394d49bb24291225782d"
|
||||
},
|
||||
{
|
||||
"url": "js/app.main.js",
|
||||
"revision": "e9b14b8dc26b74941392aad30c4632b1"
|
||||
},
|
||||
{
|
||||
"url": "js/app.nav.js",
|
||||
"revision": "0a57c2156e586988e06695c210d514bb"
|
||||
},
|
||||
{
|
||||
"url": "js/app.settings.js",
|
||||
"revision": "da8fa209405c5a5fa6675e7330b3b5d1"
|
||||
},
|
||||
{
|
||||
"url": "js/app.shell.js",
|
||||
"revision": "8803d0b66b42744a5221021f5f7b796b"
|
||||
},
|
||||
{
|
||||
"url": "js/app.util.js",
|
||||
"revision": "ec5db7c62adce792cef75335d7539c78"
|
||||
},
|
||||
{
|
||||
"url": "js/app.utilB.js",
|
||||
"revision": "ccd22c2472e700c992aea9289494a6a7"
|
||||
},
|
||||
{
|
||||
"url": "js/index.js",
|
||||
"revision": "8b3b3e5c919cab7821a5077d8adbaa20"
|
||||
},
|
||||
{
|
||||
"url": "js/lib/bootstrap.min.js",
|
||||
"revision": "67176c242e1bdc20603c878dee836df3"
|
||||
},
|
||||
{
|
||||
"url": "js/lib/handlebars.runtime-v4.0.5.js",
|
||||
"revision": "fb40ec16c4686ee4af44e1a9ce6e6a59"
|
||||
},
|
||||
{
|
||||
"url": "js/lib/jquery-3.2.1.min.js",
|
||||
"revision": "c9f5aeeca3ad37bf2aa006139b935f0a"
|
||||
},
|
||||
{
|
||||
"url": "js/lib/jquery.autocomplete.min.js",
|
||||
"revision": "d83d89e7e96d4775cfbf0b8dd36c6161"
|
||||
},
|
||||
{
|
||||
"url": "js/lib/jquery.event.gevent.js",
|
||||
"revision": "8177fde2b2d7cf9a2a2864c6d5fcfec8"
|
||||
},
|
||||
{
|
||||
"url": "js/lib/jquery.event.ue.js",
|
||||
"revision": "0ab5aed2e8c659a1f8b4b6a21cc2fd47"
|
||||
},
|
||||
{
|
||||
"url": "js/lib/jquery.gzserialize.js",
|
||||
"revision": "b8c369b12bb3723d768d27dca01e4c88"
|
||||
},
|
||||
{
|
||||
"url": "js/lib/lodash.min.js",
|
||||
"revision": "c8515f131f3194c32a3670c8e274fab6"
|
||||
},
|
||||
{
|
||||
"url": "js/lib/moment.min.js",
|
||||
"revision": "aeb7908241d9f6d5a45e504cc4f2ec15"
|
||||
},
|
||||
{
|
||||
"url": "js/lib/page.js",
|
||||
"revision": "ab5b5137f6b561d201545bb340702b76"
|
||||
},
|
||||
{
|
||||
"url": "js/lib/popper.min.js",
|
||||
"revision": "84910d80281fc6b554f4ae2d14612494"
|
||||
},
|
||||
{
|
||||
"url": "js/lib/store.min.js",
|
||||
"revision": "b3dba894be4c4543e117df7b1871b8ea"
|
||||
},
|
||||
{
|
||||
"url": "js/lib/workbox-sw-3.6.1.js",
|
||||
"revision": "6d74eacbefb3b382d702a8b42a39c4e0"
|
||||
},
|
||||
{
|
||||
"url": "js/templates/templates.js",
|
||||
"revision": "58cb046acae763f842d6b778634ce256"
|
||||
},
|
||||
{
|
||||
"url": "manifest.json",
|
||||
"revision": "ff8c7812f66c62e282fdf140ac50012a"
|
||||
}
|
||||
]);
|
||||
|
||||
} else {
|
||||
console.log(`Boo! Workbox didn't load 😬`);
|
||||
}
|
||||
Reference in New Issue
Block a user