This commit is contained in:
2018-11-14 18:19:59 +00:00
parent e4991bdade
commit 06312793a9
7 changed files with 31 additions and 19 deletions

View File

@@ -44,12 +44,14 @@
</v-container> </v-container>
</v-content> </v-content>
<v-footer color="indigo" app> <v-footer color="indigo" app>
<span class="white--text">&copy; 2017</span> <span class="white--text">{{ version() }}</span>
<span class="white--text">{{ copyright() }}</span>
</v-footer> </v-footer>
</v-app> </v-app>
</template> </template>
<script> <script>
import aboutInfo from "./utils/aboutinfo";
export default { export default {
name: "App", name: "App",
data() { data() {
@@ -79,6 +81,12 @@ export default {
}, },
navItems() { navItems() {
return this.$store.state.navItems; return this.$store.state.navItems;
},
copyright() {
return aboutInfo.copyright;
},
version() {
return aboutInfo.version;
} }
}, },
props: { props: {

View File

@@ -19,5 +19,8 @@ export default {
"Content-Type": "application/json", "Content-Type": "application/json",
Authorization: "Bearer " + store.state.apiToken Authorization: "Bearer " + store.state.apiToken
}; };
},
APIUrl() {
return store.state.apiUrl;
} }
}; };

View File

@@ -1,10 +1,9 @@
import config from "../utils/config"; import apiUtil from "./apiutil";
import api from "./apiutil";
import { processLogin, processLogout } from "../utils/authutil"; import { processLogin, processLogout } from "../utils/authutil";
export default { export default {
async authenticate(login, password) { async authenticate(login, password) {
return fetch(config.apiUrl + "auth", { return fetch(apiUtil.APIUrl + "auth", {
method: "post", method: "post",
mode: "cors", mode: "cors",
headers: { headers: {
@@ -16,8 +15,8 @@ export default {
password: password password: password
}) })
}) })
.then(api.status) .then(apiUtil.status)
.then(api.json) .then(apiUtil.json)
.then(processLogin) .then(processLogin)
.then(() => { .then(() => {
return Promise.resolve(true); return Promise.resolve(true);

View File

@@ -1,7 +1,6 @@
/* xeslint-disable */ /* xeslint-disable */
import store from "../store"; import store from "../store";
import config from "../utils/config"; import apiUtil from "./apiutil";
import api from "./apiutil";
import _ from "../utils/libs/core.min.js"; import _ from "../utils/libs/core.min.js";
export default { export default {
@@ -24,14 +23,14 @@ export default {
resolve(); resolve();
return; return;
} }
fetch(config.apiUrl + "locale/subset", { fetch(apiUtil.APIUrl + "locale/subset", {
method: "post", method: "post",
mode: "cors", mode: "cors",
headers: api.AuthorizedHeaders(), headers: apiUtil.AuthorizedHeaders(),
body: JSON.stringify(NeedIt) body: JSON.stringify(NeedIt)
}) })
.then(api.status) .then(apiUtil.status)
.then(api.json) .then(apiUtil.json)
.then(response => { .then(response => {
_.forEach(response.data, function(item) { _.forEach(response.data, function(item) {
store.commit("addLocaleText", item); store.commit("addLocaleText", item);

View File

@@ -0,0 +1,5 @@
export default {
version: "AyaNova 8.1.0 Alpha",
copyright:
"Copyright © 1999-2018, Ground Zero Tech-Works Inc. All Rights Reserved"
};

View File

@@ -1,6 +0,0 @@
export default {
apiUrl: "http://localhost:7575/api/v8.0/",
apiToken: "",
userId: 0,
roles: 0
};

View File

@@ -3,4 +3,8 @@
## TODO ## TODO
- Need core dlToken route for not just attachments - Need core dlToken route for not just attachments
- There should be a notification for ops if a file attachment is physically not found when it has a db record see Attachmentcontroller line 407 - There should be a notification for ops if a file attachment is physically not found when it has a db record see Attachmentcontroller line 407
Download / upload security JWT info:
https://stackoverflow.com/questions/29452031/how-to-handle-file-downloads-with-jwt-based-authentication/43133108#43133108
https://stackoverflow.com/questions/45763149/asp-net-core-jwt-in-uri-query-parameter/53295042