From 2a613243644926691b5ee19f5c402b1cc0e49c06 Mon Sep 17 00:00:00 2001 From: Devlin Junker Date: Thu, 30 Jun 2022 21:28:56 -0700 Subject: [PATCH 1/4] change linting rule from spaces to tabs to match typical vue linting also clean up all lint warnings in js+vue files Signed-off-by: Devlin Junker --- .eslintrc.js | 44 ++--- babel.config.js | 8 +- lib/Explore/feeds/feeds.en.json | 199 ++++++++++---------- src/App.vue | 28 +-- src/components/AddFeed.vue | 259 ++++++++++++------------- src/components/Explore.vue | 141 +++++++------- src/components/Sidebar.vue | 324 ++++++++++++++++---------------- src/main.js | 176 ++++++++--------- stylelint.config.js | 2 +- webpack.js | 26 +-- 10 files changed, 615 insertions(+), 592 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 1e9e7379f..3290cc73f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,26 +1,22 @@ module.exports = { - root: true, - parser: 'vue-eslint-parser', - parserOptions: { - parser: { - ts: '@typescript-eslint/parser', - }, - ecmaVersion: 2020, - }, - extends: [ - 'eslint:recommended', - 'plugin:vue/base', - 'plugin:vue/essential', - '@vue/standard', - '@vue/typescript/recommended', - '@nextcloud', - ], - ignorePatterns: ['*.d.ts'], - rules: { - 'node/no-unpublished-import': 'off', // necessary for vue-property-decorator (not published?) - - // TODO: remove these indentation rules during reformat (expects tab char \t but right now code base uses spaces) - 'vue/html-indent': 'off', - indent: ['error', 4], - }, + root: true, + parser: 'vue-eslint-parser', + parserOptions: { + parser: { + ts: '@typescript-eslint/parser', + }, + ecmaVersion: 2020, + }, + extends: [ + 'eslint:recommended', + 'plugin:vue/base', + 'plugin:vue/essential', + '@vue/standard', + '@vue/typescript/recommended', + '@nextcloud', + ], + ignorePatterns: ['*.d.ts'], + rules: { + 'node/no-unpublished-import': 'off', // necessary for vue-property-decorator (not published?) + }, } diff --git a/babel.config.js b/babel.config.js index ec45a210c..a179fa443 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,6 +1,6 @@ module.exports = { - plugins: [ - '@babel/plugin-syntax-dynamic-import', - ], - presets: ['@babel/preset-env'], + plugins: [ + '@babel/plugin-syntax-dynamic-import', + ], + presets: ['@babel/preset-env'], } diff --git a/lib/Explore/feeds/feeds.en.json b/lib/Explore/feeds/feeds.en.json index d855b243c..e6a59c86f 100644 --- a/lib/Explore/feeds/feeds.en.json +++ b/lib/Explore/feeds/feeds.en.json @@ -1,98 +1,105 @@ { - "Nextcloud": [{ - "title": "Nextcloud News", - "favicon": "https://nextcloud.com/wp-content/themes/next/assets/img/common/favicon-touch.png", - "url": "https://nextcloud.com/news/", - "feed": "https://nextcloud.com/blog/feed", - "description": "See what is going on in and around Nextcloud", - "votes": 1000 - }, - { - "title": "Nextcloud Podcast", - "favicon": "https://nextcloud.com/wp-content/themes/next/assets/img/common/favicon-touch.png", - "url": "https://nextcloud.com/podcast/", - "feed": "https://nextcloud.com/podcast-feed.rss", - "description": "Digital Sovereignty, self hosting, privacy and more", - "votes": 1000 - }], - "News": [{ - "title": "World Health Organization", - "favicon": "https://www.who.int/favicon.ico", - "url": "https://www.who.int/", - "feed": "https://www.who.int/rss-feeds/news-english.xml", - "description": "All news releases, notes for the media, statements issued by WHO", - "votes": 500 - }, - { - "title": "Wikinews", - "favicon": "https://en.wikinews.org/static/apple-touch/wikinews.png", - "url": "https://en.wikinews.org/", - "feed": "https://en.wikinews.org/w/index.php?title=Special:NewsFeed&feed=atom&categories=Published¬categories=No%20publish%7CArchived%7CAutoArchived%7Cdisputed&namespace=0&count=30&hourcount=124&ordermethod=categoryadd&stablepages=only", - "description": "Collaborative journalism news site by the Wikimedia Foundation", - "votes": 100 - }, - { - "title": "Privacy International", - "favicon": "https://privacyinternational.org/sites/default/files/fav/apple-icon-60x60.png", - "url": "https://privacyinternational.org/", - "feed": "https://privacyinternational.org/rss.xml", - "description": "News on the right to privacy", - "votes": 100 - }], - "Open knowledge": [{ - "title": "Wikipedia picture of the day", - "favicon": "https://www.wikipedia.org/static/apple-touch/wikipedia.png", - "url": "https://en.wikipedia.org/wiki/Wikipedia:Featured_pictures", - "feed": "https://en.wikipedia.org/w/api.php?action=featuredfeed&feed=potd&feedformat=atom", - "description": "Some of the finest images on Wikipedia", - "votes": 100 - }, - { - "title": "Wikipedia article of the day", - "favicon": "https://www.wikipedia.org/static/apple-touch/wikipedia.png", - "url": "https://en.wikipedia.org/", - "feed": "https://en.wikipedia.org/w/api.php?action=featuredfeed&feed=featured&feedformat=atom", - "description": "The best articles Wikipedia has to offer", - "votes": 100 - }, - { - "title": "Project Gutenberg", - "favicon": "https://www.gutenberg.org/gutenberg/favicon.ico", - "url": "https://gutenberg.org/", - "feed": "http://www.gutenberg.org/cache/epub/feeds/today.rss", - "description": "A library of over 60,000 free eBooks", - "votes": 100 - }, - { - "title": "LibriVox", - "favicon": "https://librivox.org/wp-content/themes/librivox/favicon.ico", - "url": "https://librivox.org/", - "feed": "https://librivox.org/rss/latest_releases", - "description": "Free public domain audiobooks", - "votes": 100 - }, - { - "title": "Public Domain Review", - "favicon": "https://publicdomainreview.org/favicon-96x96.png", - "url": "https://publicdomainreview.org/", - "feed": "https://publicdomainreview.org/rss.xml", - "description": "Curious and compelling works from the history of art, literature, and ideas", - "votes": 100 - }, - { - "title": "Public Library of Science", - "favicon": "https://plos.org/wp-content/themes/plos/favicon/apple-touch-icon.png", - "url": "https://plos.org/", - "feed": "https://journals.plos.org/plosone/feed/atom", - "description": "Primary research from any discipline within science and medicine", - "votes": 100 - }, - { - "title": "ccMixter", - "favicon": "http://ccmixter.org/mixter-files/images/mixter-default.gif", - "url": "http://ccmixter.org/", - "feed": "http://ccmixter.org/api/query?f=rss&tags=editorial_pick&sort=date&dir=DESC&limit=22", - "description": "Editor’s picks from the global music community", - "votes": 100 - }] + "Nextcloud": [ + { + "title": "Nextcloud News", + "favicon": "https://nextcloud.com/wp-content/themes/next/assets/img/common/favicon-touch.png", + "url": "https://nextcloud.com/news/", + "feed": "https://nextcloud.com/blog/feed", + "description": "See what is going on in and around Nextcloud", + "votes": 1000 + }, + { + "title": "Nextcloud Podcast", + "favicon": "https://nextcloud.com/wp-content/themes/next/assets/img/common/favicon-touch.png", + "url": "https://nextcloud.com/podcast/", + "feed": "https://nextcloud.com/podcast-feed.rss", + "description": "Digital Sovereignty, self hosting, privacy and more", + "votes": 1000 + } + ], + "News": [{ + + "title": "World Health Organization", + "favicon": "https://www.who.int/favicon.ico", + "url": "https://www.who.int/", + "feed": "https://www.who.int/rss-feeds/news-english.xml", + "description": "All news releases, notes for the media, statements issued by WHO", + "votes": 500 + }, + { + "title": "Wikinews", + "favicon": "https://en.wikinews.org/static/apple-touch/wikinews.png", + "url": "https://en.wikinews.org/", + "feed": "https://en.wikinews.org/w/index.php?title=Special:NewsFeed&feed=atom&categories=Published¬categories=No%20publish%7CArchived%7CAutoArchived%7Cdisputed&namespace=0&count=30&hourcount=124&ordermethod=categoryadd&stablepages=only", + "description": "Collaborative journalism news site by the Wikimedia Foundation", + "votes": 100 + }, + { + "title": "Privacy International", + "favicon": "https://privacyinternational.org/sites/default/files/fav/apple-icon-60x60.png", + "url": "https://privacyinternational.org/", + "feed": "https://privacyinternational.org/rss.xml", + "description": "News on the right to privacy", + "votes": 100 + } + ], + "Open knowledge": [ + { + "title": "Wikipedia picture of the day", + "favicon": "https://www.wikipedia.org/static/apple-touch/wikipedia.png", + "url": "https://en.wikipedia.org/wiki/Wikipedia:Featured_pictures", + "feed": "https://en.wikipedia.org/w/api.php?action=featuredfeed&feed=potd&feedformat=atom", + "description": "Some of the finest images on Wikipedia", + "votes": 100 + }, + { + "title": "Wikipedia article of the day", + "favicon": "https://www.wikipedia.org/static/apple-touch/wikipedia.png", + "url": "https://en.wikipedia.org/", + "feed": "https://en.wikipedia.org/w/api.php?action=featuredfeed&feed=featured&feedformat=atom", + "description": "The best articles Wikipedia has to offer", + "votes": 100 + }, + { + "title": "Project Gutenberg", + "favicon": "https://www.gutenberg.org/gutenberg/favicon.ico", + "url": "https://gutenberg.org/", + "feed": "http://www.gutenberg.org/cache/epub/feeds/today.rss", + "description": "A library of over 60,000 free eBooks", + "votes": 100 + }, + { + "title": "LibriVox", + "favicon": "https://librivox.org/wp-content/themes/librivox/favicon.ico", + "url": "https://librivox.org/", + "feed": "https://librivox.org/rss/latest_releases", + "description": "Free public domain audiobooks", + "votes": 100 + }, + { + "title": "Public Domain Review", + "favicon": "https://publicdomainreview.org/favicon-96x96.png", + "url": "https://publicdomainreview.org/", + "feed": "https://publicdomainreview.org/rss.xml", + "description": "Curious and compelling works from the history of art, literature, and ideas", + "votes": 100 + }, + { + "title": "Public Library of Science", + "favicon": "https://plos.org/wp-content/themes/plos/favicon/apple-touch-icon.png", + "url": "https://plos.org/", + "feed": "https://journals.plos.org/plosone/feed/atom", + "description": "Primary research from any discipline within science and medicine", + "votes": 100 + }, + { + "title": "ccMixter", + "favicon": "http://ccmixter.org/mixter-files/images/mixter-default.gif", + "url": "http://ccmixter.org/", + "feed": "http://ccmixter.org/api/query?f=rss&tags=editorial_pick&sort=date&dir=DESC&limit=22", + "description": "Editor’s picks from the global music community", + "votes": 100 + } + ] } + \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index a5b4034ad..ad80f18d5 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,10 +1,10 @@ diff --git a/src/components/AddFeed.vue b/src/components/AddFeed.vue index a07125d3a..9eded0159 100644 --- a/src/components/AddFeed.vue +++ b/src/components/AddFeed.vue @@ -1,45 +1,45 @@ diff --git a/src/components/Explore.vue b/src/components/Explore.vue index 11c370ce8..96e90fad1 100644 --- a/src/components/Explore.vue +++ b/src/components/Explore.vue @@ -1,33 +1,33 @@ diff --git a/src/main.js b/src/main.js index befe02f56..815396b79 100644 --- a/src/main.js +++ b/src/main.js @@ -23,110 +23,114 @@ const feedUrl = generateUrl('/apps/news/feeds') const folderUrl = generateUrl('/apps/news/folders') const routes = [ - { - name: 'explore', - path: '#explore', - component: Explore, - }, + { + name: 'explore', + path: '#explore', + component: Explore, + }, ] const router = new VueRouter({ - mode: 'history', - base: generateUrl('apps/news'), - routes, + mode: 'history', + base: generateUrl('apps/news'), + routes, }) const store = new Store({ - state: { - folders: [], - feeds: [], - }, - mutations: { - addFolders(state, folders) { - folders.forEach((it) => { - it.feedCount = 0 - state.folders.push(it) - }) - }, - addFeeds(state, feeds) { - feeds.forEach((it) => { - state.feeds.push(it) - const folder = state.folders.find( - (folder) => folder.id === it.folderId, - ) - if (folder) { - folder.feeds.push(it) - folder.feedCount += it.unreadCount - } - }) - }, - }, - actions: { - addFolder({ commit }, { folder }) { - axios - .post(folderUrl, { folderName: folder.name }) - .then((response) => - commit('addFolders', response.data.folders), - ) - }, - deleteFolder({ commit }, { folder }) { - /** + state: { + folders: [], + feeds: [], + }, + mutations: { + addFolders(state, folders) { + folders.forEach((it) => { + it.feedCount = 0 + state.folders.push(it) + }) + }, + addFeeds(state, feeds) { + feeds.forEach((it) => { + state.feeds.push(it) + const folder = state.folders.find( + (folder) => folder.id === it.folderId, + ) + if (folder) { + folder.feeds.push(it) + folder.feedCount += it.unreadCount + } + }) + }, + }, + actions: { + addFolder({ commit }, { folder }) { + axios + .post(folderUrl, { folderName: folder.name }) + .then((response) => + commit('addFolders', response.data.folders), + ) + }, + deleteFolder({ commit }, { folder }) { + /** this.getByFolderId(folderId).forEach(function (feed) { promises.push(self.reversiblyDelete(feed.id, false, true)); }); this.updateUnreadCache(); - */ - axios.delete(folderUrl + '/' + folder.id).then() - }, - loadFolder({ commit }) { - axios.get(folderUrl).then((response) => { - commit('addFolders', response.data.folders) - axios - .get(feedUrl) - .then((response) => - commit('addFeeds', response.data.feeds), - ) - }) - }, - addFeed({ commit }, { feedReq }) { - let url = feedReq.url.trim() - if (!url.startsWith('http')) { - url = 'https://' + url - } + */ + axios.delete(folderUrl + '/' + folder.id).then(() => { + commit('deleteFolder', folder.id) + }) + }, + loadFolder({ commit }) { + axios.get(folderUrl).then((response) => { + commit('addFolders', response.data.folders) + axios + .get(feedUrl) + .then((response) => + commit('addFeeds', response.data.feeds), + ) + }) + }, + addFeed({ commit }, { feedReq }) { + let url = feedReq.url.trim() + if (!url.startsWith('http')) { + url = 'https://' + url + } - /** + /** if (title !== undefined) { title = title.trim(); } - */ + */ - const feed = { - url, - folderId: feedReq.folder.id || 0, - title: null, - unreadCount: 0, - } + const feed = { + url, + folderId: feedReq.folder.id || 0, + title: null, + unreadCount: 0, + } - // this.add(feed); - // this.updateFolderCache(); + // this.add(feed); + // this.updateFolderCache(); - axios - .post(feedUrl, { - url: feed.url, - parentFolderId: feed.folderId, - title: null, - user: null, - password: null, - fullDiscover: feed.autoDiscover, - }) - .then() - }, - }, + axios + .post(feedUrl, { + url: feed.url, + parentFolderId: feed.folderId, + title: null, + user: null, + password: null, + fullDiscover: feed.autoDiscover, + }) + .then(() => { + commit('addFeed', feed) + }) + }, + }, }) export default new Vue({ - router, - store, - el: '#content', - render: (h) => h(App), + router, + store, + el: '#content', + render: (h) => h(App), }) diff --git a/stylelint.config.js b/stylelint.config.js index a1c15bebb..429fe944b 100644 --- a/stylelint.config.js +++ b/stylelint.config.js @@ -1,5 +1,5 @@ const stylelintConfig = require('@nextcloud/stylelint-config') -stylelintConfig.rules['indentation'] = 4; +stylelintConfig.rules.indentation = 4 module.exports = stylelintConfig diff --git a/webpack.js b/webpack.js index 73904ad79..4bdb0d02d 100644 --- a/webpack.js +++ b/webpack.js @@ -2,19 +2,19 @@ const webpackConfig = require('@nextcloud/webpack-vue-config') // Add TS Loader for processing typescript in vue templates webpackConfig.module.rules.push({ - test: /.ts$/, - exclude: [/node_modules/], - use: [ - { - loader: 'ts-loader', - options: { - transpileOnly: true, - appendTsSuffixTo: [ - '\\.vue$', - ], - }, - }, - ], + test: /.ts$/, + exclude: [/node_modules/], + use: [ + { + loader: 'ts-loader', + options: { + transpileOnly: true, + appendTsSuffixTo: [ + '\\.vue$', + ], + }, + }, + ], }) module.exports = webpackConfig From 7ad99102534e48789ccc811dba001dc78c1a2202 Mon Sep 17 00:00:00 2001 From: Devlin Junker Date: Thu, 30 Jun 2022 21:37:18 -0700 Subject: [PATCH 2/4] remove unecessary eslint rule Signed-off-by: Devlin Junker --- .eslintrc.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 3290cc73f..278afab86 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -16,7 +16,4 @@ module.exports = { '@nextcloud', ], ignorePatterns: ['*.d.ts'], - rules: { - 'node/no-unpublished-import': 'off', // necessary for vue-property-decorator (not published?) - }, } From b12e0954a92280f0af17a413cb03b66e096f5a01 Mon Sep 17 00:00:00 2001 From: Devlin Junker Date: Thu, 29 Sep 2022 19:23:28 -0700 Subject: [PATCH 3/4] revert feeds.en.json Signed-off-by: Devlin Junker --- lib/Explore/feeds/feeds.en.json | 199 +++++++++++++++----------------- 1 file changed, 96 insertions(+), 103 deletions(-) diff --git a/lib/Explore/feeds/feeds.en.json b/lib/Explore/feeds/feeds.en.json index e6a59c86f..d855b243c 100644 --- a/lib/Explore/feeds/feeds.en.json +++ b/lib/Explore/feeds/feeds.en.json @@ -1,105 +1,98 @@ { - "Nextcloud": [ - { - "title": "Nextcloud News", - "favicon": "https://nextcloud.com/wp-content/themes/next/assets/img/common/favicon-touch.png", - "url": "https://nextcloud.com/news/", - "feed": "https://nextcloud.com/blog/feed", - "description": "See what is going on in and around Nextcloud", - "votes": 1000 - }, - { - "title": "Nextcloud Podcast", - "favicon": "https://nextcloud.com/wp-content/themes/next/assets/img/common/favicon-touch.png", - "url": "https://nextcloud.com/podcast/", - "feed": "https://nextcloud.com/podcast-feed.rss", - "description": "Digital Sovereignty, self hosting, privacy and more", - "votes": 1000 - } - ], - "News": [{ - - "title": "World Health Organization", - "favicon": "https://www.who.int/favicon.ico", - "url": "https://www.who.int/", - "feed": "https://www.who.int/rss-feeds/news-english.xml", - "description": "All news releases, notes for the media, statements issued by WHO", - "votes": 500 - }, - { - "title": "Wikinews", - "favicon": "https://en.wikinews.org/static/apple-touch/wikinews.png", - "url": "https://en.wikinews.org/", - "feed": "https://en.wikinews.org/w/index.php?title=Special:NewsFeed&feed=atom&categories=Published¬categories=No%20publish%7CArchived%7CAutoArchived%7Cdisputed&namespace=0&count=30&hourcount=124&ordermethod=categoryadd&stablepages=only", - "description": "Collaborative journalism news site by the Wikimedia Foundation", - "votes": 100 - }, - { - "title": "Privacy International", - "favicon": "https://privacyinternational.org/sites/default/files/fav/apple-icon-60x60.png", - "url": "https://privacyinternational.org/", - "feed": "https://privacyinternational.org/rss.xml", - "description": "News on the right to privacy", - "votes": 100 - } - ], - "Open knowledge": [ - { - "title": "Wikipedia picture of the day", - "favicon": "https://www.wikipedia.org/static/apple-touch/wikipedia.png", - "url": "https://en.wikipedia.org/wiki/Wikipedia:Featured_pictures", - "feed": "https://en.wikipedia.org/w/api.php?action=featuredfeed&feed=potd&feedformat=atom", - "description": "Some of the finest images on Wikipedia", - "votes": 100 - }, - { - "title": "Wikipedia article of the day", - "favicon": "https://www.wikipedia.org/static/apple-touch/wikipedia.png", - "url": "https://en.wikipedia.org/", - "feed": "https://en.wikipedia.org/w/api.php?action=featuredfeed&feed=featured&feedformat=atom", - "description": "The best articles Wikipedia has to offer", - "votes": 100 - }, - { - "title": "Project Gutenberg", - "favicon": "https://www.gutenberg.org/gutenberg/favicon.ico", - "url": "https://gutenberg.org/", - "feed": "http://www.gutenberg.org/cache/epub/feeds/today.rss", - "description": "A library of over 60,000 free eBooks", - "votes": 100 - }, - { - "title": "LibriVox", - "favicon": "https://librivox.org/wp-content/themes/librivox/favicon.ico", - "url": "https://librivox.org/", - "feed": "https://librivox.org/rss/latest_releases", - "description": "Free public domain audiobooks", - "votes": 100 - }, - { - "title": "Public Domain Review", - "favicon": "https://publicdomainreview.org/favicon-96x96.png", - "url": "https://publicdomainreview.org/", - "feed": "https://publicdomainreview.org/rss.xml", - "description": "Curious and compelling works from the history of art, literature, and ideas", - "votes": 100 - }, - { - "title": "Public Library of Science", - "favicon": "https://plos.org/wp-content/themes/plos/favicon/apple-touch-icon.png", - "url": "https://plos.org/", - "feed": "https://journals.plos.org/plosone/feed/atom", - "description": "Primary research from any discipline within science and medicine", - "votes": 100 - }, - { - "title": "ccMixter", - "favicon": "http://ccmixter.org/mixter-files/images/mixter-default.gif", - "url": "http://ccmixter.org/", - "feed": "http://ccmixter.org/api/query?f=rss&tags=editorial_pick&sort=date&dir=DESC&limit=22", - "description": "Editor’s picks from the global music community", - "votes": 100 - } - ] + "Nextcloud": [{ + "title": "Nextcloud News", + "favicon": "https://nextcloud.com/wp-content/themes/next/assets/img/common/favicon-touch.png", + "url": "https://nextcloud.com/news/", + "feed": "https://nextcloud.com/blog/feed", + "description": "See what is going on in and around Nextcloud", + "votes": 1000 + }, + { + "title": "Nextcloud Podcast", + "favicon": "https://nextcloud.com/wp-content/themes/next/assets/img/common/favicon-touch.png", + "url": "https://nextcloud.com/podcast/", + "feed": "https://nextcloud.com/podcast-feed.rss", + "description": "Digital Sovereignty, self hosting, privacy and more", + "votes": 1000 + }], + "News": [{ + "title": "World Health Organization", + "favicon": "https://www.who.int/favicon.ico", + "url": "https://www.who.int/", + "feed": "https://www.who.int/rss-feeds/news-english.xml", + "description": "All news releases, notes for the media, statements issued by WHO", + "votes": 500 + }, + { + "title": "Wikinews", + "favicon": "https://en.wikinews.org/static/apple-touch/wikinews.png", + "url": "https://en.wikinews.org/", + "feed": "https://en.wikinews.org/w/index.php?title=Special:NewsFeed&feed=atom&categories=Published¬categories=No%20publish%7CArchived%7CAutoArchived%7Cdisputed&namespace=0&count=30&hourcount=124&ordermethod=categoryadd&stablepages=only", + "description": "Collaborative journalism news site by the Wikimedia Foundation", + "votes": 100 + }, + { + "title": "Privacy International", + "favicon": "https://privacyinternational.org/sites/default/files/fav/apple-icon-60x60.png", + "url": "https://privacyinternational.org/", + "feed": "https://privacyinternational.org/rss.xml", + "description": "News on the right to privacy", + "votes": 100 + }], + "Open knowledge": [{ + "title": "Wikipedia picture of the day", + "favicon": "https://www.wikipedia.org/static/apple-touch/wikipedia.png", + "url": "https://en.wikipedia.org/wiki/Wikipedia:Featured_pictures", + "feed": "https://en.wikipedia.org/w/api.php?action=featuredfeed&feed=potd&feedformat=atom", + "description": "Some of the finest images on Wikipedia", + "votes": 100 + }, + { + "title": "Wikipedia article of the day", + "favicon": "https://www.wikipedia.org/static/apple-touch/wikipedia.png", + "url": "https://en.wikipedia.org/", + "feed": "https://en.wikipedia.org/w/api.php?action=featuredfeed&feed=featured&feedformat=atom", + "description": "The best articles Wikipedia has to offer", + "votes": 100 + }, + { + "title": "Project Gutenberg", + "favicon": "https://www.gutenberg.org/gutenberg/favicon.ico", + "url": "https://gutenberg.org/", + "feed": "http://www.gutenberg.org/cache/epub/feeds/today.rss", + "description": "A library of over 60,000 free eBooks", + "votes": 100 + }, + { + "title": "LibriVox", + "favicon": "https://librivox.org/wp-content/themes/librivox/favicon.ico", + "url": "https://librivox.org/", + "feed": "https://librivox.org/rss/latest_releases", + "description": "Free public domain audiobooks", + "votes": 100 + }, + { + "title": "Public Domain Review", + "favicon": "https://publicdomainreview.org/favicon-96x96.png", + "url": "https://publicdomainreview.org/", + "feed": "https://publicdomainreview.org/rss.xml", + "description": "Curious and compelling works from the history of art, literature, and ideas", + "votes": 100 + }, + { + "title": "Public Library of Science", + "favicon": "https://plos.org/wp-content/themes/plos/favicon/apple-touch-icon.png", + "url": "https://plos.org/", + "feed": "https://journals.plos.org/plosone/feed/atom", + "description": "Primary research from any discipline within science and medicine", + "votes": 100 + }, + { + "title": "ccMixter", + "favicon": "http://ccmixter.org/mixter-files/images/mixter-default.gif", + "url": "http://ccmixter.org/", + "feed": "http://ccmixter.org/api/query?f=rss&tags=editorial_pick&sort=date&dir=DESC&limit=22", + "description": "Editor’s picks from the global music community", + "votes": 100 + }] } - \ No newline at end of file From e8ec80a785e5884ffdc61ed72f07bb68be9c4226 Mon Sep 17 00:00:00 2001 From: Devlin Junker Date: Sun, 2 Oct 2022 19:22:10 -0700 Subject: [PATCH 4/4] fix editor config and spaces inside of quotes Signed-off-by: Devlin Junker --- .editorconfig | 7 ++++++- src/components/AddFeed.vue | 33 +++++++++++++++------------------ 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/.editorconfig b/.editorconfig index df73b20ac..bac177253 100644 --- a/.editorconfig +++ b/.editorconfig @@ -5,11 +5,16 @@ trim_trailing_whitespace = true end_of_line = lf insert_final_newline = true -[*.{js,php,html,vue}] +[*.{php,html}] indent_style = space indent_size = 4 charset = utf-8 +[*.{js,ts,vue}] +indent_style = tab +indent_size = 4 +charset = utf-8 + [*.bats] indent_style = space indent_size = 2 diff --git a/src/components/AddFeed.vue b/src/components/AddFeed.vue index 9eded0159..3688d583c 100644 --- a/src/components/AddFeed.vue +++ b/src/components/AddFeed.vue @@ -9,9 +9,9 @@ :value="feed" ng-model="Navigation.feed.url" ng-class="{'ng-invalid': - !Navigation.addingFeed && - Navigation.feedUrlExists(Navigation.feed.url) - }" + !Navigation.addingFeed && + Navigation.feedUrlExists(Navigation.feed.url) + }" :placeholder="t('news', 'Web address')" name="address" pattern="[^\s]+" @@ -20,7 +20,7 @@

+ Navigation.feedUrlExists(Navigation.feed.url)"> {{ t("news", "Feed exists already!") }}

@@ -40,13 +40,11 @@ type="text" ng-model="Navigation.feed.newFolder" ng-class="{'ng-invalid': - !Navigation.addingFeed && - !Navigation.addingFeed && - Navigation.showNewFolder && - Navigation.folderNameExists( - Navigation.feed.newFolder - ) - }" + !Navigation.addingFeed && + !Navigation.addingFeed && + Navigation.showNewFolder && + Navigation.folderNameExists(Navigation.feed.newFolder) + }" :placeholder="t('news', 'Folder name')" name="folderName" style="width: 90%" @@ -54,7 +52,7 @@

+ Navigation.folderNameExists(Navigation.feed.newFolder)"> {{ t("news", "Folder exists already!") }}

@@ -92,12 +90,11 @@