@whyour/qinglong 0.14.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/static/build/api/config.js +1 -1
- package/static/dist/index.html +1 -1
- package/static/dist/src__pages__diff__index.b7927e8c.async.js +1 -0
- package/static/dist/{umi.c864c23a.js → umi.d9c7e2bb.js} +1 -1
- package/static/dist/src__pages__diff__index.218dfd1a.async.js +0 -1
package/package.json
CHANGED
|
@@ -38,7 +38,7 @@ const got_1 = __importDefault(require("got"));
|
|
|
38
38
|
const route = (0, express_1.Router)();
|
|
39
39
|
exports.default = (app) => {
|
|
40
40
|
app.use('/configs', route);
|
|
41
|
-
route.get('/
|
|
41
|
+
route.get('/samples', async (req, res, next) => {
|
|
42
42
|
try {
|
|
43
43
|
res.send({
|
|
44
44
|
code: 200,
|
package/static/dist/index.html
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[6401],{86726:function(e,n,t){t.r(n),t.d(n,{default:function(){return S}});var a=t(54306),i=t.n(a),o=t(88265),r=t(63313),c=t(28756),s=t(9835),l=t(24378),f=t(59873),u=t(66585),d=t(67393),h=t(15207),g=t(23435),p=t(57229),m=t(82755),x=t(22370),Z=t.n(x),v=t(14851),w=t(40141),j=t(11527),P=c.Z.Option,S=function(){var e=(0,v.useOutletContext)(),n=e.headerStyle,t=e.isPhone,a=e.theme,x=(0,r.useState)("sample/config.sample.sh"),S=i()(x,2),y=S[0],C=S[1],W=(0,r.useState)("config.sh"),b=i()(W,2),k=b[0],V=b[1],I=(0,r.useState)(""),M=i()(I,2),N=M[0],R=M[1],_=(0,r.useState)(""),q=i()(_,2),E=q[0],X=q[1],O=(0,r.useState)(!0),T=i()(O,2),U=T[0],z=T[1],A=(0,r.useState)([]),B=i()(A,2),D=B[0],H=B[1],$=(0,r.useRef)(null),F=(0,r.useState)("shell"),G=i()(F,2),J=G[0],K=G[1];return(0,r.useEffect)((function(){z(!0),p.W.get("".concat(h.Z.apiPrefix,"configs/samples")).then((function(e){var n=e.code,t=e.data;200===n&&H(t)})).finally((function(){return z(!1)}))}),[]),(0,r.useEffect)((function(){p.W.get("".concat(h.Z.apiPrefix,"configs/").concat(encodeURIComponent(y))).then((function(e){var n=e.code,t=e.data;200===n&&R(t)}))}),[y]),(0,r.useEffect)((function(){p.W.get("".concat(h.Z.apiPrefix,"configs/").concat(encodeURIComponent(k))).then((function(e){var n=e.code,t=e.data;200===n&&X(t)}))}),[k]),(0,j.jsxs)(g.ZP,{className:"ql-container-wrapper",title:o.ZP.get("对比工具"),loading:U,header:{style:n},extra:!t&&[(0,j.jsx)(l.Z,{type:"primary",onClick:function(){var e=$.current?$.current.getModel().modified.getValue().replace(/\r\n/g,"\n"):E;p.W.post("".concat(h.Z.apiPrefix,"configs/save"),{content:e,name:k}).then((function(e){var n=e.code;e.data;200===n&&s.ZP.success(o.ZP.get("保存成功"))}))},children:o.ZP.get("保存")},"1")],children:[(0,j.jsxs)(f.Z,{gutter:24,className:"diff-switch-file",children:[(0,j.jsx)(u.Z,{span:12,children:(0,j.jsx)(d.Z.Item,{label:o.ZP.get("源文件"),children:(0,j.jsx)(c.Z,{value:y,onChange:function(e,n){V(n.extra.target),C(e);var t=(0,w.H$)(e);K(t)},children:D.map((function(e){return(0,j.jsx)(P,{value:e.value,extra:e,children:e.title},e.value)}))})})}),(0,j.jsx)(u.Z,{span:12,children:(0,j.jsx)(d.Z.Item,{label:o.ZP.get("当前文件"),children:(0,j.jsx)("span",{className:"ant-form-text",children:k})})})]}),t?(0,j.jsx)(Z(),{styles:{diffContainer:{overflowX:"auto",minWidth:768},diffRemoved:{overflowX:"auto",maxWidth:300},diffAdded:{overflowX:"auto",maxWidth:300},line:{wordBreak:"break-word"}},oldValue:N,newValue:E,splitView:!0,leftTitle:"config.sh",rightTitle:"config.sample.sh",disableWordDiff:!0}):(0,j.jsx)(m.SV,{language:J,original:N,modified:E,options:{fontSize:12,lineNumbersMinChars:3,folding:!1,glyphMargin:!1,wordWrap:"on"},theme:a,onMount:function(e){$.current=e}})]})}}}]);
|