Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2506ee4821 | ||
|
|
27d3f80f5a | ||
|
|
7a64a986c2 | ||
|
|
f7b479a759 | ||
|
|
fe165af596 |
No files matched your search
File renamed without changes.
@@ -5,7 +5,6 @@ open System.Threading.Tasks
|
|||||||
open Microsoft.Extensions.Caching.Distributed
|
open Microsoft.Extensions.Caching.Distributed
|
||||||
open NodaTime
|
open NodaTime
|
||||||
open Npgsql
|
open Npgsql
|
||||||
open Npgsql.FSharp
|
|
||||||
|
|
||||||
/// Helper types and functions for the cache
|
/// Helper types and functions for the cache
|
||||||
[<AutoOpen>]
|
[<AutoOpen>]
|
||||||
File renamed without changes.
@@ -0,0 +1,17 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Entities.fs" />
|
||||||
|
<Compile Include="Access.fs" />
|
||||||
|
<Compile Include="DistributedCache.fs" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="BitBadger.Documents.Postgres" />
|
||||||
|
<PackageReference Include="Giraffe" />
|
||||||
|
<PackageReference Include="NodaTime" />
|
||||||
|
<PackageReference Include="Npgsql.FSharp" />
|
||||||
|
<PackageReference Include="Npgsql.NodaTime" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net11.0</TargetFramework>
|
||||||
<AssemblyVersion>8.4.0.0</AssemblyVersion>
|
<AssemblyVersion>8.5.0.0</AssemblyVersion>
|
||||||
<FileVersion>8.4.0.0</FileVersion>
|
<FileVersion>8.5.0.0</FileVersion>
|
||||||
<Authors>danieljsummers</Authors>
|
<Authors>danieljsummers</Authors>
|
||||||
<Company>Bit Badger Solutions</Company>
|
<Company>Bit Badger Solutions</Company>
|
||||||
<Version>8.4.0</Version>
|
<Version>8.5.0</Version>
|
||||||
<DebugType>Embedded</DebugType>
|
<DebugType>Embedded</DebugType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<Project>
|
||||||
|
<PropertyGroup>
|
||||||
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
||||||
|
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageVersion Include="BitBadger.AspNetCore.CanonicalDomains" Version="1.1.0" />
|
||||||
|
<PackageVersion Include="BitBadger.Documents.Postgres" Version="4.3.0" />
|
||||||
|
<PackageVersion Include="Expecto" Version="11.1.1" />
|
||||||
|
<PackageVersion Include="Giraffe" Version="8.3.0" />
|
||||||
|
<PackageVersion Include="Giraffe.Htmx" Version="2.0.11" />
|
||||||
|
<PackageVersion Include="Giraffe.ViewEngine" Version="1.4.0" />
|
||||||
|
<PackageVersion Include="Giraffe.ViewEngine.Htmx" Version="2.0.11" />
|
||||||
|
<PackageVersion Include="MailKit" Version="5.0.0" />
|
||||||
|
<PackageVersion Include="Microsoft.AspNetCore.Html.Abstractions" Version="2.3.14" />
|
||||||
|
<PackageVersion Include="Microsoft.AspNetCore.Http" Version="2.3.14" />
|
||||||
|
<PackageVersion Include="Microsoft.AspNetCore.Http.Extensions" Version="2.3.14" />
|
||||||
|
<PackageVersion Include="Microsoft.AspNetCore.Mvc" Version="2.3.14" />
|
||||||
|
<PackageVersion Include="Microsoft.AspNetCore.WebUtilities" Version="2.3.14" />
|
||||||
|
<PackageVersion Include="Newtonsoft.Json" Version="13.0.4" />
|
||||||
|
<PackageVersion Include="NodaTime" Version="3.3.7" />
|
||||||
|
<PackageVersion Include="NodaTime.Serialization.JsonNet" Version="3.3.0" />
|
||||||
|
<PackageVersion Include="NodaTime.Testing" Version="3.3.7" />
|
||||||
|
<PackageVersion Include="Npgsql.FSharp" Version="8.0.0" />
|
||||||
|
<PackageVersion Include="Npgsql.NodaTime" Version="11.0.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
+10
-10
@@ -1,25 +1,25 @@
|
|||||||
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
|
FROM mcr.microsoft.com/dotnet/sdk:11.0-alpine AS build
|
||||||
WORKDIR /pt
|
WORKDIR /pt
|
||||||
COPY ./PrayerTracker.sln ./
|
COPY ./PrayerTracker.slnx ./
|
||||||
COPY ./Directory.Build.props ./
|
COPY ./Directory.*.props ./
|
||||||
COPY ./PrayerTracker/PrayerTracker.fsproj ./PrayerTracker/
|
COPY ./PrayerTracker/PrayerTracker.fsproj ./PrayerTracker/
|
||||||
COPY ./PrayerTracker.Data/PrayerTracker.Data.fsproj ./PrayerTracker.Data/
|
COPY ./Data/PrayerTracker.Data.fsproj ./Data/
|
||||||
COPY ./PrayerTracker.Tests/PrayerTracker.Tests.fsproj ./PrayerTracker.Tests/
|
COPY ./Tests/PrayerTracker.Tests.fsproj ./Tests/
|
||||||
COPY ./PrayerTracker.UI/PrayerTracker.UI.fsproj ./PrayerTracker.UI/
|
COPY ./UI/PrayerTracker.UI.fsproj ./UI/
|
||||||
RUN dotnet restore
|
RUN dotnet restore
|
||||||
|
|
||||||
COPY . ./
|
COPY . ./
|
||||||
WORKDIR /pt/PrayerTracker.Tests
|
WORKDIR /pt/Tests
|
||||||
RUN dotnet run
|
RUN dotnet run
|
||||||
|
|
||||||
WORKDIR /pt/PrayerTracker
|
WORKDIR /pt/PrayerTracker
|
||||||
RUN dotnet publish -c Release -r linux-x64
|
RUN dotnet publish -c Release -r linux-x64
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine as final
|
FROM mcr.microsoft.com/dotnet/aspnet:11.0-alpine AS final
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN apk add --no-cache icu-libs
|
RUN apk add --no-cache icu-libs
|
||||||
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
|
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
|
||||||
COPY --from=build /pt/PrayerTracker/bin/Release/net8.0/linux-x64/publish/ ./
|
COPY --from=build /pt/PrayerTracker/bin/Release/net11.0/linux-x64/publish/ ./
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
CMD [ "dotnet", "/app/PrayerTracker.dll" ]
|
CMD [ "dotnet", "/app/PrayerTracker.dll" ]
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="Entities.fs" />
|
|
||||||
<Compile Include="Access.fs" />
|
|
||||||
<Compile Include="DistributedCache.fs" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="BitBadger.Documents.Postgres" Version="3.1.0" />
|
|
||||||
<PackageReference Include="Giraffe" Version="6.4.0" />
|
|
||||||
<PackageReference Include="NodaTime" Version="3.1.11" />
|
|
||||||
<PackageReference Include="Npgsql.FSharp" Version="5.7.0" />
|
|
||||||
<PackageReference Include="Npgsql.NodaTime" Version="8.0.3" />
|
|
||||||
<PackageReference Update="FSharp.Core" Version="8.0.300" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio Version 17
|
|
||||||
VisualStudioVersion = 17.2.32630.192
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "PrayerTracker", "PrayerTracker\PrayerTracker.fsproj", "{63780D3F-D811-4BFB-9FB0-C28A83CCE28F}"
|
|
||||||
EndProject
|
|
||||||
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "PrayerTracker.UI", "PrayerTracker.UI\PrayerTracker.UI.fsproj", "{EEE04A2B-818C-4241-90C5-69097CB0BF71}"
|
|
||||||
EndProject
|
|
||||||
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "PrayerTracker.Tests", "PrayerTracker.Tests\PrayerTracker.Tests.fsproj", "{786E7BE9-9370-4117-B194-02CC2F71AA09}"
|
|
||||||
EndProject
|
|
||||||
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "PrayerTracker.Data", "PrayerTracker.Data\PrayerTracker.Data.fsproj", "{2B5BA107-9BDA-4A1D-A9AF-AFEE6BF12270}"
|
|
||||||
EndProject
|
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B290BA27-C8B8-44F3-BF01-D103302D815F}"
|
|
||||||
ProjectSection(SolutionItems) = preProject
|
|
||||||
Directory.Build.props = Directory.Build.props
|
|
||||||
EndProjectSection
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Any CPU = Debug|Any CPU
|
|
||||||
Release|Any CPU = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{63780D3F-D811-4BFB-9FB0-C28A83CCE28F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{63780D3F-D811-4BFB-9FB0-C28A83CCE28F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{63780D3F-D811-4BFB-9FB0-C28A83CCE28F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{63780D3F-D811-4BFB-9FB0-C28A83CCE28F}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{EEE04A2B-818C-4241-90C5-69097CB0BF71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{EEE04A2B-818C-4241-90C5-69097CB0BF71}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{EEE04A2B-818C-4241-90C5-69097CB0BF71}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{EEE04A2B-818C-4241-90C5-69097CB0BF71}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{786E7BE9-9370-4117-B194-02CC2F71AA09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{786E7BE9-9370-4117-B194-02CC2F71AA09}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{786E7BE9-9370-4117-B194-02CC2F71AA09}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{786E7BE9-9370-4117-B194-02CC2F71AA09}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{2B5BA107-9BDA-4A1D-A9AF-AFEE6BF12270}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{2B5BA107-9BDA-4A1D-A9AF-AFEE6BF12270}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{2B5BA107-9BDA-4A1D-A9AF-AFEE6BF12270}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{2B5BA107-9BDA-4A1D-A9AF-AFEE6BF12270}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {D8518203-9A8E-4DD7-AAD3-F048224DA21B}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<Solution>
|
||||||
|
<Folder Name="/Solution Items/">
|
||||||
|
<File Path="Directory.Build.props" />
|
||||||
|
<File Path="Directory.Packages.props" />
|
||||||
|
</Folder>
|
||||||
|
<Project Path="Data/PrayerTracker.Data.fsproj" />
|
||||||
|
<Project Path="Tests/PrayerTracker.Tests.fsproj" />
|
||||||
|
<Project Path="UI/PrayerTracker.UI.fsproj" />
|
||||||
|
<Project Path="PrayerTracker/PrayerTracker.fsproj" />
|
||||||
|
</Solution>
|
||||||
+25
-19
@@ -15,13 +15,14 @@ open System
|
|||||||
open Microsoft.AspNetCore.Builder
|
open Microsoft.AspNetCore.Builder
|
||||||
open Microsoft.AspNetCore.Hosting
|
open Microsoft.AspNetCore.Hosting
|
||||||
open Microsoft.Extensions.Configuration
|
open Microsoft.Extensions.Configuration
|
||||||
|
open Microsoft.Extensions.Hosting
|
||||||
|
|
||||||
/// Module to hold configuration for the web app
|
/// Module to hold configuration for the web app
|
||||||
[<RequireQualifiedAccess>]
|
[<RequireQualifiedAccess>]
|
||||||
module Configure =
|
module Configure =
|
||||||
|
|
||||||
/// Set up the configuration for the app
|
/// Set up the configuration for the app
|
||||||
let configuration (ctx: WebHostBuilderContext) (cfg: IConfigurationBuilder) =
|
let configuration (ctx: HostBuilderContext) (cfg: IConfigurationBuilder) =
|
||||||
cfg.SetBasePath(ctx.HostingEnvironment.ContentRootPath)
|
cfg.SetBasePath(ctx.HostingEnvironment.ContentRootPath)
|
||||||
.AddJsonFile("appsettings.json", optional = true, reloadOnChange = true)
|
.AddJsonFile("appsettings.json", optional = true, reloadOnChange = true)
|
||||||
.AddJsonFile($"appsettings.{ctx.HostingEnvironment.EnvironmentName}.json", optional = true)
|
.AddJsonFile($"appsettings.{ctx.HostingEnvironment.EnvironmentName}.json", optional = true)
|
||||||
@@ -37,6 +38,7 @@ module Configure =
|
|||||||
open System.Globalization
|
open System.Globalization
|
||||||
open BitBadger.Documents.Postgres
|
open BitBadger.Documents.Postgres
|
||||||
open Microsoft.AspNetCore.Authentication.Cookies
|
open Microsoft.AspNetCore.Authentication.Cookies
|
||||||
|
open Microsoft.AspNetCore.HttpOverrides
|
||||||
open Microsoft.AspNetCore.Localization
|
open Microsoft.AspNetCore.Localization
|
||||||
open Microsoft.Extensions.Caching.Distributed
|
open Microsoft.Extensions.Caching.Distributed
|
||||||
open Microsoft.Extensions.DependencyInjection
|
open Microsoft.Extensions.DependencyInjection
|
||||||
@@ -56,6 +58,10 @@ module Configure =
|
|||||||
opts.DefaultRequestCulture <- RequestCulture("en-US", "en-US")
|
opts.DefaultRequestCulture <- RequestCulture("en-US", "en-US")
|
||||||
opts.SupportedCultures <- supportedCultures
|
opts.SupportedCultures <- supportedCultures
|
||||||
opts.SupportedUICultures <- supportedCultures)
|
opts.SupportedUICultures <- supportedCultures)
|
||||||
|
let _ =
|
||||||
|
svc.Configure<ForwardedHeadersOptions>(
|
||||||
|
fun (opts: ForwardedHeadersOptions) ->
|
||||||
|
opts.ForwardedHeaders <- ForwardedHeaders.XForwardedFor ||| ForwardedHeaders.XForwardedProto)
|
||||||
let _ =
|
let _ =
|
||||||
svc.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
|
svc.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme)
|
||||||
.AddCookie(fun opts ->
|
.AddCookie(fun opts ->
|
||||||
@@ -176,8 +182,6 @@ module Configure =
|
|||||||
logger.LogError(EventId(), ex, "An unhandled exception has occurred while executing the request.")
|
logger.LogError(EventId(), ex, "An unhandled exception has occurred while executing the request.")
|
||||||
clearResponse >=> setStatusCode 500 >=> text ex.Message
|
clearResponse >=> setStatusCode 500 >=> text ex.Message
|
||||||
|
|
||||||
open Microsoft.Extensions.Hosting
|
|
||||||
|
|
||||||
/// Configure logging
|
/// Configure logging
|
||||||
let logging (log: ILoggingBuilder) =
|
let logging (log: ILoggingBuilder) =
|
||||||
let env = log.Services.BuildServiceProvider().GetService<IWebHostEnvironment>()
|
let env = log.Services.BuildServiceProvider().GetService<IWebHostEnvironment>()
|
||||||
@@ -190,9 +194,8 @@ module Configure =
|
|||||||
open Microsoft.Extensions.Options
|
open Microsoft.Extensions.Options
|
||||||
|
|
||||||
/// Configure the application
|
/// Configure the application
|
||||||
let app (app : IApplicationBuilder) =
|
let app (app : WebApplication) =
|
||||||
let env = app.ApplicationServices.GetRequiredService<IWebHostEnvironment>()
|
if app.Environment.IsDevelopment() then
|
||||||
if env.IsDevelopment() then
|
|
||||||
app.UseDeveloperExceptionPage()
|
app.UseDeveloperExceptionPage()
|
||||||
else
|
else
|
||||||
app.UseGiraffeErrorHandler errorHandler
|
app.UseGiraffeErrorHandler errorHandler
|
||||||
@@ -206,12 +209,11 @@ module Configure =
|
|||||||
let _ = app.UseMiddleware<RequestStartMiddleware>()
|
let _ = app.UseMiddleware<RequestStartMiddleware>()
|
||||||
let _ = app.UseRouting()
|
let _ = app.UseRouting()
|
||||||
let _ = app.UseSession()
|
let _ = app.UseSession()
|
||||||
let _ = app.UseRequestLocalization(
|
let _ = app.UseRequestLocalization(app.Services.GetService<IOptions<RequestLocalizationOptions>>().Value)
|
||||||
app.ApplicationServices.GetService<IOptions<RequestLocalizationOptions>>().Value)
|
|
||||||
let _ = app.UseAuthentication()
|
let _ = app.UseAuthentication()
|
||||||
let _ = app.UseAuthorization()
|
let _ = app.UseAuthorization()
|
||||||
let _ = app.UseEndpoints(fun e -> e.MapGiraffeEndpoints routes)
|
let _ = app.UseEndpoints(fun e -> e.MapGiraffeEndpoints routes)
|
||||||
app.ApplicationServices.GetRequiredService<IStringLocalizerFactory>() |> Views.I18N.setUpFactories
|
app.Services.GetRequiredService<IStringLocalizerFactory>() |> Views.I18N.setUpFactories
|
||||||
|
|
||||||
|
|
||||||
/// The web application
|
/// The web application
|
||||||
@@ -222,15 +224,19 @@ module App =
|
|||||||
[<EntryPoint>]
|
[<EntryPoint>]
|
||||||
let main args =
|
let main args =
|
||||||
let contentRoot = Directory.GetCurrentDirectory()
|
let contentRoot = Directory.GetCurrentDirectory()
|
||||||
let app =
|
let builder = WebApplication.CreateBuilder(
|
||||||
WebHostBuilder()
|
WebApplicationOptions(
|
||||||
.UseContentRoot(contentRoot)
|
ContentRootPath = contentRoot,
|
||||||
.ConfigureAppConfiguration(Configure.configuration)
|
WebRootPath = Path.Combine(contentRoot, "wwwroot"),
|
||||||
.UseKestrel(Configure.kestrel)
|
Args = args))
|
||||||
.UseWebRoot(Path.Combine(contentRoot, "wwwroot"))
|
let _ = builder.Host.ConfigureAppConfiguration Configure.configuration
|
||||||
.ConfigureServices(Configure.services)
|
let _ = builder.WebHost.UseStaticWebAssets()
|
||||||
.ConfigureLogging(Configure.logging)
|
let _ = builder.WebHost.UseKestrel Configure.kestrel
|
||||||
.Configure(System.Action<IApplicationBuilder> Configure.app)
|
let _ = Configure.services builder.Services
|
||||||
.Build()
|
let _ = builder.WebHost.ConfigureLogging Configure.logging
|
||||||
|
|
||||||
|
let app = builder.Build()
|
||||||
|
Configure.app app
|
||||||
|
|
||||||
if args.Length > 0 then printfn $"Unrecognized option {args[0]}" else app.Run()
|
if args.Length > 0 then printfn $"Unrecognized option {args[0]}" else app.Run()
|
||||||
0
|
0
|
||||||
@@ -3,7 +3,6 @@ module PrayerTracker.Email
|
|||||||
|
|
||||||
open MailKit.Net.Smtp
|
open MailKit.Net.Smtp
|
||||||
open Microsoft.Extensions.Localization
|
open Microsoft.Extensions.Localization
|
||||||
open MimeKit
|
|
||||||
open PrayerTracker.Entities
|
open PrayerTracker.Entities
|
||||||
|
|
||||||
/// Parameters required to send an e-mail
|
/// Parameters required to send an e-mail
|
||||||
@@ -58,6 +57,8 @@ let getConnection () = task {
|
|||||||
return client
|
return client
|
||||||
}
|
}
|
||||||
|
|
||||||
|
open MimeKit
|
||||||
|
|
||||||
/// Create a mail message object, filled with everything but the body content
|
/// Create a mail message object, filled with everything but the body content
|
||||||
let createMessage opts =
|
let createMessage opts =
|
||||||
let msg = new MimeMessage()
|
let msg = new MimeMessage()
|
||||||
@@ -96,6 +97,8 @@ let createTextMessage opts =
|
|||||||
msg.Body <- new TextPart(TextFormat.Plain, Text = bodyText)
|
msg.Body <- new TextPart(TextFormat.Plain, Text = bodyText)
|
||||||
msg
|
msg
|
||||||
|
|
||||||
|
open MailKit
|
||||||
|
|
||||||
/// Send e-mails to a class
|
/// Send e-mails to a class
|
||||||
let sendEmails opts = task {
|
let sendEmails opts = task {
|
||||||
use htmlMsg = createHtmlMessage opts
|
use htmlMsg = createHtmlMessage opts
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ type ClaimsPrincipal with
|
|||||||
|
|
||||||
|
|
||||||
open Giraffe
|
open Giraffe
|
||||||
open Npgsql
|
|
||||||
|
|
||||||
/// Extensions on the ASP.NET Core HTTP context
|
/// Extensions on the ASP.NET Core HTTP context
|
||||||
type HttpContext with
|
type HttpContext with
|
||||||
|
|||||||
@@ -77,8 +77,6 @@ let edit reqId : HttpHandler = requireAccess [ User ] >=> fun next ctx -> task {
|
|||||||
| Result.Error e -> return! e
|
| Result.Error e -> return! e
|
||||||
}
|
}
|
||||||
|
|
||||||
open Microsoft.Extensions.Configuration
|
|
||||||
|
|
||||||
// GET /prayer-requests/email/[date]
|
// GET /prayer-requests/email/[date]
|
||||||
let email date : HttpHandler = requireAccess [ User ] >=> fun next ctx -> task {
|
let email date : HttpHandler = requireAccess [ User ] >=> fun next ctx -> task {
|
||||||
let s = ctx.Strings
|
let s = ctx.Strings
|
||||||
|
|||||||
@@ -25,15 +25,14 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="BitBadger.AspNetCore.CanonicalDomains" Version="1.0.0" />
|
<PackageReference Include="BitBadger.AspNetCore.CanonicalDomains" />
|
||||||
<PackageReference Include="Giraffe.Htmx" Version="2.0.0" />
|
<PackageReference Include="Giraffe.Htmx" />
|
||||||
<PackageReference Include="NodaTime.Serialization.JsonNet" Version="3.1.0" />
|
<PackageReference Include="NodaTime.Serialization.JsonNet" />
|
||||||
<PackageReference Update="FSharp.Core" Version="8.0.300" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\PrayerTracker.Data\PrayerTracker.Data.fsproj" />
|
<ProjectReference Include="..\Data\PrayerTracker.Data.fsproj" />
|
||||||
<ProjectReference Include="..\PrayerTracker.UI\PrayerTracker.UI.fsproj" />
|
<ProjectReference Include="..\UI\PrayerTracker.UI.fsproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -241,7 +241,6 @@ let savePreferences : HttpHandler = requireAccess [ User ] >=> validateCsrf >=>
|
|||||||
|
|
||||||
open Giraffe.ViewEngine
|
open Giraffe.ViewEngine
|
||||||
open PrayerTracker.Views.CommonFunctions
|
open PrayerTracker.Views.CommonFunctions
|
||||||
open Microsoft.Extensions.Configuration
|
|
||||||
|
|
||||||
// POST /small-group/announcement/send
|
// POST /small-group/announcement/send
|
||||||
let sendAnnouncement : HttpHandler = requireAccess [ User ] >=> validateCsrf >=> fun next ctx -> task {
|
let sendAnnouncement : HttpHandler = requireAccess [ User ] >=> validateCsrf >=> fun next ctx -> task {
|
||||||
|
|||||||
File renamed without changes.
+4
-5
@@ -14,14 +14,13 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Expecto" Version="10.2.1" />
|
<PackageReference Include="Expecto" />
|
||||||
<PackageReference Include="NodaTime.Testing" Version="3.1.11" />
|
<PackageReference Include="NodaTime.Testing" />
|
||||||
<PackageReference Update="FSharp.Core" Version="8.0.300" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\PrayerTracker.Data\PrayerTracker.Data.fsproj" />
|
<ProjectReference Include="..\Data\PrayerTracker.Data.fsproj" />
|
||||||
<ProjectReference Include="..\PrayerTracker.UI\PrayerTracker.UI.fsproj" />
|
<ProjectReference Include="..\UI\PrayerTracker.UI.fsproj" />
|
||||||
<ProjectReference Include="..\PrayerTracker\PrayerTracker.fsproj" />
|
<ProjectReference Include="..\PrayerTracker\PrayerTracker.fsproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
File renamed without changes.
@@ -9,6 +9,6 @@ let _s =
|
|||||||
let asm = typeof<Common>.Assembly.GetName().Name
|
let asm = typeof<Common>.Assembly.GetName().Name
|
||||||
let opts =
|
let opts =
|
||||||
{ new IOptions<LocalizationOptions> with
|
{ new IOptions<LocalizationOptions> with
|
||||||
member __.Value with get () = LocalizationOptions (ResourcesPath = "Resources")
|
member _.Value with get () = LocalizationOptions (ResourcesPath = "Resources")
|
||||||
}
|
}
|
||||||
ResourceManagerStringLocalizerFactory(opts, new NullLoggerFactory ()).Create("Common", asm)
|
ResourceManagerStringLocalizerFactory(opts, new NullLoggerFactory ()).Create("Common", asm)
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -3,7 +3,6 @@ module PrayerTracker.Views.Help
|
|||||||
|
|
||||||
open System.IO
|
open System.IO
|
||||||
open Giraffe.ViewEngine
|
open Giraffe.ViewEngine
|
||||||
open PrayerTracker.ViewModels
|
|
||||||
|
|
||||||
/// The help index page
|
/// The help index page
|
||||||
let index () =
|
let index () =
|
||||||
@@ -286,7 +285,7 @@ module User =
|
|||||||
|
|
||||||
/// Change Your Password
|
/// Change Your Password
|
||||||
let password () =
|
let password () =
|
||||||
let s = I18N.localizer.Force()
|
let _ = I18N.localizer.Force()
|
||||||
let l = I18N.forView "Help/User/Password"
|
let l = I18N.forView "Help/User/Password"
|
||||||
use sw = new StringWriter()
|
use sw = new StringWriter()
|
||||||
let raw = rawLocText sw
|
let raw = rawLocText sw
|
||||||
File renamed without changes.
File renamed without changes.
@@ -278,7 +278,7 @@ let private pageLayout viewInfo pgTitle content =
|
|||||||
(contentSection viewInfo pgTitle content)
|
(contentSection viewInfo pgTitle content)
|
||||||
match viewInfo.Layout with
|
match viewInfo.Layout with
|
||||||
| FullPage ->
|
| FullPage ->
|
||||||
Script.minified
|
Script.local
|
||||||
script [ _src "/js/ckeditor/ckeditor.js" ] []
|
script [ _src "/js/ckeditor/ckeditor.js" ] []
|
||||||
script [ _src "/js/app.js" ] []
|
script [ _src "/js/app.js" ] []
|
||||||
| _ -> () ]
|
| _ -> () ]
|
||||||
File renamed without changes.
@@ -15,19 +15,18 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Giraffe.ViewEngine" Version="1.4.0" />
|
<PackageReference Include="Giraffe.ViewEngine" />
|
||||||
<PackageReference Include="Giraffe.ViewEngine.Htmx" Version="2.0.0" />
|
<PackageReference Include="Giraffe.ViewEngine.Htmx" />
|
||||||
<PackageReference Include="MailKit" Version="4.6.0" />
|
<PackageReference Include="MailKit" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Html.Abstractions" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Html.Abstractions" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
|
<PackageReference Include="Microsoft.AspNetCore.Http" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Http.Extensions" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Http.Extensions" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Mvc" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" />
|
||||||
<PackageReference Update="FSharp.Core" Version="8.0.300" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\PrayerTracker.Data\PrayerTracker.Data.fsproj" />
|
<ProjectReference Include="..\Data\PrayerTracker.Data.fsproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -619,7 +619,7 @@ let preferences (model : EditPreferences) ctx viewInfo =
|
|||||||
]
|
]
|
||||||
p [] [
|
p [] [
|
||||||
rawText "*** "
|
rawText "*** "
|
||||||
raw l["If you want a custom color, you may be able to get some ideas (and a list of RGB values for those colors) from the W3 School's <a href=\"http://www.w3schools.com/html/html_colornames.asp\" title=\"HTML Color List - W3 School\">HTML color name list</a>."]
|
raw l["If you want a custom color, you may be able to get some ideas (and a list of RGB values for those colors) from the W3 School's <a href=\"https://www.w3schools.com/html/html_colornames.asp\" title=\"HTML Color List - W3 School\">HTML color name list</a>."]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|> Layout.Content.standard
|
|> Layout.Content.standard
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user