Browse Source

Merge branch 'rel-5.0' of https://github.com/abpframework/abp into rel-5.0

pull/10870/head
Alper Ebicoglu 4 years ago
parent
commit
3a097922a7
  1. 6
      docs/en/Object-Extensions.md
  2. 55
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs
  3. 997
      modules/docs/app/VoloDocs.EntityFrameworkCore/Migrations/20211201062931_Added_IsActive_To_AbpUsers.Designer.cs
  4. 66
      modules/docs/app/VoloDocs.EntityFrameworkCore/Migrations/20211201062931_Added_IsActive_To_AbpUsers.cs
  5. 56
      modules/docs/app/VoloDocs.EntityFrameworkCore/Migrations/VoloDocsDbContextModelSnapshot.cs
  6. 12
      modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml
  7. 11
      modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.css
  8. 2
      modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.min.css
  9. 6
      modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.scss
  10. 4
      npm/ng-packs/packages/account/src/lib/account-routing.module.ts
  11. 15
      npm/ng-packs/packages/core/src/lib/components/dynamic-layout.component.ts
  12. 11
      npm/ng-packs/packages/core/src/lib/models/rest.ts
  13. 24
      npm/ng-packs/packages/core/src/lib/services/rest.service.ts
  14. 8
      npm/ng-packs/packages/identity/src/lib/identity-routing.module.ts
  15. 6
      npm/ng-packs/packages/setting-management/src/lib/setting-management-routing.module.ts
  16. 4
      npm/ng-packs/packages/tenant-management/src/lib/tenant-management-routing.module.ts

6
docs/en/Object-Extensions.md

@ -9,10 +9,10 @@ ABP Framework provides an **object extension system** to allow you to **add extr
This is the interface to make a class extensible. It simply defines a `Dictionary` property:
````csharp
Dictionary<string, object> ExtraProperties { get; }
ExtraPropertyDictionary ExtraProperties { get; }
````
Then you can add or get extra properties using this dictionary.
`ExtraPropertyDictionary` class is inherited from the `Dictionary<string, object>` class. You can add or get extra properties using this dictionary.
### Base Classes
@ -413,4 +413,4 @@ See the [Entity Framework Core Integration document](Entity-Framework-Core.md) f
## See Also
* [Module Entity Extensions](Module-Entity-Extensions.md)
* [Module Entity Extensions](Module-Entity-Extensions.md)

55
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs

@ -82,17 +82,21 @@ namespace Volo.Abp.Cli.ProjectBuilding
version = latestVersion;
}
if (await GetTemplateNugetVersionAsync(name, type, version) == null)
else
{
throw new Exception("There is no version found with given version: " + version);
if (!await IsVersionExists(version))
{
throw new Exception("There is no version found with given version: " + version);
}
}
var nugetVersion = (await GetTemplateNugetVersionAsync(name, type, version)) ?? version;
if (!string.IsNullOrWhiteSpace(templateSource) && !IsNetworkSource(templateSource))
{
Logger.LogInformation("Using local " + type + ": " + name + ", version: " + version);
return new TemplateFile(File.ReadAllBytes(Path.Combine(templateSource, name + "-" + version + ".zip")),
version, latestVersion, version);
version, latestVersion, nugetVersion);
}
var localCacheFile = Path.Combine(CliPaths.TemplateCache, name.Replace("/", ".") + "-" + version + ".zip");
@ -100,14 +104,14 @@ namespace Volo.Abp.Cli.ProjectBuilding
#if DEBUG
if (File.Exists(localCacheFile))
{
return new TemplateFile(File.ReadAllBytes(localCacheFile), version, latestVersion, version);
return new TemplateFile(File.ReadAllBytes(localCacheFile), version, latestVersion, nugetVersion);
}
#endif
if (Options.CacheTemplates && File.Exists(localCacheFile) && templateSource.IsNullOrWhiteSpace())
{
Logger.LogInformation("Using cached " + type + ": " + name + ", version: " + version);
return new TemplateFile(File.ReadAllBytes(localCacheFile), version, latestVersion, version);
return new TemplateFile(File.ReadAllBytes(localCacheFile), version, latestVersion, nugetVersion);
}
Logger.LogInformation("Downloading " + type + ": " + name + ", version: " + version);
@ -128,7 +132,7 @@ namespace Volo.Abp.Cli.ProjectBuilding
File.WriteAllBytes(localCacheFile, fileContent);
}
return new TemplateFile(fileContent, version, latestVersion, version);
return new TemplateFile(fileContent, version, latestVersion, nugetVersion);
}
private async Task<string> GetLatestSourceCodeVersionAsync(string name, string type, string url = null,
@ -196,6 +200,30 @@ namespace Volo.Abp.Cli.ProjectBuilding
}
}
private async Task<bool> IsVersionExists(string version)
{
var url = $"{CliUrls.WwwAbpIo}api/download/versions?includePreReleases=true";
try
{
var client = _cliHttpClientFactory.CreateClient();
using (var response = await client.GetAsync(url,
_cliHttpClientFactory.GetCancellationToken(TimeSpan.FromMinutes(10))))
{
await RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(response);
var result = await response.Content.ReadAsStringAsync();
var versions = JsonSerializer.Deserialize<List<GithubRelease>>(result);
return versions.Any(v => v.Name == version);
}
}
catch (Exception ex)
{
throw new Exception($"Error occured while getting the versions from {url} : {ex.Message}");
}
}
private async Task<byte[]> DownloadSourceCodeContentAsync(SourceCodeDownloadInputDto input)
{
var url = $"{CliUrls.WwwAbpIo}api/download/{input.Type}/";
@ -292,5 +320,16 @@ namespace Volo.Abp.Cli.ProjectBuilding
{
public string Version { get; set; }
}
public class GithubRelease
{
public int Id { get; set; }
public string Name { get; set; }
public bool IsPrerelease { get; set; }
public DateTime PublishTime { get; set; }
}
}
}
}

