refactor more to tailwind
This commit is contained in:
@@ -108,6 +108,7 @@ p {
|
||||
border-width: 2px;
|
||||
border-radius: 10px;
|
||||
border-style: solid;
|
||||
border-color: black;
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
width: 250px;
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
<template>
|
||||
<div class="rounded-lg border-2 border-solid border-black flex flex-wrap">
|
||||
<div class="areaDiv">
|
||||
<label for="name">
|
||||
Name:
|
||||
<input type="text" name="name" class="width" v-model="area.name" @keypress="sthChanged">
|
||||
</label>
|
||||
<label for="valve">Ventil:
|
||||
<select name="valve" class="width" v-model="area.valveId" @change="sthChanged">
|
||||
<div class="rounded-lg border-2 border-solid border-black flex flex-row mb-3 w-full h-72">
|
||||
<div class="flex flex-col m-2 w-full space-y-1">
|
||||
<div class="flex flex-row justify-between">
|
||||
<label class="w-1/3" for="name">Name:</label>
|
||||
<input class="w-2/3" type="text" name="name" v-model="area.name" @keypress="sthChanged">
|
||||
</div>
|
||||
<div class="flex flex-row justify-between">
|
||||
<label class="w-1/3" for="valve">Ventil:</label>
|
||||
<select class="w-2/3" name="valve" v-model="area.valveId" @change="sthChanged">
|
||||
<option v-for="valve in valves" :key="valve.id" :value="valve.id">
|
||||
Ventil {{ valve.number }}
|
||||
</option>
|
||||
</select>
|
||||
</label>
|
||||
<label for="description">
|
||||
Beschreibung:
|
||||
<textarea name="description" rows="8" class="width" v-model="area.description" @keypress="sthChanged"></textarea>
|
||||
</label>
|
||||
</div>
|
||||
<div class="areaConfDiv">
|
||||
<h3>Konfigurationen</h3>
|
||||
<IrrigationAreaConfLine v-for="conf in area.areaConfs" :key="conf.id" :areaConf="conf" @confDeleted="confDeleted">
|
||||
</IrrigationAreaConfLine>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<div class="flex flex-row items-center w-full justify-between">
|
||||
<div>
|
||||
<button v-if="!changed">
|
||||
<img src="../../assets/img/buttons/delete_icon.svg" alt="Löschen" @click="deleteArea">
|
||||
<img class="w-10 ml-2" src="../../assets/img/buttons/delete_icon.svg" alt="Löschen" @click="deleteArea">
|
||||
</button>
|
||||
<button v-else>
|
||||
<img src="../../assets/img/buttons/sync_icon.svg" alt="Aktualisieren" @click="updateArea">
|
||||
<img class="w-10 ml-2" src="../../assets/img/buttons/sync_icon.svg" alt="Aktualisieren" @click="updateArea">
|
||||
</button>
|
||||
</div>
|
||||
<textarea class="w-2/3" name="description" rows="8" v-model="area.description" @keypress="sthChanged"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-full overflow-auto">
|
||||
<h3 class="text-center text-xl">Konfigurationen</h3>
|
||||
<IrrigationAreaConfLine v-for="conf in area.areaConfs" :key="conf.id" :areaConf="conf" @confDeleted="confDeleted">
|
||||
</IrrigationAreaConfLine>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -96,64 +96,3 @@ function confDeleted(id) {
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* .areaConfDiv{
|
||||
width: 300px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.areaConfDiv::-webkit-scrollbar {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
h3 {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
margin: 4px 0;
|
||||
}
|
||||
|
||||
button img{
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
button {
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
left: 20px;
|
||||
padding: 8px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.areaDiv {
|
||||
width: 300px;
|
||||
margin: 8px;
|
||||
}
|
||||
|
||||
.mainDiv {
|
||||
display: flex;
|
||||
position: relative;
|
||||
border-radius: 10px;
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
margin: 8px;
|
||||
height: 215px;
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.width {
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
label {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 0px 0px 8px 0px;
|
||||
} */
|
||||
</style>
|
||||
@@ -30,7 +30,7 @@ function updateTime() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<footer>
|
||||
<footer class="bg-white flex flex-wrap flex-row justify-between items-center text-xs fixed bottom-0 w-full">
|
||||
<div>
|
||||
<ul>
|
||||
<li>
|
||||
@@ -39,7 +39,9 @@ function updateTime() {
|
||||
<li>Server Zeit: <span id="footerServerTime">00:00:00</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div>Kleiax Irrigation Frontend</div>
|
||||
<div >
|
||||
Kleiax Irrigation Frontend
|
||||
</div>
|
||||
<div>
|
||||
<ul class="links">
|
||||
<li><RouterLink to="/imprint">Impressum</RouterLink></li>
|
||||
@@ -48,36 +50,3 @@ function updateTime() {
|
||||
</div>
|
||||
</footer>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
footer {
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
height: 4em;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
place-items: center;
|
||||
background-color: aquamarine;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0px;
|
||||
margin-left: 8px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.links {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -71,102 +71,37 @@ function close(event) {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<aside>
|
||||
<h2>Infos</h2>
|
||||
<hr />
|
||||
<h3>Pumpe</h3>
|
||||
<p>
|
||||
<aside class="flex flex-col items-center space-y-3 ml-3">
|
||||
<div class="bg-white rounded-xl w-full shadow-md">
|
||||
<h2 class="text-3xl text-center ">Infos</h2>
|
||||
</div>
|
||||
|
||||
<div class="bg-white rounded-xl w-full shadow-md">
|
||||
<h3 class="text-2xl text-center">Pumpe</h3>
|
||||
<p class="text-center">
|
||||
Status: <br />
|
||||
<b>{{ pump.status }}</b> <br />
|
||||
seit <br />
|
||||
<b>{{ parseInt(pump.time / 60) }}</b> <br />
|
||||
Minuten
|
||||
</p>
|
||||
<hr />
|
||||
<h3>
|
||||
</div>
|
||||
|
||||
<div v-if="openValves.length !== 0" class="bg-white rounded-xl w-full shadow-md">
|
||||
<h3 class="text-2xl text-center">
|
||||
Offene <br />
|
||||
Bereiche
|
||||
</h3>
|
||||
<p v-if="openValves.length === 0">Alles zu!</p>
|
||||
<ul v-else>
|
||||
<li v-for="valve in openValves" :key="valve.id">
|
||||
<ul>
|
||||
<li class="text-center my-4" v-for="valve in openValves" :key="valve.id">
|
||||
Bereich: <br />
|
||||
<b>{{ getAreaName(valve.id) }} </b> <br />
|
||||
Verbleibende Zeit: <br />
|
||||
<b>{{ parseInt(valve.remainingTime / 60) }} min </b> <br />
|
||||
<a class="closeLink" @click="close" :id=valve.id>Schließen!</a>
|
||||
<a class="hover:cursor-pointer hover:bg-slate-400 text-xl border rounded-lg p-1" @click="close" :id=valve.id>Schließen!</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</aside>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
li {
|
||||
width: 80%;
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
margin-bottom: 16px;
|
||||
text-align: center;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: blue;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: darkblue;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
aside {
|
||||
min-width: 200px;
|
||||
border-radius: 10px;
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
h3 {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
p {
|
||||
text-align: center;
|
||||
font-size: larger;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
b {
|
||||
display: inline-block;
|
||||
width: 150px;
|
||||
text-decoration: underline;
|
||||
/* padding-left: 15px;
|
||||
padding-right: 15px; */
|
||||
|
||||
}
|
||||
</style>
|
||||
fixed bottom-0
|
||||
Reference in New Issue
Block a user