From a92369b2843974d3f2964830bea7be5085d98bf6 Mon Sep 17 00:00:00 2001 From: sheychen Date: Wed, 17 Apr 2019 10:22:45 +0200 Subject: [PATCH] Add movable --- compiler/dist/mastodon/main.js | 2 +- compiler/dist/nextcloud-news/main.js | 2 +- compiler/dist/openweathermap/main.js | 4 ++-- compiler/src/core/baseService.vue | 5 +++++ compiler/src/core/serviceHeader.vue | 13 ++++++++++++- compiler/src/core/tools.js | 4 ++-- compiler/src/mastodon/client.vue | 5 +++-- compiler/src/mastodon/main.vue | 4 ++-- compiler/src/mastodon/notification.vue | 5 ++++- compiler/src/mastodon/status.vue | 8 ++++---- compiler/src/nextcloud-news/main.vue | 2 +- compiler/src/openweathermap/main.vue | 2 +- index.html | 4 ++-- main.css | 12 ++++++++++++ main.css.map | 2 +- main.js | 6 ++++++ main.sass | 5 +++++ 17 files changed, 64 insertions(+), 21 deletions(-) diff --git a/compiler/dist/mastodon/main.js b/compiler/dist/mastodon/main.js index 3571082..ecf754b 100644 --- a/compiler/dist/mastodon/main.js +++ b/compiler/dist/mastodon/main.js @@ -1 +1 @@ -!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=81)}([function(t,e,n){var r=n(19)("wks"),o=n(13),i=n(1).Symbol,s="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=s&&i[t]||(s?i:o)("Symbol."+t))}).store=r},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){t.exports=!n(3)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(5),o=n(36),i=n(17),s=Object.defineProperty;e.f=n(2)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(8);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(4),o=n(18);t.exports=n(2)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(1),o=n(7),i=n(6),s=n(13)("src"),a=n(49),c=(""+a).split("toString");n(12).inspectSource=function(t){return a.call(t)},(t.exports=function(t,e,n,a){var u="function"==typeof n;u&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(u&&(i(n,s)||o(n,s,t[e]?""+t[e]:c.join(String(e)))),t===r?t[e]=n:a?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[s]||a.call(this)})},function(t,e,n){var r=n(52),o=n(16);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(1),o=n(12),i=n(7),s=n(9),a=n(38),c=function(t,e,n){var u,l,f,p,v=t&c.F,h=t&c.G,d=t&c.S,g=t&c.P,m=t&c.B,y=h?r:d?r[e]||(r[e]={}):(r[e]||{}).prototype,_=h?o:o[e]||(o[e]={}),b=_.prototype||(_.prototype={});for(u in h&&(n=e),n)f=((l=!v&&y&&void 0!==y[u])?y:n)[u],p=m&&l?a(f,r):g&&"function"==typeof f?a(Function.call,f):f,y&&s(y,u,f,t&c.U),_[u]!=f&&i(_,u,p),g&&b[u]!=f&&(b[u]=f)};r.core=o,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(42),o=n(26);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(8);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(12),o=n(1),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(20)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports=!1},function(t,e,n){"use strict";var r=n(1),o=n(6),i=n(15),s=n(65),a=n(17),c=n(3),u=n(29).f,l=n(30).f,f=n(4).f,p=n(67).trim,v=r.Number,h=v,d=v.prototype,g="Number"==i(n(28)(d)),m="trim"in String.prototype,y=function(t){var e=a(t,!1);if("string"==typeof e&&e.length>2){var n,r,o,i=(e=m?e.trim():p(e,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+e}for(var s,c=e.slice(2),u=0,l=c.length;uo)return NaN;return parseInt(c,r)}}return+e};if(!v(" 0o1")||!v("0b1")||v("+0x1")){v=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof v&&(g?c(function(){d.valueOf.call(n)}):"Number"!=i(n))?s(new h(y(e)),n,v):y(e)};for(var _,b=n(2)?u(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;b.length>x;x++)o(h,_=b[x])&&!o(v,_)&&f(v,_,l(h,_));v.prototype=d,d.constructor=v,n(9)(r,"Number",v)}},function(t,e,n){"use strict";var r=n(1),o=n(6),i=n(2),s=n(11),a=n(9),c=n(50).KEY,u=n(3),l=n(19),f=n(23),p=n(13),v=n(0),h=n(40),d=n(41),g=n(51),m=n(55),y=n(5),_=n(8),b=n(10),x=n(17),w=n(18),S=n(28),O=n(58),k=n(30),E=n(4),C=n(14),j=k.f,M=E.f,P=O.f,N=r.Symbol,T=r.JSON,I=T&&T.stringify,R=v("_hidden"),A=v("toPrimitive"),L={}.propertyIsEnumerable,F=l("symbol-registry"),D=l("symbols"),$=l("op-symbols"),B=Object.prototype,V="function"==typeof N,G=r.QObject,H=!G||!G.prototype||!G.prototype.findChild,z=i&&u(function(){return 7!=S(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=j(B,e);r&&delete B[e],M(t,e,n),r&&t!==B&&M(B,e,r)}:M,U=function(t){var e=D[t]=S(N.prototype);return e._k=t,e},J=V&&"symbol"==typeof N.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof N},W=function(t,e,n){return t===B&&W($,e,n),y(t),e=x(e,!0),y(n),o(D,e)?(n.enumerable?(o(t,R)&&t[R][e]&&(t[R][e]=!1),n=S(n,{enumerable:w(0,!1)})):(o(t,R)||M(t,R,w(1,{})),t[R][e]=!0),z(t,e,n)):M(t,e,n)},X=function(t,e){y(t);for(var n,r=g(e=b(e)),o=0,i=r.length;i>o;)W(t,n=r[o++],e[n]);return t},Y=function(t){var e=L.call(this,t=x(t,!0));return!(this===B&&o(D,t)&&!o($,t))&&(!(e||!o(this,t)||!o(D,t)||o(this,R)&&this[R][t])||e)},q=function(t,e){if(t=b(t),e=x(e,!0),t!==B||!o(D,e)||o($,e)){var n=j(t,e);return!n||!o(D,e)||o(t,R)&&t[R][e]||(n.enumerable=!0),n}},K=function(t){for(var e,n=P(b(t)),r=[],i=0;n.length>i;)o(D,e=n[i++])||e==R||e==c||r.push(e);return r},Q=function(t){for(var e,n=t===B,r=P(n?$:b(t)),i=[],s=0;r.length>s;)!o(D,e=r[s++])||n&&!o(B,e)||i.push(D[e]);return i};V||(a((N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===B&&e.call($,n),o(this,R)&&o(this[R],t)&&(this[R][t]=!1),z(this,t,w(1,n))};return i&&H&&z(B,t,{configurable:!0,set:e}),U(t)}).prototype,"toString",function(){return this._k}),k.f=q,E.f=W,n(29).f=O.f=K,n(27).f=Y,n(44).f=Q,i&&!n(20)&&a(B,"propertyIsEnumerable",Y,!0),h.f=function(t){return U(v(t))}),s(s.G+s.W+s.F*!V,{Symbol:N});for(var Z="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Z.length>tt;)v(Z[tt++]);for(var et=C(v.store),nt=0;et.length>nt;)d(et[nt++]);s(s.S+s.F*!V,"Symbol",{for:function(t){return o(F,t+="")?F[t]:F[t]=N(t)},keyFor:function(t){if(!J(t))throw TypeError(t+" is not a symbol!");for(var e in F)if(F[e]===t)return e},useSetter:function(){H=!0},useSimple:function(){H=!1}}),s(s.S+s.F*!V,"Object",{create:function(t,e){return void 0===e?S(t):X(S(t),e)},defineProperty:W,defineProperties:X,getOwnPropertyDescriptor:q,getOwnPropertyNames:K,getOwnPropertySymbols:Q}),T&&s(s.S+s.F*(!V||u(function(){var t=N();return"[null]"!=I([t])||"{}"!=I({a:t})||"{}"!=I(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(_(e)||void 0!==t)&&!J(t))return m(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!J(e))return e}),r[1]=e,I.apply(T,r)}}),N.prototype[A]||n(7)(N.prototype,A,N.prototype.valueOf),f(N,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(t,e,n){var r=n(4).f,o=n(6),i=n(0)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(19)("keys"),o=n(13);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(5),o=n(56),i=n(26),s=n(25)("IE_PROTO"),a=function(){},c=function(){var t,e=n(37)("iframe"),r=i.length;for(e.style.display="none",n(57).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write(" diff --git a/compiler/src/core/serviceHeader.vue b/compiler/src/core/serviceHeader.vue index c869823..953c9fa 100644 --- a/compiler/src/core/serviceHeader.vue +++ b/compiler/src/core/serviceHeader.vue @@ -3,6 +3,12 @@ .title(@click="showSettings = !showSettings") slot(name="title") .settings(v-show="showSettings") + input.position( + @keyup.up.ctrl.exact="onMove('x', -1)" @keyup.down.ctrl.exact="onMove('x', 1)" + @keyup.left.ctrl.exact="onMove('y', -1)" @keyup.right.ctrl.exact="onMove('y', 1)" + @keyup.up.alt.exact="onMove('h', -1)" @keyup.down.alt.exact="onMove('h', 1)" + @keyup.left.alt.exact="onMove('w', -1)" @keyup.right.alt.exact="onMove('w', 1)" + ) slot(name="settings") @@ -10,6 +16,11 @@ export default { data() { return { showSettings: false - } } + } }, + methods: { + onMove(type, direction) { + this.$emit('move', { type: type, direction: direction }) + }, + } } diff --git a/compiler/src/core/tools.js b/compiler/src/core/tools.js index 24262f8..92a65b5 100644 --- a/compiler/src/core/tools.js +++ b/compiler/src/core/tools.js @@ -1,7 +1,7 @@ export const emitErrorMixin = { methods: { emitError(err) { - this.$emit("error", err.toString()) + this.$emit('error', err.toString()) } } } @@ -9,7 +9,7 @@ export const emitErrorMixin = { export const handleOptionsMixin = { methods: { saveOptions(options) { - this.$emit("save", options) + this.$emit('save', options) }, setOption(name, value) { const options = {...this.$props} diff --git a/compiler/src/mastodon/client.vue b/compiler/src/mastodon/client.vue index 7ea8f2e..dd18c17 100644 --- a/compiler/src/mastodon/client.vue +++ b/compiler/src/mastodon/client.vue @@ -1,5 +1,5 @@