Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit aadfc02

Browse files
Major application refactoring that includes upgrade to .NET 5.0, ClientApp file restructure, general code refactoring (client & server)
1 parent 036fc45 commit aadfc02

32 files changed

+4638
-3215
lines changed

‎GhostUI/ClientApp/.browserslistrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
> 1%
22
last 2 versions
3-
not dead
3+
not dead

‎GhostUI/ClientApp/.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = {
44
node: true
55
},
66
extends: [
7-
"plugin:vue/vue3-essential",
7+
"plugin:vue/essential",
88
"eslint:recommended",
99
"@vue/typescript/recommended",
1010
"@vue/prettier/@typescript-eslint"

‎GhostUI/ClientApp/package-lock.json

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

‎GhostUI/ClientApp/package.json

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,45 +11,46 @@
1111
"test:unit": "vue-cli-service test:unit"
1212
},
1313
"dependencies": {
14-
"@fortawesome/fontawesome-svg-core": "^1.2.32",
15-
"@fortawesome/free-brands-svg-icons": "^5.15.1",
16-
"@fortawesome/free-solid-svg-icons": "^5.15.1",
17-
"@fortawesome/vue-fontawesome": "^2.0.0",
18-
"@microsoft/signalr": "^3.1.9",
19-
"axios": "^0.20.0",
20-
"bulma": "^0.9.1",
21-
"core-js": "^3.6.5",
22-
"register-service-worker": "^1.7.1",
14+
"@fortawesome/fontawesome-svg-core": "^1.2.34",
15+
"@fortawesome/free-brands-svg-icons": "^5.15.2",
16+
"@fortawesome/free-solid-svg-icons": "^5.15.2",
17+
"@fortawesome/vue-fontawesome": "^2.0.2",
18+
"@microsoft/signalr": "^5.0.3",
19+
"axios": "^0.21.1",
20+
"bulma": "^0.9.2",
21+
"core-js": "^3.8.3",
22+
"register-service-worker": "^1.7.2",
2323
"vue": "^2.6.12",
2424
"vue-class-component": "^7.2.6",
25-
"vue-property-decorator": "^9.0.2",
26-
"vue-router": "^3.4.7",
25+
"vue-property-decorator": "^9.1.2",
26+
"vue-router": "^3.5.1",
2727
"vue-snotify": "^3.2.1",
28-
"vue-styled-components": "^1.5.1",
29-
"vuex": "^3.5.1"
28+
"vue-styled-components": "^1.6.0",
29+
"vuex": "^3.6.2"
3030
},
3131
"devDependencies": {
32-
"@testing-library/jest-dom": "^5.11.4",
33-
"@types/jest": "^26.0.15",
34-
"@typescript-eslint/eslint-plugin": "^4.5.0",
35-
"@typescript-eslint/parser": "^4.5.0",
36-
"@vue/cli-plugin-babel": "^4.5.8",
37-
"@vue/cli-plugin-e2e-nightwatch": "^4.5.8",
38-
"@vue/cli-plugin-eslint": "^4.5.8",
39-
"@vue/cli-plugin-pwa": "^4.5.8",
40-
"@vue/cli-plugin-typescript": "^4.5.8",
41-
"@vue/cli-plugin-unit-jest": "^4.5.8",
42-
"@vue/cli-service": "^4.5.8",
32+
"@testing-library/jest-dom": "^5.11.9",
33+
"@types/jest": "^26.0.20",
34+
"@typescript-eslint/eslint-plugin": "^4.15.1",
35+
"@typescript-eslint/parser": "^4.15.1",
36+
"@vue/cli-plugin-babel": "^4.5.11",
37+
"@vue/cli-plugin-e2e-nightwatch": "^4.5.11",
38+
"@vue/cli-plugin-eslint": "^4.5.11",
39+
"@vue/cli-plugin-pwa": "^4.5.11",
40+
"@vue/cli-plugin-typescript": "^4.5.11",
41+
"@vue/cli-plugin-unit-jest": "^4.5.11",
42+
"@vue/cli-service": "^4.5.11",
4343
"@vue/eslint-config-prettier": "^6.0.0",
44-
"@vue/test-utils": "1.1.0",
45-
"eslint": "^7.11.0",
46-
"eslint-plugin-prettier": "^3.1.4",
47-
"eslint-plugin-vue": "^7.1.0",
48-
"node-sass": "^4.14.1",
49-
"prettier": "^2.1.2",
50-
"sass-loader": "^10.0.3",
51-
"ts-jest": "^26.4.1",
52-
"typescript": "^4.0.3",
44+
"@vue/eslint-config-typescript": "^7.0.0",
45+
"@vue/test-utils": "1.1.3",
46+
"eslint": "^7.20.0",
47+
"eslint-plugin-prettier": "^3.3.1",
48+
"eslint-plugin-vue": "^7.6.0",
49+
"node-sass": "^5.0.0",
50+
"prettier": "^2.2.1",
51+
"sass-loader": "^10.1.1",
52+
"ts-jest": "^26.5.1",
53+
"typescript": "^4.1.5",
5354
"vue-svg-loader": "^0.16.0",
5455
"vue-template-compiler": "^2.6.12",
5556
"vuex-module-decorators": "^1.0.1"

‎GhostUI/ClientApp/public/index.html

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
4-
<meta charset="utf-8">
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6-
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7-
<title>GhostUI</title>
8-
</head>
9-
<body>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7+
<title>GhostUI</title>
8+
</head>
9+
<body>
1010
<noscript>
11-
<strong>We're sorry but this application doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
11+
<strong>We're sorry but this application doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
1212
</noscript>
1313
<div id="app"></div>
14+
<!-- built files will be auto injected -->
1415
</body>
1516
</html>

‎GhostUI/ClientApp/public/manifest.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
22
"name": "aspnet-core-vue-vuex-playground-template",
3-
"short_name": "aspnet-core-vue-template",
3+
"short_name": "VueNetCoreSpa",
44
"icons": [
55
{
6-
"src": "./img/icons/android-chrome-192x192.png",
6+
"src": "/img/icons/android-chrome-192x192.png",
77
"sizes": "192x192",
88
"type": "image/png"
99
},
1010
{
11-
"src": "./img/icons/android-chrome-512x512.png",
11+
"src": "/img/icons/android-chrome-512x512.png",
1212
"sizes": "512x512",
1313
"type": "image/png"
1414
}
1515
],
16-
"start_url": "/index.html",
16+
"start_url": ".",
1717
"display": "standalone",
18-
"background_color": "#000000",
18+
"background_color": "#ffffff",
1919
"theme_color": "#209cee"
2020
}

