diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c2e8717 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*node_modules +*vscode \ No newline at end of file diff --git a/compiler/dist/mastodon/main.js b/compiler/dist/mastodon/main.js index a4f6c94..170295d 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,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},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=45)}([function(t,e,n){var r=n(20)("wks"),o=n(15),i=n(2).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){t.exports=function(t){try{return!!t()}catch(t){return!0}}},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(1)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(6);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){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(4),o=n(42),i=n(18),s=Object.defineProperty;e.f=n(3)?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(7),o=n(17);t.exports=n(3)?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(2),o=n(8),i=n(5),s=n(15)("src"),a=n(75),c=(""+a).split("toString");n(16).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(77),o=n(13);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(38),o=n(28);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(2),o=n(16),i=n(8),s=n(9),a=n(40),c=function(t,e,n){var u,f,l,p,v=t&c.F,h=t&c.G,d=t&c.S,m=t&c.P,g=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)l=((f=!v&&y&&void 0!==y[u])?y:n)[u],p=g&&f?a(l,r):m&&"function"==typeof l?a(Function.call,l):l,y&&s(y,u,l,t&c.U),_[u]!=l&&i(_,u,p),m&&b[u]!=l&&(b[u]=l)};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){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},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){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},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(6);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=!1},function(t,e,n){var r=n(16),o=n(2),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(19)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){"use strict";var r,o,i=n(22),s=RegExp.prototype.exec,a=String.prototype.replace,c=s,u=(r=/a/,o=/b*/g,s.call(r,"a"),s.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),f=void 0!==/()??/.exec("")[1];(u||f)&&(c=function(t){var e,n,r,o,c=this;return f&&(n=new RegExp("^"+c.source+"$(?!\\s)",i.call(c))),u&&(e=c.lastIndex),r=s.call(c,t),u&&r&&(c.lastIndex=c.global?r.index+r[0].length:e),f&&r&&r.length>1&&a.call(r[0],n,function(){for(o=1;o2){var n,r,o,i=(e=g?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,f=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&&(m?c(function(){d.valueOf.call(n)}):"Number"!=i(n))?s(new h(y(e)),n,v):y(e)};for(var _,b=n(3)?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,_)&&l(v,_,f(h,_));v.prototype=d,d.constructor=v,n(9)(r,"Number",v)}},function(t,e,n){var r=n(7).f,o=n(5),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){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(20)("keys"),o=n(15);t.exports=function(t){return r[t]||(r[t]=o(t))}},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(4),o=n(73),i=n(28),s=n(29)("IE_PROTO"),a=function(){},c=function(){var t,e=n(41)("iframe"),r=i.length;for(e.style.display="none",n(70).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write(" - - \ No newline at end of file diff --git a/compiler/src/mastodon/account.vue b/compiler/src/mastodon/account.vue index 040d394..de0c695 100644 --- a/compiler/src/mastodon/account.vue +++ b/compiler/src/mastodon/account.vue @@ -1,6 +1,6 @@ @@ -9,7 +9,13 @@ a.account(target="_blank" :href="account.url") import { parseEmojisMixin } from './tools' export default { - props: ["account"], + props: { + account: Object, + showMedia: { + type: Boolean, + default: true + } + }, mixins: [ parseEmojisMixin ], methods: { avatarStyle(avatar) { diff --git a/compiler/src/mastodon/client.vue b/compiler/src/mastodon/client.vue index a7e843c..efc524a 100644 --- a/compiler/src/mastodon/client.vue +++ b/compiler/src/mastodon/client.vue @@ -2,21 +2,22 @@ .client .statues .header(v-if="notifications.length > 0") Accueil - .list(v-if="statues.length > 0") + .list(v-if="statues.length > 0" @scroll="onScroll") template(v-for="status in statues") - status(v-if="showStatus(status)" :key="status.id" :status="status" :now="now" @mark="onStatusMark") + status(v-if="showStatus(status)" :key="status.id" :status="status" :now="now" :showMedia="showMedia" @mark="onStatusMark") + .status(v-show="loadingOlder") Loading... template(v-else) Loading... .notifications(v-if="notifications.length > 0") .header | Notifications span.date(@click.stop.prevent="onNotificationsClear") ❌ .list - notification(v-for="notification in notifications" :key="notification.id" :notification="notification" :now="now" @dismiss="onNotificationDismiss") + notification(v-for="notification in notifications" :key="notification.id" :notification="notification" :now="now" :showMedia="showMedia" @dismiss="onNotificationDismiss") diff --git a/compiler/src/openweathermap/main.vue b/compiler/src/openweathermap/main.vue index c07c08d..17bf358 100644 --- a/compiler/src/openweathermap/main.vue +++ b/compiler/src/openweathermap/main.vue @@ -8,6 +8,9 @@ p label(for="update") Update interval: input#update(type="number" :value="update" @keyup.enter="setOption('update', parseInt($event.target.value))") + p + label(for="forecastLimit") Forecast limit: + input#forecastLimit(type="number" :value="forecastLimit" @keyup.enter="setOption('forecastLimit', parseInt($event.target.value))") p button(@click="showAdd = true") Add city template(v-if="weathers.length > 0 || cities.length == 0") @@ -24,27 +27,21 @@ | {{ city.main.temp }}°C ─ {{ city.main.humidity }}% input.weather(v-show="showAdd" placeholder="city id" @keyup.enter="addCity(parseInt($event.target.value))") .forecast - template(v-if="forecast") - .list - .line(v-for="line in forecast") - | {{ formatDate(line.dt) }} - .data - | {{ line.main.temp }}°C ─ {{ line.main.humidity }}% - .main(v-for="main in line.weather") - .ic - img(:src="`https://openweathermap.org/img/w/${main.icon}.png`" :alt="main.main") - p {{ main.description }} + chart(v-if="forecast" :chartData="forecastChart") template(v-else) Loading... template(v-else) Loading...