mirror of
https://github.com/Av0idD4rk/packmate.git
synced 2026-10-25 05:49:26 +00:00
Удаление паттернов, размер шрифта
This commit is contained in:
parent
038465582e
commit
0d709a97e4
@ -114,6 +114,7 @@
|
|||||||
font-family: 'Open Sans', Helvetica, Arial, sans-serif;
|
font-family: 'Open Sans', Helvetica, Arial, sans-serif;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
font-size: .875rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
|||||||
@ -15,6 +15,12 @@
|
|||||||
<template v-if="pattern.type === 'BOTH'">anywhere</template>
|
<template v-if="pattern.type === 'BOTH'">anywhere</template>
|
||||||
<template v-else-if="pattern.type === 'INPUT'">in request</template>
|
<template v-else-if="pattern.type === 'INPUT'">in request</template>
|
||||||
<template v-else>in response</template>
|
<template v-else>in response</template>
|
||||||
|
<div class="float-right" style="margin-left: 2em;">
|
||||||
|
<button type="button" class="btn btn-outline-danger btn-block btn-sm"
|
||||||
|
@click.stop.prevent="deletePattern(pattern.id)">
|
||||||
|
<i class="far fa-trash-alt"/>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</b-dropdown-item-button>
|
</b-dropdown-item-button>
|
||||||
</b-dropdown>
|
</b-dropdown>
|
||||||
</template>
|
</template>
|
||||||
@ -52,6 +58,21 @@
|
|||||||
query: {pattern: patternId,},
|
query: {pattern: patternId,},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
deletePattern(patternId) {
|
||||||
|
console.debug('Deleting pattern w/ id', patternId);
|
||||||
|
this.$http.delete(`pattern/${patternId}`)
|
||||||
|
.then(response => {
|
||||||
|
const data = response.data;
|
||||||
|
console.debug('Done deleting pattern', data);
|
||||||
|
this.$emit('patternAddComplete');
|
||||||
|
}).catch(e => {
|
||||||
|
this.$bvToast.toast(`Не удалось удалить паттерн: ${e}`, {
|
||||||
|
title: 'Сбой',
|
||||||
|
variant: 'danger',
|
||||||
|
});
|
||||||
|
console.error('Failed to delete pattern', e);
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user