‎GhostUI/ClientApp/public/robots.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1+
# https://www.robotstxt.org/robotstxt.html
12
User-agent: *
2-
Disallow:

‎GhostUI/ClientApp/src/App.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<template>
22
<div id="app">
33
<vue-snotify />
4-
<Navbar />
5-
<Settings />
4+
<navbar />
5+
<settings />
66
<transition mode="out-in" :name="$route.meta.transitionName">
77
<router-view />
88
</transition>
9-
<AppFooter />
9+
<app-footer />
1010
</div>
1111
</template>
1212

‎GhostUI/ClientApp/src/components/VDropdown.render.tsx

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export default class VDropdown extends Vue {
5353

5454
public renderListOption(option: any, index: number): VNode {
5555
const optionLabel = this.getOptionLabelName(option);
56+
5657
return (
5758
<li key={index}>
5859
<a
@@ -83,14 +84,21 @@ export default class VDropdown extends Vue {
8384
}
8485

8586
public keyDownHandler(e: KeyboardEvent): void {
86-
if (e.keyCode === 38 || e.keyCode === 40) { // up and down keys
87-
this.toggleDropdownMenu();
88-
e.preventDefault();
89-
} else if (e.keyCode === 27) { // Esc key
90-
this.$refs.dropdownButton.focus();
91-
this.hideDropdownMenu();
92-
} else if (e.keyCode === 9) { // Tab key
93-
this.hideDropdownMenu();
87+
switch (e.key) {
88+
case 'ArrowUp':
89+
case 'ArrowDown':
90+
this.toggleDropdownMenu();
91+
e.preventDefault();
92+
break;
93+
case 'Escape':
94+
this.$refs.dropdownButton.focus();
95+
this.hideDropdownMenu();
96+
break;
97+
case 'Tab':
98+
this.hideDropdownMenu();
99+
break;
100+
default:
101+
break;
94102
}
95103
}
96104
}

‎GhostUI/ClientApp/src/main.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
import Vue from 'vue';
2-
import App from '@/App.vue';
32
import '@/registerServiceWorker';
43
import '@/assets/style/scss/main.scss';
4+
import '@/config/fa.config';
5+
import App from '@/App.vue';
56
import store from '@/store';
67
import router from '@/router';
78
import Snotify from 'vue-snotify';
89
import { vClickOutside } from '@/plugins';
910
import { SignalRApi } from '@/api/signalR.service';
1011
import { snotifyDefaults } from '@/config/vue-snotify.config';
1112
import AxiosGlobalConfig from '@/config/axios.config';
12-
import '@/config/fa.config';
13-
14-
// Execute global Axios configurations (e.g. request interceptors)
15-
AxiosGlobalConfig.setup();
1613

1714
// Install custom plugins/third-party packages
18-
Vue.use(vClickOutside)
19-
.use(Snotify, snotifyDefaults);
15+
Vue.use(vClickOutside);
16+
Vue.use(Snotify, snotifyDefaults);
2017

21-
// In the mounted callback configure Signalr - wrap in this.$nextTick callback to ensure all children mount as well
18+
// In the mounted callback configure Signalr/Axios - wrap in this.$nextTick callback to ensure all children mount as well
2219
new Vue({
2320
router,
2421
store,
2522
render: (h) => h(App),
2623
mounted() {
27-
this.$nextTick(() => SignalRApi.startConnection());
24+
this.$nextTick(() => {
25+
AxiosGlobalConfig.setup();
26+
SignalRApi.startConnection();
27+
});
2828
}
2929
}).$mount('#app');

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /