2021-05-16 20:17:32 +00:00
|
|
|
<template>
|
2022-02-12 21:24:23 +00:00
|
|
|
<div class="json-editor-outer" v-if="allowViewConfig">
|
2021-06-20 19:39:45 +00:00
|
|
|
<!-- Main JSON editor -->
|
2021-10-28 00:33:35 +00:00
|
|
|
<v-jsoneditor v-model="jsonData" :options="options" />
|
2021-06-20 19:39:45 +00:00
|
|
|
<!-- Options raido, and save button -->
|
2021-10-28 00:33:35 +00:00
|
|
|
<Radio class="save-options"
|
|
|
|
v-model="saveMode"
|
|
|
|
:label="$t('config-editor.save-location-label')"
|
|
|
|
:options="saveOptions"
|
|
|
|
:initialOption="initialSaveMode"
|
2022-02-11 10:20:45 +00:00
|
|
|
:disabled="!allowWriteToDisk || !allowSaveLocally"
|
2021-10-28 00:33:35 +00:00
|
|
|
/>
|
|
|
|
<!-- Save Buttons -->
|
|
|
|
<div :class="`btn-container ${!isValid ? 'err' : ''}`">
|
2022-02-11 10:20:45 +00:00
|
|
|
<Button :click="save" :disallow="!allowWriteToDisk && !allowSaveLocally">
|
2021-10-28 00:33:35 +00:00
|
|
|
{{ $t('config-editor.save-button') }}
|
|
|
|
</Button>
|
|
|
|
<Button :click="startPreview">
|
|
|
|
{{ $t('config-editor.preview-button') }}
|
|
|
|
</Button>
|
2021-06-20 19:39:45 +00:00
|
|
|
</div>
|
|
|
|
<!-- List validation warnings -->
|
2021-06-06 16:09:37 +00:00
|
|
|
<p class="errors">
|
|
|
|
<ul>
|
|
|
|
<li v-for="(error, index) in errorMessages" :key="index" :class="`type-${error.type}`">
|
|
|
|
{{error.msg}}
|
|
|
|
</li>
|
|
|
|
<li v-if="errorMessages.length < 1" class="type-valid">
|
2021-07-24 13:18:48 +00:00
|
|
|
{{ $t('config-editor.valid-label') }}
|
2021-06-06 16:09:37 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</p>
|
2021-06-20 19:39:45 +00:00
|
|
|
<!-- Information notes -->
|
|
|
|
<p v-if="saveSuccess !== undefined"
|
|
|
|
:class="`response-output status-${saveSuccess ? 'success' : 'fail'}`">
|
2021-07-24 13:18:48 +00:00
|
|
|
{{saveSuccess
|
|
|
|
? $t('config-editor.status-success-msg') : $t('config-editor.status-fail-msg') }}
|
2021-06-20 19:39:45 +00:00
|
|
|
</p>
|
2021-08-18 21:17:17 +00:00
|
|
|
<p v-if="!allowWriteToDisk" class="no-permission-note">
|
|
|
|
{{ $t('config-editor.not-admin-note') }}
|
|
|
|
</p>
|
2021-06-20 19:39:45 +00:00
|
|
|
<p class="response-output">{{ responseText }}</p>
|
|
|
|
<p v-if="saveSuccess" class="response-output">
|
2021-07-24 13:18:48 +00:00
|
|
|
{{ $t('config-editor.success-note-l1') }}
|
|
|
|
{{ $t('config-editor.success-note-l2') }}
|
2021-05-17 17:53:35 +00:00
|
|
|
</p>
|
2021-07-24 13:18:48 +00:00
|
|
|
<p class="note">{{ $t('config.backup-note') }}</p>
|
2021-05-16 20:17:32 +00:00
|
|
|
</div>
|
2022-02-12 21:24:23 +00:00
|
|
|
<AccessError v-else />
|
2021-05-16 20:17:32 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
2021-08-09 19:15:37 +00:00
|
|
|
import axios from 'axios';
|
2022-02-04 22:06:15 +00:00
|
|
|
import { Progress } from 'rsup-progress';
|
2021-05-16 20:17:32 +00:00
|
|
|
import VJsoneditor from 'v-jsoneditor';
|
2021-10-28 00:33:35 +00:00
|
|
|
import jsYaml from 'js-yaml';
|
2021-11-07 21:07:12 +00:00
|
|
|
import ErrorHandler, { InfoHandler, InfoKeys } from '@/utils/ErrorHandler';
|
2021-06-07 15:01:11 +00:00
|
|
|
import configSchema from '@/utils/ConfigSchema.json';
|
2021-10-28 00:33:35 +00:00
|
|
|
import StoreKeys from '@/utils/StoreMutations';
|
|
|
|
import { localStorageKeys, serviceEndpoints, modalNames } from '@/utils/defaults';
|
|
|
|
import Button from '@/components/FormElements/Button';
|
|
|
|
import Radio from '@/components/FormElements/Radio';
|
2022-02-12 21:24:23 +00:00
|
|
|
import AccessError from '@/components/Configuration/AccessError';
|
2021-05-16 20:17:32 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'JsonEditor',
|
|
|
|
components: {
|
|
|
|
VJsoneditor,
|
2021-10-28 00:33:35 +00:00
|
|
|
Button,
|
|
|
|
Radio,
|
2022-02-12 21:24:23 +00:00
|
|
|
AccessError,
|
2021-05-16 20:17:32 +00:00
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
2021-10-28 00:33:35 +00:00
|
|
|
jsonData: {},
|
2021-06-06 16:09:37 +00:00
|
|
|
errorMessages: [],
|
2021-10-28 00:33:35 +00:00
|
|
|
saveMode: '',
|
2021-05-16 20:17:32 +00:00
|
|
|
options: {
|
2021-06-06 16:09:37 +00:00
|
|
|
schema: configSchema,
|
2021-05-16 20:17:32 +00:00
|
|
|
mode: 'tree',
|
|
|
|
modes: ['tree', 'code', 'preview'],
|
2021-06-06 16:09:37 +00:00
|
|
|
name: 'config',
|
|
|
|
onValidationError: this.validationErrors,
|
2021-05-16 20:17:32 +00:00
|
|
|
},
|
2021-06-20 19:39:45 +00:00
|
|
|
responseText: '',
|
|
|
|
saveSuccess: undefined,
|
2022-02-04 22:06:15 +00:00
|
|
|
progress: new Progress({ color: 'var(--progress-bar)' }),
|
2021-10-28 00:33:35 +00:00
|
|
|
saveOptions: [
|
|
|
|
{ label: this.$t('config-editor.location-disk-label'), value: 'file' },
|
|
|
|
{ label: this.$t('config-editor.location-local-label'), value: 'local' },
|
|
|
|
],
|
2021-05-16 20:17:32 +00:00
|
|
|
};
|
|
|
|
},
|
2021-06-06 16:09:37 +00:00
|
|
|
computed: {
|
2021-10-28 00:33:35 +00:00
|
|
|
config() {
|
|
|
|
return this.$store.state.config;
|
|
|
|
},
|
2021-06-06 16:09:37 +00:00
|
|
|
isValid() {
|
|
|
|
return this.errorMessages.length < 1;
|
|
|
|
},
|
2022-02-12 21:24:23 +00:00
|
|
|
permissions() {
|
|
|
|
// Returns: { allowWriteToDisk, allowSaveLocally, allowViewConfig }
|
|
|
|
return this.$store.getters.permissions;
|
|
|
|
},
|
2021-10-28 00:33:35 +00:00
|
|
|
allowWriteToDisk() {
|
2022-02-12 21:24:23 +00:00
|
|
|
return this.permissions.allowWriteToDisk;
|
2021-10-28 00:33:35 +00:00
|
|
|
},
|
2022-02-11 10:20:45 +00:00
|
|
|
allowSaveLocally() {
|
2022-02-12 21:24:23 +00:00
|
|
|
return this.permissions.allowSaveLocally;
|
|
|
|
},
|
|
|
|
allowViewConfig() {
|
|
|
|
return this.permissions.allowViewConfig;
|
2022-02-11 10:20:45 +00:00
|
|
|
},
|
2021-10-28 00:33:35 +00:00
|
|
|
initialSaveMode() {
|
2022-02-11 10:20:45 +00:00
|
|
|
if (this.allowWriteToDisk) return 'file';
|
|
|
|
if (this.allowSaveLocally) return 'local';
|
|
|
|
return '';
|
2021-10-28 00:33:35 +00:00
|
|
|
},
|
2021-06-06 16:09:37 +00:00
|
|
|
},
|
2021-06-21 10:53:10 +00:00
|
|
|
mounted() {
|
2021-10-28 00:33:35 +00:00
|
|
|
this.jsonData = this.config;
|
2021-06-21 12:09:20 +00:00
|
|
|
if (!this.allowWriteToDisk) this.saveMode = 'local';
|
2021-06-21 10:53:10 +00:00
|
|
|
},
|
2021-05-16 20:17:32 +00:00
|
|
|
methods: {
|
2021-10-28 00:33:35 +00:00
|
|
|
/* Calls appropriate save method, based on save-type radio selected */
|
2021-05-16 20:17:32 +00:00
|
|
|
save() {
|
2021-06-21 12:09:20 +00:00
|
|
|
if (this.saveMode === 'local' || !this.allowWriteToDisk) {
|
2021-06-20 19:39:45 +00:00
|
|
|
this.saveConfigLocally();
|
|
|
|
} else if (this.saveMode === 'file') {
|
|
|
|
this.writeConfigToDisk();
|
|
|
|
} else {
|
2021-07-24 13:18:48 +00:00
|
|
|
this.$toasted.show(this.$t('config-editor.error-msg-save-mode'));
|
2021-06-20 19:39:45 +00:00
|
|
|
}
|
|
|
|
},
|
2021-10-28 00:33:35 +00:00
|
|
|
/* Applies changes to the local state, begins edit mode and closes modal */
|
|
|
|
startPreview() {
|
2021-11-07 21:07:12 +00:00
|
|
|
InfoHandler('Applying changes to local state...', InfoKeys.RAW_EDITOR);
|
2021-10-28 00:33:35 +00:00
|
|
|
const data = this.jsonData;
|
|
|
|
this.$store.commit(StoreKeys.SET_APP_CONFIG, data.appConfig);
|
|
|
|
this.$store.commit(StoreKeys.SET_PAGE_INFO, data.pageInfo);
|
|
|
|
this.$store.commit(StoreKeys.SET_SECTIONS, data.sections);
|
|
|
|
this.$store.commit(StoreKeys.SET_MODAL_OPEN, false);
|
|
|
|
this.$store.commit(StoreKeys.SET_EDIT_MODE, true);
|
|
|
|
this.$modal.hide(modalNames.CONF_EDITOR);
|
|
|
|
},
|
|
|
|
/* Converts config to YAML, and writes it to disk */
|
2021-06-20 19:39:45 +00:00
|
|
|
writeConfigToDisk() {
|
|
|
|
// 1. Convert JSON into YAML
|
2021-10-28 00:33:35 +00:00
|
|
|
const yaml = jsYaml.dump(this.config);
|
2021-06-20 19:39:45 +00:00
|
|
|
// 2. Prepare the request
|
|
|
|
const baseUrl = process.env.VUE_APP_DOMAIN || window.location.origin;
|
2021-09-17 21:40:39 +00:00
|
|
|
const endpoint = `${baseUrl}${serviceEndpoints.save}`;
|
2021-06-20 19:39:45 +00:00
|
|
|
const headers = { 'Content-Type': 'text/plain' };
|
|
|
|
const body = { config: yaml, timestamp: new Date() };
|
|
|
|
const request = axios.post(endpoint, body, headers);
|
|
|
|
// 3. Make the request, and handle response
|
2021-08-27 22:15:58 +00:00
|
|
|
this.progress.start();
|
2021-06-20 19:39:45 +00:00
|
|
|
request.then((response) => {
|
|
|
|
this.saveSuccess = response.data.success || false;
|
|
|
|
this.responseText = response.data.message;
|
2021-06-21 12:09:20 +00:00
|
|
|
if (this.saveSuccess) {
|
|
|
|
this.carefullyClearLocalStorage();
|
2021-07-24 13:18:48 +00:00
|
|
|
this.showToast(this.$t('config-editor.success-msg-disk'), true);
|
2021-06-21 12:09:20 +00:00
|
|
|
} else {
|
2021-07-24 13:18:48 +00:00
|
|
|
this.showToast(this.$t('config-editor.error-msg-cannot-save'), false);
|
2021-06-21 12:09:20 +00:00
|
|
|
}
|
2021-11-07 21:07:12 +00:00
|
|
|
InfoHandler('Config has been written to disk succesfully', InfoKeys.RAW_EDITOR);
|
2021-10-28 00:33:35 +00:00
|
|
|
this.$store.commit(StoreKeys.SET_CONFIG, this.jsonData);
|
2021-08-27 22:15:58 +00:00
|
|
|
this.progress.end();
|
2021-06-20 19:39:45 +00:00
|
|
|
})
|
|
|
|
.catch((error) => {
|
|
|
|
this.saveSuccess = false;
|
|
|
|
this.responseText = error;
|
2021-06-21 12:09:20 +00:00
|
|
|
this.showToast(error, false);
|
2021-09-12 15:33:29 +00:00
|
|
|
ErrorHandler(`Failed to save config. ${error}`);
|
2021-08-27 22:15:58 +00:00
|
|
|
this.progress.end();
|
2021-06-20 19:39:45 +00:00
|
|
|
});
|
|
|
|
},
|
2021-10-28 00:33:35 +00:00
|
|
|
/* Saves config to local browser storage */
|
2021-06-20 19:39:45 +00:00
|
|
|
saveConfigLocally() {
|
2022-02-11 10:20:45 +00:00
|
|
|
if (!this.allowSaveLocally) {
|
|
|
|
ErrorHandler('Unable to save changes locally, this feature has been disabled');
|
|
|
|
return;
|
|
|
|
}
|
2021-06-06 16:09:37 +00:00
|
|
|
const data = this.jsonData;
|
|
|
|
if (data.sections) {
|
|
|
|
localStorage.setItem(localStorageKeys.CONF_SECTIONS, JSON.stringify(data.sections));
|
|
|
|
}
|
|
|
|
if (data.pageInfo) {
|
|
|
|
localStorage.setItem(localStorageKeys.PAGE_INFO, JSON.stringify(data.pageInfo));
|
|
|
|
}
|
|
|
|
if (data.appConfig) {
|
2021-10-23 00:57:21 +00:00
|
|
|
data.appConfig.auth = this.config.appConfig.auth || {};
|
2021-06-06 16:09:37 +00:00
|
|
|
localStorage.setItem(localStorageKeys.APP_CONFIG, JSON.stringify(data.appConfig));
|
|
|
|
}
|
|
|
|
if (data.appConfig.theme) {
|
|
|
|
localStorage.setItem(localStorageKeys.THEME, data.appConfig.theme);
|
|
|
|
}
|
2022-02-11 10:20:45 +00:00
|
|
|
InfoHandler('Config has successfully been saved in browser storage', InfoKeys.RAW_EDITOR);
|
2021-07-24 13:18:48 +00:00
|
|
|
this.showToast(this.$t('config-editor.success-msg-local'), true);
|
2021-05-16 20:17:32 +00:00
|
|
|
},
|
2021-10-28 00:33:35 +00:00
|
|
|
/* Clears config from browser storage, only removing relevant items */
|
2021-06-20 19:39:45 +00:00
|
|
|
carefullyClearLocalStorage() {
|
|
|
|
localStorage.removeItem(localStorageKeys.PAGE_INFO);
|
|
|
|
localStorage.removeItem(localStorageKeys.APP_CONFIG);
|
|
|
|
localStorage.removeItem(localStorageKeys.CONF_SECTIONS);
|
|
|
|
},
|
2021-10-28 00:33:35 +00:00
|
|
|
/* Convert error messages into readable format for UI */
|
2021-06-06 16:09:37 +00:00
|
|
|
validationErrors(errors) {
|
|
|
|
const errorMessages = [];
|
|
|
|
errors.forEach((error) => {
|
|
|
|
switch (error.type) {
|
|
|
|
case 'validation':
|
|
|
|
errorMessages.push({
|
|
|
|
type: 'validation',
|
2021-07-24 13:18:48 +00:00
|
|
|
msg: `${this.$t('config-editor.warning-msg-validation')}: `
|
2022-02-01 18:54:19 +00:00
|
|
|
+ `${(error.error || error).dataPath} ${(error.error || error).message}`,
|
2021-06-06 16:09:37 +00:00
|
|
|
});
|
|
|
|
break;
|
|
|
|
case 'error':
|
|
|
|
errorMessages.push({
|
|
|
|
type: 'parse',
|
|
|
|
msg: error.message,
|
|
|
|
});
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
errorMessages.push({
|
|
|
|
type: 'editor',
|
2021-07-24 13:18:48 +00:00
|
|
|
msg: this.$t('config-editor.error-msg-bad-json'),
|
2021-06-06 16:09:37 +00:00
|
|
|
});
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
this.errorMessages = errorMessages;
|
|
|
|
},
|
2021-10-28 00:33:35 +00:00
|
|
|
/* Shows toast message */
|
2021-06-21 12:09:20 +00:00
|
|
|
showToast(message, success) {
|
|
|
|
this.$toasted.show(message, { className: `toast-${success ? 'success' : 'error'}` });
|
|
|
|
},
|
2021-05-16 20:17:32 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
2021-06-20 19:39:45 +00:00
|
|
|
@import '@/styles/media-queries.scss';
|
2021-05-16 20:17:32 +00:00
|
|
|
|
|
|
|
.json-editor-outer {
|
|
|
|
text-align: center;
|
|
|
|
}
|
2021-05-17 17:53:35 +00:00
|
|
|
p.note {
|
|
|
|
font-size: 0.8rem;
|
|
|
|
color: var(--medium-grey);
|
|
|
|
margin: 0.2rem;
|
|
|
|
}
|
2021-06-06 16:09:37 +00:00
|
|
|
p.errors {
|
|
|
|
text-align: left;
|
|
|
|
margin: 0.5rem auto;
|
|
|
|
width: 95%;
|
|
|
|
ul {
|
|
|
|
list-style: none;
|
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
|
|
|
li {
|
|
|
|
&.type-validation {
|
|
|
|
color: var(--warning);
|
|
|
|
&::before { content: "⚠️"; }
|
|
|
|
}
|
|
|
|
&.type-parse {
|
|
|
|
color: var(--danger);
|
|
|
|
&::before { content: "❌"; }
|
|
|
|
}
|
|
|
|
&.type-valid {
|
|
|
|
color: var(--success);
|
|
|
|
&::before { content: "✅"; }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-06-20 19:39:45 +00:00
|
|
|
p.response-output {
|
|
|
|
font-size: 0.8rem;
|
|
|
|
text-align: left;
|
|
|
|
margin: 0.5rem auto;
|
|
|
|
width: 95%;
|
|
|
|
color: var(--config-settings-color);
|
2021-07-12 22:29:25 +00:00
|
|
|
&.status-success {
|
|
|
|
font-weight: bold;
|
|
|
|
color: var(--success);
|
|
|
|
}
|
|
|
|
&.status-fail {
|
|
|
|
font-weight: bold;
|
|
|
|
color: var(--danger);
|
|
|
|
}
|
2021-06-20 19:39:45 +00:00
|
|
|
}
|
|
|
|
|
2021-08-18 21:17:17 +00:00
|
|
|
p.no-permission-note {
|
2022-02-12 21:24:23 +00:00
|
|
|
color: var(--warning);
|
2021-08-18 21:17:17 +00:00
|
|
|
}
|
|
|
|
|
2021-10-28 00:33:35 +00:00
|
|
|
.btn-container {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
button {
|
|
|
|
padding: 0.5rem 1rem;
|
|
|
|
margin: 0.25rem;
|
|
|
|
font-size: 1.2rem;
|
2021-05-17 17:53:35 +00:00
|
|
|
background: var(--config-settings-background);
|
|
|
|
color: var(--config-settings-color);
|
2021-10-28 00:33:35 +00:00
|
|
|
border: 1px solid var(--config-settings-color);
|
|
|
|
border-radius: var(--curve-factor);
|
|
|
|
&:hover {
|
|
|
|
background: var(--config-settings-color);
|
|
|
|
color: var(--config-settings-background);
|
|
|
|
border-color: var(--config-settings-background);
|
|
|
|
}
|
2021-05-16 20:17:32 +00:00
|
|
|
}
|
2021-10-28 00:33:35 +00:00
|
|
|
&.err button {
|
2021-06-06 16:09:37 +00:00
|
|
|
opacity: 0.8;
|
|
|
|
cursor: default;
|
|
|
|
&:hover {
|
2021-10-28 00:33:35 +00:00
|
|
|
background: var(--config-settings-background);
|
|
|
|
color: var(--config-settings-color);
|
2021-06-06 16:09:37 +00:00
|
|
|
border-color: var(--danger);
|
|
|
|
}
|
|
|
|
}
|
2021-05-16 20:17:32 +00:00
|
|
|
}
|
|
|
|
|
2021-10-28 00:33:35 +00:00
|
|
|
div.save-options.radio-container {
|
2021-06-20 19:39:45 +00:00
|
|
|
display: flex;
|
2021-10-28 00:33:35 +00:00
|
|
|
align-items: center;
|
2021-06-20 19:39:45 +00:00
|
|
|
justify-content: center;
|
2021-10-28 00:33:35 +00:00
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
2021-06-20 19:39:45 +00:00
|
|
|
border-top: 2px solid var(--config-settings-background);
|
2021-10-28 00:33:35 +00:00
|
|
|
background: var(--code-editor-background);
|
|
|
|
label.radio-label {
|
|
|
|
font-size: 1rem;
|
|
|
|
flex-grow: revert;
|
|
|
|
flex-basis: revert;
|
|
|
|
color: var(--code-editor-color);
|
|
|
|
padding-left: 1rem;
|
2021-06-20 19:39:45 +00:00
|
|
|
}
|
2021-10-28 00:33:35 +00:00
|
|
|
.radio-wrapper {
|
|
|
|
margin: 0;
|
|
|
|
font-size: 1rem;
|
|
|
|
justify-content: space-around;
|
|
|
|
background: var(--code-editor-background);
|
|
|
|
color: var(--code-editor-color);
|
|
|
|
.radio-option:hover:not(.wrap-disabled) {
|
|
|
|
border: 1px solid var(--code-editor-color);
|
|
|
|
}
|
2021-06-20 19:39:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-08-07 14:15:53 +00:00
|
|
|
.jsoneditor-container.min-box {
|
|
|
|
height: 58vh;
|
|
|
|
}
|
|
|
|
|
2021-06-20 19:39:45 +00:00
|
|
|
.jsoneditor, .jsoneditor-menu {
|
|
|
|
border-color: var(--primary);
|
|
|
|
}
|
|
|
|
.jsoneditor {
|
|
|
|
border-bottom: none;
|
|
|
|
}
|
|
|
|
|
2021-06-06 16:40:28 +00:00
|
|
|
.jsoneditor-menu, .pico-modal-header {
|
|
|
|
background: var(--config-settings-background) !important;
|
|
|
|
color: var(--config-settings-color) !important;
|
|
|
|
}
|
|
|
|
.jsoneditor-contextmenu .jsoneditor-menu li button {
|
2021-05-17 18:38:18 +00:00
|
|
|
background: var(--config-settings-background);
|
|
|
|
color: var(--config-settings-color);
|
2021-06-06 16:40:28 +00:00
|
|
|
&.jsoneditor-selected, &.jsoneditor-selected:focus, &.jsoneditor-selected:hover {
|
|
|
|
background: var(--config-settings-color);
|
|
|
|
color: var(--config-settings-background);
|
|
|
|
}
|
2021-05-16 20:17:32 +00:00
|
|
|
}
|
2021-06-06 16:40:28 +00:00
|
|
|
div.jsoneditor-search div.jsoneditor-frame {
|
|
|
|
border-radius: var(--curve-factor);
|
2021-05-16 20:17:32 +00:00
|
|
|
}
|
2021-05-17 17:53:35 +00:00
|
|
|
.jsoneditor-poweredBy {
|
|
|
|
display: none;
|
|
|
|
}
|
2021-05-18 14:22:11 +00:00
|
|
|
.jsoneditor-tree, pre.jsoneditor-preview {
|
2021-06-20 19:39:45 +00:00
|
|
|
background: var(--code-editor-background);
|
2021-05-18 14:22:11 +00:00
|
|
|
text-align: left;
|
|
|
|
}
|
2021-06-06 16:40:28 +00:00
|
|
|
|
|
|
|
.jsoneditor-jmespath-label {
|
|
|
|
color: var(--config-settings-color) !important;
|
|
|
|
}
|
|
|
|
.jsoneditor-jmespath-block.jsoneditor-modal-actions input {
|
|
|
|
background: var(--config-settings-color);
|
|
|
|
color: var(--config-settings-background);
|
|
|
|
border: 1px solid var(--config-settings-background);
|
|
|
|
border-radius: var(--curve-factor);
|
|
|
|
&:hover {
|
|
|
|
background: var(--config-settings-background);
|
|
|
|
color: var(--config-settings-color);
|
|
|
|
border-color: var(--config-settings-color);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
textarea.jsoneditor-transform-preview, div.jsoneditor-jmespath-block textarea#query {
|
|
|
|
border: 1px solid var(--config-settings-color);
|
|
|
|
border-radius: var(--curve-factor);
|
|
|
|
}
|
2021-05-16 20:17:32 +00:00
|
|
|
</style>
|