mirror of
https://github.com/Av0idD4rk/packmate.git
synced 2026-10-25 05:29:26 +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({
|
const axiosInstance = Axios.create({
|
||||||
baseURL: '/api', // TO!DO: edit for release!
|
baseURL: '/api', // TO!DO: edit for release!
|
||||||
// baseURL: 'http://192.168.79.131:65000/api',
|
// baseURL: 'http://192.168.79.131:65000/api',
|
||||||
auth: {
|
|
||||||
username: store.state.apiLogin,
|
|
||||||
password: store.state.apiPassword,
|
|
||||||
},
|
|
||||||
headers: {
|
headers: {
|
||||||
'Accept': 'application/json',
|
'Accept': 'application/json',
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
|||||||
@ -8,8 +8,6 @@ Vue.use(Vuex);
|
|||||||
// noinspection JSUnusedLocalSymbols,JSUnusedGlobalSymbols
|
// noinspection JSUnusedLocalSymbols,JSUnusedGlobalSymbols
|
||||||
export default new Vuex.Store({
|
export default new Vuex.Store({
|
||||||
state: {
|
state: {
|
||||||
apiLogin: 'BinaryBears',
|
|
||||||
apiPassword: '123456',
|
|
||||||
hexdumpBlockSize: 16,
|
hexdumpBlockSize: 16,
|
||||||
hexdumpLineNumberBase: 10,
|
hexdumpLineNumberBase: 10,
|
||||||
pageSize: 25,
|
pageSize: 25,
|
||||||
@ -25,8 +23,6 @@ export default new Vuex.Store({
|
|||||||
patterns: [],
|
patterns: [],
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
setApiLogin: (s, p) => s.apiLogin = p,
|
|
||||||
setApiPassword: (s, p) => s.apiPassword = p,
|
|
||||||
setHexdumpBlockSize: (s, p) => s.hexdumpBlockSize = p,
|
setHexdumpBlockSize: (s, p) => s.hexdumpBlockSize = p,
|
||||||
setHexdumpLineNumberBase: (s, p) => s.hexdumpLineNumberBase = p,
|
setHexdumpLineNumberBase: (s, p) => s.hexdumpLineNumberBase = p,
|
||||||
setPageSize: (s, p) => s.pageSize = p,
|
setPageSize: (s, p) => s.pageSize = p,
|
||||||
|
|||||||
@ -1,20 +1,6 @@
|
|||||||
<!--suppress JSUnresolvedVariable -->
|
<!--suppress JSUnresolvedVariable -->
|
||||||
<template>
|
<template>
|
||||||
<b-modal id="settingsModal" title="Settings" centered scrollable ok-only>
|
<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
|
<b-form-group
|
||||||
label-cols-sm="4"
|
label-cols-sm="4"
|
||||||
label-cols-lg="3"
|
label-cols-lg="3"
|
||||||
@ -49,24 +35,6 @@
|
|||||||
export default {
|
export default {
|
||||||
name: 'Settings',
|
name: 'Settings',
|
||||||
computed: {
|
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: {
|
hexdumpBlockSize: {
|
||||||
get() {
|
get() {
|
||||||
return this.$store.state.hexdumpBlockSize;
|
return this.$store.state.hexdumpBlockSize;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user