diff --git a/compiler/.eslintrc.json b/compiler/.eslintrc.json new file mode 100644 index 0000000..864c3e0 --- /dev/null +++ b/compiler/.eslintrc.json @@ -0,0 +1,27 @@ +{ + "extends": [ + "eslint:recommended", + "plugin:vue/recommended" + ], + "rules": { + "indent": [ + "error", + 2, + { + "SwitchCase": 1 + } + ], + "linebreak-style": [ + "error", + "windows" + ], + "quotes": [ + "error", + "single" + ], + "semi": [ + "error", + "never" + ] + } +} \ No newline at end of file diff --git a/compiler/dist/discord/main.js b/compiler/dist/discord/main.js index 1024cf0..52396fd 100644 --- a/compiler/dist/discord/main.js +++ b/compiler/dist/discord/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=44)}([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(6)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){"use strict";var r=n(0),o=n(4),i=n(12),u=n(26),s=n(8),a=n(6),l=n(31).f,c=n(14).f,f=n(11).f,p=n(36).trim,d=r.Number,v=d,h=d.prototype,y="Number"==i(n(40)(h)),_="trim"in String.prototype,m=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){var n,r,o,i=(e=_?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 u,a=e.slice(2),l=0,c=a.length;lo)return NaN;return parseInt(a,r)}}return+e};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof d&&(y?a(function(){h.valueOf.call(n)}):"Number"!=i(n))?u(new v(m(e)),n,d):m(e)};for(var g,b=n(1)?l(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;b.length>w;w++)o(v,g=b[w])&&!o(d,g)&&f(d,g,c(v,g));d.prototype=h,h.constructor=d,n(25)(r,"Number",d)}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(2);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(30),o=n(16);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(2);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){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(5),o=n(17),i=n(8),u=Object.defineProperty;e.f=n(1)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return u(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){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(28);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r=n(29),o=n(15),i=n(7),u=n(8),s=n(4),a=n(17),l=Object.getOwnPropertyDescriptor;e.f=n(1)?l:function(t,e){if(t=i(t),e=u(e,!0),a)try{return l(t,e)}catch(t){}if(s(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){t.exports=!n(1)&&!n(6)(function(){return 7!=Object.defineProperty(n(18)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(2),o=n(0).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(4),o=n(7),i=n(32)(!1),u=n(21)("IE_PROTO");t.exports=function(t,e){var n,s=o(t),a=0,l=[];for(n in s)n!=u&&r(s,n)&&l.push(n);for(;e.length>a;)r(s,n=e[a++])&&(~i(l,n)||l.push(n));return l}},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(22)("keys"),o=n(23);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(9),o=n(0),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(35)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},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(11),o=n(15);t.exports=n(1)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(0),o=n(24),i=n(4),u=n(23)("src"),s=n(38),a=(""+s).split("toString");n(9).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var l="function"==typeof n;l&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(l&&(i(n,u)||o(n,u,t[e]?""+t[e]:a.join(String(e)))),t===r?t[e]=n:s?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[u]||s.call(this)})},function(t,e,n){var r=n(2),o=n(27).set;t.exports=function(t,e,n){var i,u=e.constructor;return u!==n&&"function"==typeof u&&(i=u.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},function(t,e,n){var r=n(2),o=n(5),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(13)(Function.call,n(14).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(12);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(19),o=n(10).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){var r=n(7),o=n(33),i=n(34);t.exports=function(t){return function(e,n,u){var s,a=r(e),l=o(a.length),c=i(u,l);if(t&&n!=n){for(;l>c;)if((s=a[c++])!=s)return!0}else for(;l>c;c++)if((t||c in a)&&a[c]===n)return t||c||0;return!t&&-1}}},function(t,e,n){var r=n(20),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e,n){var r=n(20),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e){t.exports=!1},function(t,e,n){var r=n(37),o=n(16),i=n(6),u=n(39),s="["+u+"]",a=RegExp("^"+s+s+"*"),l=RegExp(s+s+"*$"),c=function(t,e,n){var o={},s=i(function(){return!!u[t]()||"​…"!="​…"[t]()}),a=o[t]=s?e(f):u[t];n&&(o[n]=a),r(r.P+r.F*s,"String",o)},f=c.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(a,"")),2&e&&(t=t.replace(l,"")),t};t.exports=c},function(t,e,n){var r=n(0),o=n(9),i=n(24),u=n(25),s=n(13),a=function(t,e,n){var l,c,f,p,d=t&a.F,v=t&a.G,h=t&a.S,y=t&a.P,_=t&a.B,m=v?r:h?r[e]||(r[e]={}):(r[e]||{}).prototype,g=v?o:o[e]||(o[e]={}),b=g.prototype||(g.prototype={});for(l in v&&(n=e),n)f=((c=!d&&m&&void 0!==m[l])?m:n)[l],p=_&&c?s(f,r):y&&"function"==typeof f?s(Function.call,f):f,m&&u(m,l,f,t&a.U),g[l]!=f&&i(g,l,p),y&&b[l]!=f&&(b[l]=f)};r.core=o,a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,e,n){t.exports=n(22)("native-function-to-string",Function.toString)},function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,e,n){var r=n(5),o=n(41),i=n(10),u=n(21)("IE_PROTO"),s=function(){},a=function(){var t,e=n(18)("iframe"),r=i.length;for(e.style.display="none",n(43).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write(" \ No newline at end of file diff --git a/compiler/src/core/input/baseSetting.vue b/compiler/src/core/input/baseSetting.vue index 660f1c9..d2b1829 100644 --- a/compiler/src/core/input/baseSetting.vue +++ b/compiler/src/core/input/baseSetting.vue @@ -1,8 +1,14 @@ diff --git a/compiler/src/core/input/settingString.vue b/compiler/src/core/input/settingString.vue index 1a16e48..b55d412 100644 --- a/compiler/src/core/input/settingString.vue +++ b/compiler/src/core/input/settingString.vue @@ -9,6 +9,11 @@ block input import baseSettingVue from './baseSetting.vue' export default { extends: baseSettingVue, - props: { value: String } + props: { + value: { + type: String, + default: undefined + } + } } diff --git a/compiler/src/core/loadable/Loadable.js b/compiler/src/core/loadable/Loadable.js index 92606b1..6666c02 100644 --- a/compiler/src/core/loadable/Loadable.js +++ b/compiler/src/core/loadable/Loadable.js @@ -31,7 +31,7 @@ export default class { load(promise, then, reset = true) { if(reset) this.reset() - + promise .then(res => this.success(then(res))) .catch(err => { diff --git a/compiler/src/core/serviceEmiter.vue b/compiler/src/core/serviceEmiter.vue index 807037c..164550b 100644 --- a/compiler/src/core/serviceEmiter.vue +++ b/compiler/src/core/serviceEmiter.vue @@ -1,7 +1,10 @@ \ No newline at end of file diff --git a/compiler/src/discord/guild.vue b/compiler/src/discord/guild.vue new file mode 100644 index 0000000..eef08da --- /dev/null +++ b/compiler/src/discord/guild.vue @@ -0,0 +1,27 @@ + + + diff --git a/compiler/src/discord/main.vue b/compiler/src/discord/main.vue index 07f5373..a9df7f9 100644 --- a/compiler/src/discord/main.vue +++ b/compiler/src/discord/main.vue @@ -19,18 +19,22 @@ \ No newline at end of file diff --git a/compiler/src/discord/message.vue b/compiler/src/discord/message.vue deleted file mode 100644 index 3ea9988..0000000 --- a/compiler/src/discord/message.vue +++ /dev/null @@ -1,22 +0,0 @@ - - - diff --git a/compiler/src/discord/tools.js b/compiler/src/discord/tools.js new file mode 100644 index 0000000..b747d98 --- /dev/null +++ b/compiler/src/discord/tools.js @@ -0,0 +1 @@ +export const CDN = 'https://cdn.discordapp.com' \ No newline at end of file diff --git a/compiler/src/mastodon/account.vue b/compiler/src/mastodon/account.vue index aa3838b..8a18b10 100644 --- a/compiler/src/mastodon/account.vue +++ b/compiler/src/mastodon/account.vue @@ -11,7 +11,10 @@ import { parseEmojisMixin } from './tools' export default { mixins: [ parseEmojisMixin ], props: { - account: Object, + account: { + type: Object, + default: undefined + }, showMedia: { type: Boolean, default: true @@ -20,8 +23,8 @@ export default { methods: { avatarStyle(avatar) { return { - "background-image": `url(${avatar})` - }; + 'background-image': `url(${avatar})` + } } } } diff --git a/compiler/src/mastodon/client.vue b/compiler/src/mastodon/client.vue index a5b17ff..b360eb1 100644 --- a/compiler/src/mastodon/client.vue +++ b/compiler/src/mastodon/client.vue @@ -18,6 +18,7 @@ \ No newline at end of file diff --git a/compiler/src/mastodon/main.vue b/compiler/src/mastodon/main.vue index 1272604..c6e6c45 100644 --- a/compiler/src/mastodon/main.vue +++ b/compiler/src/mastodon/main.vue @@ -28,21 +28,28 @@ \ No newline at end of file diff --git a/compiler/src/mastodon/notification.vue b/compiler/src/mastodon/notification.vue index fa6f62b..dd846e2 100644 --- a/compiler/src/mastodon/notification.vue +++ b/compiler/src/mastodon/notification.vue @@ -22,19 +22,22 @@ import accountVue from './account.vue' import statusVue from './status.vue' export default { - props: { - notification: Object, - showMedia: { - type: Boolean, - default: true - } - }, - mixins: [ timedMixin ], components: { fromNow: fromNowVue, account: accountVue, status: statusVue }, + mixins: [ timedMixin ], + props: { + notification: { + type: Object, + default: undefined + }, + showMedia: { + type: Boolean, + default: true + } + }, methods: { makeDismiss() { this.$emit('dismiss', this.notification.id) diff --git a/compiler/src/mastodon/status.vue b/compiler/src/mastodon/status.vue index 636fb44..a046ca8 100644 --- a/compiler/src/mastodon/status.vue +++ b/compiler/src/mastodon/status.vue @@ -40,14 +40,17 @@ import { parseEmojisMixin } from './tools' import accountVue from './account.vue' export default { - name: "status", - mixins: [ timedMixin, parseEmojisMixin ], + name: 'Status', components: { account: accountVue, fromNow: fromNowVue }, + mixins: [ timedMixin, parseEmojisMixin ], props: { - status: Object, + status: { + type: Object, + default: undefined + }, withAccount: { type: Boolean, default: true diff --git a/compiler/src/nextcloud-news/main.vue b/compiler/src/nextcloud-news/main.vue index cd06e7d..207830b 100644 --- a/compiler/src/nextcloud-news/main.vue +++ b/compiler/src/nextcloud-news/main.vue @@ -32,6 +32,7 @@ \ No newline at end of file diff --git a/compiler/src/openweathermap/chart.vue b/compiler/src/openweathermap/chart.vue index 0db6491..b6e316b 100644 --- a/compiler/src/openweathermap/chart.vue +++ b/compiler/src/openweathermap/chart.vue @@ -11,7 +11,7 @@ export default { responsive: true, maintainAspectRatio: false, legend: { labels: { - fontColor: "white" + fontColor: 'white' } }, scales: { @@ -19,7 +19,7 @@ export default { type: 'time', distribution: 'series', ticks: { - fontColor: "white", + fontColor: 'white', source: 'data', autoSkip: true, maxRotation: 0, @@ -36,14 +36,14 @@ export default { display: true, position: 'left', ticks: { - fontColor: "white" + fontColor: 'white' } },{ id: 'y-axis-rain', display: true, position: 'right', ticks: { - fontColor: "white", + fontColor: 'white', beginAtZero: true, suggestedMax: 1 } @@ -53,16 +53,16 @@ export default { intersect: false, callbacks: { title: function(tooltipItem, myData) { - var item = myData.datasets[tooltipItem[0].datasetIndex].data[tooltipItem[0].index] - return moment(item.x || item.t).format('HH[h]') + var item = myData.datasets[tooltipItem[0].datasetIndex].data[tooltipItem[0].index] + return moment(item.x || item.t).format('HH[h]') }, label: function(tooltipItem, myData) { - var label = myData.datasets[tooltipItem.datasetIndex].label || ''; - if (label) { - label += ': '; - } - label += tooltipItem.value; - return label; + var label = myData.datasets[tooltipItem.datasetIndex].label || '' + if (label) { + label += ': ' + } + label += tooltipItem.value + return label } } } diff --git a/compiler/src/openweathermap/main.vue b/compiler/src/openweathermap/main.vue index 52ca132..e5647a2 100644 --- a/compiler/src/openweathermap/main.vue +++ b/compiler/src/openweathermap/main.vue @@ -26,21 +26,26 @@ \ No newline at end of file diff --git a/compiler/src/openweathermap/weather.vue b/compiler/src/openweathermap/weather.vue index d54bebe..a120f79 100644 --- a/compiler/src/openweathermap/weather.vue +++ b/compiler/src/openweathermap/weather.vue @@ -15,7 +15,10 @@