aboutsummaryrefslogtreecommitdiff
path: root/src/site
diff options
context:
space:
mode:
Diffstat (limited to 'src/site')
-rw-r--r--src/site/store/admin.js10
-rw-r--r--src/site/store/config.js25
2 files changed, 9 insertions, 26 deletions
diff --git a/src/site/store/admin.js b/src/site/store/admin.js
index 4f814b5..51213b7 100644
--- a/src/site/store/admin.js
+++ b/src/site/store/admin.js
@@ -11,7 +11,6 @@ export const state = () => ({
files: []
},
file: {},
- settings: {},
statistics: {},
settingsSchema: {
type: null,
@@ -20,12 +19,6 @@ export const state = () => ({
});
export const actions = {
- async fetchSettings({ commit }) {
- const response = await this.$axios.$get('service/config');
- commit('setSettings', response);
-
- return response;
- },
async fetchStatistics({ commit }, category) {
const url = category ? `service/statistics/${category}` : 'service/statistics';
const response = await this.$axios.$get(url);
@@ -105,9 +98,6 @@ export const actions = {
};
export const mutations = {
- setSettings(state, { config }) {
- state.settings = config;
- },
setStatistics(state, { statistics, category }) {
if (category) {
state.statistics[category] = statistics[category];
diff --git a/src/site/store/config.js b/src/site/store/config.js
index c17632d..623e324 100644
--- a/src/site/store/config.js
+++ b/src/site/store/config.js
@@ -1,18 +1,11 @@
export const state = () => ({
- development: true,
- version: '4.0.0',
- URL: 'http://localhost:8080',
- baseURL: 'http://localhost:8080/api',
- serviceName: '',
- maxFileSize: 100,
- chunkSize: 90,
- maxLinksPerAlbum: 5,
- publicMode: false,
- userAccounts: false
+ development: process.env.development,
+ version: process.env.version,
+ URL: process.env.development ? 'http://localhost:5000' : '/',
+ baseURL: `${process.env.development ? 'http://localhost:5000' : ''}/api`,
+ serviceName: process.env.serviceName,
+ maxFileSize: process.env.maxFilesize,
+ chunkSize: process.env.chunkSize,
+ publicMode: process.env.publicMode,
+ userAccounts: process.env.userAccounts
});
-
-export const mutations = {
- set(state, config) {
- Object.assign(state, config);
- }
-};