Skip to content

Commit

Permalink
chore: Separate MasaFramework and Stack Sdk packages (#697)
Browse files Browse the repository at this point in the history
  • Loading branch information
wzh425 committed Jun 17, 2024
1 parent 0200d06 commit c3c319e
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 22 deletions.
9 changes: 9 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project>
<PropertyGroup>
<MicrosoftPackageVersion Condition="'$(TargetFramework)' == 'net6.0'">6.0.0</MicrosoftPackageVersion>
<MicrosoftPackageVersion Condition="'$(TargetFramework)' == 'net7.0'">7.0.0</MicrosoftPackageVersion>
<MicrosoftPackageVersion Condition="'$(TargetFramework)' == 'net8.0'">8.0.0</MicrosoftPackageVersion>
<MasaFrameworkPackageVersion>1.2.0-preview.2</MasaFrameworkPackageVersion>
<MasaStackSdksPackageVersion>1.1.0-preview.1</MasaStackSdksPackageVersion>
</PropertyGroup>
</Project>
30 changes: 15 additions & 15 deletions src/Masa.Stack.Components/Masa.Stack.Components.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@
<PackageReference Include="Humanizer" Version="2.14.1" />
<PackageReference Include="Mapster" Version="7.3.0" />
<PackageReference Include="Masa.Blazor" Version="1.4.*" />
<PackageReference Include="Masa.Contrib.SearchEngine.AutoComplete.ElasticSearch" Version="1.0.1-preview.1" />
<PackageReference Include="Masa.Contrib.StackSdks.Caller" Version="1.0.1-preview.1" />
<PackageReference Include="Masa.Contrib.StackSdks.Config" Version="1.0.1-preview.1" />
<PackageReference Include="Masa.Contrib.StackSdks.Tsc.OpenTelemetry" Version="1.0.1-preview.1" />
<PackageReference Include="Masa.Contrib.StackSdks.Mc" Version="1.0.1-preview.1" />
<PackageReference Include="Masa.Contrib.Authentication.Identity.BlazorServer" Version="1.0.1-preview.1" />
<PackageReference Include="Masa.Contrib.StackSdks.Pm" Version="1.0.1-preview.1" />
<PackageReference Include="Masa.Utils.Extensions.DependencyInjection" Version="1.0.1-preview.1" />
<PackageReference Include="Masa.Contrib.StackSdks.Auth" Version="1.0.1-preview.1" />
<PackageReference Include="Masa.Utils.Extensions.Enums" Version="1.0.1-preview.1" />
<PackageReference Include="Masa.Contrib.Configuration.ConfigurationApi.Dcc" Version="1.0.1-preview.1" />
<PackageReference Include="Masa.Contrib.Storage.ObjectStorage.Aliyun" Version="1.0.1-preview.1" />
<PackageReference Include="Masa.Contrib.Configuration" Version="1.0.1-preview.1" />
<PackageReference Include="Masa.Contrib.StackSdks.Isolation" Version="1.0.1-preview.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="6.0.15" />
<PackageReference Include="Masa.Contrib.SearchEngine.AutoComplete.ElasticSearch" Version="$(MasaFrameworkPackageVersion)" />
<PackageReference Include="Masa.Contrib.StackSdks.Caller" Version="$(MasaStackSdksPackageVersion)" />
<PackageReference Include="Masa.Contrib.StackSdks.Config" Version="$(MasaStackSdksPackageVersion)" />
<PackageReference Include="Masa.Contrib.StackSdks.Tsc.OpenTelemetry" Version="$(MasaStackSdksPackageVersion)" />
<PackageReference Include="Masa.Contrib.StackSdks.Mc" Version="$(MasaStackSdksPackageVersion)" />
<PackageReference Include="Masa.Contrib.Authentication.Identity.BlazorServer" Version="$(MasaFrameworkPackageVersion)" />
<PackageReference Include="Masa.Contrib.StackSdks.Pm" Version="$(MasaStackSdksPackageVersion)" />
<PackageReference Include="Masa.Utils.Extensions.DependencyInjection" Version="$(MasaFrameworkPackageVersion)" />
<PackageReference Include="Masa.Contrib.StackSdks.Auth" Version="$(MasaStackSdksPackageVersion)" />
<PackageReference Include="Masa.Utils.Extensions.Enums" Version="$(MasaFrameworkPackageVersion)" />
<PackageReference Include="Masa.Contrib.Configuration.ConfigurationApi.Dcc" Version="$(MasaFrameworkPackageVersion)" />
<PackageReference Include="Masa.Contrib.Storage.ObjectStorage.Aliyun" Version="$(MasaFrameworkPackageVersion)" />
<PackageReference Include="Masa.Contrib.Configuration" Version="$(MasaFrameworkPackageVersion)" />
<PackageReference Include="Masa.Contrib.StackSdks.Isolation" Version="$(MasaStackSdksPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="$(MicrosoftPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="6.0.6" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ public partial class GlobalNavigation : MasaComponentBase
{
private const string MENU_URL_NAME = "url";

[Parameter]
public string ClientId { get; set; }

[Parameter]
public RenderFragment<ActivatorProps> ActivatorContent { get; set; } = null!;

Expand Down Expand Up @@ -100,7 +103,7 @@ private async Task<ExpansionMenu> GenerateMenuAsync()
var menu = ExpansionMenu.CreateRootMenu(ExpansionMenuSituation.Favorite);
try
{
var apps = (await AuthClient.ProjectService.GetGlobalNavigations()).SelectMany(p => p.Apps).ToList();
var apps = (await AuthClient.ProjectService.GetGlobalNavigations(ClientId)).SelectMany(p => p.Apps).ToList();
var categories = apps.GroupBy(a => a.Tag).ToList();
var favorites = await FetchFavorites();

Expand Down
2 changes: 1 addition & 1 deletion src/Masa.Stack.Components/Shared/Layouts/SLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
Class="mx-6 masa-app-bar"
Elevation="0"
Height="96">
<GlobalNavigation OnFavoriteAdd="AddFavoriteMenu"
<GlobalNavigation ClientId="@AppId" OnFavoriteAdd="AddFavoriteMenu"
OnFavoriteRemove="RemoveFavoriteMenu">
<ActivatorContent>
<MButton Icon
Expand Down
8 changes: 4 additions & 4 deletions tests/MasaWebApp/MasaWebApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Masa.Contrib.SearchEngine.AutoComplete.ElasticSearch" Version="1.0.1-preview.1" />
<PackageReference Include="Masa.Contrib.StackSdks.Caller" Version="1.0.1-preview.1" />
<PackageReference Include="Masa.Utils.Data.Elasticsearch" Version="1.0.1-preview.1" />
<PackageReference Include="Masa.Contrib.Configuration" Version="1.0.1-preview.1" />
<PackageReference Include="Masa.Contrib.SearchEngine.AutoComplete.ElasticSearch" Version="$(MasaFrameworkPackageVersion)" />
<PackageReference Include="Masa.Contrib.StackSdks.Caller" Version="$(MasaStackSdksPackageVersion)" />
<PackageReference Include="Masa.Utils.Data.Elasticsearch" Version="$(MasaFrameworkPackageVersion)" />
<PackageReference Include="Masa.Contrib.Configuration" Version="$(MasaFrameworkPackageVersion)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Masa.Stack.Components\Masa.Stack.Components.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion tests/MasaWebApp/Shared/MainLayout.razor
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@using Masa.Stack.Components.Models
@inherits LayoutComponentBase

<SLayout AppId="lonsid-iot-admin" OnSignOut="SignOut" WhiteUris="_whiteUris" TeamRouteFormat="team/{0}" IsShowEnvironmentSwitch=true
<SLayout AppId="auth-web-dev" OnSignOut="SignOut" WhiteUris="_whiteUris" TeamRouteFormat="team/{0}" IsShowEnvironmentSwitch=true
Logo="https://cdn.masastack.com/stack/images/logo/MASAStack/logo-h-en.png"
MiniLogo="https://cdn.masastack.com/stack/images/logo/MASAStack/logo.png">
@Body
Expand Down

0 comments on commit c3c319e

Please sign in to comment.