mirror of
https://github.com/thelounge/thelounge.git
synced 2024-04-26 03:50:35 +02:00
Allow cancel button in ConfirmDialog to be customizable
This commit is contained in:
parent
2b0beac1d9
commit
462488edfd
|
@ -275,7 +275,7 @@ export default {
|
|||
this.channel.inputHistory.splice(1, 0, text);
|
||||
}
|
||||
|
||||
// Limit input history to a 100 entries
|
||||
// Limit input history to 100 entries
|
||||
if (this.channel.inputHistory.length > 100) {
|
||||
this.channel.inputHistory.pop();
|
||||
}
|
||||
|
@ -304,7 +304,8 @@ export default {
|
|||
{
|
||||
title: "Upload as file?",
|
||||
text: `You're trying to send a lot of text. Would you like to upload it?`,
|
||||
button: "Upload",
|
||||
confirmButton: "Upload",
|
||||
cancelButton: "Send anyway",
|
||||
},
|
||||
(result) => {
|
||||
if (!result) {
|
||||
|
|
|
@ -6,8 +6,12 @@
|
|||
<p>{{ data.text }}</p>
|
||||
</div>
|
||||
<div class="confirm-buttons">
|
||||
<button class="btn btn-cancel" @click="close(false)">Cancel</button>
|
||||
<button class="btn btn-danger" @click="close(true)">{{ data.button }}</button>
|
||||
<button class="btn btn-cancel" @click="close(false)">
|
||||
{{ data.cancelButton || "Cancel" }}
|
||||
</button>
|
||||
<button class="btn btn-danger" @click="close(true)">
|
||||
{{ data.confirmButton }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -154,7 +154,7 @@ export function generateChannelContextMenu($root, channel, network) {
|
|||
{
|
||||
title: "Clear history",
|
||||
text: `Are you sure you want to clear history for ${channel.name}? This cannot be undone.`,
|
||||
button: "Clear history",
|
||||
confirmButton: "Clear history",
|
||||
},
|
||||
(result) => {
|
||||
if (!result) {
|
||||
|
|
|
@ -36,7 +36,7 @@ new Vue({
|
|||
{
|
||||
title: "Remove network",
|
||||
text: `Are you sure you want to quit and remove ${channel.name}? This cannot be undone.`,
|
||||
button: "Remove network",
|
||||
confirmButton: "Remove network",
|
||||
},
|
||||
(result) => {
|
||||
if (!result) {
|
||||
|
|
Loading…
Reference in a new issue