filebrowser/frontend/src/components/CustomToast.vue

42 lines
755 B
Vue

<template>
<div class="t-container">
<span>{{ message }}</span>
<button v-if="isReport" class="action" @click.stop="clicked">
{{ reportText }}
</button>
</div>
</template>
<script>
export default {
name: "error-toast",
props: ["message", "reportText", "isReport"],
methods: {
clicked() {
window.open(
"https://github.com/filebrowser/filebrowser/issues/new/choose"
);
},
},
};
</script>
<style scoped>
.t-container {
width: 100%;
padding: 5px 0;
display: flex;
justify-content: space-between;
align-items: center;
}
.action {
text-align: center;
height: 40px;
padding: 0 10px;
border-radius: 5px;
color: white;
cursor: pointer;
border: thin solid currentColor;
}
</style>