Browse Source

Merge branch 'dev' into issue-19324

pull/19326/head
oykuermann 3 years ago
parent
commit
3b73476b1d
  1. 16
      abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json
  2. 16
      abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/tr.json
  3. 27
      framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpScripts.razor
  4. 29
      framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpStyles.razor
  5. 2
      framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ApplicationApiDescriptionModel.cs

16
abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json

@ -602,9 +602,21 @@
"ProductCount": "Product Count",
"Actions": "Actions",
"CreateInvoice": "Create Invoice",
"IsVisible": "Visible",
"Menu:Testimonials": "Testimonials",
"TestimonialDeletionConfirmationMessage": "Are you sure you want to delete this testimonial ?",
"FullName": "Full name",
"TestimonialText": "Testimonial text",
"ExperienceYear": "Experience year",
"Position": "Title",
"YearsOfExperience": "Experience year",
"AllowedLicenses": "Allowed Licenses",
"AllowedModules": "Allowed Modules",
"ModuleName": "Module name",
"NonYet": "Non yet"
"NonYet": "Non yet",
"Permission:Testimonials": "Testimonials",
"SelectCompanySizePlaceholder": "Company Size",
"SelectExperienceYearPlaceholder": "Experience year",
"SelectCountryPlaceholder": "Country"
}
}
}

16
abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/tr.json

@ -443,6 +443,18 @@
"QuotationTemplate.Tax/VAT:": "Vergiler (%{0}) :",
"QuotationTemplate.TotalDiscount:": "Toplam İndirim :",
"QuotationTemplate.TOTALDUE:": "NET TOPLAM :",
"QuotationTemplate.BankAccount": "Banka hesap bilgilerimize {0} adresinden erişebilirsiniz."
"QuotationTemplate.BankAccount": "Banka hesap bilgilerimize {0} adresinden erişebilirsiniz.",
"Menu:Testimonials": "Referanslar",
"IsVisible": "Görünürlük",
"TestimonialDeletionConfirmationMessage": "Bu referansı silmek istediğinize emin misiniz ?",
"FullName": "Ad soyad",
"TestimonialText": "Tecrübe yazısı",
"ExperienceYear": "Sektörel deneyim",
"Position": "Başlık",
"Actions": "İşlemler",
"Permission:Testimonials": "Referanslar",
"SelectCompanySizePlaceholder": "Şirket Büyüklüğü",
"SelectExperienceYearPlaceholder": "Sektörel deneyim",
"SelectCountryPlaceholder": "Ülke"
}
}
}

27
framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpScripts.razor

@ -1,5 +1,7 @@
@using Volo.Abp
@implements IDisposable
@inject IComponentBundleManager BundleManager
@inject PersistentComponentState PersistentComponentState
@if (ScriptFiles != null)
{
@ -18,16 +20,37 @@
private List<string>? ScriptFiles { get; set; }
private PersistingComponentStateSubscription persistingSubscription;
protected override async Task OnInitializedAsync()
{
if (BundleName == null)
{
throw new AbpException("The BundleName parameter of the AbpScripts component can not be null!");
}
ScriptFiles = (await BundleManager.GetScriptBundleFilesAsync(BundleName!)).ToList();
persistingSubscription = PersistentComponentState.RegisterOnPersisting(PersistScriptFiles);
if (PersistentComponentState.TryTakeFromJson<List<string>>(nameof(ScriptFiles), out var restoredStyleFiles))
{
ScriptFiles = restoredStyleFiles;
}
else
{
ScriptFiles = (await BundleManager.GetScriptBundleFilesAsync(BundleName!)).ToList();
}
if (OperatingSystem.IsBrowser() && WebAssemblyScriptFiles != null)
{
ScriptFiles.AddRange(WebAssemblyScriptFiles);
ScriptFiles?.AddRange(WebAssemblyScriptFiles);
}
}
private Task PersistScriptFiles()
{
PersistentComponentState.PersistAsJson(nameof(ScriptFiles), ScriptFiles);
return Task.CompletedTask;
}
public void Dispose() => persistingSubscription.Dispose();
}

29
framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpStyles.razor

@ -1,11 +1,13 @@
@using Volo.Abp
@implements IDisposable
@inject IComponentBundleManager BundleManager
@inject PersistentComponentState PersistentComponentState
@if (StyleFiles != null)
{
foreach (var file in StyleFiles)
{
<link rel="stylesheet" href="@file"/>
<link rel="stylesheet" href="@file" />
}
}
@ -18,16 +20,37 @@
private List<string>? StyleFiles { get; set; }
private PersistingComponentStateSubscription persistingSubscription;
protected override async Task OnInitializedAsync()
{
if (BundleName == null)
{
throw new AbpException("The BundleName parameter of the AbpStyles component can not be null!");
}
StyleFiles = (await BundleManager.GetStyleBundleFilesAsync(BundleName!)).ToList();
persistingSubscription = PersistentComponentState.RegisterOnPersisting(PersistStyleFiles);
if (PersistentComponentState.TryTakeFromJson<List<string>>(nameof(StyleFiles), out var restoredStyleFiles))
{
StyleFiles = restoredStyleFiles;
}
else
{
StyleFiles = (await BundleManager.GetStyleBundleFilesAsync(BundleName!)).ToList();
}
if (OperatingSystem.IsBrowser() && WebAssemblyStyleFiles != null)
{
StyleFiles.AddRange(WebAssemblyStyleFiles);
StyleFiles?.AddRange(WebAssemblyStyleFiles);
}
}
private Task PersistStyleFiles()
{
PersistentComponentState.PersistAsJson(nameof(StyleFiles), StyleFiles);
return Task.CompletedTask;
}
public void Dispose() => persistingSubscription.Dispose();
}

2
framework/src/Volo.Abp.Http/Volo/Abp/Http/Modeling/ApplicationApiDescriptionModel.cs

@ -21,7 +21,7 @@ public class ApplicationApiDescriptionModel
{
return new ApplicationApiDescriptionModel
{
Modules = new ConcurrentDictionary<string, ModuleApiDescriptionModel>(), //TODO: Why ConcurrentDictionary?
Modules = new Dictionary<string, ModuleApiDescriptionModel>(),
Types = new SortedDictionary<string, TypeApiDescriptionModel>()
};
}

Loading…
Cancel
Save