App name refactor
Some checks failed
Build Bimix / Build WebAPI and WebUI (push) Failing after 12s

This commit is contained in:
Michał Zieliński
2025-10-11 11:33:46 +02:00
parent b4edaf007e
commit 6d2c46d971
88 changed files with 437 additions and 419 deletions

View File

@@ -19,8 +19,8 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Bimix.Application\Bimix.Application.csproj" />
<ProjectReference Include="..\Bimix.Infrastructure\Bimix.Infrastructure.csproj" />
<ProjectReference Include="..\BimAI.Application\BimAI.Application.csproj" />
<ProjectReference Include="..\BimAI.Infrastructure\BimAI.Infrastructure.csproj" />
</ItemGroup>
</Project>

6
BimAI.API/BimAI.API.http Normal file
View File

@@ -0,0 +1,6 @@
@BimAI.API_HostAddress = http://localhost:5090
GET {{BimAI.API_HostAddress}}/weatherforecast/
Accept: application/json
###

View File

@@ -1,10 +1,10 @@
using System.Security.Claims;
using Bimix.API.Services;
using Bimix.Application.DTOModels;
using BimAI.API.Services;
using BimAI.Application.DTOModels;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Bimix.API.Controllers;
namespace BimAI.API.Controllers;
public class AuthController(
GoogleAuthService googleAuthService,

View File

@@ -1,17 +1,16 @@
using Bimix.Application.DTOModels;
using Bimix.Application.DTOModels.Common;
using BimAI.Application.DTOModels;
using BimAI.Application.DTOModels.Common;
using BimAI.Infrastructure.Data;
using Microsoft.AspNetCore.Mvc;
using Bimix.Infrastructure.Data;
using Bimix.Domain.Entities;
using Microsoft.EntityFrameworkCore;
namespace Bimix.API.Controllers;
namespace BimAI.API.Controllers;
[ApiController]
[Route("api/[controller]")]
public class ProductsController(BimixDbContext context) : ControllerBase
public class ProductsController(BimAIDbContext context) : ControllerBase
{
private readonly BimixDbContext _context = context;
private readonly BimAIDbContext _context = context;
[HttpGet]
public async Task<ActionResult<IEnumerable<ProductDto>>> GetProducts([FromQuery] ProductFilterRequest request)

View File

@@ -1,7 +1,7 @@
using Bimix.Infrastructure.Sync;
using BimAI.Infrastructure.Sync;
using Microsoft.AspNetCore.Mvc;
namespace Bimix.API.Controllers;
namespace BimAI.API.Controllers;
[ApiController]
[Route("api/[controller]")]

View File

@@ -1,7 +1,7 @@
using System.Text;
using Bimix.API.Services;
using Bimix.Infrastructure.Data;
using Bimix.Infrastructure.Sync;
using BimAI.API.Services;
using BimAI.Infrastructure.Data;
using BimAI.Infrastructure.Sync;
using Microsoft.EntityFrameworkCore;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.IdentityModel.Tokens;
@@ -10,7 +10,7 @@ using Microsoft.IdentityModel.Tokens;
var builder = WebApplication.CreateBuilder(args);
var connectionString = builder.Configuration.GetConnectionString("DefaultConnection");
builder.Services.AddDbContext<BimixDbContext>(options => options.UseSqlServer(connectionString));
builder.Services.AddDbContext<BimAIDbContext>(options => options.UseSqlServer(connectionString));
builder.Services.AddScoped<ProductSyncService>();
builder.Services.AddHttpClient();

View File

@@ -1,13 +1,13 @@
using Bimix.Domain.Entities;
using Bimix.Infrastructure.Data;
using BimAI.Domain.Entities;
using BimAI.Infrastructure.Data;
using Google.Apis.Auth;
using Microsoft.EntityFrameworkCore;
namespace Bimix.API.Services;
namespace BimAI.API.Services;
public class GoogleAuthService(BimixDbContext context, IConfiguration configuration, ILogger<GoogleAuthService> logger)
public class GoogleAuthService(BimAIDbContext context, IConfiguration configuration, ILogger<GoogleAuthService> logger)
{
private readonly BimixDbContext _context = context;
private readonly BimAIDbContext _context = context;
private readonly IConfiguration _configuration = configuration;
private readonly ILogger<GoogleAuthService> _logger = logger;
@@ -35,8 +35,8 @@ public class GoogleAuthService(BimixDbContext context, IConfiguration configurat
if (user == null)
{
_logger.LogError("User not found in Bimix database: {Email}", payload.Email);
return (false, null, "User not found in Bimix database");
_logger.LogError("User not found in BimAI database: {Email}", payload.Email);
return (false, null, "User not found in BimAI database");
}
if (!user.IsActive)

View File

@@ -1,11 +1,10 @@
using Microsoft.IdentityModel.Tokens;
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;
using System.Text;
using Bimix.Domain.Entities;
using BimAI.Domain.Entities;
using Microsoft.IdentityModel.Tokens;
namespace Bimix.API.Services;
namespace BimAI.API.Services;
public class JwtTokenService(IConfiguration configuration, ILogger<JwtTokenService> logger)
{

View File

@@ -0,0 +1,27 @@
{
"AllowedHosts": "*",
"ConnectionStrings": {
"DefaultConnection": "Server=localhost,1433;Database=bimai;User Id=sa;Password=9832&^*&huihj;TrustServerCertificate=True;"
},
"E5_CRM": {
"ApiKey": "7e50a8a5-f01f-4fbc-8c1b-59f3fc474bb5"
},
"GoogleAuth": {
"ClientId": "1037727384847-t1l2au6du34kdckamro81guklk17cjah.apps.googleusercontent.com"
},
"JwtSettings": {
"SecretKey": "BimAISuperSecretKeyThatMustBeAtLeast32CharactersLong123456789",
"Issuer": "BimAI.API",
"Audience": "BimAI.Clients",
"ExpiryDays": 7
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Microsoft.EntityFrameworkCore": "Warning",
"Microsoft.EntityFrameworkCore.Database.Command": "Warning",
"Microsoft.EntityFrameworkCore.Infrastructure": "Warning"
}
}
}

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\Bimix.Domain\Bimix.Domain.csproj" />
<ProjectReference Include="..\BimAI.Domain\BimAI.Domain.csproj" />
</ItemGroup>
<PropertyGroup>

View File

@@ -1,4 +1,4 @@
namespace Bimix.Application.DTOModels;
namespace BimAI.Application.DTOModels;
public class GoogleAuthRequest
{

View File

@@ -1,4 +1,4 @@
namespace Bimix.Application.DTOModels.Common;
namespace BimAI.Application.DTOModels.Common;
public class PagedResult<T>
{

View File

@@ -1,4 +1,4 @@
namespace Bimix.Application.DTOModels;
namespace BimAI.Application.DTOModels;
public class ProductDto
{

View File

@@ -1,4 +1,4 @@
namespace Bimix.Domain.Entities;
namespace BimAI.Domain.Entities;
public abstract class BaseEntity
{

View File

@@ -1,4 +1,4 @@
namespace Bimix.Domain.Entities;
namespace BimAI.Domain.Entities;
public class Product : BaseEntity
{

View File

@@ -1,4 +1,4 @@
namespace Bimix.Domain.Entities;
namespace BimAI.Domain.Entities;
public class SyncState
{

View File

@@ -1,4 +1,4 @@
namespace Bimix.Domain.Entities;
namespace BimAI.Domain.Entities;
public class User : BaseEntity
{

View File

@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<ProjectReference Include="..\Bimix.Domain\Bimix.Domain.csproj" />
<ProjectReference Include="..\Bimix.Application\Bimix.Application.csproj" />
<ProjectReference Include="..\BimAI.Domain\BimAI.Domain.csproj" />
<ProjectReference Include="..\BimAI.Application\BimAI.Application.csproj" />
</ItemGroup>
<ItemGroup>

View File

@@ -1,9 +1,9 @@
using Bimix.Domain.Entities;
using Microsoft.EntityFrameworkCore;
using BimAI.Domain.Entities;
namespace Bimix.Infrastructure.Data;
namespace BimAI.Infrastructure.Data;
public class BimixDbContext(DbContextOptions<BimixDbContext> options) : DbContext(options)
public class BimAIDbContext(DbContextOptions<BimAIDbContext> options) : DbContext(options)
{
public DbSet<Product> Products { get; set; }
public DbSet<SyncState> SyncStates { get; set; }

View File

@@ -1,6 +1,6 @@
// <auto-generated />
using System;
using Bimix.Infrastructure.Data;
using BimAI.Infrastructure.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
@@ -9,9 +9,9 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Bimix.Infrastructure.Migrations
namespace BimAI.Infrastructure.Migrations
{
[DbContext(typeof(BimixDbContext))]
[DbContext(typeof(BimAIDbContext))]
[Migration("20250619185202_InitDatabase")]
partial class InitDatabase
{
@@ -25,7 +25,7 @@ namespace Bimix.Infrastructure.Migrations
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Bimix.Domain.Entities.Product", b =>
modelBuilder.Entity("BimAI.Domain.Entities.Product", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()

View File

@@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Bimix.Infrastructure.Migrations
namespace BimAI.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class InitDatabase : Migration

View File

@@ -1,6 +1,6 @@
// <auto-generated />
using System;
using Bimix.Infrastructure.Data;
using BimAI.Infrastructure.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
@@ -9,9 +9,9 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Bimix.Infrastructure.Migrations
namespace BimAI.Infrastructure.Migrations
{
[DbContext(typeof(BimixDbContext))]
[DbContext(typeof(BimAIDbContext))]
[Migration("20250623184943_AddSyncState")]
partial class AddSyncState
{
@@ -25,7 +25,7 @@ namespace Bimix.Infrastructure.Migrations
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Bimix.Domain.Entities.Product", b =>
modelBuilder.Entity("BimAI.Domain.Entities.Product", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
@@ -47,7 +47,7 @@ namespace Bimix.Infrastructure.Migrations
b.ToTable("Products");
});
modelBuilder.Entity("Bimix.Domain.Entities.SyncState", b =>
modelBuilder.Entity("BimAI.Domain.Entities.SyncState", b =>
{
b.Property<string>("Entity")
.HasColumnType("nvarchar(450)");

View File

@@ -2,7 +2,7 @@
#nullable disable
namespace Bimix.Infrastructure.Migrations
namespace BimAI.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class AddSyncState : Migration

View File

@@ -1,6 +1,6 @@
// <auto-generated />
using System;
using Bimix.Infrastructure.Data;
using BimAI.Infrastructure.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
@@ -9,9 +9,9 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Bimix.Infrastructure.Migrations
namespace BimAI.Infrastructure.Migrations
{
[DbContext(typeof(BimixDbContext))]
[DbContext(typeof(BimAIDbContext))]
[Migration("20250623194653_ResizeProductName")]
partial class ResizeProductName
{
@@ -25,7 +25,7 @@ namespace Bimix.Infrastructure.Migrations
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Bimix.Domain.Entities.Product", b =>
modelBuilder.Entity("BimAI.Domain.Entities.Product", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
@@ -47,7 +47,7 @@ namespace Bimix.Infrastructure.Migrations
b.ToTable("Products");
});
modelBuilder.Entity("Bimix.Domain.Entities.SyncState", b =>
modelBuilder.Entity("BimAI.Domain.Entities.SyncState", b =>
{
b.Property<string>("Entity")
.HasColumnType("nvarchar(450)");

View File

@@ -2,7 +2,7 @@
#nullable disable
namespace Bimix.Infrastructure.Migrations
namespace BimAI.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class ResizeProductName : Migration

View File

@@ -1,6 +1,6 @@
// <auto-generated />
using System;
using Bimix.Infrastructure.Data;
using BimAI.Infrastructure.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
@@ -9,9 +9,9 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Bimix.Infrastructure.Migrations
namespace BimAI.Infrastructure.Migrations
{
[DbContext(typeof(BimixDbContext))]
[DbContext(typeof(BimAIDbContext))]
[Migration("20250624193445_Products-NewFields")]
partial class ProductsNewFields
{
@@ -25,7 +25,7 @@ namespace Bimix.Infrastructure.Migrations
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Bimix.Domain.Entities.Product", b =>
modelBuilder.Entity("BimAI.Domain.Entities.Product", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
@@ -62,7 +62,7 @@ namespace Bimix.Infrastructure.Migrations
b.ToTable("Products");
});
modelBuilder.Entity("Bimix.Domain.Entities.SyncState", b =>
modelBuilder.Entity("BimAI.Domain.Entities.SyncState", b =>
{
b.Property<string>("Entity")
.HasColumnType("nvarchar(450)");

View File

@@ -2,7 +2,7 @@
#nullable disable
namespace Bimix.Infrastructure.Migrations
namespace BimAI.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class ProductsNewFields : Migration

View File

@@ -1,6 +1,6 @@
// <auto-generated />
using System;
using Bimix.Infrastructure.Data;
using BimAI.Infrastructure.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
@@ -9,9 +9,9 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Bimix.Infrastructure.Migrations
namespace BimAI.Infrastructure.Migrations
{
[DbContext(typeof(BimixDbContext))]
[DbContext(typeof(BimAIDbContext))]
[Migration("20250718162313_AddUsersTable")]
partial class AddUsersTable
{
@@ -25,7 +25,7 @@ namespace Bimix.Infrastructure.Migrations
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Bimix.Domain.Entities.Product", b =>
modelBuilder.Entity("BimAI.Domain.Entities.Product", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
@@ -66,7 +66,7 @@ namespace Bimix.Infrastructure.Migrations
b.ToTable("Products");
});
modelBuilder.Entity("Bimix.Domain.Entities.SyncState", b =>
modelBuilder.Entity("BimAI.Domain.Entities.SyncState", b =>
{
b.Property<string>("Entity")
.HasColumnType("nvarchar(450)");
@@ -79,7 +79,7 @@ namespace Bimix.Infrastructure.Migrations
b.ToTable("SyncStates");
});
modelBuilder.Entity("Bimix.Domain.Entities.User", b =>
modelBuilder.Entity("BimAI.Domain.Entities.User", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()

View File

@@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Bimix.Infrastructure.Migrations
namespace BimAI.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class AddUsersTable : Migration

View File

@@ -1,6 +1,6 @@
// <auto-generated />
using System;
using Bimix.Infrastructure.Data;
using BimAI.Infrastructure.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
@@ -8,10 +8,10 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Bimix.Infrastructure.Migrations
namespace BimAI.Infrastructure.Migrations
{
[DbContext(typeof(BimixDbContext))]
partial class BimixDbContextModelSnapshot : ModelSnapshot
[DbContext(typeof(BimAIDbContext))]
partial class BimAIDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
@@ -22,7 +22,7 @@ namespace Bimix.Infrastructure.Migrations
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Bimix.Domain.Entities.Product", b =>
modelBuilder.Entity("BimAI.Domain.Entities.Product", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
@@ -63,7 +63,7 @@ namespace Bimix.Infrastructure.Migrations
b.ToTable("Products");
});
modelBuilder.Entity("Bimix.Domain.Entities.SyncState", b =>
modelBuilder.Entity("BimAI.Domain.Entities.SyncState", b =>
{
b.Property<string>("Entity")
.HasColumnType("nvarchar(450)");
@@ -76,7 +76,7 @@ namespace Bimix.Infrastructure.Migrations
b.ToTable("SyncStates");
});
modelBuilder.Entity("Bimix.Domain.Entities.User", b =>
modelBuilder.Entity("BimAI.Domain.Entities.User", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()

View File

@@ -1,14 +1,12 @@
using System.Reflection.Metadata.Ecma335;
using System.Text.Json;
using System.Text.RegularExpressions;
using System.Web;
using Bimix.Domain.Entities;
using Bimix.Infrastructure.Data;
using BimAI.Domain.Entities;
using BimAI.Infrastructure.Data;
using Microsoft.Extensions.Configuration;
namespace Bimix.Infrastructure.Sync;
namespace BimAI.Infrastructure.Sync;
public class ProductSyncService(HttpClient httpClient, BimixDbContext db, IConfiguration configuration)
public class ProductSyncService(HttpClient httpClient, BimAIDbContext db, IConfiguration configuration)
{
/// <summary>
/// Dekoduje encje HTML w ciągu znaków (np. &quot; na ")

View File

@@ -1,4 +1,4 @@
namespace Bimix.UI.Mobile;
namespace BimAI.UI.Mobile;
public partial class App : Microsoft.Maui.Controls.Application
{

View File

@@ -15,7 +15,7 @@
<!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> -->
<OutputType>Exe</OutputType>
<RootNamespace>Bimix.UI.Mobile</RootNamespace>
<RootNamespace>BimAI.UI.Mobile</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
@@ -23,10 +23,10 @@
<Nullable>enable</Nullable>
<!-- Display name -->
<ApplicationTitle>Bimix</ApplicationTitle>
<ApplicationTitle>BimAI</ApplicationTitle>
<!-- App Identifier -->
<ApplicationId>cloud.bimit.bimix</ApplicationId>
<ApplicationId></ApplicationId>
<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
@@ -41,31 +41,12 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'iPhone'">
<ApplicationId>cloud.bimit.bimix</ApplicationId>
<ApplicationId></ApplicationId>
<CodesignKey>Apple Development: Michal Zielinski (2F35ZHMBTB)</CodesignKey>
<CodesignProvision>bimix-local</CodesignProvision>
<CodesignProvision>bimai-local</CodesignProvision>
<RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
</PropertyGroup>
<ItemGroup>
<None Remove="appsettings.json" />
<None Remove="appsettings.Development.json" />
<Content Include="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
<Content Include="appsettings.Development.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<DependentUpon>appsettings.json</DependentUpon>
</Content>
</ItemGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4"/>
@@ -103,7 +84,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Bimix.UI.Shared\Bimix.UI.Shared.csproj"/>
<ProjectReference Include="..\BimAI.UI.Shared\BimAI.UI.Shared.csproj"/>
</ItemGroup>
</Project>

View File

@@ -1,4 +1,4 @@
namespace Bimix.UI.Mobile;
namespace BimAI.UI.Mobile;
public partial class MainPage : ContentPage
{

View File

@@ -1,8 +1,8 @@
using System.Reflection;
using Bimix.UI.Mobile.Services;
using Bimix.UI.Shared.Extensions;
using Bimix.UI.Shared.Interfaces;
using Bimix.UI.Shared.Services;
using BimAI.UI.Mobile.Services;
using BimAI.UI.Shared.Extensions;
using BimAI.UI.Shared.Interfaces;
using BimAI.UI.Shared.Services;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
@@ -12,7 +12,7 @@ using Microsoft.Maui.Hosting;
using MudBlazor.Services;
using ZXing.Net.Maui.Controls;
namespace Bimix.UI.Mobile;
namespace BimAI.UI.Mobile;
public static class MauiProgram
{

View File

Before

Width:  |  Height:  |  Size: 228 B

After

Width:  |  Height:  |  Size: 228 B

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -1,8 +1,8 @@
using Bimix.UI.Shared.Interfaces;
using BimAI.UI.Shared.Interfaces;
using ZXing.Net.Maui;
using ZXing.Net.Maui.Controls;
namespace Bimix.UI.Mobile.Services;
namespace BimAI.UI.Mobile.Services;
public class ScannerService : IScannerService
{

View File

@@ -19,8 +19,8 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Bimix.Domain\Bimix.Domain.csproj" />
<ProjectReference Include="..\Bimix.Application\Bimix.Application.csproj" />
<ProjectReference Include="..\BimAI.Domain\BimAI.Domain.csproj" />
<ProjectReference Include="..\BimAI.Application\BimAI.Application.csproj" />
</ItemGroup>
<ItemGroup>

View File

@@ -1,4 +1,4 @@
@using Bimix.UI.Shared.Services
@using BimAI.UI.Shared.Services
@inject AuthService AuthService
@inject NavigationManager Navigation

View File

@@ -1,6 +1,6 @@
@using BimAI.UI.Shared.Services
@using Microsoft.Extensions.Configuration
@using Bimix.UI.Shared.Services
@inject IJSRuntime JS
@inject IConfiguration Configuration
@inject AuthService AuthService
@@ -8,7 +8,7 @@
<MudCard Class="login-card" Elevation="8">
<MudCardContent Class="pa-8 d-flex flex-column align-center">
<MudText Typo="Typo.h4" Class="mb-4">Witaj w Bimix</MudText>
<MudText Typo="Typo.h4" Class="mb-4">Witaj w BimAI</MudText>
<MudText Typo="Typo.body1" Class="mb-6 text-center">
Zaloguj się używając konta Google
</MudText>

View File

@@ -1,12 +1,11 @@
using Bimix.Application.DTOModels;
using Bimix.Application.DTOModels.Common;
using Bimix.UI.Shared.Interfaces;
using Bimix.UI.Shared.Services;
using BimAI.UI.Shared.Interfaces;
using BimAI.UI.Shared.Services;
using Microsoft.AspNetCore.Components;
using BimAI.Application.DTOModels;
using BimAI.Application.DTOModels.Common;
using MudBlazor;
namespace Bimix.UI.Shared.Components;
namespace BimAI.UI.Shared.Components;
public partial class ProductListComponent : ComponentBase
{

View File

@@ -1,7 +1,7 @@
using Bimix.UI.Shared.Services;
using BimAI.UI.Shared.Services;
using Microsoft.Extensions.DependencyInjection;
namespace Bimix.UI.Shared.Extensions;
namespace BimAI.UI.Shared.Extensions;
public static class ServiceCollectionExtensions
{

View File

@@ -1,4 +1,4 @@
namespace Bimix.UI.Shared.Interfaces;
namespace BimAI.UI.Shared.Interfaces;
public interface IScannerService
{

View File

@@ -16,7 +16,7 @@
OnClick="ToggleDrawer"
Class="mud-hidden-md-up"/>
<MudSpacer/>
<MudText Typo="Typo.h6">Bimix</MudText>
<MudText Typo="Typo.h6">BimAI</MudText>
</MudAppBar>
<MudDrawer @bind-Open="_drawerOpen"

View File

@@ -30,7 +30,7 @@
background-size: cover;
background-position: center;
background-repeat: no-repeat;
background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('_content/Bimix.UI.Shared/images/login-background.jpg') no-repeat center;
background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('_content/BimAI.UI.Shared/images/login-background.jpg') no-repeat center;
background-size: cover;
display: flex;
align-items: center;

View File

@@ -1,4 +1,5 @@
@page "/products"
@using BimAI.UI.Shared.Components
<PageTitle>Produkty</PageTitle>

View File

@@ -1,7 +1,7 @@
using System.Text.Json;
using Microsoft.JSInterop;
namespace Bimix.UI.Shared.Services;
namespace BimAI.UI.Shared.Services;
public class UserInfo
{

View File

@@ -1,4 +1,4 @@
namespace Bimix.UI.Shared.Services;
namespace BimAI.UI.Shared.Services;
// TODO it's a good place for this file?
public class GoogleAuthConfig

View File

@@ -1,4 +1,6 @@
using Bimix.UI.Shared.Interfaces;
using BimAI.UI.Shared.Interfaces;
namespace BimAI.UI.Shared.Services;
public class NoOpScannerService : IScannerService
{

View File

@@ -1,9 +1,9 @@
using System.Text.Json;
using Bimix.Application.DTOModels;
using Bimix.Application.DTOModels.Common;
using BimAI.Application.DTOModels;
using BimAI.Application.DTOModels.Common;
using Microsoft.AspNetCore.WebUtilities;
namespace Bimix.UI.Shared.Services;
namespace BimAI.UI.Shared.Services;
public class ProductService(HttpClient httpClient)
{

View File

@@ -6,8 +6,7 @@
@using static Microsoft.AspNetCore.Components.Web.RenderMode
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using Bimix.UI.Web
@using Bimix.UI.Web.Components
@using Bimix.UI.Shared
@using Bimix.UI.Shared.Components
@using MudBlazor
@using BimAI.UI.Shared
@using MudBlazor@using BimAI.Application.DTOModels
@using BimAI.Application.DTOModels.Common
@using BimAI.UI.Shared.Components

View File

Before

Width:  |  Height:  |  Size: 965 KiB

After

Width:  |  Height:  |  Size: 965 KiB

View File

@@ -28,7 +28,7 @@ async function handleAuthError(error, context = '') {
const errorMessage = error?.message || error?.type || error?.toString() || 'Unknown error';
const fullError = `${context}: ${errorMessage}`;
console.error('Google Auth Error:', { context, error, fullError });
await DotNet.invokeMethodAsync('Bimix.UI.Shared', 'OnGoogleSignInError', fullError);
await DotNet.invokeMethodAsync('Bimai.UI.Shared', 'OnGoogleSignInError', fullError);
}
async function fetchUserInfo(accessToken) {
@@ -39,7 +39,7 @@ async function fetchUserInfo(accessToken) {
if (!response.ok) {
const errorText = await response.text();
console.error('Failed to fetch user info:', errorText);
await DotNet.invokeMethodAsync('Bimix.UI.Shared', 'OnGoogleSignInError',
await DotNet.invokeMethodAsync('Bimai.UI.Shared', 'OnGoogleSignInError',
`Failed to fetch user info: HTTP ${response.status}`);
return null;
}
@@ -62,7 +62,7 @@ window.initGoogleSignIn = async function(clientId) {
try {
if (tokenResponse.error) {
console.error('Token response error:', tokenResponse.error);
await DotNet.invokeMethodAsync('Bimix.UI.Shared', 'OnGoogleSignInError',
await DotNet.invokeMethodAsync('Bimai.UI.Shared', 'OnGoogleSignInError',
tokenResponse.error);
return;
}
@@ -70,7 +70,7 @@ window.initGoogleSignIn = async function(clientId) {
const userInfo = await fetchUserInfo(tokenResponse.access_token);
if (!userInfo) return;
await DotNet.invokeMethodAsync('Bimix.UI.Shared', 'OnGoogleSignInSuccess',
await DotNet.invokeMethodAsync('Bimai.UI.Shared', 'OnGoogleSignInSuccess',
tokenResponse.access_token,
userInfo.name || '',
userInfo.email || '',
@@ -78,7 +78,7 @@ window.initGoogleSignIn = async function(clientId) {
);
} catch (error) {
console.error('Callback error:', error);
await DotNet.invokeMethodAsync('Bimix.UI.Shared', 'OnGoogleSignInError',
await DotNet.invokeMethodAsync('Bimai.UI.Shared', 'OnGoogleSignInError',
error.message || 'Unknown callback error');
} finally {
isSigningIn = false;
@@ -86,7 +86,7 @@ window.initGoogleSignIn = async function(clientId) {
},
error_callback: async (error) => {
console.error('OAuth flow error:', error);
await DotNet.invokeMethodAsync('Bimix.UI.Shared', 'OnGoogleSignInError',
await DotNet.invokeMethodAsync('Bimai.UI.Shared', 'OnGoogleSignInError',
error.type || 'OAuth flow error');
isSigningIn = false;
}
@@ -95,7 +95,7 @@ window.initGoogleSignIn = async function(clientId) {
return googleClient;
} catch (error) {
console.error('Initiaxcrun xctrace list deviceslization error:', error);
await DotNet.invokeMethodAsync('Bimix.UI.Shared', 'OnGoogleSignInError',
await DotNet.invokeMethodAsync('Bimai.UI.Shared', 'OnGoogleSignInError',
error.message || 'Failed to initialize Google Sign-In');
isSigningIn = false;
}
@@ -109,7 +109,7 @@ window.requestGoogleSignIn = async function() {
if (!googleClient) {
console.error('Google Sign-In not initialized');
await DotNet.invokeMethodAsync('Bimix.UI.Shared', 'OnGoogleSignInError',
await DotNet.invokeMethodAsync('Bimai.UI.Shared', 'OnGoogleSignInError',
'Google Sign-In not initialized. Call initGoogleSignIn first.');
return;
}

View File

@@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Bimix.UI.Shared\Bimix.UI.Shared.csproj" />
<ProjectReference Include="..\BimAI.UI.Shared\BimAI.UI.Shared.csproj" />
</ItemGroup>
<ItemGroup>

View File

@@ -8,13 +8,13 @@
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
<link href="Bimix.UI.Web.styles.css" rel="stylesheet" />
<link href="BimAI.UI.Web.styles.css" rel="stylesheet" />
<script src="https://accounts.google.com/gsi/client" async defer></script>
<HeadOutlet />
</head>
<body>
<Bimix.UI.Shared.Components.Routes @rendermode="InteractiveServer" />
<BimAI.UI.Shared.Components.Routes @rendermode="InteractiveServer" />
<div id="blazor-error-ui">
@@ -30,7 +30,7 @@
<script src="_framework/blazor.web.js"></script>
<script src="_content/MudBlazor/MudBlazor.min.js"></script>
<script src="_content/Bimix.UI.Shared/js/auth.js"></script>
<script src="_content/BimAI.UI.Shared/js/auth.js"></script>
</body>
</html>

View File

@@ -6,6 +6,8 @@
@using static Microsoft.AspNetCore.Components.Web.RenderMode
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using Bimix.UI.Shared
@using Bimix.UI.Shared.Components
@using BimAI.UI.Web
@using BimAI.UI.Web.Components
@using BimAI.UI.Shared
@using BimAI.UI.Shared.Components
@using MudBlazor

View File

@@ -1,8 +1,8 @@
using Bimix.UI.Shared;
using Bimix.UI.Shared.Extensions;
using Bimix.UI.Shared.Interfaces;
using Bimix.UI.Shared.Services;
using Bimix.UI.Web.Components;
using BimAI.UI.Shared;
using BimAI.UI.Shared.Extensions;
using BimAI.UI.Shared.Interfaces;
using BimAI.UI.Shared.Services;
using BimAI.UI.Web.Components;
using MudBlazor.Services;
var builder = WebApplication.CreateBuilder(args);

View File

@@ -0,0 +1,11 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"GoogleAuth": {
"ClientId": "1037727384847-t1l2au6du34kdckamro81guklk17cjah.apps.googleusercontent.com"
}
}

View File

@@ -3,19 +3,19 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bimix.Domain", "Bimix.Domain\Bimix.Domain.csproj", "{190E3B1F-C91F-430F-BE32-4E7221574D36}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BimAI.Domain", "BimAI.Domain\BimAI.Domain.csproj", "{190E3B1F-C91F-430F-BE32-4E7221574D36}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bimix.Application", "Bimix.Application\Bimix.Application.csproj", "{2E61A11C-851F-47D6-A8B6-329078CF1AFC}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BimAI.Application", "BimAI.Application\BimAI.Application.csproj", "{2E61A11C-851F-47D6-A8B6-329078CF1AFC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bimix.Infrastructure", "Bimix.Infrastructure\Bimix.Infrastructure.csproj", "{1049E8B5-6965-4CCD-A989-88E44D40BF48}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BimAI.Infrastructure", "BimAI.Infrastructure\BimAI.Infrastructure.csproj", "{1049E8B5-6965-4CCD-A989-88E44D40BF48}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bimix.API", "Bimix.API\Bimix.API.csproj", "{02FF9A1C-6D22-4CD1-8FE6-DD5BCDD621DA}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BimAI.API", "BimAI.API\BimAI.API.csproj", "{02FF9A1C-6D22-4CD1-8FE6-DD5BCDD621DA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bimix.UI.Shared", "Bimix.UI.Shared\Bimix.UI.Shared.csproj", "{0EB8CFFF-97BA-48D1-BEC1-2DFD6C934946}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BimAI.UI.Shared", "BimAI.UI.Shared\BimAI.UI.Shared.csproj", "{0EB8CFFF-97BA-48D1-BEC1-2DFD6C934946}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bimix.UI.Web", "Bimix.UI.Web\Bimix.UI.Web.csproj", "{7ACBFE74-E72C-4033-9172-30512233A518}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BimAI.UI.Web", "BimAI.UI.Web\BimAI.UI.Web.csproj", "{7ACBFE74-E72C-4033-9172-30512233A518}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bimix.UI.Mobile", "Bimix.UI.Mobile\Bimix.UI.Mobile.csproj", "{12FB8E56-08C1-47CF-B0FC-4BE9F01F020A}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BimAI.UI.Mobile", "BimAI.UI.Mobile\BimAI.UI.Mobile.csproj", "{12FB8E56-08C1-47CF-B0FC-4BE9F01F020A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

@@ -1,6 +0,0 @@
@Bimix.API_HostAddress = http://localhost:5090
GET {{Bimix.API_HostAddress}}/weatherforecast/
Accept: application/json
###