diff --git a/templates/Coalesce.Vue.Template/.vscode/settings.json b/templates/Coalesce.Vue.Template/.vscode/settings.json
index 8c5a1a9f5..5440fd3b7 100644
--- a/templates/Coalesce.Vue.Template/.vscode/settings.json
+++ b/templates/Coalesce.Vue.Template/.vscode/settings.json
@@ -1,3 +1,4 @@
{
- "dotnet.defaultSolution": "content\\Coalesce.Starter.Vue.sln"
+ "dotnet.defaultSolution": "content\\Coalesce.Starter.Vue.sln",
+ "editor.formatOnSave": true,
}
\ No newline at end of file
diff --git a/templates/Coalesce.Vue.Template/content/.template.config/template.json b/templates/Coalesce.Vue.Template/content/.template.config/template.json
index e4bf22c13..d7e424735 100644
--- a/templates/Coalesce.Vue.Template/content/.template.config/template.json
+++ b/templates/Coalesce.Vue.Template/content/.template.config/template.json
@@ -1,15 +1,15 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "IntelliTect",
- "classifications": [ "Web", "MVC", "Vue" ],
+ "classifications": ["Web", "MVC", "Vue"],
"identity": "IntelliTect.Coalesce.Vue.Template",
"name": "IntelliTect Coalesce Web App Vue Template",
"shortName": "coalescevue",
"tags": {
- "language": "C#",
- "type":"project"
+ "language": "C#",
+ "type": "project"
},
- "sourceName": "Coalesce.Starter.Vue",
+ "sourceName": "Coalesce.Starter.Vue",
"preferNameDirectory": true,
"symbols": {
"KestrelPortGenerated": {
@@ -28,7 +28,7 @@
},
"replaces": "5002"
},
-
+
"Identity": {
"type": "parameter",
"datatype": "bool"
@@ -81,8 +81,9 @@
{
"condition": "!Identity",
"exclude": [
- "**/Program.Auth.cs",
+ "**/ProgramAuth.cs",
"**/Forbidden.vue",
+ "**/UserAvatar.vue",
"**/SignIn.cshtml",
"**/SignIn.cshtml.cs",
"**/AppClaimTypes.cs",
@@ -91,53 +92,36 @@
"**/Permission.cs",
"**/User.cs",
"**/UserRole.cs",
- "**/Role.cs",
- "**/RoleClaim.cs"
+ "**/Role.cs"
]
},
{
"condition": "!(UserPictures && Identity)",
- "exclude": [
- "Coalesce.Starter.Vue.Data/Models/UserPhoto.cs"
- ]
+ "exclude": ["Coalesce.Starter.Vue.Data/Models/UserPhoto.cs"]
},
{
"condition": "!AuditLogs",
- "exclude": [
- "**/AuditOperationContext.cs",
- "**/AuditLog.cs"
- ]
+ "exclude": ["**/AuditOperationContext.cs", "**/AuditLog.cs"]
},
{
"condition": "!TrackingBase",
- "exclude": [
- "**/TrackingBase.cs"
- ]
+ "exclude": ["**/TrackingBase.cs"]
},
{
"condition": "!AppInsights",
- "exclude": [
- "**/AppInsightsTelemetryEnricher.cs"
- ]
+ "exclude": ["**/AppInsightsTelemetryEnricher.cs"]
},
{
"condition": "!GoogleAuth",
- "exclude": [
- "**/google-logo.svg"
- ]
+ "exclude": ["**/google-logo.svg"]
},
{
"condition": "!MicrosoftAuth",
- "exclude": [
- "**/microsoft-logo.svg"
- ]
+ "exclude": ["**/microsoft-logo.svg"]
},
{
"condition": "!ExampleModel",
- "exclude": [
- "**/WidgetEdit.vue",
- "**/WidgetEdit.spec.ts"
- ]
+ "exclude": ["**/WidgetEdit.vue", "**/WidgetEdit.spec.ts"]
}
]
}
@@ -148,14 +132,14 @@
{
"type": "conditional",
"configuration": {
- "if": [ "//#if" ],
- "else": [ "//#else" ],
- "elseif": [ "//#elseif" ],
- "endif": [ "//#endif" ],
- "actionableIf": [ "////#if" ],
- "actionableElse": [ "////#else" ],
- "actionableElseif": [ "////#elseif" ],
- "actions": [ "cStyleUncomment", "cStyleReduceComment" ],
+ "if": ["//#if"],
+ "else": ["//#else"],
+ "elseif": ["//#elseif"],
+ "endif": ["//#endif"],
+ "actionableIf": ["////#if"],
+ "actionableElse": ["////#else"],
+ "actionableElseif": ["////#elseif"],
+ "actions": ["cStyleUncomment", "cStyleReduceComment"],
"trim": true,
"wholeLine": true,
"evaluator": "C++"
@@ -164,10 +148,15 @@
{
"type": "conditional",
"configuration": {
- "endif": [ "#endif", "
+
3. Add Authentication
+ Implement a proper authentication mechanism in
+ Program.cs and remove the existing dummy authentication. If you want
+ to use
+
-
-
-
-
+ ASP.NET Core Identity , you should start over and include the Identity option when
+ instantiating the Coalesce project template. Otherwise,
+
+ read more about authentication in ASP.NET Core .
+
+
+ This template authenticates all users as a dummy user to facilitate
+ rapid initial development. Since all Coalesce endpoints require
+ authentication by default, you would otherwise have to setup a real
+ authentication scheme before you could begin development.
+
+
+
+
+
+
+ Development Environment Recommended Tooling:
+
+
+
+
+
-
-
-
+
+ Visual Studio is recommended for back-end C# work, but other
+ IDEs like Rider or VS Code can also be used.
+
+ Recommended extensions:
+
+
+
+
+
+
-
-
-
+ VS Code is recommended for front-end Vue/Typescript work, with
+ these extensions:
+
-
- Here are some next steps to get started:
-
-
- -
- Create your data model by adding classes to the
- Models folder in your data project, and adding DbSet properties
- on AppDbContext.
-
- -
- Create an EF migration by running
-
dotnet ef migrations add MigrationName
- in your .Data project. The pages below will not work until you
- do so.
-
- -
-
- Implement a proper authentication mechanism in
- Program.cs and remove the existing dummy authentication. Options
- include
-
- Identity
-
- and
-
- Windows Authentication
-
-
-
-
- This template authenticates all users as a dummy user to
- facilitate rapid initial development. Since all Coalesce
- endpoints require authentication by default, you would otherwise
- have to setup a real authentication scheme before you could
- begin development.
-
- -
- Check out the other pages in the sidebar for
- examples and
- admin page links!
-
-
-
-
- Development Environment Recommended Tooling:
-
-
-
-
+
+
+
-
-
- Visual Studio is recommended for back-end C# work, but other
- IDEs like Rider or VS Code can also be used. Recommended
- extensions:
-
-
-
-
-
-
-
- VS Code is recommended for front-end Vue/Typescript work, with
- these extensions:
-
-
-
-
-
-
-
-
- Recommended browser extensions:
-
-
-
-
+
+
+
+
+ Recommended browser extensions:
+
+
+
@@ -198,36 +166,31 @@
Quick Links
- Documentation
-
+
+
+
+
+
+
+
+
+
Resources
@@ -251,12 +214,13 @@ defineProps<{ msg: string | null }>();
-
diff --git a/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/src/components/display/UserAvatar.vue b/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/src/components/display/UserAvatar.vue
index 4d4b72461..d5587ed07 100644
--- a/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/src/components/display/UserAvatar.vue
+++ b/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/src/components/display/UserAvatar.vue
@@ -22,17 +22,14 @@
diff --git a/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/src/views/WidgetEdit.vue b/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/src/views/WidgetEdit.vue
index 76d7dbecf..4d230e6dd 100644
--- a/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/src/views/WidgetEdit.vue
+++ b/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/src/views/WidgetEdit.vue
@@ -51,7 +51,7 @@ import { useBindKeyToRouteOnCreate } from "coalesce-vue";
const props = defineProps<{ id?: number }>();
-useTitle(() => item.name);
+useTitle(() => (props.id ? item.name || "Loading" : "Create Widget"));
const form = useForm();
// The properties on the generated ViewModels are already reactive.
diff --git a/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/src/views/errors/Forbidden.vue b/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/src/views/errors/Forbidden.vue
index 44a8a2d0d..b3cf7d4a3 100644
--- a/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/src/views/errors/Forbidden.vue
+++ b/templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/src/views/errors/Forbidden.vue
@@ -1,55 +1,46 @@
-
-
-
- Forbidden
-
- User '{{ $userInfo.userName }}' is not permitted to access the
- requested page.
-
+
+
+ {{ $userInfo.userName }} is not permitted to access this page.
+
-
-
- fa fa-arrow-left Back
-
-
- fa fa-home Home
-
-
- fa fa-sign-out Switch Account
-
-
+
+
+ fa fa-arrow-left Back
+
+
+ fa fa-home Home
+
+
+ fa fa-sign-out Sign Out
+
+
-
-
- User needs at least one of these required permissions:
-
- {{
- permissions
- ?.map((p) => PermissionMeta.valueLookup[p].displayName)
- .join(", ")
- }}
-
-
-
-
+
+
+
+ Required permissions:
+ {{
+ permissions
+ ?.map((p) => PermissionMeta.valueLookup[p].displayName)
+ .join(", ")
+ }}
+
+
+