Merge branch 'master' of github.com:Lissy93/dashy into FEATURE/sub-items
This commit is contained in:
@@ -1,21 +1,27 @@
|
||||
<template>
|
||||
<pre><code>{{ jsonParser(config) }}</code></pre>
|
||||
<pre v-if="allowViewConfig"><code>{{ yamlConfig }}</code></pre>
|
||||
<AccessError v-else />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JsonToYaml from '@/utils/JsonToYaml';
|
||||
import JsYaml from 'js-yaml';
|
||||
import AccessError from '@/components/Configuration/AccessError';
|
||||
|
||||
export default {
|
||||
name: 'DownloadConfig',
|
||||
components: {
|
||||
AccessError,
|
||||
},
|
||||
computed: {
|
||||
config() {
|
||||
return this.$store.state.config;
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
jsonParser: JsonToYaml,
|
||||
};
|
||||
yamlConfig() {
|
||||
return JsYaml.dump(this.config);
|
||||
},
|
||||
allowViewConfig() {
|
||||
return this.$store.getters.permissions.allowViewConfig;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -23,8 +29,9 @@ export default {
|
||||
|
||||
<style scoped lang="scss">
|
||||
pre {
|
||||
background: var(--code-editor-background);
|
||||
color: var(--code-editor-color);
|
||||
margin: 0;
|
||||
padding: 1rem;
|
||||
color: var(--code-editor-color);
|
||||
background: var(--code-editor-background);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -149,7 +149,7 @@ export default {
|
||||
let sectionToReturn;
|
||||
const parse = (section) => section.replaceAll(' ', '-').toLowerCase().trim();
|
||||
allSections.forEach((section) => {
|
||||
if (parse(sectionTitle) === parse(section.name)) {
|
||||
if (parse(sectionTitle) === parse(section.name || '')) {
|
||||
sectionToReturn = [section];
|
||||
}
|
||||
});
|
||||
|
||||
@@ -21,15 +21,15 @@
|
||||
<!-- Main login form -->
|
||||
<form class="login-form" v-if="(!isUserAlreadyLoggedIn) && isAuthenticationEnabled">
|
||||
<h2 class="login-title">{{ $t('login.title') }}</h2>
|
||||
<Input
|
||||
<Input type="text"
|
||||
v-model="username"
|
||||
type="text"
|
||||
:onEnter="submitLogin"
|
||||
:label="$t('login.username-label')"
|
||||
class="login-field username"
|
||||
/>
|
||||
<Input
|
||||
<Input type="password"
|
||||
v-model="password"
|
||||
type="password"
|
||||
:onEnter="submitLogin"
|
||||
:label="$t('login.password-label')"
|
||||
class="login-field password"
|
||||
/>
|
||||
@@ -38,6 +38,7 @@
|
||||
v-model="timeout"
|
||||
:selectOnTab="true"
|
||||
:options="dropDownMenu"
|
||||
:map-keydown="(map) => ({ ...map, 13: () => this.submitLogin() })"
|
||||
class="login-time-dropdown"
|
||||
/>
|
||||
<Button class="login-button" :click="submitLogin">
|
||||
|
||||
Reference in New Issue
Block a user