Skip to content

Commit b618125

Browse files
committed
2 parents d8a075f + bddbb52 commit b618125

16 files changed

Lines changed: 203 additions & 16 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ Finally, those microservices are consumed by multiple client web and mobile apps
2323
<b>*MVC Application (ASP.NET Core)*</b>: Its an MVC 6 application where you can find interesting scenarios on how to consume HTTP-based microservices from C# running in the server side, as it is a typical ASP.NET Core MVC application. Since it is a server-side application, access to other containers/microservices is done within the internal Docker Host network with its internal name resolution.
2424
<img src="img/eshop-webmvc-app-screenshot.png">
2525

26-
<b>*SPA (Single Page Application)*</b>: Developed with Angular 2, Typescript and ASP.NET Core MVC 6. This is another approach for client web applications to be used when you want to have a more modern behavior which is not behaving with the typical browser round-trip on every action but behaving like a Single-Page-Application which is more similar to a desktop app experience. The consumption of the HTTP-based microservices is done from TypeScript/JavaScript in the client browser, so out of the Docker Host internal network (Like from your network or even from the Internet).
27-
- <<<<< TBD Image for SPA App >>>>>
26+
<b>*SPA (Single Page Application)*</b>: Providing similar "eShop business functionality" but developed with Angular 2, Typescript and slightly using ASP.NET Core MVC 6. This is another approach for client web applications to be used when you want to have a more modern client behavior which is not behaving with the typical browser round-trip on every action but behaving like a Single-Page-Application which is more similar to a desktop app usage experience. The consumption of the HTTP-based microservices is done from TypeScript/JavaScript in the client browser, so the client calls to the microservices come from out of the Docker Host internal network (Like from your network or even from the Internet).
27+
<img src="img/eshop-webspa-app-screenshot.png">
2828

2929
<b>*Xamarin Mobile App (For iOS, Android and Windows/UWP)*</b>: It is a client mobile app supporting the most common mobilee OS platforms (iOS, Android and Windows/UWP). In this case, the consumption of the microservices is done from C# but running on the client devices, so out of the Docker Host internal network (Like from your network or even the Internet).
3030

README.md.saved.bak

Lines changed: 149 additions & 0 deletions
Large diffs are not rendered by default.
-1.88 MB
Loading
1.16 MB
Loading

src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/eShopOnContainers.TestRunner.Droid.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
1717
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
1818
<AndroidUseLatestPlatformSdk>True</AndroidUseLatestPlatformSdk>
19-
<TargetFrameworkVersion>v7.0</TargetFrameworkVersion>
19+
<TargetFrameworkVersion>v6.0</TargetFrameworkVersion>
2020
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
2121
<NuGetPackageImportStamp>
2222
</NuGetPackageImportStamp>

src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/eShopOnContainers.TestRunner.Droid.csproj.bak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
1717
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
1818
<AndroidUseLatestPlatformSdk>True</AndroidUseLatestPlatformSdk>
19-
<TargetFrameworkVersion>v6.0</TargetFrameworkVersion>
19+
<TargetFrameworkVersion>v7.0</TargetFrameworkVersion>
2020
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
2121
<NuGetPackageImportStamp>
2222
</NuGetPackageImportStamp>

src/Web/WebMVC/Controllers/CartController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public async Task<IActionResult> Index(Dictionary<string, int> quantities, strin
5252

5353
public async Task<IActionResult> AddToCart(CatalogItem productDetails)
5454
{
55-
if (productDetails != null)
55+
if (productDetails.Id != null)
5656
{
5757
var user = _appUserParser.Parse(HttpContext.User);
5858
var product = new BasketItem()

src/Web/WebMVC/Views/Catalog/_product.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<form asp-controller="Cart" asp-action="AddToCart">
55

66
<img class="esh-catalog-thumbnail" src="@Model.PictureUri" />
7-
<input class="esh-catalog-button" type="submit" value="[ ADD TO CART ]" />
7+
<input class="esh-catalog-button @((!User.Identity.IsAuthenticated) ? "is-disabled" : "")" type="submit" value="[ ADD TO CART ]" />
88

99
<div class="esh-catalog-name">
1010
<span>@Model.Name</span>

src/Web/WebMVC/wwwroot/css/catalog/catalog.component.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@
8686
text-align: center;
8787
margin-bottom: 1.5rem;
8888
width: 33%;
89+
display: inline-block;
90+
float: none !important;
8991
}
9092

9193
@media screen and (max-width: 1024px) {
@@ -116,6 +118,10 @@
116118
transition: all 0.35s;
117119
width: 80%;
118120
}
121+
.esh-catalog-button.is-disabled {
122+
opacity: .5;
123+
pointer-events: none;
124+
}
119125

120126
.esh-catalog-button:hover {
121127
background-color: #4a760f;

src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/basket/basket-status/basket-status.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class BasketStatusComponent implements OnInit {
2424
// Subscribe to Add Basket Observable:
2525
this.basketItemAddedSubscription = this.basketEvents.addItemToBasket$.subscribe(
2626
item => {
27-
this.service.setBasket(item).subscribe(res => {
27+
this.service.addItemToBasket(item).subscribe(res => {
2828
this.service.getBasket().subscribe(basket => {
2929
if (basket)
3030
this.badge = basket.items.length;

0 commit comments

Comments
 (0)