mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-20 20:08:33 -04:00
Setting Modal
This commit is contained in:
parent
966066b897
commit
85eb084305
2 changed files with 129 additions and 26 deletions
|
@ -49,26 +49,15 @@
|
|||
{{ monitor.element.name }}
|
||||
</a>
|
||||
<p v-else class="item-name"> {{ monitor.element.name }} </p>
|
||||
<span
|
||||
v-if="showLink(monitor, true)"
|
||||
title="Toggle Clickable Link"
|
||||
>
|
||||
<font-awesome-icon
|
||||
v-if="editMode"
|
||||
:class="{'link-active': monitor.element.sendUrl, 'btn-link': true}"
|
||||
icon="link" class="action me-3"
|
||||
@click="toggleLink(group.index, monitor.index)"
|
||||
/>
|
||||
</span>
|
||||
|
||||
<span
|
||||
title="Badge Generator"
|
||||
title="Setting"
|
||||
>
|
||||
<font-awesome-icon
|
||||
v-if="editMode"
|
||||
:class="{'link-active': true, 'btn-link': true}"
|
||||
icon="certificate" class="action me-3"
|
||||
@click="$refs.badgeGeneratorDialog.show(monitor.element.id, monitor.element.name)"
|
||||
icon="cog" class="action me-3"
|
||||
@click="$refs.monitorSettingDialog.show(group, monitor)"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -80,7 +69,7 @@
|
|||
<HeartbeatBar size="small" :monitor-id="monitor.element.id" />
|
||||
</div>
|
||||
</div>
|
||||
<BadgeGeneratorDialog ref="badgeGeneratorDialog" />
|
||||
<MonitorSettingDialog ref="monitorSettingDialog" />
|
||||
</div>
|
||||
</template>
|
||||
</Draggable>
|
||||
|
@ -91,7 +80,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import BadgeGeneratorDialog from "./BadgeGeneratorDialog.vue";
|
||||
import MonitorSettingDialog from "./MonitorSettingDialog.vue";
|
||||
import Draggable from "vuedraggable";
|
||||
import HeartbeatBar from "./HeartbeatBar.vue";
|
||||
import Uptime from "./Uptime.vue";
|
||||
|
@ -99,7 +88,7 @@ import Tag from "./Tag.vue";
|
|||
|
||||
export default {
|
||||
components: {
|
||||
BadgeGeneratorDialog,
|
||||
MonitorSettingDialog,
|
||||
Draggable,
|
||||
HeartbeatBar,
|
||||
Uptime,
|
||||
|
@ -148,15 +137,6 @@ export default {
|
|||
this.$root.publicGroupList[groupIndex].monitorList.splice(index, 1);
|
||||
},
|
||||
|
||||
/**
|
||||
* Toggle the value of sendUrl
|
||||
* @param {number} groupIndex Index of group monitor is member of
|
||||
* @param {number} index Index of monitor within group
|
||||
*/
|
||||
toggleLink(groupIndex, index) {
|
||||
this.$root.publicGroupList[groupIndex].monitorList[index].sendUrl = !this.$root.publicGroupList[groupIndex].monitorList[index].sendUrl;
|
||||
},
|
||||
|
||||
/**
|
||||
* Should a link to the monitor be shown?
|
||||
* Attempts to guess if a link should be shown based upon if
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue