remove hardcoded h1 tag, keep the title h1 tag; more cleanup;

This commit is contained in:
Johann Hoffmann
2024-11-22 11:43:05 +01:00
parent e2b42de6b3
commit ecab3ea4d9
5 changed files with 187 additions and 188 deletions
@@ -36,7 +36,8 @@ export default {
}
).catch(err => console.error('ERROR:', err));
},
template: `<div class="dashboard-admin-widgets">
template: `
<div class="dashboard-admin-widgets">
<div v-for="widget in widgets" :key="widget.widget_id" class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" :id="'dashboard-admin-widgets-' + widget.widget_id" v-model="widget.allowed" @input.prevent="sendChange(widget.widget_id)">
<label class="form-check-label" :for="'dashboard-admin-widgets-' + widget.widget_id">{{(widget.setup && widget.setup.name) || widget.widget_kurzbz}}</label>
@@ -1,5 +1,4 @@
import AbstractWidget from './Abstract';
export default {
mixins: [
AbstractWidget
@@ -12,7 +11,8 @@ export default {
created() {
this.$emit('setConfig', false)
},
template: `<div :class="css">
template: `
<div :class="css">
<h5 class="card-title">{{ config.title }}</h5>
<p class="card-text">{{ config.msg }}</p>
</div>`
+5 -4
View File
@@ -1,10 +1,11 @@
import AbstractWidget from './Abstract';
import BsModal from '../Bootstrap/Modal';
const MAX_LOADED_NEWS = 10;
export default {
name: "WidgetsNews",
components: { BsModal },
components: {BsModal},
data: () => ({
allNewsList: [],
singleNews: {},
@@ -64,8 +65,8 @@ export default {
this.$refs.newsModal.show();
},
},
template: /*html*/ `<div class="widgets-news h-100" :style="getNewsWidgetStyle">
template: /*html*/ `
<div class="widgets-news h-100" :style="getNewsWidgetStyle">
<div class="d-flex flex-column h-100 ">
<div class="h-100" style="overflow-y: auto" v-if="width == 1">
<div v-for="(news, index) in newsList" :key="news.id" class="mt-2">
@@ -84,6 +85,6 @@ export default {
<div class="news-content h-100" :style="'--news-widget-height: '+height" ref="htmlContent" v-html="news.content_obj.content"></div>
</div>
</div>
</div>
</div>
</div>`,
};
+7 -9
View File
@@ -12,9 +12,9 @@ export default {
data: () => ({
title_input: "",
url_input: "",
validation:{
validation: {
invalidURL: false,
invalidTitel:false,
invalidTitel: false,
}
}),
@@ -33,7 +33,7 @@ export default {
},
},
methods: {
isValidationSuccessfull(){
isValidationSuccessfull() {
// validate the input fields
if (this.title_input.length === 0) {
this.$fhcAlert.alertError(this.$p.t("bookmark", "invalidTitel"));
@@ -57,7 +57,7 @@ export default {
},
addLink() {
// reset is-invalid css on url input field
for(let key of Object.keys(this.validation)){
for (let key of Object.keys(this.validation)) {
this.validation[key] = false;
}
@@ -86,7 +86,7 @@ export default {
let isConfirmed = await this.$fhcAlert.confirmDelete();
// early return if the confirm dialog was not confirmed
if(!isConfirmed) return;
if (!isConfirmed) return;
this.$fhcApi.factory.bookmark
.delete(bookmark_id)
@@ -102,8 +102,7 @@ export default {
async mounted() {
await this.fetchBookmarks();
},
created()
{
created() {
//
// this.$emit('setConfig', true); -> use this to enable widget config mode if needed
},
@@ -115,8 +114,7 @@ export default {
<template v-if="!emptyBookmarks">
<div v-for="link in shared" :key="link.id" class="d-flex mt-2">
<a target="_blank" :href="link.url">
<i class="fa fa-solid fa-arrow-up-right-from-square"></i>
{{ link.title }}
<i class="fa fa-solid fa-arrow-up-right-from-square"></i>{{ link.title }}
</a>
<a class="ms-auto" href="#" @click.prevent="removeLink(link.bookmark_id)" v-show="configMode || editModeIsActive">
<i class="fa fa-regular fa-trash-can" style="color: #e01b24;"></i>
-1
View File
@@ -73,7 +73,6 @@ EOXML04;
<xsl:output encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/>
<xsl:output method="html"/>
<xsl:template match="/">
<h1>News</h1>
<div class="row">
<xsl:choose>
<xsl:when test="content/stg_extras">