mirror of
https://github.com/Av0idD4rk/packmate.git
synced 2026-10-23 16:31:01 +00:00
Remove api login and password from config
This commit is contained in:
parent
a7e6b9bfdc
commit
36fdb69be1
@ -27,10 +27,6 @@ Vue.use(InfiniteLoading, {
|
||||
const axiosInstance = Axios.create({
|
||||
baseURL: '/api', // TO!DO: edit for release!
|
||||
// baseURL: 'http://192.168.79.131:65000/api',
|
||||
auth: {
|
||||
username: store.state.apiLogin,
|
||||
password: store.state.apiPassword,
|
||||
},
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
'Content-Type': 'application/json',
|
||||
|
||||
@ -8,8 +8,6 @@ Vue.use(Vuex);
|
||||
// noinspection JSUnusedLocalSymbols,JSUnusedGlobalSymbols
|
||||
export default new Vuex.Store({
|
||||
state: {
|
||||
apiLogin: 'BinaryBears',
|
||||
apiPassword: '123456',
|
||||
hexdumpBlockSize: 16,
|
||||
hexdumpLineNumberBase: 10,
|
||||
pageSize: 25,
|
||||
@ -25,8 +23,6 @@ export default new Vuex.Store({
|
||||
patterns: [],
|
||||
},
|
||||
mutations: {
|
||||
setApiLogin: (s, p) => s.apiLogin = p,
|
||||
setApiPassword: (s, p) => s.apiPassword = p,
|
||||
setHexdumpBlockSize: (s, p) => s.hexdumpBlockSize = p,
|
||||
setHexdumpLineNumberBase: (s, p) => s.hexdumpLineNumberBase = p,
|
||||
setPageSize: (s, p) => s.pageSize = p,
|
||||
|
||||
@ -1,20 +1,6 @@
|
||||
<!--suppress JSUnresolvedVariable -->
|
||||
<template>
|
||||
<b-modal id="settingsModal" title="Settings" centered scrollable ok-only>
|
||||
<b-form-group
|
||||
label-cols-sm="4"
|
||||
label-cols-lg="3"
|
||||
label="API login"
|
||||
label-for="settings-apiLogin">
|
||||
<b-form-input id="settings-apiLogin" v-model="apiLogin"/>
|
||||
</b-form-group>
|
||||
<b-form-group
|
||||
label-cols-sm="4"
|
||||
label-cols-lg="3"
|
||||
label="API password"
|
||||
label-for="settings-apiPassword">
|
||||
<b-form-input type="password" id="settings-apiPassword" v-model="apiPassword"/>
|
||||
</b-form-group>
|
||||
<b-form-group
|
||||
label-cols-sm="4"
|
||||
label-cols-lg="3"
|
||||
@ -49,24 +35,6 @@
|
||||
export default {
|
||||
name: 'Settings',
|
||||
computed: {
|
||||
apiLogin: {
|
||||
get() {
|
||||
return this.$store.state.apiLogin;
|
||||
},
|
||||
set(v) {
|
||||
this.$store.commit('setApiLogin', v);
|
||||
this.$http.defaults.auth.username = v;
|
||||
},
|
||||
},
|
||||
apiPassword: {
|
||||
get() {
|
||||
return this.$store.state.apiPassword;
|
||||
},
|
||||
set(v) {
|
||||
this.$store.commit('setApiPassword', v);
|
||||
this.$http.defaults.auth.password = v;
|
||||
},
|
||||
},
|
||||
hexdumpBlockSize: {
|
||||
get() {
|
||||
return this.$store.state.hexdumpBlockSize;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user