Merge branch 'master' of github.com:Lissy93/dashy into FEATURE/minimal-view

This commit is contained in:
Alicia Sykes
2021-08-09 20:46:46 +01:00
22 changed files with 117 additions and 65 deletions

View File

@@ -26,7 +26,7 @@
"logout-message": "Logged Out"
},
"config": {
"main-tab": "Config",
"main-tab": "Main Menu",
"view-config-tab": "View Config",
"edit-config-tab": "Edit Config",
"custom-css-tab": "Custom Styles",
@@ -142,6 +142,7 @@
"restore-id-label": "Restore ID",
"restore-password-label": "Password",
"restore-button": "Restore",
"backup-missing-password": "Missing Password",
"backup-error-unknown": "Unable to process request",
"backup-error-password": "Incorrect password. Please enter your current password.",
"backup-success-msg": "Completed Successfully",

View File

@@ -26,7 +26,7 @@
"logout-message": "Déconnexion"
},
"config": {
"main-tab": "Configuration",
"main-tab": "Menu principal",
"view-config-tab": "Afficher la configuration",
"edit-config-tab": "Modifier la configuration",
"custom-css-tab": "Styles personnalisés",
@@ -142,6 +142,7 @@
"restore-id-label": "Identifiant de sauvegarde",
"restore-password-label": "Mot de passe",
"restore-button": "Restaurer",
"backup-missing-password": "Mot de passe manquant",
"backup-error-unknown": "Impossible de traiter la demande",
"backup-error-password": "Mot de passe incorrect. Veuillez saisir votre mot de passe actuel.",
"backup-success-msg": "Sauvegarde effectuée avec succès",

View File

@@ -96,7 +96,9 @@ export default {
},
checkPass() {
const savedHash = localStorage[localStorageKeys.BACKUP_HASH] || undefined;
if (!savedHash) {
if (!this.backupPassword) {
this.showErrorMsg(this.$t('cloud-sync.backup-missing-password'));
} else if (!savedHash) {
this.makeBackup();
} else if (savedHash === this.makeHash(this.backupPassword)) {
this.makeUpdate();

View File

@@ -10,15 +10,15 @@
{{ $t('config.download-config-button') }}
</button>
</a>
<button class="config-button center" @click="() => navigateToTab(2)">
<button class="config-button center" @click="() => navigateToTab(1)">
<EditIcon class="button-icon"/>
{{ $t('config.edit-config-button') }}
</button>
<button class="config-button center" @click="() => navigateToTab(4)">
<button class="config-button center" @click="() => navigateToTab(3)">
<CustomCssIcon class="button-icon"/>
{{ $t('config.edit-css-button') }}
</button>
<button class="config-button center" @click="() => navigateToTab(3)">
<button class="config-button center" @click="() => navigateToTab(2)">
<CloudIcon class="button-icon"/>
{{backupId ? $t('config.edit-cloud-sync-button') : $t('config.cloud-sync-button') }}
</button>
@@ -51,21 +51,6 @@
<!-- Rebuild App Modal -->
<RebuildApp />
</TabItem>
<TabItem :name="$t('config.view-config-tab')" class="code-container">
<pre id="conf-yaml">{{yaml}}</pre>
<div class="yaml-action-buttons">
<h2>{{ $t('config.actions-label') }}</h2>
<a class="yaml-button download" @click="downloadConfigFile('conf.yml', yaml)">
{{ $t('config.download-config-button') }}
</a>
<a class="yaml-button copy" @click="copyConfigToClipboard()">
{{ $t('config.copy-config-label') }}
</a>
<a class="yaml-button reset" @click="resetLocalSettings()">
{{ $t('config.reset-config-label') }}
</a>
</div>
</TabItem>
<TabItem :name="$t('config.edit-config-tab')">
<JsonEditor :config="config" />
</TabItem>

View File

@@ -11,14 +11,15 @@
</template>
<script>
import CustomThemeMaker from '@/components/Settings/CustomThemeMaker';
import { getTheme } from '@/utils/ConfigHelpers';
import { PrismEditor } from 'vue-prism-editor';
import { highlight, languages } from 'prismjs/components/prism-core';
import 'prismjs/components/prism-css';
import 'prismjs/themes/prism-funky.css';
import 'vue-prism-editor/dist/prismeditor.min.css';
import CustomThemeMaker from '@/components/Settings/CustomThemeMaker';
import { getTheme } from '@/utils/ConfigHelpers';
import { localStorageKeys } from '@/utils/defaults';
export default {

View File

@@ -55,12 +55,12 @@
<script>
import axios from 'axios';
import VJsoneditor from 'v-jsoneditor';
import { localStorageKeys } from '@/utils/defaults';
import configSchema from '@/utils/ConfigSchema.json';
import JsonToYaml from '@/utils/JsonToYaml';
import { isUserAdmin } from '@/utils/Auth';
import axios from 'axios';
export default {
name: 'JsonEditor',

View File

@@ -15,7 +15,7 @@
<!-- Modal for manually changing locale -->
<modal :name="modalNames.LANG_SWITCHER" classes="dashy-modal"
:resizable="true" width="30%" height="25%">
:resizable="true" width="35%" height="35%">
<LanguageSwitcher />
</modal>

View File

@@ -1,5 +1,6 @@
@import '@/styles/style-helpers.scss';
@import '@/styles/media-queries.scss';
/* Essential global page layout styles */
html {
@@ -26,6 +27,13 @@ html {
box-shadow: 0 40px 70px -2px hsl(0deg 0% 0% / 60%), 1px 1px 6px var(--primary) !important;
min-width: 350px;
min-height: 200px;
@include phone {
left: 0.5rem !important;
right: 0.5rem !important;
width: 95% !important;
top: 2rem !important;
}
}
.vm--overlay {
background: #00000080;

View File

@@ -263,6 +263,10 @@
"type": "boolean",
"default": false,
"description": "Enable anonymous crash reports. This helps bugs be found and fixed, in order to make Dashy more stable. Reporting is off by default, and no data will EVER be collected without your explicit and active concent."
},
"sentryDsn": {
"type": "string",
"description": "The DSN to your self-hosted Sentry server, if you need to collect bug reports. Only used if enableErrorReporting is enabled"
}
},
"additionalProperties": false

View File

@@ -10,6 +10,7 @@
/* eslint-disable global-require */
import ConfigAccumulator from '@/utils/ConfigAccumalator';
import { sentryDsn } from '@/utils/defaults';
const ErrorTracking = (Vue, router) => {
// Fetch users config
@@ -19,7 +20,8 @@ const ErrorTracking = (Vue, router) => {
// Import Sentry
const Sentry = require('@sentry/vue');
const { Integrations } = require('@sentry/tracing');
const dsn = 'https://3138ea85f15a4fa883a5b27a4dc8ee28@o937511.ingest.sentry.io/5887934';
// Get the Data Source Name for your or Dashy's Sentry instance
const dsn = appConfig.sentryDsn || sentryDsn;
// Initialize Sentry
Sentry.init({
Vue,

View File

@@ -141,4 +141,6 @@ module.exports = {
['#f5f5f5', '#d9d9d9', '#bfbfbf', '#9a9a9a'],
['#636363', '#363636', '#313941', '#0d0d0d'],
],
/* Use your own self-hosted Sentry instance. Only used if error reporting is turned on */
sentryDsn: 'https://3138ea85f15a4fa883a5b27a4dc8ee28@o937511.ingest.sentry.io/5887934',
};