Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

Commit 5d11a1f

Browse files
committed
Fix samples, finalize dotnet 3.0
1 parent 41342ef commit 5d11a1f

37 files changed

+11371
-278
lines changed

samples/QuasarCliSample/ClientApp/package-lock.json

Lines changed: 299 additions & 240 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/QuasarCliSample/ClientApp/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,27 @@
77
"author": "EEparker <[email protected]>",
88
"private": true,
99
"scripts": {
10-
"dev": "quasar dev",
10+
"serve": "quasar dev",
1111
"build": "quasar build",
1212
"build:pwa": "quasar build -m pwa"
1313
},
1414
"dependencies": {
1515
"@quasar/extras": "^1.3.2",
1616
"axios": "^0.19.0",
17-
"quasar": "^1.1.6",
17+
"quasar": "^1.2.0",
1818
"vue-class-component": "^7.1.0",
1919
"vue-property-decorator": "^8.2.2",
2020
"vuex": "^3.1.1",
2121
"vuex-class": "^0.3.2",
2222
"vuex-module-decorators": "^0.10.1"
2323
},
2424
"devDependencies": {
25-
"@quasar/app": "^1.1.2",
26-
"@types/node": "^12.7.8",
25+
"@quasar/app": "^1.2.0",
26+
"@types/node": "^12.7.12",
2727
"pug": "^2.0.4",
2828
"pug-plain-loader": "^1.0.0",
2929
"ts-loader": "^6.2.0",
30-
"typescript": "^3.6.3"
30+
"typescript": "^3.6.4"
3131
},
3232
"engines": {
3333
"node": ">= 8.9.0",

samples/QuasarCliSample/ClientApp/quasar.conf.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ module.exports = function (ctx) {
6969
'QList',
7070
'QItem',
7171
'QItemSection',
72-
'QItemLabel'
72+
'QItemLabel',
73+
'QTable',
74+
'QTh',
75+
'QTr',
76+
'QTd'
7377
],
7478

7579
directives: [

samples/QuasarCliSample/ClientApp/src/index.template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<meta name="description" content="<%= htmlWebpackPlugin.options.productDescription %>">
88
<meta name="format-detection" content="telephone=no">
99
<meta name="msapplication-tap-highlight" content="no">
10-
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (htmlWebpackPlugin.options.ctx.mode.cordova) { %>, viewport-fit=cover<% } %>">
10+
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (htmlWebpackPlugin.options.ctx.mode.cordova || htmlWebpackPlugin.options.ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>">
1111

1212
<link rel="icon" type="image/png" href="statics/app-logo-128x128.png">
1313
<link rel="icon" type="image/png" sizes="16x16" href="statics/icons/favicon-16x16.png">
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export interface IWeatherForecast {
2+
temperatureC: number;
3+
temperatureF: number;
4+
summary: string;
5+
date: Date;
6+
}
Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,36 @@
11
<template lang="pug">
22
q-page.flex.flex-center
3-
img(alt='Quasar logo' src='~assets/quasar-logo-full.svg')
3+
q-table(title="Weather" :data="forecasts" :columns="forecastCols")
44
</template>
55

66
<script lang="ts">
77
import { Component, Vue} from 'vue-property-decorator';
8+
import { date } from 'quasar'
9+
import { IWeatherForecast } from '../models/IWeatherForecast';
10+
import axios from 'axios';
811
912
@Component
1013
export default class PageIndex extends Vue {
14+
private forecasts: IWeatherForecast[] = [{ summary: 'No data.' } as IWeatherForecast];
15+
private forecastCols: any[] = [
16+
{ name: 'Summary', label: 'Summary', field: (row: IWeatherForecast) => row.summary },
17+
{ name: 'F', label: 'F', field: (row: IWeatherForecast) => row.temperatureF },
18+
{ name: 'C', label: 'C', field: (row: IWeatherForecast) => row.temperatureC },
19+
{
20+
name: 'Date',
21+
label: 'Date',
22+
field: (row: IWeatherForecast) => row.date,
23+
format: (val: Date) => `${date.formatDate(val, 'YYYY/MM/DD HH:mm:ss')}`
24+
}
25+
];
1126
27+
public async mounted() {
28+
try {
29+
this.forecasts = (await axios.get('api/weatherforecast')).data;
30+
} catch {
31+
this.forecasts = [{ summary: 'No data.' } as IWeatherForecast];
32+
}
33+
}
1234
}
1335
</script>
1436

samples/QuasarCliSample/Properties/launchSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"anonymousAuthentication": true,
55
"iisExpress": {
66
"applicationUrl": "http://localhost:58786",
7-
"sslPort": 44330
7+
"sslPort": 0
88
}
99
},
1010
"$schema": "http://json.schemastore.org/launchsettings.json",

samples/QuasarCliSample/QuasarCliSample.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@
22

33
<PropertyGroup>
44
<TargetFramework>netcoreapp3.0</TargetFramework>
5-
<!--<PublishSingleFile>true</PublishSingleFile>-->
6-
<!--<PublishTrimmed>true</PublishTrimmed>-->
75
</PropertyGroup>
86

97
<ItemGroup>
108
<ProjectReference Include="..\..\src\VueCliMiddleware\VueCliMiddleware.csproj" />
119
</ItemGroup>
1210

1311
<PropertyGroup>
14-
<!-- Typescript/Javascript Client Configuration -->
1512
<SpaRoot>ClientApp\</SpaRoot>
1613
<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
1714
</PropertyGroup>

samples/QuasarCliSample/Startup.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
4040
app.UseDeveloperExceptionPage();
4141
}
4242

43-
app.UseHttpsRedirection();
44-
4543
app.UseSpaStaticFiles();
4644

4745
app.UseRouting();
@@ -52,14 +50,13 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
5250
{
5351
endpoints.MapControllers();
5452

53+
// Note: only use vuecliproxy in development.
54+
// Production should use "UseSpaStaticFiles()" and the webpack dist
5555
endpoints.MapToVueCliProxy(
5656
"{*path}",
57-
new SpaOptions { SourcePath = "ClientApp" }
58-
//,(System.Diagnostics.Debugger.IsAttached) ? "dev" : null
59-
//,regex: "Compiled successfully"
57+
new SpaOptions { SourcePath = "ClientApp" },
58+
npmScript: (System.Diagnostics.Debugger.IsAttached) ? "serve" : null
6059
);
61-
62-
//endpoints.MapFallbackToFile("{*path}", "index.html");
6360
});
6461
}
6562
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
> 1%
2+
last 2 versions

0 commit comments

Comments
 (0)