997
modules/docs/app/VoloDocs.EntityFrameworkCore/Migrations/20211201062931_Added_IsActive_To_AbpUsers.Designer.cs

@ -0,0 +1,997 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.Abp.EntityFrameworkCore;
using VoloDocs.EntityFrameworkCore;
#nullable disable
namespace VoloDocs.EntityFrameworkCore.Migrations
{
[DbContext(typeof(VoloDocsDbContext))]
[Migration("20211201062931_Added_IsActive_To_AbpUsers")]
partial class Added_IsActive_To_AbpUsers
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
.HasAnnotation("ProductVersion", "6.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("Description")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsStatic")
.HasColumnType("bit");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<string>("Regex")
.HasMaxLength(512)
.HasColumnType("nvarchar(512)");
b.Property<string>("RegexDescription")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<bool>("Required")
.HasColumnType("bit");
b.Property<int>("ValueType")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("AbpClaimTypes", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("SourceTenantId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("SourceUserId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TargetTenantId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("TargetUserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId")
.IsUnique()
.HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL");
b.ToTable("AbpLinkUsers", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDefault")
.HasColumnType("bit")
.HasColumnName("IsDefault");
b.Property<bool>("IsPublic")
.HasColumnType("bit")
.HasColumnName("IsPublic");
b.Property<bool>("IsStatic")
.HasColumnType("bit")
.HasColumnName("IsStatic");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<string>("NormalizedName")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("NormalizedName");
b.ToTable("AbpRoles", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("ClaimType")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<string>("ClaimValue")
.HasMaxLength(1024)
.HasColumnType("nvarchar(1024)");
b.Property<Guid>("RoleId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AbpRoleClaims", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Action")
.HasMaxLength(96)
.HasColumnType("nvarchar(96)");
b.Property<string>("ApplicationName")
.HasMaxLength(96)
.HasColumnType("nvarchar(96)");
b.Property<string>("BrowserInfo")
.HasMaxLength(512)
.HasColumnType("nvarchar(512)");
b.Property<string>("ClientId")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ClientIpAddress")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("CorrelationId")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<string>("Identity")
.HasMaxLength(96)
.HasColumnType("nvarchar(96)");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.Property<string>("TenantName")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<Guid?>("UserId")
.HasColumnType("uniqueidentifier");
b.Property<string>("UserName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.HasKey("Id");
b.HasIndex("TenantId", "Action");
b.HasIndex("TenantId", "ApplicationName");
b.HasIndex("TenantId", "Identity");
b.HasIndex("TenantId", "UserId");
b.ToTable("AbpSecurityLogs", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<int>("AccessFailedCount")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasDefaultValue(0)
.HasColumnName("AccessFailedCount");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<string>("Email")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("nvarchar(256)")
.HasColumnName("Email");
b.Property<bool>("EmailConfirmed")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("EmailConfirmed");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsActive")
.HasColumnType("bit");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<bool>("IsExternal")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsExternal");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<bool>("LockoutEnabled")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("LockoutEnabled");
b.Property<DateTimeOffset?>("LockoutEnd")
.HasColumnType("datetimeoffset");
b.Property<string>("Name")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasColumnName("Name");
b.Property<string>("NormalizedEmail")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("nvarchar(256)")
.HasColumnName("NormalizedEmail");
b.Property<string>("NormalizedUserName")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("nvarchar(256)")
.HasColumnName("NormalizedUserName");
b.Property<string>("PasswordHash")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)")
.HasColumnName("PasswordHash");
b.Property<string>("PhoneNumber")
.HasMaxLength(16)
.HasColumnType("nvarchar(16)")
.HasColumnName("PhoneNumber");
b.Property<bool>("PhoneNumberConfirmed")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("PhoneNumberConfirmed");
b.Property<string>("SecurityStamp")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("nvarchar(256)")
.HasColumnName("SecurityStamp");
b.Property<string>("Surname")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)")
.HasColumnName("Surname");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.Property<bool>("TwoFactorEnabled")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("TwoFactorEnabled");
b.Property<string>("UserName")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("nvarchar(256)")
.HasColumnName("UserName");
b.HasKey("Id");
b.HasIndex("Email");
b.HasIndex("NormalizedEmail");
b.HasIndex("NormalizedUserName");
b.HasIndex("UserName");
b.ToTable("AbpUsers", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("ClaimType")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<string>("ClaimValue")
.HasMaxLength(1024)
.HasColumnType("nvarchar(1024)");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.Property<Guid>("UserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("AbpUserClaims", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
{
b.Property<Guid>("UserId")
.HasColumnType("uniqueidentifier");
b.Property<string>("LoginProvider")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ProviderDisplayName")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<string>("ProviderKey")
.IsRequired()
.HasMaxLength(196)
.HasColumnType("nvarchar(196)");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.HasKey("UserId", "LoginProvider");
b.HasIndex("LoginProvider", "ProviderKey");
b.ToTable("AbpUserLogins", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b =>
{
b.Property<Guid>("OrganizationUnitId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("UserId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.HasKey("OrganizationUnitId", "UserId");
b.HasIndex("UserId", "OrganizationUnitId");
b.ToTable("AbpUserOrganizationUnits", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{
b.Property<Guid>("UserId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("RoleId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId", "UserId");
b.ToTable("AbpUserRoles", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
{
b.Property<Guid>("UserId")
.HasColumnType("uniqueidentifier");
b.Property<string>("LoginProvider")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Name")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.Property<string>("Value")
.HasColumnType("nvarchar(max)");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AbpUserTokens", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Code")
.IsRequired()
.HasMaxLength(95)
.HasColumnType("nvarchar(95)")
.HasColumnName("Code");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<string>("DisplayName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)")
.HasColumnName("DisplayName");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<Guid?>("ParentId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("Code");
b.HasIndex("ParentId");
b.ToTable("AbpOrganizationUnits", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b =>
{
b.Property<Guid>("OrganizationUnitId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("RoleId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.HasKey("OrganizationUnitId", "RoleId");
b.HasIndex("RoleId", "OrganizationUnitId");
b.ToTable("AbpOrganizationUnitRoles", (string)null);
});
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<string>("ProviderKey")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ProviderName")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey")
.IsUnique()
.HasFilter("[TenantId] IS NOT NULL");
b.ToTable("AbpPermissionGrants", (string)null);
});
modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<string>("ProviderKey")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("ProviderName")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Value")
.IsRequired()
.HasMaxLength(2048)
.HasColumnType("nvarchar(2048)");
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey")
.IsUnique()
.HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL");
b.ToTable("AbpSettings", (string)null);
});
modelBuilder.Entity("Volo.Docs.Documents.Document", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("Content")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2");
b.Property<string>("EditLink")
.HasMaxLength(2048)
.HasColumnType("nvarchar(2048)");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<string>("FileName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<string>("Format")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<string>("LanguageCode")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<DateTime>("LastCachedTime")
.HasColumnType("datetime2");
b.Property<DateTime?>("LastSignificantUpdateTime")
.HasColumnType("datetime2");
b.Property<DateTime>("LastUpdatedTime")
.HasColumnType("datetime2");
b.Property<string>("LocalDirectory")
.HasMaxLength(512)
.HasColumnType("nvarchar(512)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("nvarchar(255)");
b.Property<Guid>("ProjectId")
.HasColumnType("uniqueidentifier");
b.Property<string>("RawRootUrl")
.HasMaxLength(2048)
.HasColumnType("nvarchar(2048)");
b.Property<string>("RootUrl")
.HasMaxLength(2048)
.HasColumnType("nvarchar(2048)");
b.Property<string>("Version")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.HasKey("Id");
b.ToTable("DocsDocuments", (string)null);
});
modelBuilder.Entity("Volo.Docs.Documents.DocumentContributor", b =>
{
b.Property<Guid>("DocumentId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Username")
.HasColumnType("nvarchar(450)");
b.Property<string>("AvatarUrl")
.HasColumnType("nvarchar(max)");
b.Property<int>("CommitCount")
.HasColumnType("int");
b.Property<string>("UserProfileUrl")
.HasColumnType("nvarchar(max)");
b.HasKey("DocumentId", "Username");
b.ToTable("DocsDocumentContributors", (string)null);
});
modelBuilder.Entity("Volo.Docs.Projects.Project", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("DefaultDocumentName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<string>("DocumentStoreType")
.HasColumnType("nvarchar(max)");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<string>("Format")
.HasColumnType("nvarchar(max)");
b.Property<string>("LatestVersionBranchName")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<string>("MainWebsiteUrl")
.HasColumnType("nvarchar(max)");
b.Property<string>("MinimumVersion")
.HasColumnType("nvarchar(max)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<string>("NavigationDocumentName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<string>("ParametersDocumentName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property<string>("ShortName")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("nvarchar(32)");
b.HasKey("Id");
b.ToTable("DocsProjects", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityRole", null)
.WithMany("Claims")
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser", null)
.WithMany("Claims")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser", null)
.WithMany("Logins")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b =>
{
b.HasOne("Volo.Abp.Identity.OrganizationUnit", null)
.WithMany()
.HasForeignKey("OrganizationUnitId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Volo.Abp.Identity.IdentityUser", null)
.WithMany("OrganizationUnits")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityRole", null)
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Volo.Abp.Identity.IdentityUser", null)
.WithMany("Roles")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser", null)
.WithMany("Tokens")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b =>
{
b.HasOne("Volo.Abp.Identity.OrganizationUnit", null)
.WithMany()
.HasForeignKey("ParentId");
});
modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b =>
{
b.HasOne("Volo.Abp.Identity.OrganizationUnit", null)
.WithMany("Roles")
.HasForeignKey("OrganizationUnitId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Volo.Abp.Identity.IdentityRole", null)
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Docs.Documents.DocumentContributor", b =>
{
b.HasOne("Volo.Docs.Documents.Document", null)
.WithMany("Contributors")
.HasForeignKey("DocumentId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b =>
{
b.Navigation("Claims");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b =>
{
b.Navigation("Claims");
b.Navigation("Logins");
b.Navigation("OrganizationUnits");
b.Navigation("Roles");
b.Navigation("Tokens");
});
modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b =>
{
b.Navigation("Roles");
});
modelBuilder.Entity("Volo.Docs.Documents.Document", b =>
{
b.Navigation("Contributors");
});
#pragma warning restore 612, 618
}
}
}

66
modules/docs/app/VoloDocs.EntityFrameworkCore/Migrations/20211201062931_Added_IsActive_To_AbpUsers.cs

@ -0,0 +1,66 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace VoloDocs.EntityFrameworkCore.Migrations
{
public partial class Added_IsActive_To_AbpUsers : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_AbpSettings_Name_ProviderName_ProviderKey",
table: "AbpSettings");
migrationBuilder.DropIndex(
name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey",
table: "AbpPermissionGrants");
migrationBuilder.AddColumn<bool>(
name: "IsActive",
table: "AbpUsers",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.CreateIndex(
name: "IX_AbpSettings_Name_ProviderName_ProviderKey",
table: "AbpSettings",
columns: new[] { "Name", "ProviderName", "ProviderKey" },
unique: true,
filter: "[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_AbpPermissionGrants_TenantId_Name_ProviderName_ProviderKey",
table: "AbpPermissionGrants",
columns: new[] { "TenantId", "Name", "ProviderName", "ProviderKey" },
unique: true,
filter: "[TenantId] IS NOT NULL");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_AbpSettings_Name_ProviderName_ProviderKey",
table: "AbpSettings");
migrationBuilder.DropIndex(
name: "IX_AbpPermissionGrants_TenantId_Name_ProviderName_ProviderKey",
table: "AbpPermissionGrants");
migrationBuilder.DropColumn(
name: "IsActive",
table: "AbpUsers");
migrationBuilder.CreateIndex(
name: "IX_AbpSettings_Name_ProviderName_ProviderKey",
table: "AbpSettings",
columns: new[] { "Name", "ProviderName", "ProviderKey" });
migrationBuilder.CreateIndex(
name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey",
table: "AbpPermissionGrants",
columns: new[] { "Name", "ProviderName", "ProviderKey" });
}
}
}

56
modules/docs/app/VoloDocs.EntityFrameworkCore/Migrations/VoloDocsDbContextModelSnapshot.cs

@ -7,6 +7,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.Abp.EntityFrameworkCore;
using VoloDocs.EntityFrameworkCore;
#nullable disable
namespace VoloDocs.EntityFrameworkCore.Migrations
{
[DbContext(typeof(VoloDocsDbContext))]
@ -16,10 +18,11 @@ namespace VoloDocs.EntityFrameworkCore.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.UseIdentityColumns()
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("ProductVersion", "5.0.1");
.HasAnnotation("ProductVersion", "6.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b =>
{
@ -65,7 +68,7 @@ namespace VoloDocs.EntityFrameworkCore.Migrations
b.HasKey("Id");
b.ToTable("AbpClaimTypes");
b.ToTable("AbpClaimTypes", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b =>
@ -92,7 +95,7 @@ namespace VoloDocs.EntityFrameworkCore.Migrations
.IsUnique()
.HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL");
b.ToTable("AbpLinkUsers");
b.ToTable("AbpLinkUsers", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b =>
@ -141,7 +144,7 @@ namespace VoloDocs.EntityFrameworkCore.Migrations
b.HasIndex("NormalizedName");
b.ToTable("AbpRoles");
b.ToTable("AbpRoles", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
@ -169,7 +172,7 @@ namespace VoloDocs.EntityFrameworkCore.Migrations
b.HasIndex("RoleId");
b.ToTable("AbpRoleClaims");
b.ToTable("AbpRoleClaims", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b =>
@ -244,7 +247,7 @@ namespace VoloDocs.EntityFrameworkCore.Migrations
b.HasIndex("TenantId", "UserId");
b.ToTable("AbpSecurityLogs");
b.ToTable("AbpSecurityLogs", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b =>
@ -297,6 +300,9 @@ namespace VoloDocs.EntityFrameworkCore.Migrations
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsActive")
.HasColumnType("bit");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
@ -396,7 +402,7 @@ namespace VoloDocs.EntityFrameworkCore.Migrations
b.HasIndex("UserName");
b.ToTable("AbpUsers");
b.ToTable("AbpUsers", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b =>
@ -424,7 +430,7 @@ namespace VoloDocs.EntityFrameworkCore.Migrations
b.HasIndex("UserId");
b.ToTable("AbpUserClaims");
b.ToTable("AbpUserClaims", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
@ -453,7 +459,7 @@ namespace VoloDocs.EntityFrameworkCore.Migrations
b.HasIndex("LoginProvider", "ProviderKey");
b.ToTable("AbpUserLogins");
b.ToTable("AbpUserLogins", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b =>
@ -480,7 +486,7 @@ namespace VoloDocs.EntityFrameworkCore.Migrations
b.HasIndex("UserId", "OrganizationUnitId");
b.ToTable("AbpUserOrganizationUnits");
b.ToTable("AbpUserOrganizationUnits", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
@ -499,7 +505,7 @@ namespace VoloDocs.EntityFrameworkCore.Migrations
b.HasIndex("RoleId", "UserId");
b.ToTable("AbpUserRoles");
b.ToTable("AbpUserRoles", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
@ -524,7 +530,7 @@ namespace VoloDocs.EntityFrameworkCore.Migrations
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AbpUserTokens");
b.ToTable("AbpUserTokens", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b =>
@ -598,7 +604,7 @@ namespace VoloDocs.EntityFrameworkCore.Migrations
b.HasIndex("ParentId");
b.ToTable("AbpOrganizationUnits");
b.ToTable("AbpOrganizationUnits", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b =>
@ -625,7 +631,7 @@ namespace VoloDocs.EntityFrameworkCore.Migrations
b.HasIndex("RoleId", "OrganizationUnitId");
b.ToTable("AbpOrganizationUnitRoles");
b.ToTable("AbpOrganizationUnitRoles", (string)null);
});
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b =>
@ -655,9 +661,11 @@ namespace VoloDocs.EntityFrameworkCore.Migrations
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey")
.IsUnique()
.HasFilter("[TenantId] IS NOT NULL");
b.ToTable("AbpPermissionGrants");
b.ToTable("AbpPermissionGrants", (string)null);
});
modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b =>
@ -686,9 +694,11 @@ namespace VoloDocs.EntityFrameworkCore.Migrations
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.HasIndex("Name", "ProviderName", "ProviderKey")
.IsUnique()
.HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL");
b.ToTable("AbpSettings");
b.ToTable("AbpSettings", (string)null);
});
modelBuilder.Entity("Volo.Docs.Documents.Document", b =>
@ -768,7 +778,7 @@ namespace VoloDocs.EntityFrameworkCore.Migrations
b.HasKey("Id");
b.ToTable("DocsDocuments");
b.ToTable("DocsDocuments", (string)null);
});
modelBuilder.Entity("Volo.Docs.Documents.DocumentContributor", b =>
@ -790,7 +800,7 @@ namespace VoloDocs.EntityFrameworkCore.Migrations
b.HasKey("DocumentId", "Username");
b.ToTable("DocsDocumentContributors");
b.ToTable("DocsDocumentContributors", (string)null);
});
modelBuilder.Entity("Volo.Docs.Projects.Project", b =>
@ -852,7 +862,7 @@ namespace VoloDocs.EntityFrameworkCore.Migrations
b.HasKey("Id");
b.ToTable("DocsProjects");
b.ToTable("DocsProjects", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>

12
modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml

@ -93,7 +93,7 @@
</span>
<select asp-items="Model.ProjectSelectItems"
class="form-control"
class="form-select"
onchange="window.location.pathname = this.value">
</select>
</div>
@ -115,7 +115,7 @@
<select asp-items="Model.VersionSelectItems"
class="form-control"
class="form-select"
onchange="if (this.value) { window.location.replace(this.value) }">
</select>
</div>
@ -126,15 +126,15 @@
@if (Model.LanguageSelectListItems.Count > 1)
{
<div class="@(Model.VersionSelectItems.Any()? "pl-0 col-5" : "col")">
<div class="docs-version docs-language @(Model.VersionSelectItems.Any()?"pl-1":"")">
<div class="@(Model.VersionSelectItems.Any()? "ps-0 col-5" : "col")">
<div class="docs-version docs-language @(Model.VersionSelectItems.Any() ? "ps-1" : "")">
<div class="version-select">
<div class="input-group">
@*<span class="input-group-text">
<i class="fa fa-globe" aria-hidden="true" data-bs-toggle="tooltip" title="@L["Language"]"></i>
</span>*@
<select asp-items="Model.LanguageSelectListItems"
class="form-control"
class="form-select"
onchange="window.location.replace(this.value)">
</select>
</div>
@ -260,7 +260,7 @@
<abp-column size="_4">
<div class="input-group">
<span class="input-group-text" id="@("Section" + parameter.Name + "ComboboxAddonId")">@(parameter.DisplayName)</span>
<select class="doc-section-combobox form-control"
<select class="doc-section-combobox form-select"
aria-describedby="@("Section" + parameter.Name + "ComboboxAddonId")"
id="@("Section" + parameter.Name + "ComboboxId")" data-key="@parameter.Name">
@foreach (var value in parameter.Values)

11
modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.css

@ -48,16 +48,16 @@ a {
background: #000; }
.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select .input-group-text i {
color: #666; }
.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-control, .docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control {
.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-select, .docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control {
padding: 0 10px 2px 10px;
border: 0;
min-height: 34px;
height: 34px;
font-size: .9em;
border-radius: 0px; }
.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-control:focus, .docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-control:active, .docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-control:hover, .docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-control:visited, .docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control:focus, .docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control:active, .docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control:hover, .docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control:visited {
.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-select:focus, .docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-select:active, .docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-select:hover, .docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-select:visited, .docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-select:focus, .docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control:active, .docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control:hover, .docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control:visited {
box-shadow: none; }
.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-control {
.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-select {
padding: 0 10px 2px 6px; }
.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-filter {
padding: 0 1rem;
@ -247,9 +247,8 @@ a {
margin-bottom: 1rem;
margin-left: 0;
border-left: 3px solid #d2dbe4;
padding: 1em 1.5em;
background-color: #e9edf1;
padding-bottom: .2em;
padding: 1em 1.5em !important;
font-size: 1em; }
.docs-page .docs-content article.docs-body img {
max-width: 100%;
@ -356,7 +355,7 @@ a {
.docs-page .docs-page-index .scroll-top-btn.showup {
display: block; }
.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-control, .docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control {
.docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select select.form-select, .docs-page .docs-sidebar .docs-sidebar-wrapper .docs-version .version-select input.form-control {
background: #000000;
color: white; }

2
modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.min.css

File diff suppressed because one or more lines are too long

6
modules/docs/src/Volo.Docs.Web/Pages/Documents/Shared/Styles/vs.scss

@ -68,7 +68,7 @@ a { text-decoration: none;}
}
}
select.form-control, input.form-control {
select.form-select, input.form-control {
padding: 0 10px 2px 10px;
border: 0;
min-height: 34px;
@ -81,7 +81,7 @@ a { text-decoration: none;}
}
}
select.form-control {
select.form-select {
padding: 0 10px 2px 6px;
}
}
@ -594,7 +594,7 @@ a { text-decoration: none;}
.docs-version {
.version-select {
select.form-control, input.form-control {
select.form-select, input.form-control {
background: #000000;
color: white;
}

4
npm/ng-packs/packages/account/src/lib/account-routing.module.ts

@ -1,8 +1,8 @@
import {
AuthGuard,
DynamicLayoutComponent,
ReplaceableComponents,
ReplaceableRouteContainerComponent,
RouterOutletComponent,
} from '@abp/ng.core';
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
@ -18,7 +18,7 @@ const routes: Routes = [
{ path: '', pathMatch: 'full', redirectTo: 'login' },
{
path: '',
component: DynamicLayoutComponent,
component: RouterOutletComponent,
children: [
{
path: 'login',

15
npm/ng-packs/packages/core/src/lib/components/dynamic-layout.component.ts

@ -1,4 +1,4 @@
import { Component, Injector, Optional, SkipSelf, Type } from '@angular/core';
import { Component, Injector, isDevMode, Optional, SkipSelf, Type } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { eLayoutType } from '../enums/common';
import { ABP } from '../models';
@ -13,13 +13,7 @@ import { TreeNode } from '../utils/tree-utils';
@Component({
selector: 'abp-dynamic-layout',
template: `
<ng-container *ngTemplateOutlet="layout ? componentOutlet : routerOutlet"></ng-container>
<ng-template #routerOutlet><router-outlet></router-outlet></ng-template>
<ng-template #componentOutlet
><ng-container *ngIf="isLayoutVisible" [ngComponentOutlet]="layout"></ng-container
></ng-template>
`,
template: ` <ng-container *ngIf="isLayoutVisible" [ngComponentOutlet]="layout"></ng-container> `,
providers: [SubscriptionService],
})
export class DynamicLayoutComponent {
@ -47,7 +41,10 @@ export class DynamicLayoutComponent {
private routerEvents: RouterEvents,
@Optional() @SkipSelf() dynamicLayoutComponent: DynamicLayoutComponent,
) {
if (dynamicLayoutComponent) return;
if (dynamicLayoutComponent) {
if (isDevMode) console.warn('DynamicLayoutComponent must be used only in AppComponent.');
return;
}
this.route = injector.get(ActivatedRoute);
this.router = injector.get(Router);
this.routes = injector.get(RoutesService);

11
npm/ng-packs/packages/core/src/lib/models/rest.ts

@ -1,10 +1,11 @@
import { HttpHeaders, HttpParams } from '@angular/common/http';
import { HttpHeaders, HttpParameterCodec, HttpParams } from '@angular/common/http';
export namespace Rest {
export type Config = Partial<{
apiName: string;
skipHandleError: boolean;
observe: Observe;
httpParamEncoder?: HttpParameterCodec;
}>;
export const enum Observe {
@ -20,6 +21,8 @@ export namespace Rest {
Text = 'text',
}
export type Params = HttpParams | { [param: string]: any };
export interface Request<T> {
body?: T;
headers?:
@ -28,11 +31,7 @@ export namespace Rest {
[header: string]: string | string[];
};
method: string;
params?:
| HttpParams
| {
[param: string]: any;
};
params?: Params;
reportProgress?: boolean;
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
url: string;

24
npm/ng-packs/packages/core/src/lib/services/rest.service.ts

@ -1,4 +1,4 @@
import { HttpClient, HttpRequest } from '@angular/common/http';
import { HttpClient, HttpParameterCodec, HttpParams, HttpRequest } from '@angular/common/http';
import { Inject, Injectable } from '@angular/core';
import { Observable, throwError } from 'rxjs';
import { catchError } from 'rxjs/operators';
@ -43,18 +43,22 @@ export class RestService {
.request<R>(method, api + request.url, {
observe,
...(params && {
params: Object.keys(params).reduce((acc, key) => {
const value = params[key];
if (isUndefinedOrEmptyString(value)) return acc;
if (value === null && !this.options.sendNullsAsQueryParam) return acc;
acc[key] = value;
return acc;
}, {}),
params: this.getParams(params, config.httpParamEncoder),
}),
...options,
} as any)
.pipe(catchError(err => (skipHandleError ? throwError(err) : this.handleError(err))));
}
private getParams(params: Rest.Params, encoder?: HttpParameterCodec): HttpParams {
const httpParams = encoder ? new HttpParams({ encoder }) : new HttpParams();
return Object.keys(params).reduce((acc, key) => {
const value = params[key];
if (isUndefinedOrEmptyString(value)) return acc;
if (value === null && !this.options.sendNullsAsQueryParam) return acc;
acc = acc.set(key, value);
return acc;
}, httpParams);
}
}

8
npm/ng-packs/packages/identity/src/lib/identity-routing.module.ts

@ -1,9 +1,7 @@
import {
AuthGuard,
DynamicLayoutComponent,
PermissionGuard,
AuthGuard, PermissionGuard,
ReplaceableComponents,
ReplaceableRouteContainerComponent,
ReplaceableRouteContainerComponent, RouterOutletComponent
} from '@abp/ng.core';
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
@ -16,7 +14,7 @@ const routes: Routes = [
{ path: '', redirectTo: 'roles', pathMatch: 'full' },
{
path: '',
component: DynamicLayoutComponent,
component: RouterOutletComponent,
canActivate: [AuthGuard, PermissionGuard, IdentityExtensionsGuard],
children: [
{

6
npm/ng-packs/packages/setting-management/src/lib/setting-management-routing.module.ts

@ -1,8 +1,8 @@
import {
DynamicLayoutComponent,
AuthGuard,
ReplaceableComponents,
ReplaceableRouteContainerComponent,
AuthGuard,
RouterOutletComponent,
} from '@abp/ng.core';
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
@ -12,7 +12,7 @@ import { eSettingManagementComponents } from './enums/components';
const routes: Routes = [
{
path: '',
component: DynamicLayoutComponent,
component: RouterOutletComponent,
canActivate: [AuthGuard],
children: [
{

4
npm/ng-packs/packages/tenant-management/src/lib/tenant-management-routing.module.ts

@ -1,9 +1,9 @@
import {
AuthGuard,
DynamicLayoutComponent,
PermissionGuard,
ReplaceableComponents,
ReplaceableRouteContainerComponent,
RouterOutletComponent,
} from '@abp/ng.core';
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
@ -15,7 +15,7 @@ const routes: Routes = [
{ path: '', redirectTo: 'tenants', pathMatch: 'full' },
{
path: '',
component: DynamicLayoutComponent,
component: RouterOutletComponent,
canActivate: [AuthGuard, PermissionGuard, TenantManagementExtensionsGuard],
children: [
{

Loading…
Cancel
Save