File tree Expand file tree Collapse file tree 2 files changed +7
-38
lines changed Expand file tree Collapse file tree 2 files changed +7
-38
lines changed Original file line number Diff line number Diff line change 87
87
88
88
<script >
89
89
import pako from ' pako'
90
- import { undoUrlSafeBase64 } from ' ../../ helpers/utils'
90
+ import { undoUrlSafeBase64 } from ' ../helpers/utils'
91
91
export default {
92
92
layout: ' main' ,
93
93
mounted () {
94
- const { diff : _diff } = this .$route .params
94
+ const _diff = this .$route .hash
95
95
const gunzip = pako .ungzip (Buffer .from (undoUrlSafeBase64 (_diff), ' base64' ))
96
96
const diff = JSON .parse (Buffer .from (gunzip).toString (' utf8' ))
97
97
this .lhsDiff = diff
Original file line number Diff line number Diff line change 12
12
<div class =" flex flex-wrap w-full h-full gap-4" >
13
13
<textarea
14
14
id =" lhs"
15
- class ="
16
- flex-1
17
- h-full
18
- max-h-full
19
- bg-transparent
20
- rounded-md
21
- resize-none
22
- form-textarea
23
- "
15
+ class =" flex-1 h-full max-h-full bg-transparent rounded-md resize-none form-textarea"
24
16
></textarea >
25
17
<textarea
26
18
id =" rhs"
27
- class ="
28
- flex-1
29
- h-full
30
- max-h-full
31
- bg-transparent
32
- rounded-md
33
- resize-none
34
- form-textarea
35
- "
19
+ class =" flex-1 h-full max-h-full bg-transparent rounded-md resize-none form-textarea"
36
20
></textarea >
37
21
<div class =" self-end flex-grow-0 w-full text-center" >
38
22
<button
39
- class ="
40
- inline-flex
41
- items-center
42
- justify-center
43
- w-48
44
- px-4
45
- py-2
46
- transition-transform
47
- transform
48
- bg-blue-600
49
- rounded-md
50
- shadow-lg
51
- outline-none
52
- text-gray-50
53
- focus:ring-4
54
- active:scale-y-75
55
- "
23
+ class =" inline-flex items-center justify-center w-48 px-4 py-2 transition-transform transform bg-blue-600 rounded-md shadow-lg outline-none text-gray-50 focus:ring-4 active:scale-y-75"
56
24
>
57
25
Compare
58
26
</button >
@@ -113,7 +81,8 @@ export default Vue.extend({
113
81
' base64'
114
82
)
115
83
this .$router .push ({
116
- path: ` /diff/${doUrlSafeBase64 (gzip )} ` ,
84
+ path: ' /diff' ,
85
+ hash: ` #${doUrlSafeBase64 (gzip )} ` ,
117
86
})
118
87
},
119
88
},
You can’t perform that action at this time.
0 commit comments