File tree Expand file tree Collapse file tree 3 files changed +25
-3
lines changed Expand file tree Collapse file tree 3 files changed +25
-3
lines changed Original file line number Diff line number Diff line change 1515 v-bind:class =" {
1616 '-translate-y-screen': !toastState.show,
1717 '-translate-y-0': !toastState.show,
18- 'bg-green-400': toastState.theme === 'success',
19- 'bg-blue-400': toastState.theme !== 'success',
18+ 'bg-green-400 text-gray-800': toastState.theme === 'success',
19+ 'bg-red-400 text-white': toastState.theme === 'error',
20+ 'bg-blue-400 text-white': toastState.theme !== 'success',
2021 }"
2122 >
2223 <div class =" flex justify-between gap-2" >
Original file line number Diff line number Diff line change 88 class =" inline-flex justify-center px-4 py-2 text-white transition-transform transform rounded-md shadow-lg outline-none copy-uri-button align-center focus:ring-4 active:scale-y-75"
99 v-bind:class =" {
1010 'bg-blue-600 text-white': !copied,
11- 'bg-green-500 text-black ': copied,
11+ 'bg-green-500 text-gray-800 ': copied,
1212 }"
1313 >
1414 <span class =" inline-flex justify-center" v-show =" copied" >
Original file line number Diff line number Diff line change @@ -46,6 +46,27 @@ export default Vue.extend({
4646 ) as HTMLTextAreaElement
4747 const rhs: string = rhsTextArea ?.value || ' '
4848 if (! lhs || ! rhs ) {
49+ this .$store .commit (' toast/show' , {
50+ show: true ,
51+ content: ' Please enter some data on both sides to compare' ,
52+ iconHTML: `
53+ <svg
54+ class="w-6 h-6"
55+ fill="none"
56+ stroke="currentColor"
57+ viewBox="0 0 24 24"
58+ xmlns="http://www.w3.org/2000/svg"
59+ >
60+ <path
61+ stroke-linecap="round"
62+ stroke-linejoin="round"
63+ stroke-width="2"
64+ d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
65+ ></path>
66+ </svg>
67+ ` ,
68+ theme: ' error' ,
69+ })
4970 return
5071 }
5172 const originalLhs = lhs .split (' \n ' )
You can’t perform that action at this time.
0 commit comments