diff --git a/.gitignore b/.gitignore index c2e8717..08eacdc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *node_modules -*vscode \ No newline at end of file +*vscode +config.json \ No newline at end of file diff --git a/compiler/.eslintrc.json b/compiler/.eslintrc.json deleted file mode 100644 index 864c3e0..0000000 --- a/compiler/.eslintrc.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "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/.gitkeep b/compiler/dist/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/compiler/dist/discord/main.js b/compiler/dist/discord/main.js deleted file mode 100644 index e5f6a02..0000000 --- a/compiler/dist/discord/main.js +++ /dev/null @@ -1 +0,0 @@ -!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=67)}([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){var r=n(17)("wks"),o=n(12),i=n(0).Symbol,u="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=u&&i[t]||(u?i:o)("Symbol."+t))}).store=r},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){t.exports=!n(4)(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(6),o=n(16);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(11),o=n(31),i=n(15),u=Object.defineProperty;e.f=n(3)?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){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(0),o=n(5),i=n(2),u=n(12)("src"),c=n(43),s=(""+c).split("toString");n(10).inspectSource=function(t){return c.call(t)},(t.exports=function(t,e,n,c){var a="function"==typeof n;a&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(a&&(i(n,u)||o(n,u,t[e]?""+t[e]:s.join(String(e)))),t===r?t[e]=n:c?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]||c.call(this)})},function(t,e,n){var r=n(48),o=n(21);t.exports=function(t){return r(o(t))}},function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(7);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},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(35),o=n(23);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(0),o=n(10),i=n(5),u=n(8),c=n(33),s=function(t,e,n){var a,l,f,p,d=t&s.F,v=t&s.G,h=t&s.S,y=t&s.P,m=t&s.B,g=v?r:h?r[e]||(r[e]={}):(r[e]||{}).prototype,b=v?o:o[e]||(o[e]={}),_=b.prototype||(b.prototype={});for(a in v&&(n=e),n)f=((l=!d&&g&&void 0!==g[a])?g:n)[a],p=m&&l?c(f,r):y&&"function"==typeof f?c(Function.call,f):f,g&&u(g,a,f,t&s.U),b[a]!=f&&i(b,a,p),y&&_[a]!=f&&(_[a]=f)};r.core=o,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,e,n){var r=n(7);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(10),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(18)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports=!1},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var r=n(6).f,o=n(2),i=n(1)("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=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(17)("keys"),o=n(12);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(11),o=n(53),i=n(23),u=n(22)("IE_PROTO"),c=function(){},s=function(){var t,e=n(32)("iframe"),r=i.length;for(e.style.display="none",n(54).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write(" diff --git a/compiler/src/core/baseService.vue b/compiler/src/core/baseService.vue deleted file mode 100644 index 7cbfc5e..0000000 --- a/compiler/src/core/baseService.vue +++ /dev/null @@ -1,60 +0,0 @@ - diff --git a/compiler/src/core/connectedService.vue b/compiler/src/core/connectedService.vue deleted file mode 100644 index 9ce83d6..0000000 --- a/compiler/src/core/connectedService.vue +++ /dev/null @@ -1,42 +0,0 @@ - diff --git a/compiler/src/core/fromNow.vue b/compiler/src/core/fromNow.vue deleted file mode 100644 index e4e0c1a..0000000 --- a/compiler/src/core/fromNow.vue +++ /dev/null @@ -1,66 +0,0 @@ - -span {{ timeSince }} - - - \ No newline at end of file diff --git a/compiler/src/core/input/baseSetting.vue b/compiler/src/core/input/baseSetting.vue deleted file mode 100644 index d2b1829..0000000 --- a/compiler/src/core/input/baseSetting.vue +++ /dev/null @@ -1,19 +0,0 @@ - diff --git a/compiler/src/core/input/model.pug b/compiler/src/core/input/model.pug deleted file mode 100644 index 9e7def7..0000000 --- a/compiler/src/core/input/model.pug +++ /dev/null @@ -1,3 +0,0 @@ -p.setting - label(:for="id") {{ title }}: - block input \ No newline at end of file diff --git a/compiler/src/core/input/settingBoolean.vue b/compiler/src/core/input/settingBoolean.vue deleted file mode 100644 index 664114c..0000000 --- a/compiler/src/core/input/settingBoolean.vue +++ /dev/null @@ -1,14 +0,0 @@ - -extends model - -block input - input(:id="id" type="checkbox" :checked="value" @change.stop="sendChange($event.target.checked)") - - - diff --git a/compiler/src/core/input/settingInt.vue b/compiler/src/core/input/settingInt.vue deleted file mode 100644 index 8c1379c..0000000 --- a/compiler/src/core/input/settingInt.vue +++ /dev/null @@ -1,19 +0,0 @@ - -extends model - -block input - input(:id="id" type="number" step="1" :value="value" @keyup.enter="sendChange(parseInt($event.target.value))") - - - diff --git a/compiler/src/core/input/settingString.vue b/compiler/src/core/input/settingString.vue deleted file mode 100644 index b55d412..0000000 --- a/compiler/src/core/input/settingString.vue +++ /dev/null @@ -1,19 +0,0 @@ - -extends model - -block input - input(:id="id" type="text" :value="value" @keyup.enter="sendChange($event.target.value)") - - - diff --git a/compiler/src/core/loadable/Loadable.js b/compiler/src/core/loadable/Loadable.js deleted file mode 100644 index 65ab2c2..0000000 --- a/compiler/src/core/loadable/Loadable.js +++ /dev/null @@ -1,41 +0,0 @@ -export default class { - constructor() { - this.reset() - } - - get() { - return this.data - } - isSuccess() { - return this.loaded && this.error == undefined - } - display() { - return this.loaded ? (this.error || this.data) : 'Loading...' - } - - reset() { - this.loaded = false - this.data = undefined - this.error = undefined - } - success(data) { - this.loaded = true - this.data = data || {} - } - fail(error) { - this.loaded = true - this.error = error || 'Failed' - } - - load(promise, then, reset = true) { - if(reset) - this.reset() - - promise - .then(res => this.success(then(res))) - .catch(err => { - this.fail(err) - throw err - }) - } -} \ No newline at end of file diff --git a/compiler/src/core/loadable/ReLoadable.js b/compiler/src/core/loadable/ReLoadable.js deleted file mode 100644 index 63d5399..0000000 --- a/compiler/src/core/loadable/ReLoadable.js +++ /dev/null @@ -1,16 +0,0 @@ -import Loadable from './Loadable' - -export default class extends Loadable { - reset() { - super.reset() - this.loadingMore = false - } - - loadMore(promise, then) { - this.loadingMore = true - promise.then(res => { - then(res, this.data, this) - this.loadingMore = false - }) - } -} \ No newline at end of file diff --git a/compiler/src/core/loadable/loadableBlock.vue b/compiler/src/core/loadable/loadableBlock.vue deleted file mode 100644 index afe3721..0000000 --- a/compiler/src/core/loadable/loadableBlock.vue +++ /dev/null @@ -1,22 +0,0 @@ - -div.loadable-block - slot(name="success" v-if="loadable.isSuccess()") {{ get }} - slot(name="error" v-else-if="loadable.error") {{ loadable.error }} - slot(name="loading" v-else) - .service-loader - - - diff --git a/compiler/src/core/loadable/loadableInline.vue b/compiler/src/core/loadable/loadableInline.vue deleted file mode 100644 index cf43ac1..0000000 --- a/compiler/src/core/loadable/loadableInline.vue +++ /dev/null @@ -1,21 +0,0 @@ - -span.loadable-inline - slot(name="success" v-if="loadable.isSuccess()") {{ get }} - slot(name="error" v-else-if="loadable.error") {{ loadable.error }} - slot(name="loading" v-else) Loading... - - - diff --git a/compiler/src/core/serviceEmiter.vue b/compiler/src/core/serviceEmiter.vue deleted file mode 100644 index ee94c77..0000000 --- a/compiler/src/core/serviceEmiter.vue +++ /dev/null @@ -1,37 +0,0 @@ - diff --git a/compiler/src/core/serviceHeader.vue b/compiler/src/core/serviceHeader.vue deleted file mode 100644 index 75cf8d1..0000000 --- a/compiler/src/core/serviceHeader.vue +++ /dev/null @@ -1,39 +0,0 @@ - -.service-header - .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)" - @keyup.delete.ctrl.exact="onRemove" @keyup.delete.alt.exact="onRemoveService" - ) - slot(name="settings") - - - diff --git a/compiler/src/discord/client.vue b/compiler/src/discord/client.vue deleted file mode 100644 index bb8b27b..0000000 --- a/compiler/src/discord/client.vue +++ /dev/null @@ -1,97 +0,0 @@ - -.client(@scroll.passive="onScroll") - loadable-block.list(:loadable="guilds") - template(#success) - guild(v-for="guild in guilds.get()" :key="guild.id" :guild="guild" :showMedia="options.showMedia") - - - \ No newline at end of file diff --git a/compiler/src/discord/guild.vue b/compiler/src/discord/guild.vue deleted file mode 100644 index eef08da..0000000 --- a/compiler/src/discord/guild.vue +++ /dev/null @@ -1,27 +0,0 @@ - -.guild - | {{ guild.name }} - img(v-if="showMedia && guild.icon" :src="`${CDN}/icons/${guild.id}/${guild.icon}.png?size=16`") - - - diff --git a/compiler/src/discord/main.vue b/compiler/src/discord/main.vue deleted file mode 100644 index a45b733..0000000 --- a/compiler/src/discord/main.vue +++ /dev/null @@ -1,54 +0,0 @@ - -.discord - service-header(:emit="emit") - template(#title) {{ serviceName }}: {{ account.display() }} - template(#settings) - setting-boolean(:id="'reconnect'" :title="'Reconnect'" :value="params.reconnect" @change="saveOptionCouple") - setting-int(:id="'buffer'" :title="'Buffer size'" :value="params.buffer" @change="saveOptionCouple") - setting-boolean(:id="'showMedia'" :title="'Show medias'" :value="params.showMedia" @change="saveOptionCouple") - loadable-block.service-content(:loadable="account") - template(#success) - client(:auth="auth" :options="params" :emit="emit") - template(#error) - form(@submit.prevent="makeAuth") - p - label(for="token") Token: - input#token(v-model="newAuth.token" required) - p - input(type="submit" value="Connect") - - - \ No newline at end of file diff --git a/compiler/src/discord/tools.js b/compiler/src/discord/tools.js deleted file mode 100644 index b747d98..0000000 --- a/compiler/src/discord/tools.js +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 8a18b10..0000000 --- a/compiler/src/mastodon/account.vue +++ /dev/null @@ -1,31 +0,0 @@ - -a.account(target="_blank" :href="account.url") - .avatar(v-if="showMedia" :style="avatarStyle(account.avatar_static)") - .name(v-html="parseEmojis(account.display_name, account.emojis)") - .acct @{{ account.acct }} - - - diff --git a/compiler/src/mastodon/client.vue b/compiler/src/mastodon/client.vue deleted file mode 100644 index 09b06d3..0000000 --- a/compiler/src/mastodon/client.vue +++ /dev/null @@ -1,146 +0,0 @@ - -.client(@scroll.passive="onScroll") - .statues - .header(v-if="hasNotifications") Accueil - loadable-block.list(:loadable="statues") - template(#success) - template(v-for="status in statues.get()") - status(v-if="showStatus(status)" :key="status.id" :status="status" :now="now" :showMedia="options.showMedia" @mark="onStatusMark") - .status(v-show="statues.loadingMore") - .service-loader - .notifications(v-if="hasNotifications") - .header - | Notifications - span.date(@click.stop.prevent="onNotificationsClear") ❌ - .list - notification(v-for="notification in notifications.get()" :key="notification.id" :notification="notification" :now="now" - :showMedia="options.showMedia" @dismiss="onNotificationDismiss" @mark="onStatusMark") - - - \ No newline at end of file diff --git a/compiler/src/mastodon/main.vue b/compiler/src/mastodon/main.vue deleted file mode 100644 index 3e1befc..0000000 --- a/compiler/src/mastodon/main.vue +++ /dev/null @@ -1,66 +0,0 @@ - -.mastodon - service-header(:emit="emit") - template(#title) - | {{ serviceName }}: - loadable-inline(:loadable="account") - template(#success) - span(v-html="parseEmojis(account.data.display_name, account.data.emojis) + '@' + auth.server") - template(#settings) - setting-boolean(:id="'reconnect'" :title="'Reconnect'" :value="params.reconnect" @change="saveOptionCouple") - setting-boolean(:id="'reblog'" :title="'Show reblogs'" :value="params.reblog" @change="saveOptionCouple") - setting-boolean(:id="'reply'" :title="'Show replies'" :value="params.reply" @change="saveOptionCouple") - setting-int(:id="'buffer'" :title="'Buffer size'" :value="params.buffer" @change="saveOptionCouple") - setting-boolean(:id="'showMedia'" :title="'Show medias'" :value="params.showMedia" @change="saveOptionCouple") - loadable-block.service-content(:loadable="account") - template(#success) - client(:auth="auth" :options="params" :emit="emit") - template(#error) - form(@submit.prevent="makeAuth") - p - label(for="server") Server: - input#server(v-model="newAuth.server" required) - p - label(for="token") Token: - input#token(v-model="newAuth.token" required) - p - input(type="submit" value="Connect") - - - \ No newline at end of file diff --git a/compiler/src/mastodon/notification.vue b/compiler/src/mastodon/notification.vue deleted file mode 100644 index dd846e2..0000000 --- a/compiler/src/mastodon/notification.vue +++ /dev/null @@ -1,50 +0,0 @@ - -.notification - account(:account="notification.account" :showMedia="showMedia") - - span.colored.text-icon.letter(v-if="notification.type == 'mention'") ✉ - span.colored.text-icon.letter(v-if="notification.type == 'reblog'") ⟳ - span.colored.text-icon.letter(v-if="notification.type == 'favourite'") ⚝ - - from-now.date(:date="notification.created_at" :now="now") - - .content - template(v-if="notification.type == 'follow'") Vous suit - status.reblog(v-else-if="notification.status" :status="notification.status" :now="now" - :showMedia="showMedia" :withAccount="notification.type != 'mention'" @mark="passMark") - - a.date(@click.stop.prevent="makeDismiss" style="margin-top: -1em") ❌ - - - diff --git a/compiler/src/mastodon/status.vue b/compiler/src/mastodon/status.vue deleted file mode 100644 index a046ca8..0000000 --- a/compiler/src/mastodon/status.vue +++ /dev/null @@ -1,91 +0,0 @@ - -.status - account(v-if="withAccount" :account="status.account" :showMedia="showMedia") - - span.text-icon.letter(v-if="status.reblog") ⟳ - - a.date(target="_blank" :href="status.uri") - from-now(:date="status.created_at" :now="now") - - .content(:class="{ avatared: showMedia }") - template(v-if="!status.reblog") - .spoiler(v-if="status.spoiler_text" @click.stop.prevent="status.sensitive = !status.sensitive"). - {{ status.spoiler_text || 'Spoiler' }} {{ status.sensitive ? '→' : '↓' }} - div(v-if="!status.spoiler_text || !status.sensitive") - .text(v-html="parseEmojis(status.content, status.emojis)") - a.media(v-for="media in status.media_attachments" :href="media.url" target="_blank") - template(v-if="showMedia") - img(v-if="media.type == 'image' || media.type == 'gifv'" :src="media.preview_url" :alt="media.description" :title="media.description") - .gif(v-if="media.type == 'gifv'") GIF - template(v-else) Hidden media - status.reblog(v-else :status="status.reblog" :now="now" :showMedia="showMedia") - - .meta(v-if="!status.reblog") - a.replies(@click.stop.prevent="makeReply(status)") - span.text-icon ✉ - | {{ status.replies_count }} - a.reblogs(:class="{ colored: status.reblogged }" @click.stop.prevent="makeReblog(status)") - span.text-icon ⟳ - | {{ status.reblogs_count }} - a.favourites(:class="{ colored: status.favourited }" @click.stop.prevent="makeFav(status)") - span.text-icon ⚝ - | {{ status.favourites_count }} - a.fil(v-if="status.in_reply_to_id" @click.stop.prevent="showReply(status.in_reply_to_id)") - | Voir le fil - - - diff --git a/compiler/src/mastodon/tools.js b/compiler/src/mastodon/tools.js deleted file mode 100644 index cf5ebf3..0000000 --- a/compiler/src/mastodon/tools.js +++ /dev/null @@ -1,12 +0,0 @@ -export const parseEmojisMixin = { - methods: { - parseEmojis(text, emojis) { - for (const emoji of emojis) { - text = text.split(`:${emoji.shortcode}:`).join( - `` - ) - } - return text - } - } -} \ No newline at end of file diff --git a/compiler/src/nextcloud-news/main.vue b/compiler/src/nextcloud-news/main.vue deleted file mode 100644 index e31a8dc..0000000 --- a/compiler/src/nextcloud-news/main.vue +++ /dev/null @@ -1,114 +0,0 @@ - -.nextcloud-news(v-show="showService") - service-header(:emit="emit") - template(#title) - | {{ serviceName }} - span.note(v-if="hasNews") ({{ news.get().length }}) - template(#settings) - setting-int(:id="'update'" :title="'Update interval'" :value="params.update" @change="saveOptionCouple") - setting-int(:id="'buffer'" :title="'Buffer size'" :value="params.buffer" @change="saveOptionCouple") - setting-boolean(:id="'showEmpty'" :title="'Show empty'" :value="params.showEmpty" @change="saveOptionCouple") - loadable-block.unreaded(:loadable="news") - template(#success) - .news(v-for="line in news.get()") - a(:href="line.url" target="_blank") - from-now.date(:date="line.pubDate * 1000" :now="now") - span.read(@click.stop="makeRead(line.id)") 👁 - span.title(@click.stop="line.open = !line.open") {{ line.author }} ─ {{ line.title }} - .content(v-if="line.open && line.body") {{ line.body }} - template(#error) - form(@submit.prevent="makeAuth") - p - label(for="server") Server: - input#server(v-model="newAuth.server" required) - p - label(for="username") Username: - input#username(v-model="newAuth.username" required) - p - label(for="token") Token: - input#token(v-model="newAuth.token" required) - p - input(type="submit" value="Connect") - - - \ No newline at end of file diff --git a/compiler/src/openweathermap/chart.vue b/compiler/src/openweathermap/chart.vue deleted file mode 100644 index b6e316b..0000000 --- a/compiler/src/openweathermap/chart.vue +++ /dev/null @@ -1,72 +0,0 @@ - diff --git a/compiler/src/openweathermap/main.vue b/compiler/src/openweathermap/main.vue deleted file mode 100644 index a5dd173..0000000 --- a/compiler/src/openweathermap/main.vue +++ /dev/null @@ -1,166 +0,0 @@ - -.openweathermap - service-header(:emit="emit") - template(#title) {{ serviceName }} - template(#settings) - setting-int(:id="'update'" :title="'Update interval'" :value="params.update" @change="saveOptionCouple") - setting-int(:id="'forecastLimit'" :title="'Forecast limit'" :value="params.forecastLimit" @change="saveOptionCouple") - p.setting - button(@click="showAdd = true") Add city - loadable-block(:loadable="weathers") - template(#success) - .list - weather(v-for="(city, id) in weathers.get()" :key="id" :selected="selectedId == id" - :city="city" @select="makeSelect(id)" @remove="removeCity(id)") - input.weather(v-show="showAdd" placeholder="city id" @keyup.enter="addCity(parseInt($event.target.value))") - loadable-block(:loadable="forecast").forecast - template(#success) - chart.chart(:chartData="forecastChart") - template(#error) - form(@submit.prevent="makeAuth") - p - label(for="token") Token: - input#token(v-model="newAuth.token" required) - p - input(type="submit" value="Connect") - - - \ No newline at end of file diff --git a/compiler/src/openweathermap/weather.vue b/compiler/src/openweathermap/weather.vue deleted file mode 100644 index a120f79..0000000 --- a/compiler/src/openweathermap/weather.vue +++ /dev/null @@ -1,25 +0,0 @@ - -.weather(:class="{ selected: selected }" @click.stop.prevent="$emit('select')") - .main(v-for="main in city.weather") - p {{ main.description }} - .ic - img(:src="`https://openweathermap.org/img/w/${main.icon}.png`" :alt="main.main") - span.remove(@click.stop.prevent="$emit('remove')") ❌ - .header - | {{ city.name }} - img.icon(:src="`https://openweathermap.org/images/flags/${city.sys.country.toLowerCase()}.png`" :alt="city.sys.country" :title="city.sys.country") - .data - | {{ city.main.temp }}°C ─ {{ city.main.humidity }}% - - - diff --git a/compiler/webpack.config.js b/compiler/webpack.config.js deleted file mode 100644 index 0246b16..0000000 --- a/compiler/webpack.config.js +++ /dev/null @@ -1,127 +0,0 @@ -// ---------------------------------------------------------------------- -// WEBPACK CONFIGURATION -// ---------------------------------------------------------------------- - -// INSTRUCTIONS -// webpack --env.file="./path/to/file" --relative to the src folder - -// Import dependencies -const path = require('path'); -const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin'); -const StringReplacePlugin = require('string-replace-webpack-plugin'); -const VueLoaderPlugin = require('vue-loader/lib/plugin'); - -function resolve(dir) { - return path.resolve(__dirname, dir); -} - -module.exports = (env) => { - // Get the basename from the filepath - const filename = path.basename(env.file, '.vue'); - const filepath = path.dirname(env.file); - - return { - mode : 'production', - entry : { - [filename] : './entry.js' - }, - performance: { - maxEntrypointSize: 512000, - maxAssetSize: 512000 - }, - output : { - filename : '[name].js', - path : path.resolve(__dirname, 'dist', filepath) - }, - resolve : { - extensions : ['.vue', '.js'], - alias : { - 'vue$' : resolve('node_modules/vue/dist/vue.min.js'), - '@' : resolve('src') - } - }, - externals : { - vue : 'Vue', - lodash : 'lodash' - }, - module : { - rules : [ - { - test : /entry\.js$/, - loader : StringReplacePlugin.replace({ - replacements: [ - { - pattern: /__FILE__/ig, - replacement: function (match, p1, offset, string) { - return env.file; - } - } - ]}) - }, - { - test : /\.vue$/, - loader : 'vue-loader' - }, - { - test : /\.js$/, - loader : 'babel-loader', - include : [ - resolve('src') - ], - exclude: file => ( - /node_modules/.test(file) && - !/\.vue\.js/.test(file) - ) - }, - { - test : /\.css$/, - use : [ - 'vue-style-loader', - 'css-loader' - ] - }, - { - test : /\.less$/, - use : [ - 'vue-style-loader', - 'css-loader', - 'less-loader' - ] - }, - { - test : /\.scss$/, - use : [ - 'vue-style-loader', - 'css-loader', - 'sass-loader' - ] - }, - { - test : /\.sass$/, - use : [ - 'vue-style-loader', - 'css-loader', - { - loader : 'sass-loader', - options : { - indentedSyntax : true - } - } - ] - }, - { - test: /\.pug$/, - loader: 'pug-plain-loader' - } - ] - }, - plugins : [ - new VueLoaderPlugin(), - new OptimizeCSSPlugin({ - cssProcessorOptions: { - safe: true - } - }) - ] - }; -}; \ No newline at end of file diff --git a/index.html b/index.html deleted file mode 100644 index b683baf..0000000 --- a/index.html +++ /dev/null @@ -1,57 +0,0 @@ - - -
- - -{{ error }}
-, or missing
. Bailing hydration and performing ' + - 'full client-side render.' - ); - } - } - // either not server-rendered, or hydration failed. - // create an empty node and replace it - oldVnode = emptyNodeAt(oldVnode); - } - - // replacing existing element - var oldElm = oldVnode.elm; - var parentElm$1 = nodeOps.parentNode(oldElm); - - // create new node - createElm( - vnode, - insertedVnodeQueue, - // extremely rare edge case: do not insert if old element is in a - // leaving transition. Only happens when combining transition + - // keep-alive + HOCs. (#4590) - oldElm._leaveCb ? null : parentElm$1, - nodeOps.nextSibling(oldElm) - ); - - // update parent placeholder node element, recursively - if (isDef(vnode.parent)) { - var ancestor = vnode.parent; - var patchable = isPatchable(vnode); - while (ancestor) { - for (var i = 0; i < cbs.destroy.length; ++i) { - cbs.destroy[i](ancestor); - } - ancestor.elm = vnode.elm; - if (patchable) { - for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) { - cbs.create[i$1](emptyNode, ancestor); - } - // #6513 - // invoke insert hooks that may have been merged by create hooks. - // e.g. for directives that uses the "inserted" hook. - var insert = ancestor.data.hook.insert; - if (insert.merged) { - // start at index 1 to avoid re-invoking component mounted hook - for (var i$2 = 1; i$2 < insert.fns.length; i$2++) { - insert.fns[i$2](); - } - } - } else { - registerRef(ancestor); - } - ancestor = ancestor.parent; - } - } - - // destroy old node - if (isDef(parentElm$1)) { - removeVnodes(parentElm$1, [oldVnode], 0, 0); - } else if (isDef(oldVnode.tag)) { - invokeDestroyHook(oldVnode); - } - } - } - - invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch); - return vnode.elm - } -} - -/* */ - -var directives = { - create: updateDirectives, - update: updateDirectives, - destroy: function unbindDirectives (vnode) { - updateDirectives(vnode, emptyNode); - } -} - -function updateDirectives (oldVnode, vnode) { - if (oldVnode.data.directives || vnode.data.directives) { - _update(oldVnode, vnode); - } -} - -function _update (oldVnode, vnode) { - var isCreate = oldVnode === emptyNode; - var isDestroy = vnode === emptyNode; - var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context); - var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context); - - var dirsWithInsert = []; - var dirsWithPostpatch = []; - - var key, oldDir, dir; - for (key in newDirs) { - oldDir = oldDirs[key]; - dir = newDirs[key]; - if (!oldDir) { - // new directive, bind - callHook$1(dir, 'bind', vnode, oldVnode); - if (dir.def && dir.def.inserted) { - dirsWithInsert.push(dir); - } - } else { - // existing directive, update - dir.oldValue = oldDir.value; - callHook$1(dir, 'update', vnode, oldVnode); - if (dir.def && dir.def.componentUpdated) { - dirsWithPostpatch.push(dir); - } - } - } - - if (dirsWithInsert.length) { - var callInsert = function () { - for (var i = 0; i < dirsWithInsert.length; i++) { - callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode); - } - }; - if (isCreate) { - mergeVNodeHook(vnode, 'insert', callInsert); - } else { - callInsert(); - } - } - - if (dirsWithPostpatch.length) { - mergeVNodeHook(vnode, 'postpatch', function () { - for (var i = 0; i < dirsWithPostpatch.length; i++) { - callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode); - } - }); - } - - if (!isCreate) { - for (key in oldDirs) { - if (!newDirs[key]) { - // no longer present, unbind - callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy); - } - } - } -} - -var emptyModifiers = Object.create(null); - -function normalizeDirectives$1 ( - dirs, - vm -) { - var res = Object.create(null); - if (!dirs) { - // $flow-disable-line - return res - } - var i, dir; - for (i = 0; i < dirs.length; i++) { - dir = dirs[i]; - if (!dir.modifiers) { - // $flow-disable-line - dir.modifiers = emptyModifiers; - } - res[getRawDirName(dir)] = dir; - dir.def = resolveAsset(vm.$options, 'directives', dir.name, true); - } - // $flow-disable-line - return res -} - -function getRawDirName (dir) { - return dir.rawName || ((dir.name) + "." + (Object.keys(dir.modifiers || {}).join('.'))) -} - -function callHook$1 (dir, hook, vnode, oldVnode, isDestroy) { - var fn = dir.def && dir.def[hook]; - if (fn) { - try { - fn(vnode.elm, dir, vnode, oldVnode, isDestroy); - } catch (e) { - handleError(e, vnode.context, ("directive " + (dir.name) + " " + hook + " hook")); - } - } -} - -var baseModules = [ - ref, - directives -] - -/* */ - -function updateAttrs (oldVnode, vnode) { - var opts = vnode.componentOptions; - if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) { - return - } - if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) { - return - } - var key, cur, old; - var elm = vnode.elm; - var oldAttrs = oldVnode.data.attrs || {}; - var attrs = vnode.data.attrs || {}; - // clone observed objects, as the user probably wants to mutate it - if (isDef(attrs.__ob__)) { - attrs = vnode.data.attrs = extend({}, attrs); - } - - for (key in attrs) { - cur = attrs[key]; - old = oldAttrs[key]; - if (old !== cur) { - setAttr(elm, key, cur); - } - } - // #4391: in IE9, setting type can reset value for input[type=radio] - // #6666: IE/Edge forces progress value down to 1 before setting a max - /* istanbul ignore if */ - if ((isIE || isEdge) && attrs.value !== oldAttrs.value) { - setAttr(elm, 'value', attrs.value); - } - for (key in oldAttrs) { - if (isUndef(attrs[key])) { - if (isXlink(key)) { - elm.removeAttributeNS(xlinkNS, getXlinkProp(key)); - } else if (!isEnumeratedAttr(key)) { - elm.removeAttribute(key); - } - } - } -} - -function setAttr (el, key, value) { - if (el.tagName.indexOf('-') > -1) { - baseSetAttr(el, key, value); - } else if (isBooleanAttr(key)) { - // set attribute for blank value - // e.g. - if (isFalsyAttrValue(value)) { - el.removeAttribute(key); - } else { - // technically allowfullscreen is a boolean attribute for