Skip to content

Commit fa6d052

Browse files
committed
added project from temp project
1 parent 3a7e658 commit fa6d052

File tree

443 files changed

+110257
-3437
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

443 files changed

+110257
-3437
lines changed
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
@page
2+
@using Microsoft.AspNetCore.Http.Extensions
3+
@using Microsoft.AspNetCore.Mvc.Localization
4+
@using Tasky.Pages
5+
@using Tasky.Localization
6+
@using Volo.Abp.Users
7+
@using Volo.Abp.AspNetCore.Mvc.UI.Theming
8+
@using Volo.Abp.Ui.Branding
9+
@model IndexModel
10+
@inject IHtmlLocalizer<TaskyResource> L
11+
@inject ICurrentUser CurrentUser
12+
@inject IBrandingProvider BrandingProvider
13+
@inject ITheme Theme
14+
15+
@{
16+
Layout = Theme.GetEmptyLayout();
17+
}
18+
19+
<div class="d-flex align-items-center" style="min-height: 100vh;">
20+
<div class="container">
21+
<abp-row>
22+
23+
<div class="col mx-auto account-column">
24+
<div class="account-brand p-4 text-center mb-1">
25+
26+
@if (!BrandingProvider.LogoUrl.IsNullOrEmpty())
27+
{
28+
<a class="navbar-brand" href="/" alt="@BrandingProvider.AppName"></a>
29+
}
30+
else
31+
{
32+
<h1>@BrandingProvider.AppName</h1>
33+
}
34+
</div>
35+
<abp-card>
36+
37+
<abp-card-body>
38+
39+
<div class="container">
40+
<abp-row>
41+
<abp-column size="_9">
42+
43+
<div class="d-flex align-items-center">
44+
<div class="me-3 p-2">
45+
<i class="fa fa-user d-block" style="font-size: 10em; color: #12b900"></i>
46+
</div>
47+
<div class="p2">
48+
@if (CurrentUser.IsAuthenticated)
49+
{
50+
<span class="fs-16">
51+
@L["Welcome"] <span class="fw-7">@CurrentUser.UserName</span>
52+
</span>
53+
<span class="fs-14 d-block text-dark-800 opacity-75 mb-1">@CurrentUser.Email</span>
54+
<div class="d-grid gap-2">
55+
<a abp-button="Outline_Primary" asp-controller="Manage" asp-action="Index" asp-area="Account">@L["MyAccount"]</a>
56+
<a abp-button="Primary" asp-controller="Logout" asp-action="Index" asp-area="Account">@L["Logout"]</a>
57+
</div>
58+
}
59+
else
60+
{
61+
<a abp-button="Primary" asp-controller="Login" asp-action="Index" asp-area="Account">@L["Login"]</a>
62+
}
63+
</div>
64+
65+
</div>
66+
</abp-column>
67+
<abp-column size="_3">
68+
<div class="ml-auto p-2 float-end">
69+
<abp-dropdown>
70+
<abp-dropdown-button text="@Model.CurrentLanguage" />
71+
<abp-dropdown-menu>
72+
@foreach (var language in Model.Languages)
73+
{
74+
<abp-dropdown-item href="@Url.Content($"~/Abp/Languages/Switch?culture={language.CultureName}&uiCulture={language.UiCultureName}&returnUrl={System.Net.WebUtility.UrlEncode(Request.GetEncodedPathAndQuery())}")">@language.DisplayName</abp-dropdown-item>
75+
}
76+
</abp-dropdown-menu>
77+
</abp-dropdown>
78+
</div>
79+
</abp-column>
80+
81+
</abp-row>
82+
<hr class="m-4" />
83+
84+
<abp-row>
85+
86+
@foreach (var application in Model.Applications)
87+
{
88+
<abp-column size-md="_4" class="mb-2">
89+
<abp-card>
90+
<abp-card-body>
91+
92+
@if (!application.LogoUri.IsNullOrEmpty())
93+
{
94+
<div class="mx-auto">
95+
<img src="@application.LogoUri" style="height:64px" class="mb-3" />
96+
</div>
97+
}
98+
99+
<h4>@application.DisplayName</h4>
100+
<span class="text-muted">@application.ClientUri</span>
101+
<div class="mt-1">
102+
<a abp-button="Outline_Secondary" href="@application.ClientUri">@L["Visit"]</a>
103+
</div>
104+
</abp-card-body>
105+
</abp-card>
106+
</abp-column>
107+
}
108+
109+
</abp-row>
110+
</div>
111+
112+
</abp-card-body>
113+
114+
</abp-card>
115+
</div>
116+
117+
</abp-row>
118+
</div>
119+
</div>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using System.Collections.Generic;
2+
using System.Globalization;
3+
using System.Threading.Tasks;
4+
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
5+
using Volo.Abp.Localization;
6+
using Volo.Abp.OpenIddict.Applications;
7+
8+
namespace Tasky.Pages;
9+
10+
public class IndexModel : AbpPageModel
11+
{
12+
public List<OpenIddictApplication> Applications { get; protected set; }
13+
14+
public IReadOnlyList<LanguageInfo> Languages { get; protected set; }
15+
16+
public string CurrentLanguage { get; protected set; }
17+
18+
protected IOpenIddictApplicationRepository OpenIdApplicationRepository { get; }
19+
20+
protected ILanguageProvider LanguageProvider { get; }
21+
22+
public IndexModel(IOpenIddictApplicationRepository openIdApplicationmRepository, ILanguageProvider languageProvider)
23+
{
24+
OpenIdApplicationRepository = openIdApplicationmRepository;
25+
LanguageProvider = languageProvider;
26+
}
27+
28+
public async Task OnGetAsync()
29+
{
30+
Applications = await OpenIdApplicationRepository.GetListAsync();
31+
32+
Languages = await LanguageProvider.GetLanguagesAsync();
33+
CurrentLanguage = CultureInfo.CurrentCulture.DisplayName;
34+
}
35+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
2+
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI
3+
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
4+
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling

apps/Tasky.AuthServer/Program.cs

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
using System;
2+
using System.Threading.Tasks;
3+
using Microsoft.AspNetCore.Builder;
4+
using Microsoft.Extensions.DependencyInjection;
5+
using Microsoft.Extensions.Hosting;
6+
using Serilog;
7+
using Serilog.Events;
8+
9+
namespace Tasky;
10+
11+
public class Program
12+
{
13+
public async static Task<int> Main(string[] args)
14+
{
15+
Log.Logger = new LoggerConfiguration()
16+
#if DEBUG
17+
.MinimumLevel.Debug()
18+
#else
19+
.MinimumLevel.Information()
20+
#endif
21+
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
22+
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
23+
.Enrich.FromLogContext()
24+
.WriteTo.Async(c => c.File("Logs/logs.txt"))
25+
.WriteTo.Async(c => c.Console())
26+
.CreateLogger();
27+
28+
try
29+
{
30+
Log.Information("Starting Tasky.AuthServer.");
31+
var builder = WebApplication.CreateBuilder(args);
32+
builder.Host.AddAppSettingsSecretsJson()
33+
.UseAutofac()
34+
.UseSerilog();
35+
await builder.AddApplicationAsync<TaskyAuthServerModule>();
36+
var app = builder.Build();
37+
await app.InitializeApplicationAsync();
38+
await app.RunAsync();
39+
return 0;
40+
}
41+
catch (Exception ex)
42+
{
43+
Log.Fatal(ex, "Tasky.AuthServer terminated unexpectedly!");
44+
return 1;
45+
}
46+
finally
47+
{
48+
Log.CloseAndFlush();
49+
}
50+
}
51+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"iisSettings": {
3+
"windowsAuthentication": false,
4+
"anonymousAuthentication": true,
5+
"iisExpress": {
6+
"applicationUrl": "https://localhost:44321",
7+
"sslPort": 44321
8+
}
9+
},
10+
"profiles": {
11+
"IIS Express": {
12+
"commandName": "IISExpress",
13+
"launchBrowser": true,
14+
"environmentVariables": {
15+
"ASPNETCORE_ENVIRONMENT": "Development"
16+
}
17+
},
18+
"Tasky.AuthServer": {
19+
"commandName": "Project",
20+
"launchBrowser": true,
21+
"applicationUrl": "https://localhost:44321",
22+
"environmentVariables": {
23+
"ASPNETCORE_ENVIRONMENT": "Development"
24+
}
25+
}
26+
}
27+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<Import Project="..\..\common.props" />
4+
5+
<PropertyGroup>
6+
<TargetFramework>net6.0</TargetFramework>
7+
<RootNamespace>Tasky</RootNamespace>
8+
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
9+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
10+
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
11+
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
12+
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
13+
<PreserveCompilationReferences>true</PreserveCompilationReferences>
14+
<UserSecretsId>Tasky-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId>
15+
</PropertyGroup>
16+
17+
<ItemGroup>
18+
<Compile Remove="Logs\**" />
19+
<Content Remove="Logs\**" />
20+
<EmbeddedResource Remove="Logs\**" />
21+
<None Remove="Logs\**" />
22+
</ItemGroup>
23+
24+
<ItemGroup>
25+
<None Update="Pages\**\*.js">
26+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
27+
</None>
28+
<None Update="Pages\**\*.css">
29+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
30+
</None>
31+
</ItemGroup>
32+
33+
<ItemGroup>
34+
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
35+
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
36+
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="6.0.5" />
37+
<PackageReference Include="DistributedLock.Redis" Version="1.0.2" />
38+
</ItemGroup>
39+
40+
<ItemGroup>
41+
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite" Version="1.0.0" />
42+
</ItemGroup>
43+
44+
<ItemGroup>
45+
<PackageReference Include="Volo.Abp.Autofac" Version="6.0.2" />
46+
<PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" Version="6.0.2" />
47+
<PackageReference Include="Volo.Abp.DistributedLocking" Version="6.0.2" />
48+
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="6.0.2" />
49+
<PackageReference Include="Volo.Abp.Account.Web.OpenIddict" Version="6.0.2" />
50+
<PackageReference Include="Volo.Abp.Account.Application" Version="6.0.2" />
51+
<PackageReference Include="Volo.Abp.Account.HttpApi" Version="6.0.2" />
52+
<ProjectReference Include="..\Tasky.EntityFrameworkCore\Tasky.EntityFrameworkCore.csproj" />
53+
</ItemGroup>
54+
55+
</Project>

0 commit comments

Comments
 (0)