no longer using cdn to serve ui components

This commit is contained in:
cheetah 2022-11-29 00:31:28 +01:00
parent bb9f4b26c2
commit adf0234323
9 changed files with 58380 additions and 27 deletions

9
html/css/vuetify.min.css vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -3,9 +3,9 @@
<head> <head>
<title>Testalarm Configuration</title> <title>Testalarm Configuration</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet"> <!-- <link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet"> -->
<link href="https://cdn.jsdelivr.net/npm/@mdi/font@4.x/css/materialdesignicons.min.css" rel="stylesheet"> <link href="css/materialdesignicons.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.min.css" rel="stylesheet"> <link href="css/vuetify.min.css" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
</head> </head>
@ -30,12 +30,15 @@
<v-container> <v-container>
<p>Targets:</p> <p>Targets:</p>
<v-row> <v-row>
<v-btn color="success" @click="addAlarm()">Add</v-btn> <v-btn color="primary" fab dark small icon @click="addAlarm()">
<v-icon>mdi-plus</v-icon>
</v-btn>
</v-row> </v-row>
<v-row v-for="(alarmConfig, index) in configData.alarms" :key="alarmConfig._id"
style="border-bottom: 2px solid black;"> <v-row v-for="(alarmConfig, index) in configData.alarms" :key="alarmConfig._id">
<v-card>
<v-col cols="12" sm="12" md="12"> <v-col cols="12" sm="12" md="12">
<v-btn color="error" @click="configData.alarms.splice(index, 1)" icon> <v-btn color="error" dark small fab @click="configData.alarms.splice(index, 1)" icon>
<v-icon>mdi-delete</v-icon> <v-icon>mdi-delete</v-icon>
</v-btn> </v-btn>
</v-col> </v-col>
@ -44,9 +47,7 @@
<v-row> <v-row>
<v-select :items="alarmSchedulingMode" v-model="alarmConfig.alarmSchedulingMode" <v-select :items="alarmSchedulingMode" v-model="alarmConfig.alarmSchedulingMode"
item-text="k" item-value="v" label="Scheduling Mode"></v-select> item-text="k" item-value="v" label="Scheduling Mode"></v-select>
</v-row> <v-text-field v-model="alarmConfig.alarmTime" type="time" label="Time"></v-text-field>
<v-row>
<v-time-picker format="24hr" v-model="alarmConfig.alarmTime"></v-time-picker>
</v-row> </v-row>
<v-row cols="3" sm="3" md="3" v-show="alarmConfig.alarmSchedulingMode == 'weekly'"> <v-row cols="3" sm="3" md="3" v-show="alarmConfig.alarmSchedulingMode == 'weekly'">
<v-checkbox v-for="(WN, index) of weekDays" v-model="alarmConfig.weekDay[ index ]" :label="WN"></v-checkbox> <v-checkbox v-for="(WN, index) of weekDays" v-model="alarmConfig.weekDay[ index ]" :label="WN"></v-checkbox>
@ -96,6 +97,7 @@
</v-col> </v-col>
</v-row> </v-row>
</v-col> </v-col>
</v-card>
</v-row> </v-row>
<v-row> <v-row>
<v-btn color="success" @click="storeConfig()">Store & Restart</v-btn> <v-btn color="success" @click="storeConfig()">Store & Restart</v-btn>
@ -122,9 +124,10 @@
</v-app> </v-app>
</div> </div>
<script src="https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.js"></script> <script src="js/moment-with-locales.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.js"></script> <script src="js/vue/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-resource@1.5.1"></script> <script src="js/vue/vuetify.js"></script>
<script src="js/vue/vue-resource_1.5.1.js"></script>
<script> <script>
new Vue({ new Vue({
el: '#app', el: '#app',
@ -217,18 +220,18 @@
"device": "generic", "device": "generic",
"connectors": [] "connectors": []
}, },
"alarmSchedulingMode": "weekly", },
"alarmTime": "13:37", "alarmSchedulingMode": "weekly",
"payload": "Probealarm jeden Tag 1337", "alarmTime": "13:37",
"weekDay": { "payload": "Probealarm jeden Tag 1337",
"0": true, "weekDay": {
"1": true, "0": true,
"2": true, "1": true,
"3": true, "2": true,
"4": true, "3": true,
"5": true, "4": true,
"6": true "5": true,
}, "6": true
}, },
}) })
}, },

2
html/jquery.min.js vendored

File diff suppressed because one or more lines are too long

2
html/js/moment-with-locales.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

11909
html/js/vue/vue.js Normal file

File diff suppressed because it is too large Load diff

46423
html/js/vue/vuetify.js Normal file

File diff suppressed because it is too large Load diff

View file

@ -15,6 +15,7 @@ const express = require('express')
const appConfig = express() const appConfig = express()
appConfig.use(express.json()) appConfig.use(express.json())
appConfig.use(express.static('html')) appConfig.use(express.static('html'))
appConfig.use(express.static(__dirname + '/node_modules/@mdi/font'))
async function minuteCheck() { async function minuteCheck() {
let timeRN = moment() let timeRN = moment()

View file

@ -1,5 +1,6 @@
{ {
"dependencies": { "dependencies": {
"@mdi/font": "^7.0.96",
"axios": "^1.2.0", "axios": "^1.2.0",
"express": "^4.18.2", "express": "^4.18.2",
"moment": "^2.29.4" "moment": "^2.29.4"