platypush/platypush/backend/http/webapp/dist/static/js/chunk-75e68c24.0b0c9dd6.js.map

1 line
5.1 KiB
Plaintext

{"version":3,"sources":["webpack:///./src/components/widgets/RssNews/Index.vue?5220","webpack:///./src/components/widgets/RssNews/Index.vue","webpack:///./src/components/widgets/RssNews/Index.vue?6001"],"names":["class","currentArticle","source","title","Date","published","toDateString","toTimeString","substring","name","mixins","Utils","props","db","type","String","required","limit","Number","default","refreshSeconds","data","articles","queue","undefined","methods","refresh","this","length","request","engine","query","pop","mounted","setInterval","parseInt","toFixed","render","__scopeId"],"mappings":"kHAAA,W,+JCCOA,MAAM,Y,SACJA,MAAM,W,wEADb,eAMM,MANN,EAMM,CALuB,EAAAC,gB,iBAA3B,eAIM,MAJN,EAIM,CAHJ,eAAyD,OAApDD,MAAM,S,YAAS,eAA8B,EAAR,eAACE,S,wBAC3C,eAAuD,OAAlDF,MAAM,Q,YAAQ,eAA6B,EAAP,eAACG,Q,wBAC1C,eAAkK,OAA7JH,MAAM,Y,YAAY,eAAoI,IAAxHI,KAAK,EAAAH,eAAeI,WAAWC,eAAY,SAAgBF,KAAK,EAAAH,eAAeI,WAAWE,eAAeC,UAAS,O,4HAY5I,GACbC,KAAM,UACNC,OAAQ,CAACC,EAAA,MACTC,MAAO,CAILC,GAAI,CACFC,KAAMC,OACNC,UAAU,GAIZC,MAAO,CACLH,KAAMI,OACNF,UAAU,EACVG,QAAS,IAIXC,eAAgB,CACdN,KAAMI,OACNF,UAAU,EACVG,QAAS,KAIbE,KAAM,WACJ,MAAO,CACLC,SAAU,GACVC,MAAO,GACPtB,oBAAgBuB,IAIpBC,QAAS,CACPC,QAAS,WAAF,8CAAE,iGACFC,KAAKJ,MAAMK,OADT,gCAEiBD,KAAKE,QAAQ,YAAa,CAC9CC,OAAQH,KAAKd,GACbkB,MAAO,iQAAF,OAIuDJ,KAAKV,SAR9D,OAELU,KAAKL,SAFA,OAWLK,KAAKJ,MAAL,eAAiBI,KAAKL,UAXjB,UAcFK,KAAKJ,MAAMK,OAdT,iDAiBPD,KAAK1B,eAAiB0B,KAAKJ,MAAMS,MAjB1B,gDAAF,qDAAE,IAqBXC,QAAS,WACPN,KAAKD,UACLQ,YAAYP,KAAKD,QAASS,UAA8B,IAApBR,KAAKP,gBAAqBgB,QAAQ,O,UCvE1E,EAAOC,OAAS,EAChB,EAAOC,UAAY,kBAEJ","file":"static/js/chunk-75e68c24.0b0c9dd6.js","sourcesContent":["export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./Index.vue?vue&type=style&index=0&id=1b599aef&lang=scss&scoped=true\"","<template>\n <div class=\"rss-news\">\n <div class=\"article\" v-if=\"currentArticle\">\n <div class=\"source\" v-text=\"currentArticle.source\"></div>\n <div class=\"title\" v-text=\"currentArticle.title\"></div>\n <div class=\"published\" v-text=\"new Date(currentArticle.published).toDateString() + ', ' + new Date(currentArticle.published).toTimeString().substring(0,5)\"></div>\n </div>\n </div>\n</template>\n\n<script>\nimport Utils from \"@/Utils\";\n\n/**\n * In order to use this widget you need to configure the `backend.http.poll` backend to\n * poll a list of RSS sources.\n */\nexport default {\n name: \"RssNews\",\n mixins: [Utils],\n props: {\n // Database engine string pointing to the source of the RSS feeds.\n // If not otherwise configured, you should set this to\n // `sqlite:///<HOME>/.local/share/platypush/feeds/rss.db`.\n db: {\n type: String,\n required: true,\n },\n\n // Maximum number of items to be shown in a cycle.\n limit: {\n type: Number,\n required: false,\n default: 25,\n },\n\n // How long an entry should be displayed before moving to the next one.\n refreshSeconds: {\n type: Number,\n required: false,\n default: 15,\n },\n },\n\n data: function() {\n return {\n articles: [],\n queue: [],\n currentArticle: undefined,\n }\n },\n\n methods: {\n refresh: async function() {\n if (!this.queue.length) {\n this.articles = await this.request('db.select', {\n engine: this.db,\n query: `\n select s.title as source, e.title, e.summary,\n strftime('%Y-%m-%dT%H:%M:%fZ', e.published) as published\n from FeedEntry e join FeedSource s\n on e.source_id = s.id order by e.published desc limit ${this.limit}`,\n })\n\n this.queue = [...this.articles]\n }\n\n if (!this.queue.length)\n return\n\n this.currentArticle = this.queue.pop()\n },\n },\n\n mounted: function() {\n this.refresh()\n setInterval(this.refresh, parseInt((this.refreshSeconds*1000).toFixed(0)))\n },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.rss-news {\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n letter-spacing: .025em;\n\n .article {\n width: 90%;\n padding: 0 2em;\n\n .source {\n font-size: 1.7em;\n font-weight: bold;\n margin-bottom: .5em;\n }\n\n .title {\n font-size: 1.8em;\n font-weight: normal;\n margin-bottom: .5em;\n }\n\n .published {\n text-align: right;\n font-size: 1.1em;\n }\n }\n}\n</style>\n","import { render } from \"./Index.vue?vue&type=template&id=1b599aef&scoped=true\"\nimport script from \"./Index.vue?vue&type=script&lang=js\"\nexport * from \"./Index.vue?vue&type=script&lang=js\"\n\nimport \"./Index.vue?vue&type=style&index=0&id=1b599aef&lang=scss&scoped=true\"\nscript.render = render\nscript.__scopeId = \"data-v-1b599aef\"\n\nexport default script"],"sourceRoot":""}