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 a0d1038

Browse files
general code refactoring
1 parent 24cd7c0 commit a0d1038

File tree

10 files changed

+92
-74
lines changed

10 files changed

+92
-74
lines changed

‎GhostUI/ClientApp/package-lock.json

Lines changed: 44 additions & 45 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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
"devDependencies": {
3232
"@testing-library/jest-dom": "^5.11.9",
3333
"@types/jest": "^26.0.20",
34-
"@typescript-eslint/eslint-plugin": "^4.15.2",
35-
"@typescript-eslint/parser": "^4.15.2",
34+
"@typescript-eslint/eslint-plugin": "^4.16.1",
35+
"@typescript-eslint/parser": "^4.16.1",
3636
"@vue/cli-plugin-babel": "^4.5.11",
3737
"@vue/cli-plugin-e2e-nightwatch": "^4.5.11",
3838
"@vue/cli-plugin-eslint": "^4.5.11",
@@ -45,11 +45,11 @@
4545
"@vue/test-utils": "1.1.3",
4646
"eslint": "^7.21.0",
4747
"eslint-plugin-prettier": "^3.3.1",
48-
"eslint-plugin-vue": "^7.6.0",
48+
"eslint-plugin-vue": "^7.7.0",
4949
"node-sass": "^5.0.0",
5050
"prettier": "^2.2.1",
5151
"sass-loader": "^10.1.1",
52-
"ts-jest": "^26.5.2",
52+
"ts-jest": "^26.5.3",
5353
"typescript": "^4.2.2",
5454
"vue-svg-loader": "^0.16.0",
5555
"vue-template-compiler": "^2.6.12",

‎GhostUI/ClientApp/src/api/signalR.service.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ class SignalRService {
2121

2222
public startConnection(): void {
2323
if (this._hubConnection.state === HubConnectionState.Disconnected) {
24-
this._hubConnection
25-
.start()
26-
.catch((e) => console.error(e));
24+
this._hubConnection.start().catch((e) => console.error(e));
2725
}
2826
}
2927

@@ -53,8 +51,7 @@ class SignalRService {
5351
});
5452

5553
this._hubConnection.on(SIGNALR_CONFIG.events.closeConnections, (reason: string) => {
56-
this._hubConnection
57-
.stop()
54+
this._hubConnection.stop()
5855
.then(() => {
5956
this.hubToastMessage(`Hub closed (${reason})`);
6057
});

‎GhostUI/ClientApp/src/components/Settings.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,11 @@ export default class Settings extends Vue {
7474
}
7575
7676
public handleLogout(): void {
77-
AuthModule.LogoutUser().then(() => {
78-
this.$snotify.clear();
79-
this.$router.push(this.loginRoutConfig.path);
80-
});
77+
AuthModule.LogoutUser()
78+
.then(() => {
79+
this.$snotify.clear();
80+
this.$router.push(this.loginRoutConfig.path);
81+
});
8182
}
8283
}
8384
</script>

‎GhostUI/ClientApp/src/components/Spinner.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<template>
2-
<div v-show="isLoading" id="load-spinner">
2+
<div
3+
id="load-spinner"
4+
v-show="isLoading"
5+
>
36
<div />
47
<div />
58
<div />

‎GhostUI/ClientApp/src/store/modules/auth/auth.module.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ class Auth extends VuexModule implements IAuthState {
4747
@MutationAction<IAuthState>({ mutate: ['token', 'status', 'userName', 'password', 'rememberMe'] })
4848
public async LogoutUser(): Promise<IAuthState> {
4949
await AuthApi.logout();
50-
return {
51-
...initialState
52-
};
50+
return { ...initialState };
5351
}
5452

5553
@Mutation

‎GhostUI/ClientApp/src/store/modules/weather-forecasts/weather-forecasts.module.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ const initialState: IWeatherForecastsState = {
1414
name: 'forecasts'
1515
})
1616
class WeatherForecast extends VuexModule implements IWeatherForecastsState {
17-
public startDateIndex: number = initialState.startDateIndex;
18-
public forecasts: IWeatherForecast[] = initialState.forecasts;
17+
public startDateIndex: number = initialState.startDateIndex;
18+
public forecasts: IWeatherForecast[] = initialState.forecasts;
1919

2020
@MutationAction<IWeatherForecastsState>({ mutate: ['forecasts', 'startDateIndex'] })
2121
public async GetWeatherForecasts(index: number | null): Promise<IWeatherForecastsState> {
@@ -28,9 +28,7 @@ class WeatherForecast extends VuexModule implements IWeatherForecastsState {
2828
startDateIndex
2929
};
3030
} catch (e) {
31-
return {
32-
...initialState
33-
};
31+
return { ...initialState };
3432
}
3533
}
3634
}

‎GhostUI/ClientApp/src/views/FetchData/child-components/ForecastTable.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
</tr>
1010
</thead>
1111
<tbody>
12-
<tr v-for="fc in forecasts" :key="fc.id">
12+
<tr
13+
v-for="fc in forecasts"
14+
:key="fc.id"
15+
>
1316
<td>{{fc.dateFormatted}}</td>
1417
<td>{{fc.temperatureC}}</td>
1518
<td>{{fc.temperatureF}}</td>

‎GhostUI/ClientApp/src/views/Form/Form.vue

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,23 @@
88
<h3 class="title is-4">Counter</h3>
99
<h5 class="subtitle is-5">Use buttons to update count value</h5>
1010
<p class="buttons incrementer-buttons form-control-group">
11-
<button @click="count = count - 1" class="button is-light minus">
12-
<font-awesome-icon icon="minus" class="is-danger" />
11+
<button
12+
@click="count = count - 1"
13+
class="button is-light minus"
14+
>
15+
<font-awesome-icon
16+
icon="minus"
17+
class="is-danger"
18+
/>
1319
</button>
14-
<button @click="count = count + 1" class="button is-light plus">
15-
<font-awesome-icon icon="plus" class="is-success" />
20+
<button
21+
@click="count = count + 1"
22+
class="button is-light plus"
23+
>
24+
<font-awesome-icon
25+
icon="plus"
26+
class="is-success"
27+
/>
1628
</button>
1729
</p>
1830
<p class="subtitle is-5">

‎GhostUI/ClientApp/src/views/Login/Login.vue

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,20 @@
1515
<UserNameInput :isInputInvalid="invalidInputs" />
1616
<PasswordInput :isInputInvalid="invalidInputs" />
1717
<RememberMeInput />
18-
<button type="submit" class="button is-info is-medium is-fullwidth">
18+
<button
19+
type="submit"
20+
class="button is-info is-medium is-fullwidth"
21+
>
1922
<span>Login</span>
2023
<span class="icon">
2124
<font-awesome-icon icon="sign-in-alt" />
2225
</span>
2326
</button>
24-
<Authenticator :authStatus="authStatus" @success="onAuthSuccess" @fail="onAuthFailure" />
27+
<Authenticator
28+
:authStatus="authStatus"
29+
@success="onAuthSuccess"
30+
@fail="onAuthFailure"
31+
/>
2532
</form>
2633
</div>
2734
</div>

0 commit comments

Comments
(0)

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