Compare commits
No commits in common. "main" and "1.5.8" have entirely different histories.
@ -1,14 +1,8 @@
|
|||||||
/.idea/
|
*.iml
|
||||||
/*.iml
|
.idea
|
||||||
|
|
||||||
/vendor/
|
|
||||||
/vendor-bin/*/vendor/
|
|
||||||
|
|
||||||
/.php-cs-fixer.cache
|
/.php-cs-fixer.cache
|
||||||
/tests/.phpunit.cache
|
/.php_cs.cache
|
||||||
|
|
||||||
/node_modules/
|
|
||||||
/js/
|
|
||||||
/css/
|
|
||||||
|
|
||||||
/build/
|
/build/
|
||||||
|
/vendor/
|
||||||
|
js/
|
||||||
|
node_modules/
|
||||||
|
9
.eslintignore
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
*.iml
|
||||||
|
.idea
|
||||||
|
/.php-cs-fixer.cache
|
||||||
|
/.php_cs.cache
|
||||||
|
/build/
|
||||||
|
/vendor/
|
||||||
|
js/
|
||||||
|
node_modules/
|
||||||
|
l10n/
|
@ -1,15 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
extends: [
|
|
||||||
'@nextcloud',
|
|
||||||
'@vue/eslint-config-typescript/recommended',
|
|
||||||
'plugin:pinia/recommended',
|
|
||||||
'plugin:prettier/recommended',
|
|
||||||
],
|
|
||||||
parser: 'vue-eslint-parser',
|
|
||||||
rules: {
|
|
||||||
'jsdoc/require-jsdoc': 'off',
|
|
||||||
'vue/first-attribute-linebreak': 'off',
|
|
||||||
'sort-imports': 'error',
|
|
||||||
'vue/attributes-order': ['error', { alphabetical: true }],
|
|
||||||
},
|
|
||||||
}
|
|
9
.eslintrc.js
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
module.exports = {
|
||||||
|
extends: [
|
||||||
|
'@nextcloud',
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
'sort-imports': 'error',
|
||||||
|
'vue/attributes-order': ['error', { alphabetical: true }],
|
||||||
|
},
|
||||||
|
}
|
1
.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/js/* binary
|
@ -14,7 +14,7 @@ jobs:
|
|||||||
|
|
||||||
php:
|
php:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: nextcloud:30
|
container: nextcloud:28
|
||||||
steps:
|
steps:
|
||||||
- run: apt-get update
|
- run: apt-get update
|
||||||
- run: apt-get install -y git nodejs
|
- run: apt-get install -y git nodejs
|
||||||
@ -24,15 +24,21 @@ jobs:
|
|||||||
- run: composer install
|
- run: composer install
|
||||||
- run: composer run lint
|
- run: composer run lint
|
||||||
- run: composer run cs:check
|
- run: composer run cs:check
|
||||||
- run: composer run psalm
|
- run: composer run psalm:check
|
||||||
|
|
||||||
nodejs:
|
nodejs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- uses: skjnldsv/read-package-engines-version-actions@v3
|
||||||
|
id: versions
|
||||||
|
with:
|
||||||
|
fallbackNode: '^20.0.0'
|
||||||
|
fallbackNpm: '^9.0.0'
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "^20"
|
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
||||||
|
- run: npm i -g npm@${{ steps.versions.outputs.npmVersion }}
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run lint
|
- run: npm run lint
|
||||||
- run: npm run stylelint
|
- run: npm run stylelint
|
||||||
@ -41,16 +47,22 @@ jobs:
|
|||||||
release:
|
release:
|
||||||
if: gitea.ref_type == 'tag'
|
if: gitea.ref_type == 'tag'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: nextcloud:30
|
container: nextcloud:28
|
||||||
steps:
|
steps:
|
||||||
- run: apt-get update
|
- run: apt-get update
|
||||||
- run: apt-get install -y git nodejs
|
- run: apt-get install -y git nodejs
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- run: curl -sSLo /usr/local/bin/composer https://getcomposer.org/download/latest-stable/composer.phar
|
- run: curl -sSLo /usr/local/bin/composer https://getcomposer.org/download/latest-stable/composer.phar
|
||||||
- run: chmod +x /usr/local/bin/composer
|
- run: chmod +x /usr/local/bin/composer
|
||||||
|
- uses: skjnldsv/read-package-engines-version-actions@v3
|
||||||
|
id: versions
|
||||||
|
with:
|
||||||
|
fallbackNode: '^20.0.0'
|
||||||
|
fallbackNpm: '^9.0.0'
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "^20"
|
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
||||||
|
- run: npm i -g npm@${{ steps.versions.outputs.npmVersion }}
|
||||||
- run: make dist
|
- run: make dist
|
||||||
- uses: akkuman/gitea-release-action@v1
|
- uses: akkuman/gitea-release-action@v1
|
||||||
with:
|
with:
|
||||||
|
18
.gitignore
vendored
@ -1,14 +1,8 @@
|
|||||||
/.idea/
|
*.iml
|
||||||
/*.iml
|
.idea
|
||||||
|
|
||||||
/vendor/
|
|
||||||
/vendor-bin/*/vendor/
|
|
||||||
|
|
||||||
/.php-cs-fixer.cache
|
/.php-cs-fixer.cache
|
||||||
/tests/.phpunit.cache
|
/.php_cs.cache
|
||||||
|
|
||||||
/node_modules/
|
|
||||||
/js/
|
|
||||||
/css/
|
|
||||||
|
|
||||||
/build/
|
/build/
|
||||||
|
/vendor/
|
||||||
|
js/
|
||||||
|
node_modules/
|
||||||
|
18
.l10nignore
@ -1,14 +1,8 @@
|
|||||||
.idea/
|
|
||||||
*.iml
|
*.iml
|
||||||
|
.idea
|
||||||
vendor/
|
/.php-cs-fixer.cache
|
||||||
vendor-bin/*/vendor/
|
/.php_cs.cache
|
||||||
|
|
||||||
.php-cs-fixer.cache
|
|
||||||
tests/.phpunit.cache
|
|
||||||
|
|
||||||
node_modules/
|
|
||||||
js/
|
|
||||||
css/
|
|
||||||
|
|
||||||
build/
|
build/
|
||||||
|
vendor/
|
||||||
|
js/
|
||||||
|
node_modules/
|
||||||
|
@ -15,6 +15,7 @@ class MyConfig extends Config
|
|||||||
$rules['curly_braces_position']['classes_opening_brace'] = 'next_line_unless_newline_at_signature_end';
|
$rules['curly_braces_position']['classes_opening_brace'] = 'next_line_unless_newline_at_signature_end';
|
||||||
$rules['phpdoc_separation'] = false;
|
$rules['phpdoc_separation'] = false;
|
||||||
$rules['phpdoc_to_comment'] = false;
|
$rules['phpdoc_to_comment'] = false;
|
||||||
|
$rules['single_line_comment_style'] = false;
|
||||||
return $rules;
|
return $rules;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -22,11 +23,10 @@ class MyConfig extends Config
|
|||||||
$config = new MyConfig();
|
$config = new MyConfig();
|
||||||
$config
|
$config
|
||||||
->getFinder()
|
->getFinder()
|
||||||
|
->ignoreVCSIgnored(true)
|
||||||
->notPath('build')
|
->notPath('build')
|
||||||
->notPath('l10n')
|
->notPath('l10n')
|
||||||
->notPath('node_modules')
|
|
||||||
->notPath('src')
|
->notPath('src')
|
||||||
->notPath('vendor')
|
->notPath('vendor')
|
||||||
->in(__DIR__);
|
->in(__DIR__);
|
||||||
|
|
||||||
return $config;
|
return $config;
|
||||||
|
199
CHANGELOG.md
@ -1,189 +1,4 @@
|
|||||||
## 3.4.0 - Good Night - 2024-11-09
|
## 1.5.8 - 2024-02-11
|
||||||
|
|
||||||
### Added
|
|
||||||
- ♿ Improve accessibility by adding titles when missing
|
|
||||||
- ✨ Playback speed and volume setting doesn't stick
|
|
||||||
[#185](https://git.crystalyx.net/Xefir/repod/issues/185) reported by @SteveDinn
|
|
||||||
- ✨ Skip back or forward
|
|
||||||
[#159](https://git.crystalyx.net/Xefir/repod/issues/159) reported by @moonlike8812
|
|
||||||
- ✨ Sleep timer
|
|
||||||
[#119](https://git.crystalyx.net/Xefir/repod/issues/119) reported by @Markusphi and @OiledAmoeba
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- 💄 Add padding around favorites on mobile
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- 🔒 Increase security when Nextcloud is in debug mode
|
|
||||||
|
|
||||||
## 3.3.2 - What a Nightmare - 2024-10-24
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- 🚑 Revert [#178](https://git.crystalyx.net/Xefir/repod/issues/178) not working on big subscriptions lists
|
|
||||||
[#182](https://git.crystalyx.net/Xefir/repod/issues/182) reported by @SteveDinn
|
|
||||||
|
|
||||||
## 3.3.1 - Breaking the Loop - 2024-10-24
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- ⚡ Speed up the loading time of subscriptions
|
|
||||||
[#178](https://git.crystalyx.net/Xefir/repod/issues/178) reported by @MikeAndrews
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- 🐛 Prevent Firefox for going nuts when having Plasma Integration addon installed
|
|
||||||
[#164](https://git.crystalyx.net/Xefir/repod/issues/164) reported by @cichy1173, @Share1440 and @mark.collins
|
|
||||||
|
|
||||||
## 3.3.0 - Into The Jet Lag - 2024-10-18
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- 🧑💻 CSS isn't mixed in the main JS file anymore
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- 🐛 App won't load on Firefox 115
|
|
||||||
[#158](https://git.crystalyx.net/Xefir/repod/issues/158) reported by @Jaunty and @mark.collins
|
|
||||||
- 🔇 Volume slider didn't work properly
|
|
||||||
|
|
||||||
### Deprecated
|
|
||||||
- 💣 Require Nextcloud 29 or more
|
|
||||||
|
|
||||||
## 3.2.0 - Typing fast - 2024-09-15
|
|
||||||
|
|
||||||
### Added
|
|
||||||
- 📝 Add Cardo to list of compatible clients
|
|
||||||
[#176](https://github.com/thrillfall/nextcloud-gpodder/pull/176) reported by @n0vella
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- 🧑💻 Switch entiere project to TypeScript
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- 💄 Missing icon on home when aren't any favorites
|
|
||||||
- 💄 Tweaks spacing in several spaces on Home and banners
|
|
||||||
- 💩 Leverage the available space between the episode title and the play button (but hacky way for now)
|
|
||||||
[#59](https://git.crystalyx.net/Xefir/repod/issues/59#issuecomment-6246) reported by @W_LL_M
|
|
||||||
|
|
||||||
## 3.1.0 - Above the stars - 2024-09-02
|
|
||||||
|
|
||||||
### Added
|
|
||||||
- ⭐ You can now add favorites subscriptions !
|
|
||||||
It will show's up on the homepage instead of the recommendations witch appear only when you add a new subscription.
|
|
||||||
[#59](https://git.crystalyx.net/Xefir/repod/issues/59) suggested by @W_LL_M, @Jaunty and @Satalink
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- 💥 Use html5 routing instead of hashes. All the URLs has changed removing the `#/` part.
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- 🐛 Regression on 3.0 that prevent seeking player to episode last listened position
|
|
||||||
[#136](https://git.crystalyx.net/Xefir/repod/issues/136) reported by @randomuser1967
|
|
||||||
- ⚡ Improve the detection off mis-installed or mis-enabled gpodder app
|
|
||||||
|
|
||||||
## 3.0.0 - What a vue - 2024-08-17
|
|
||||||
|
|
||||||
### Added
|
|
||||||
- 🌐 Add german translation
|
|
||||||
Thanks to @OiledAmoeba [#120](https://git.crystalyx.net/Xefir/repod/issues/120)
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- 🎉 Migrate to Vue 3
|
|
||||||
- 🔖 Support Nextcloud 30
|
|
||||||
- 🏗️ Switch from Vuex to Pinia
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- 💄 Use iTunes image first for episode if available
|
|
||||||
- 💄 Displaying styles and proper HTML on episode's modal descriptions
|
|
||||||
|
|
||||||
### Removed
|
|
||||||
- 🗑️ Temporary replacing @nextcloud/dialogs to toastyjs
|
|
||||||
|
|
||||||
## 2.3.3 - The Cake is a Lie - 2024-06-14
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- ⬆️ Update @nextcloud/dialogs to 5.3.2
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- 🐛 App crashed when no cache system available
|
|
||||||
[#107](https://git.crystalyx.net/Xefir/repod/issues/107) reported by @skvaller and @PhilTraere
|
|
||||||
|
|
||||||
## 2.3.2 - Young Youth - 2024-05-31
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- 🐛 New subscribe button on search not disapearing if subscribed
|
|
||||||
- ♿ Missing accessibility label on this button as well
|
|
||||||
|
|
||||||
## 2.3.1 - Powerwash the Universe - 2024-05-29
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- ⚡ Reduce app size by not shipping sourcemap
|
|
||||||
|
|
||||||
## 2.3.0 - Star Align - 2024-05-29
|
|
||||||
|
|
||||||
### Added
|
|
||||||
- ➕ Ability to subscribe to podcast from search list
|
|
||||||
[#105](https://git.crystalyx.net/Xefir/repod/issues/105) suggested by @crystalyz
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- 🔖 Full support for Nextcloud 29
|
|
||||||
- ⬆️ Update @nextcloud/vue to 8.12.0
|
|
||||||
- 📄 Use only AGPL licence
|
|
||||||
- ♻️ Refacto based on the new app template from Nextcloud devs
|
|
||||||
|
|
||||||
### Removed
|
|
||||||
- 💀 Drop support for Nextcloud 26
|
|
||||||
- ⚰️ Drop support for PHP 8.0
|
|
||||||
- 🌐 Removed babel
|
|
||||||
|
|
||||||
## 2.2.1 - Shami was here - 2024-05-18
|
|
||||||
|
|
||||||
### Removed
|
|
||||||
- ♻️ Rollback: Hide unreadable episodes because of insecure sources
|
|
||||||
|
|
||||||
## 2.2.0 - Moving in and out - 2024-05-18
|
|
||||||
|
|
||||||
### Added
|
|
||||||
- 🚨 Linting the code with ESLint
|
|
||||||
- 🎨 Prettierify the code
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- ⬆️ Update all dependancies
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- 🔓 Hide unreadable episodes because of insecure sources
|
|
||||||
|
|
||||||
## 2.1.0 - Pocket Gundams - 2024-03-16
|
|
||||||
|
|
||||||
### Added
|
|
||||||
- 🔍 Add CTA for rating the app on the store
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- ⬆️ Update @nextcloud/dialogs to 5.2.0
|
|
||||||
- ⬆️ Update @nextcloud/vue to 8.11.0
|
|
||||||
- 🔖 Set compatibility with Nextcloud 29
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- 🔒 App wasn't working for non admin users
|
|
||||||
[#76](https://git.crystalyx.net/Xefir/repod/issues/76) reported by @devasservice
|
|
||||||
|
|
||||||
## 2.0.0 - Taking Actions - 2024-03-05
|
|
||||||
|
|
||||||
### Added
|
|
||||||
- 🍪 Saving filters preference
|
|
||||||
[#66](https://git.crystalyx.net/Xefir/repod/issues/66) suggested by @jeef
|
|
||||||
- 📋 Add several options on each episode :
|
|
||||||
- Mark as read
|
|
||||||
- Open the webpage of the episode
|
|
||||||
- Download the episode
|
|
||||||
- ↪️ Any actions will be reflected on the episode's list
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- ⬆️ Update @nextcloud/vue to 8.8.1
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- ❤️🔥 Better handling ended episodes
|
|
||||||
|
|
||||||
## 1.5.9 - Just According to Keikaku - 2024-02-21
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- 🧑💻 Change some endpoints to match gPodder.net "specifications"
|
|
||||||
- ⬆️ Update @nextcloud/vue to 8.7.0
|
|
||||||
|
|
||||||
## 1.5.8 - Goblet of Eonothem - 2024-02-11
|
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Fyyd API sometime send empty feeds, ignoring them
|
- Fyyd API sometime send empty feeds, ignoring them
|
||||||
@ -201,19 +16,19 @@ Thanks to @OiledAmoeba [#120](https://git.crystalyx.net/Xefir/repod/issues/120)
|
|||||||
### Changed
|
### Changed
|
||||||
- Update @nextcloud/vue to v8.6.2
|
- Update @nextcloud/vue to v8.6.2
|
||||||
|
|
||||||
## 1.5.5 - Hide and seek - 2024-02-04
|
## 1.5.5 - 2024-02-04
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Can't open podcast details if cache missing or misconfigured
|
- Can't open podcast details if cache missing or misconfigured
|
||||||
[#58](https://git.crystalyx.net/Xefir/repod/issues/58) reported by @raxventus
|
[#58](https://git.crystalyx.net/Xefir/repod/issues/58) reported by @raxventus
|
||||||
|
|
||||||
## 1.5.4 - In search of the truth - 2024-02-03
|
## 1.5.4 - 2024-02-03
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Nextcloud search engine didn't work on Nextcloud 26 and 27
|
- Nextcloud search engine didn't work on Nextcloud 26 and 27
|
||||||
[#57](https://git.crystalyx.net/Xefir/repod/issues/57) reported by @JonOfUs
|
[#57](https://git.crystalyx.net/Xefir/repod/issues/57) reported by @JonOfUs
|
||||||
|
|
||||||
## 1.5.3 - The date where it all ends - 2024-02-01
|
## 1.5.3 - 2024-02-01
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Update @nextcloud/vue to v8.6.1
|
- Update @nextcloud/vue to v8.6.1
|
||||||
@ -221,7 +36,7 @@ Thanks to @OiledAmoeba [#120](https://git.crystalyx.net/Xefir/repod/issues/120)
|
|||||||
### Fixed
|
### Fixed
|
||||||
- Fix episode listing crashing if an invalid publication date is present in the RSS
|
- Fix episode listing crashing if an invalid publication date is present in the RSS
|
||||||
|
|
||||||
## 1.5.2 - A little to the top - 2024-02-01
|
## 1.5.2 - 2024-02-01
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Update @nextcloud/router to v3.0.0
|
- Update @nextcloud/router to v3.0.0
|
||||||
@ -229,7 +44,7 @@ Thanks to @OiledAmoeba [#120](https://git.crystalyx.net/Xefir/repod/issues/120)
|
|||||||
### Fixed
|
### Fixed
|
||||||
- Fix player alignment off by a couple of pixels
|
- Fix player alignment off by a couple of pixels
|
||||||
|
|
||||||
## 1.5.1 - Play on the PlayHead - 2024-01-30
|
## 1.5.1 - 2024-01-30
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Update @nextcloud/vue to v8.6.0
|
- Update @nextcloud/vue to v8.6.0
|
||||||
@ -239,7 +54,7 @@ Thanks to @OiledAmoeba [#120](https://git.crystalyx.net/Xefir/repod/issues/120)
|
|||||||
### Fixed
|
### Fixed
|
||||||
- Force the placement of the filter settings to the top
|
- Force the placement of the filter settings to the top
|
||||||
|
|
||||||
## 1.5.0 - Featuring the filtering - 2024-01-30
|
## 1.5.0 - 2024-01-30
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Filtering options for each podcast section
|
- Filtering options for each podcast section
|
||||||
|
12
Dockerfile
@ -1,10 +1,10 @@
|
|||||||
FROM nextcloud:30
|
FROM nextcloud:28
|
||||||
|
|
||||||
ENV NEXTCLOUD_UPDATE=1
|
ENV NEXTCLOUD_UPDATE 1
|
||||||
ENV NEXTCLOUD_ADMIN_USER=repod
|
ENV NEXTCLOUD_ADMIN_USER repod
|
||||||
ENV NEXTCLOUD_ADMIN_PASSWORD=repod
|
ENV NEXTCLOUD_ADMIN_PASSWORD repod
|
||||||
ENV NEXTCLOUD_INIT_HTACCESS=1
|
ENV NEXTCLOUD_INIT_HTACCESS 1
|
||||||
ENV SQLITE_DATABASE=repod
|
ENV SQLITE_DATABASE repod
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y nodejs npm sqlite3 && \
|
apt-get install -y nodejs npm sqlite3 && \
|
||||||
|
661
LICENSE
@ -1,661 +0,0 @@
|
|||||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
|
||||||
Version 3, 19 November 2007
|
|
||||||
|
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The GNU Affero General Public License is a free, copyleft license for
|
|
||||||
software and other kinds of works, specifically designed to ensure
|
|
||||||
cooperation with the community in the case of network server software.
|
|
||||||
|
|
||||||
The licenses for most software and other practical works are designed
|
|
||||||
to take away your freedom to share and change the works. By contrast,
|
|
||||||
our General Public Licenses are intended to guarantee your freedom to
|
|
||||||
share and change all versions of a program--to make sure it remains free
|
|
||||||
software for all its users.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
them if you wish), that you receive source code or can get it if you
|
|
||||||
want it, that you can change the software or use pieces of it in new
|
|
||||||
free programs, and that you know you can do these things.
|
|
||||||
|
|
||||||
Developers that use our General Public Licenses protect your rights
|
|
||||||
with two steps: (1) assert copyright on the software, and (2) offer
|
|
||||||
you this License which gives you legal permission to copy, distribute
|
|
||||||
and/or modify the software.
|
|
||||||
|
|
||||||
A secondary benefit of defending all users' freedom is that
|
|
||||||
improvements made in alternate versions of the program, if they
|
|
||||||
receive widespread use, become available for other developers to
|
|
||||||
incorporate. Many developers of free software are heartened and
|
|
||||||
encouraged by the resulting cooperation. However, in the case of
|
|
||||||
software used on network servers, this result may fail to come about.
|
|
||||||
The GNU General Public License permits making a modified version and
|
|
||||||
letting the public access it on a server without ever releasing its
|
|
||||||
source code to the public.
|
|
||||||
|
|
||||||
The GNU Affero General Public License is designed specifically to
|
|
||||||
ensure that, in such cases, the modified source code becomes available
|
|
||||||
to the community. It requires the operator of a network server to
|
|
||||||
provide the source code of the modified version running there to the
|
|
||||||
users of that server. Therefore, public use of a modified version, on
|
|
||||||
a publicly accessible server, gives the public access to the source
|
|
||||||
code of the modified version.
|
|
||||||
|
|
||||||
An older license, called the Affero General Public License and
|
|
||||||
published by Affero, was designed to accomplish similar goals. This is
|
|
||||||
a different license, not a version of the Affero GPL, but Affero has
|
|
||||||
released a new version of the Affero GPL which permits relicensing under
|
|
||||||
this license.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
0. Definitions.
|
|
||||||
|
|
||||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
|
||||||
|
|
||||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
|
||||||
works, such as semiconductor masks.
|
|
||||||
|
|
||||||
"The Program" refers to any copyrightable work licensed under this
|
|
||||||
License. Each licensee is addressed as "you". "Licensees" and
|
|
||||||
"recipients" may be individuals or organizations.
|
|
||||||
|
|
||||||
To "modify" a work means to copy from or adapt all or part of the work
|
|
||||||
in a fashion requiring copyright permission, other than the making of an
|
|
||||||
exact copy. The resulting work is called a "modified version" of the
|
|
||||||
earlier work or a work "based on" the earlier work.
|
|
||||||
|
|
||||||
A "covered work" means either the unmodified Program or a work based
|
|
||||||
on the Program.
|
|
||||||
|
|
||||||
To "propagate" a work means to do anything with it that, without
|
|
||||||
permission, would make you directly or secondarily liable for
|
|
||||||
infringement under applicable copyright law, except executing it on a
|
|
||||||
computer or modifying a private copy. Propagation includes copying,
|
|
||||||
distribution (with or without modification), making available to the
|
|
||||||
public, and in some countries other activities as well.
|
|
||||||
|
|
||||||
To "convey" a work means any kind of propagation that enables other
|
|
||||||
parties to make or receive copies. Mere interaction with a user through
|
|
||||||
a computer network, with no transfer of a copy, is not conveying.
|
|
||||||
|
|
||||||
An interactive user interface displays "Appropriate Legal Notices"
|
|
||||||
to the extent that it includes a convenient and prominently visible
|
|
||||||
feature that (1) displays an appropriate copyright notice, and (2)
|
|
||||||
tells the user that there is no warranty for the work (except to the
|
|
||||||
extent that warranties are provided), that licensees may convey the
|
|
||||||
work under this License, and how to view a copy of this License. If
|
|
||||||
the interface presents a list of user commands or options, such as a
|
|
||||||
menu, a prominent item in the list meets this criterion.
|
|
||||||
|
|
||||||
1. Source Code.
|
|
||||||
|
|
||||||
The "source code" for a work means the preferred form of the work
|
|
||||||
for making modifications to it. "Object code" means any non-source
|
|
||||||
form of a work.
|
|
||||||
|
|
||||||
A "Standard Interface" means an interface that either is an official
|
|
||||||
standard defined by a recognized standards body, or, in the case of
|
|
||||||
interfaces specified for a particular programming language, one that
|
|
||||||
is widely used among developers working in that language.
|
|
||||||
|
|
||||||
The "System Libraries" of an executable work include anything, other
|
|
||||||
than the work as a whole, that (a) is included in the normal form of
|
|
||||||
packaging a Major Component, but which is not part of that Major
|
|
||||||
Component, and (b) serves only to enable use of the work with that
|
|
||||||
Major Component, or to implement a Standard Interface for which an
|
|
||||||
implementation is available to the public in source code form. A
|
|
||||||
"Major Component", in this context, means a major essential component
|
|
||||||
(kernel, window system, and so on) of the specific operating system
|
|
||||||
(if any) on which the executable work runs, or a compiler used to
|
|
||||||
produce the work, or an object code interpreter used to run it.
|
|
||||||
|
|
||||||
The "Corresponding Source" for a work in object code form means all
|
|
||||||
the source code needed to generate, install, and (for an executable
|
|
||||||
work) run the object code and to modify the work, including scripts to
|
|
||||||
control those activities. However, it does not include the work's
|
|
||||||
System Libraries, or general-purpose tools or generally available free
|
|
||||||
programs which are used unmodified in performing those activities but
|
|
||||||
which are not part of the work. For example, Corresponding Source
|
|
||||||
includes interface definition files associated with source files for
|
|
||||||
the work, and the source code for shared libraries and dynamically
|
|
||||||
linked subprograms that the work is specifically designed to require,
|
|
||||||
such as by intimate data communication or control flow between those
|
|
||||||
subprograms and other parts of the work.
|
|
||||||
|
|
||||||
The Corresponding Source need not include anything that users
|
|
||||||
can regenerate automatically from other parts of the Corresponding
|
|
||||||
Source.
|
|
||||||
|
|
||||||
The Corresponding Source for a work in source code form is that
|
|
||||||
same work.
|
|
||||||
|
|
||||||
2. Basic Permissions.
|
|
||||||
|
|
||||||
All rights granted under this License are granted for the term of
|
|
||||||
copyright on the Program, and are irrevocable provided the stated
|
|
||||||
conditions are met. This License explicitly affirms your unlimited
|
|
||||||
permission to run the unmodified Program. The output from running a
|
|
||||||
covered work is covered by this License only if the output, given its
|
|
||||||
content, constitutes a covered work. This License acknowledges your
|
|
||||||
rights of fair use or other equivalent, as provided by copyright law.
|
|
||||||
|
|
||||||
You may make, run and propagate covered works that you do not
|
|
||||||
convey, without conditions so long as your license otherwise remains
|
|
||||||
in force. You may convey covered works to others for the sole purpose
|
|
||||||
of having them make modifications exclusively for you, or provide you
|
|
||||||
with facilities for running those works, provided that you comply with
|
|
||||||
the terms of this License in conveying all material for which you do
|
|
||||||
not control copyright. Those thus making or running the covered works
|
|
||||||
for you must do so exclusively on your behalf, under your direction
|
|
||||||
and control, on terms that prohibit them from making any copies of
|
|
||||||
your copyrighted material outside their relationship with you.
|
|
||||||
|
|
||||||
Conveying under any other circumstances is permitted solely under
|
|
||||||
the conditions stated below. Sublicensing is not allowed; section 10
|
|
||||||
makes it unnecessary.
|
|
||||||
|
|
||||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
|
||||||
|
|
||||||
No covered work shall be deemed part of an effective technological
|
|
||||||
measure under any applicable law fulfilling obligations under article
|
|
||||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
|
||||||
similar laws prohibiting or restricting circumvention of such
|
|
||||||
measures.
|
|
||||||
|
|
||||||
When you convey a covered work, you waive any legal power to forbid
|
|
||||||
circumvention of technological measures to the extent such circumvention
|
|
||||||
is effected by exercising rights under this License with respect to
|
|
||||||
the covered work, and you disclaim any intention to limit operation or
|
|
||||||
modification of the work as a means of enforcing, against the work's
|
|
||||||
users, your or third parties' legal rights to forbid circumvention of
|
|
||||||
technological measures.
|
|
||||||
|
|
||||||
4. Conveying Verbatim Copies.
|
|
||||||
|
|
||||||
You may convey verbatim copies of the Program's source code as you
|
|
||||||
receive it, in any medium, provided that you conspicuously and
|
|
||||||
appropriately publish on each copy an appropriate copyright notice;
|
|
||||||
keep intact all notices stating that this License and any
|
|
||||||
non-permissive terms added in accord with section 7 apply to the code;
|
|
||||||
keep intact all notices of the absence of any warranty; and give all
|
|
||||||
recipients a copy of this License along with the Program.
|
|
||||||
|
|
||||||
You may charge any price or no price for each copy that you convey,
|
|
||||||
and you may offer support or warranty protection for a fee.
|
|
||||||
|
|
||||||
5. Conveying Modified Source Versions.
|
|
||||||
|
|
||||||
You may convey a work based on the Program, or the modifications to
|
|
||||||
produce it from the Program, in the form of source code under the
|
|
||||||
terms of section 4, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) The work must carry prominent notices stating that you modified
|
|
||||||
it, and giving a relevant date.
|
|
||||||
|
|
||||||
b) The work must carry prominent notices stating that it is
|
|
||||||
released under this License and any conditions added under section
|
|
||||||
7. This requirement modifies the requirement in section 4 to
|
|
||||||
"keep intact all notices".
|
|
||||||
|
|
||||||
c) You must license the entire work, as a whole, under this
|
|
||||||
License to anyone who comes into possession of a copy. This
|
|
||||||
License will therefore apply, along with any applicable section 7
|
|
||||||
additional terms, to the whole of the work, and all its parts,
|
|
||||||
regardless of how they are packaged. This License gives no
|
|
||||||
permission to license the work in any other way, but it does not
|
|
||||||
invalidate such permission if you have separately received it.
|
|
||||||
|
|
||||||
d) If the work has interactive user interfaces, each must display
|
|
||||||
Appropriate Legal Notices; however, if the Program has interactive
|
|
||||||
interfaces that do not display Appropriate Legal Notices, your
|
|
||||||
work need not make them do so.
|
|
||||||
|
|
||||||
A compilation of a covered work with other separate and independent
|
|
||||||
works, which are not by their nature extensions of the covered work,
|
|
||||||
and which are not combined with it such as to form a larger program,
|
|
||||||
in or on a volume of a storage or distribution medium, is called an
|
|
||||||
"aggregate" if the compilation and its resulting copyright are not
|
|
||||||
used to limit the access or legal rights of the compilation's users
|
|
||||||
beyond what the individual works permit. Inclusion of a covered work
|
|
||||||
in an aggregate does not cause this License to apply to the other
|
|
||||||
parts of the aggregate.
|
|
||||||
|
|
||||||
6. Conveying Non-Source Forms.
|
|
||||||
|
|
||||||
You may convey a covered work in object code form under the terms
|
|
||||||
of sections 4 and 5, provided that you also convey the
|
|
||||||
machine-readable Corresponding Source under the terms of this License,
|
|
||||||
in one of these ways:
|
|
||||||
|
|
||||||
a) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by the
|
|
||||||
Corresponding Source fixed on a durable physical medium
|
|
||||||
customarily used for software interchange.
|
|
||||||
|
|
||||||
b) Convey the object code in, or embodied in, a physical product
|
|
||||||
(including a physical distribution medium), accompanied by a
|
|
||||||
written offer, valid for at least three years and valid for as
|
|
||||||
long as you offer spare parts or customer support for that product
|
|
||||||
model, to give anyone who possesses the object code either (1) a
|
|
||||||
copy of the Corresponding Source for all the software in the
|
|
||||||
product that is covered by this License, on a durable physical
|
|
||||||
medium customarily used for software interchange, for a price no
|
|
||||||
more than your reasonable cost of physically performing this
|
|
||||||
conveying of source, or (2) access to copy the
|
|
||||||
Corresponding Source from a network server at no charge.
|
|
||||||
|
|
||||||
c) Convey individual copies of the object code with a copy of the
|
|
||||||
written offer to provide the Corresponding Source. This
|
|
||||||
alternative is allowed only occasionally and noncommercially, and
|
|
||||||
only if you received the object code with such an offer, in accord
|
|
||||||
with subsection 6b.
|
|
||||||
|
|
||||||
d) Convey the object code by offering access from a designated
|
|
||||||
place (gratis or for a charge), and offer equivalent access to the
|
|
||||||
Corresponding Source in the same way through the same place at no
|
|
||||||
further charge. You need not require recipients to copy the
|
|
||||||
Corresponding Source along with the object code. If the place to
|
|
||||||
copy the object code is a network server, the Corresponding Source
|
|
||||||
may be on a different server (operated by you or a third party)
|
|
||||||
that supports equivalent copying facilities, provided you maintain
|
|
||||||
clear directions next to the object code saying where to find the
|
|
||||||
Corresponding Source. Regardless of what server hosts the
|
|
||||||
Corresponding Source, you remain obligated to ensure that it is
|
|
||||||
available for as long as needed to satisfy these requirements.
|
|
||||||
|
|
||||||
e) Convey the object code using peer-to-peer transmission, provided
|
|
||||||
you inform other peers where the object code and Corresponding
|
|
||||||
Source of the work are being offered to the general public at no
|
|
||||||
charge under subsection 6d.
|
|
||||||
|
|
||||||
A separable portion of the object code, whose source code is excluded
|
|
||||||
from the Corresponding Source as a System Library, need not be
|
|
||||||
included in conveying the object code work.
|
|
||||||
|
|
||||||
A "User Product" is either (1) a "consumer product", which means any
|
|
||||||
tangible personal property which is normally used for personal, family,
|
|
||||||
or household purposes, or (2) anything designed or sold for incorporation
|
|
||||||
into a dwelling. In determining whether a product is a consumer product,
|
|
||||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
|
||||||
product received by a particular user, "normally used" refers to a
|
|
||||||
typical or common use of that class of product, regardless of the status
|
|
||||||
of the particular user or of the way in which the particular user
|
|
||||||
actually uses, or expects or is expected to use, the product. A product
|
|
||||||
is a consumer product regardless of whether the product has substantial
|
|
||||||
commercial, industrial or non-consumer uses, unless such uses represent
|
|
||||||
the only significant mode of use of the product.
|
|
||||||
|
|
||||||
"Installation Information" for a User Product means any methods,
|
|
||||||
procedures, authorization keys, or other information required to install
|
|
||||||
and execute modified versions of a covered work in that User Product from
|
|
||||||
a modified version of its Corresponding Source. The information must
|
|
||||||
suffice to ensure that the continued functioning of the modified object
|
|
||||||
code is in no case prevented or interfered with solely because
|
|
||||||
modification has been made.
|
|
||||||
|
|
||||||
If you convey an object code work under this section in, or with, or
|
|
||||||
specifically for use in, a User Product, and the conveying occurs as
|
|
||||||
part of a transaction in which the right of possession and use of the
|
|
||||||
User Product is transferred to the recipient in perpetuity or for a
|
|
||||||
fixed term (regardless of how the transaction is characterized), the
|
|
||||||
Corresponding Source conveyed under this section must be accompanied
|
|
||||||
by the Installation Information. But this requirement does not apply
|
|
||||||
if neither you nor any third party retains the ability to install
|
|
||||||
modified object code on the User Product (for example, the work has
|
|
||||||
been installed in ROM).
|
|
||||||
|
|
||||||
The requirement to provide Installation Information does not include a
|
|
||||||
requirement to continue to provide support service, warranty, or updates
|
|
||||||
for a work that has been modified or installed by the recipient, or for
|
|
||||||
the User Product in which it has been modified or installed. Access to a
|
|
||||||
network may be denied when the modification itself materially and
|
|
||||||
adversely affects the operation of the network or violates the rules and
|
|
||||||
protocols for communication across the network.
|
|
||||||
|
|
||||||
Corresponding Source conveyed, and Installation Information provided,
|
|
||||||
in accord with this section must be in a format that is publicly
|
|
||||||
documented (and with an implementation available to the public in
|
|
||||||
source code form), and must require no special password or key for
|
|
||||||
unpacking, reading or copying.
|
|
||||||
|
|
||||||
7. Additional Terms.
|
|
||||||
|
|
||||||
"Additional permissions" are terms that supplement the terms of this
|
|
||||||
License by making exceptions from one or more of its conditions.
|
|
||||||
Additional permissions that are applicable to the entire Program shall
|
|
||||||
be treated as though they were included in this License, to the extent
|
|
||||||
that they are valid under applicable law. If additional permissions
|
|
||||||
apply only to part of the Program, that part may be used separately
|
|
||||||
under those permissions, but the entire Program remains governed by
|
|
||||||
this License without regard to the additional permissions.
|
|
||||||
|
|
||||||
When you convey a copy of a covered work, you may at your option
|
|
||||||
remove any additional permissions from that copy, or from any part of
|
|
||||||
it. (Additional permissions may be written to require their own
|
|
||||||
removal in certain cases when you modify the work.) You may place
|
|
||||||
additional permissions on material, added by you to a covered work,
|
|
||||||
for which you have or can give appropriate copyright permission.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, for material you
|
|
||||||
add to a covered work, you may (if authorized by the copyright holders of
|
|
||||||
that material) supplement the terms of this License with terms:
|
|
||||||
|
|
||||||
a) Disclaiming warranty or limiting liability differently from the
|
|
||||||
terms of sections 15 and 16 of this License; or
|
|
||||||
|
|
||||||
b) Requiring preservation of specified reasonable legal notices or
|
|
||||||
author attributions in that material or in the Appropriate Legal
|
|
||||||
Notices displayed by works containing it; or
|
|
||||||
|
|
||||||
c) Prohibiting misrepresentation of the origin of that material, or
|
|
||||||
requiring that modified versions of such material be marked in
|
|
||||||
reasonable ways as different from the original version; or
|
|
||||||
|
|
||||||
d) Limiting the use for publicity purposes of names of licensors or
|
|
||||||
authors of the material; or
|
|
||||||
|
|
||||||
e) Declining to grant rights under trademark law for use of some
|
|
||||||
trade names, trademarks, or service marks; or
|
|
||||||
|
|
||||||
f) Requiring indemnification of licensors and authors of that
|
|
||||||
material by anyone who conveys the material (or modified versions of
|
|
||||||
it) with contractual assumptions of liability to the recipient, for
|
|
||||||
any liability that these contractual assumptions directly impose on
|
|
||||||
those licensors and authors.
|
|
||||||
|
|
||||||
All other non-permissive additional terms are considered "further
|
|
||||||
restrictions" within the meaning of section 10. If the Program as you
|
|
||||||
received it, or any part of it, contains a notice stating that it is
|
|
||||||
governed by this License along with a term that is a further
|
|
||||||
restriction, you may remove that term. If a license document contains
|
|
||||||
a further restriction but permits relicensing or conveying under this
|
|
||||||
License, you may add to a covered work material governed by the terms
|
|
||||||
of that license document, provided that the further restriction does
|
|
||||||
not survive such relicensing or conveying.
|
|
||||||
|
|
||||||
If you add terms to a covered work in accord with this section, you
|
|
||||||
must place, in the relevant source files, a statement of the
|
|
||||||
additional terms that apply to those files, or a notice indicating
|
|
||||||
where to find the applicable terms.
|
|
||||||
|
|
||||||
Additional terms, permissive or non-permissive, may be stated in the
|
|
||||||
form of a separately written license, or stated as exceptions;
|
|
||||||
the above requirements apply either way.
|
|
||||||
|
|
||||||
8. Termination.
|
|
||||||
|
|
||||||
You may not propagate or modify a covered work except as expressly
|
|
||||||
provided under this License. Any attempt otherwise to propagate or
|
|
||||||
modify it is void, and will automatically terminate your rights under
|
|
||||||
this License (including any patent licenses granted under the third
|
|
||||||
paragraph of section 11).
|
|
||||||
|
|
||||||
However, if you cease all violation of this License, then your
|
|
||||||
license from a particular copyright holder is reinstated (a)
|
|
||||||
provisionally, unless and until the copyright holder explicitly and
|
|
||||||
finally terminates your license, and (b) permanently, if the copyright
|
|
||||||
holder fails to notify you of the violation by some reasonable means
|
|
||||||
prior to 60 days after the cessation.
|
|
||||||
|
|
||||||
Moreover, your license from a particular copyright holder is
|
|
||||||
reinstated permanently if the copyright holder notifies you of the
|
|
||||||
violation by some reasonable means, this is the first time you have
|
|
||||||
received notice of violation of this License (for any work) from that
|
|
||||||
copyright holder, and you cure the violation prior to 30 days after
|
|
||||||
your receipt of the notice.
|
|
||||||
|
|
||||||
Termination of your rights under this section does not terminate the
|
|
||||||
licenses of parties who have received copies or rights from you under
|
|
||||||
this License. If your rights have been terminated and not permanently
|
|
||||||
reinstated, you do not qualify to receive new licenses for the same
|
|
||||||
material under section 10.
|
|
||||||
|
|
||||||
9. Acceptance Not Required for Having Copies.
|
|
||||||
|
|
||||||
You are not required to accept this License in order to receive or
|
|
||||||
run a copy of the Program. Ancillary propagation of a covered work
|
|
||||||
occurring solely as a consequence of using peer-to-peer transmission
|
|
||||||
to receive a copy likewise does not require acceptance. However,
|
|
||||||
nothing other than this License grants you permission to propagate or
|
|
||||||
modify any covered work. These actions infringe copyright if you do
|
|
||||||
not accept this License. Therefore, by modifying or propagating a
|
|
||||||
covered work, you indicate your acceptance of this License to do so.
|
|
||||||
|
|
||||||
10. Automatic Licensing of Downstream Recipients.
|
|
||||||
|
|
||||||
Each time you convey a covered work, the recipient automatically
|
|
||||||
receives a license from the original licensors, to run, modify and
|
|
||||||
propagate that work, subject to this License. You are not responsible
|
|
||||||
for enforcing compliance by third parties with this License.
|
|
||||||
|
|
||||||
An "entity transaction" is a transaction transferring control of an
|
|
||||||
organization, or substantially all assets of one, or subdividing an
|
|
||||||
organization, or merging organizations. If propagation of a covered
|
|
||||||
work results from an entity transaction, each party to that
|
|
||||||
transaction who receives a copy of the work also receives whatever
|
|
||||||
licenses to the work the party's predecessor in interest had or could
|
|
||||||
give under the previous paragraph, plus a right to possession of the
|
|
||||||
Corresponding Source of the work from the predecessor in interest, if
|
|
||||||
the predecessor has it or can get it with reasonable efforts.
|
|
||||||
|
|
||||||
You may not impose any further restrictions on the exercise of the
|
|
||||||
rights granted or affirmed under this License. For example, you may
|
|
||||||
not impose a license fee, royalty, or other charge for exercise of
|
|
||||||
rights granted under this License, and you may not initiate litigation
|
|
||||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
|
||||||
any patent claim is infringed by making, using, selling, offering for
|
|
||||||
sale, or importing the Program or any portion of it.
|
|
||||||
|
|
||||||
11. Patents.
|
|
||||||
|
|
||||||
A "contributor" is a copyright holder who authorizes use under this
|
|
||||||
License of the Program or a work on which the Program is based. The
|
|
||||||
work thus licensed is called the contributor's "contributor version".
|
|
||||||
|
|
||||||
A contributor's "essential patent claims" are all patent claims
|
|
||||||
owned or controlled by the contributor, whether already acquired or
|
|
||||||
hereafter acquired, that would be infringed by some manner, permitted
|
|
||||||
by this License, of making, using, or selling its contributor version,
|
|
||||||
but do not include claims that would be infringed only as a
|
|
||||||
consequence of further modification of the contributor version. For
|
|
||||||
purposes of this definition, "control" includes the right to grant
|
|
||||||
patent sublicenses in a manner consistent with the requirements of
|
|
||||||
this License.
|
|
||||||
|
|
||||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
|
||||||
patent license under the contributor's essential patent claims, to
|
|
||||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
|
||||||
propagate the contents of its contributor version.
|
|
||||||
|
|
||||||
In the following three paragraphs, a "patent license" is any express
|
|
||||||
agreement or commitment, however denominated, not to enforce a patent
|
|
||||||
(such as an express permission to practice a patent or covenant not to
|
|
||||||
sue for patent infringement). To "grant" such a patent license to a
|
|
||||||
party means to make such an agreement or commitment not to enforce a
|
|
||||||
patent against the party.
|
|
||||||
|
|
||||||
If you convey a covered work, knowingly relying on a patent license,
|
|
||||||
and the Corresponding Source of the work is not available for anyone
|
|
||||||
to copy, free of charge and under the terms of this License, through a
|
|
||||||
publicly available network server or other readily accessible means,
|
|
||||||
then you must either (1) cause the Corresponding Source to be so
|
|
||||||
available, or (2) arrange to deprive yourself of the benefit of the
|
|
||||||
patent license for this particular work, or (3) arrange, in a manner
|
|
||||||
consistent with the requirements of this License, to extend the patent
|
|
||||||
license to downstream recipients. "Knowingly relying" means you have
|
|
||||||
actual knowledge that, but for the patent license, your conveying the
|
|
||||||
covered work in a country, or your recipient's use of the covered work
|
|
||||||
in a country, would infringe one or more identifiable patents in that
|
|
||||||
country that you have reason to believe are valid.
|
|
||||||
|
|
||||||
If, pursuant to or in connection with a single transaction or
|
|
||||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
|
||||||
covered work, and grant a patent license to some of the parties
|
|
||||||
receiving the covered work authorizing them to use, propagate, modify
|
|
||||||
or convey a specific copy of the covered work, then the patent license
|
|
||||||
you grant is automatically extended to all recipients of the covered
|
|
||||||
work and works based on it.
|
|
||||||
|
|
||||||
A patent license is "discriminatory" if it does not include within
|
|
||||||
the scope of its coverage, prohibits the exercise of, or is
|
|
||||||
conditioned on the non-exercise of one or more of the rights that are
|
|
||||||
specifically granted under this License. You may not convey a covered
|
|
||||||
work if you are a party to an arrangement with a third party that is
|
|
||||||
in the business of distributing software, under which you make payment
|
|
||||||
to the third party based on the extent of your activity of conveying
|
|
||||||
the work, and under which the third party grants, to any of the
|
|
||||||
parties who would receive the covered work from you, a discriminatory
|
|
||||||
patent license (a) in connection with copies of the covered work
|
|
||||||
conveyed by you (or copies made from those copies), or (b) primarily
|
|
||||||
for and in connection with specific products or compilations that
|
|
||||||
contain the covered work, unless you entered into that arrangement,
|
|
||||||
or that patent license was granted, prior to 28 March 2007.
|
|
||||||
|
|
||||||
Nothing in this License shall be construed as excluding or limiting
|
|
||||||
any implied license or other defenses to infringement that may
|
|
||||||
otherwise be available to you under applicable patent law.
|
|
||||||
|
|
||||||
12. No Surrender of Others' Freedom.
|
|
||||||
|
|
||||||
If conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot convey a
|
|
||||||
covered work so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you may
|
|
||||||
not convey it at all. For example, if you agree to terms that obligate you
|
|
||||||
to collect a royalty for further conveying from those to whom you convey
|
|
||||||
the Program, the only way you could satisfy both those terms and this
|
|
||||||
License would be to refrain entirely from conveying the Program.
|
|
||||||
|
|
||||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, if you modify the
|
|
||||||
Program, your modified version must prominently offer all users
|
|
||||||
interacting with it remotely through a computer network (if your version
|
|
||||||
supports such interaction) an opportunity to receive the Corresponding
|
|
||||||
Source of your version by providing access to the Corresponding Source
|
|
||||||
from a network server at no charge, through some standard or customary
|
|
||||||
means of facilitating copying of software. This Corresponding Source
|
|
||||||
shall include the Corresponding Source for any work covered by version 3
|
|
||||||
of the GNU General Public License that is incorporated pursuant to the
|
|
||||||
following paragraph.
|
|
||||||
|
|
||||||
Notwithstanding any other provision of this License, you have
|
|
||||||
permission to link or combine any covered work with a work licensed
|
|
||||||
under version 3 of the GNU General Public License into a single
|
|
||||||
combined work, and to convey the resulting work. The terms of this
|
|
||||||
License will continue to apply to the part which is the covered work,
|
|
||||||
but the work with which it is combined will remain governed by version
|
|
||||||
3 of the GNU General Public License.
|
|
||||||
|
|
||||||
14. Revised Versions of this License.
|
|
||||||
|
|
||||||
The Free Software Foundation may publish revised and/or new versions of
|
|
||||||
the GNU Affero General Public License from time to time. Such new versions
|
|
||||||
will be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the
|
|
||||||
Program specifies that a certain numbered version of the GNU Affero General
|
|
||||||
Public License "or any later version" applies to it, you have the
|
|
||||||
option of following the terms and conditions either of that numbered
|
|
||||||
version or of any later version published by the Free Software
|
|
||||||
Foundation. If the Program does not specify a version number of the
|
|
||||||
GNU Affero General Public License, you may choose any version ever published
|
|
||||||
by the Free Software Foundation.
|
|
||||||
|
|
||||||
If the Program specifies that a proxy can decide which future
|
|
||||||
versions of the GNU Affero General Public License can be used, that proxy's
|
|
||||||
public statement of acceptance of a version permanently authorizes you
|
|
||||||
to choose that version for the Program.
|
|
||||||
|
|
||||||
Later license versions may give you additional or different
|
|
||||||
permissions. However, no additional obligations are imposed on any
|
|
||||||
author or copyright holder as a result of your choosing to follow a
|
|
||||||
later version.
|
|
||||||
|
|
||||||
15. Disclaimer of Warranty.
|
|
||||||
|
|
||||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
|
||||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
|
||||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
|
||||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
|
||||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
||||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
|
||||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
|
||||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
16. Limitation of Liability.
|
|
||||||
|
|
||||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
|
||||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
|
||||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
|
||||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
|
||||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
|
||||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
|
||||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
|
||||||
SUCH DAMAGES.
|
|
||||||
|
|
||||||
17. Interpretation of Sections 15 and 16.
|
|
||||||
|
|
||||||
If the disclaimer of warranty and limitation of liability provided
|
|
||||||
above cannot be given local legal effect according to their terms,
|
|
||||||
reviewing courts shall apply local law that most closely approximates
|
|
||||||
an absolute waiver of all civil liability in connection with the
|
|
||||||
Program, unless a warranty or assumption of liability accompanies a
|
|
||||||
copy of the Program in return for a fee.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
|
||||||
to attach them to the start of each source file to most effectively
|
|
||||||
state the exclusion of warranty; and each file should have at least
|
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
|
||||||
Copyright (C) <year> <name of author>
|
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Affero General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Affero General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Affero General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If your software can interact with users remotely through a computer
|
|
||||||
network, you should also make sure that it provides a way for users to
|
|
||||||
get its source. For example, if your program is a web application, its
|
|
||||||
interface could display a "Source" link that leads users to an archive
|
|
||||||
of the code. There are many ways you could offer source, and different
|
|
||||||
solutions will be better for different programs; see section 13 for the
|
|
||||||
specific requirements.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or school,
|
|
||||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
|
||||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
|
||||||
<https://www.gnu.org/licenses/>.
|
|
235
LICENSES/AGPL-3.0-or-later.txt
Normal file
@ -0,0 +1,235 @@
|
|||||||
|
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 19 November 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software.
|
||||||
|
|
||||||
|
A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public.
|
||||||
|
|
||||||
|
The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version.
|
||||||
|
|
||||||
|
An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
"Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see <http://www.gnu.org/licenses/>.
|
121
LICENSES/CC0-1.0.txt
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
Creative Commons Legal Code
|
||||||
|
|
||||||
|
CC0 1.0 Universal
|
||||||
|
|
||||||
|
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||||
|
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||||
|
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||||
|
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||||
|
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
||||||
|
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||||
|
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||||
|
HEREUNDER.
|
||||||
|
|
||||||
|
Statement of Purpose
|
||||||
|
|
||||||
|
The laws of most jurisdictions throughout the world automatically confer
|
||||||
|
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||||
|
and subsequent owner(s) (each and all, an "owner") of an original work of
|
||||||
|
authorship and/or a database (each, a "Work").
|
||||||
|
|
||||||
|
Certain owners wish to permanently relinquish those rights to a Work for
|
||||||
|
the purpose of contributing to a commons of creative, cultural and
|
||||||
|
scientific works ("Commons") that the public can reliably and without fear
|
||||||
|
of later claims of infringement build upon, modify, incorporate in other
|
||||||
|
works, reuse and redistribute as freely as possible in any form whatsoever
|
||||||
|
and for any purposes, including without limitation commercial purposes.
|
||||||
|
These owners may contribute to the Commons to promote the ideal of a free
|
||||||
|
culture and the further production of creative, cultural and scientific
|
||||||
|
works, or to gain reputation or greater distribution for their Work in
|
||||||
|
part through the use and efforts of others.
|
||||||
|
|
||||||
|
For these and/or other purposes and motivations, and without any
|
||||||
|
expectation of additional consideration or compensation, the person
|
||||||
|
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
||||||
|
is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||||
|
elects to apply CC0 to the Work and publicly distribute the Work under its
|
||||||
|
terms, with knowledge of his or her Copyright and Related Rights in the
|
||||||
|
Work and the meaning and intended legal effect of CC0 on those rights.
|
||||||
|
|
||||||
|
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||||
|
protected by copyright and related or neighboring rights ("Copyright and
|
||||||
|
Related Rights"). Copyright and Related Rights include, but are not
|
||||||
|
limited to, the following:
|
||||||
|
|
||||||
|
i. the right to reproduce, adapt, distribute, perform, display,
|
||||||
|
communicate, and translate a Work;
|
||||||
|
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||||
|
iii. publicity and privacy rights pertaining to a person's image or
|
||||||
|
likeness depicted in a Work;
|
||||||
|
iv. rights protecting against unfair competition in regards to a Work,
|
||||||
|
subject to the limitations in paragraph 4(a), below;
|
||||||
|
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||||
|
in a Work;
|
||||||
|
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||||
|
European Parliament and of the Council of 11 March 1996 on the legal
|
||||||
|
protection of databases, and under any national implementation
|
||||||
|
thereof, including any amended or successor version of such
|
||||||
|
directive); and
|
||||||
|
vii. other similar, equivalent or corresponding rights throughout the
|
||||||
|
world based on applicable law or treaty, and any national
|
||||||
|
implementations thereof.
|
||||||
|
|
||||||
|
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||||
|
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||||
|
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||||
|
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||||
|
of action, whether now known or unknown (including existing as well as
|
||||||
|
future claims and causes of action), in the Work (i) in all territories
|
||||||
|
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||||
|
treaty (including future time extensions), (iii) in any current or future
|
||||||
|
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||||
|
including without limitation commercial, advertising or promotional
|
||||||
|
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
||||||
|
member of the public at large and to the detriment of Affirmer's heirs and
|
||||||
|
successors, fully intending that such Waiver shall not be subject to
|
||||||
|
revocation, rescission, cancellation, termination, or any other legal or
|
||||||
|
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||||
|
as contemplated by Affirmer's express Statement of Purpose.
|
||||||
|
|
||||||
|
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||||
|
be judged legally invalid or ineffective under applicable law, then the
|
||||||
|
Waiver shall be preserved to the maximum extent permitted taking into
|
||||||
|
account Affirmer's express Statement of Purpose. In addition, to the
|
||||||
|
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||||
|
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
||||||
|
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
||||||
|
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||||
|
maximum duration provided by applicable law or treaty (including future
|
||||||
|
time extensions), (iii) in any current or future medium and for any number
|
||||||
|
of copies, and (iv) for any purpose whatsoever, including without
|
||||||
|
limitation commercial, advertising or promotional purposes (the
|
||||||
|
"License"). The License shall be deemed effective as of the date CC0 was
|
||||||
|
applied by Affirmer to the Work. Should any part of the License for any
|
||||||
|
reason be judged legally invalid or ineffective under applicable law, such
|
||||||
|
partial invalidity or ineffectiveness shall not invalidate the remainder
|
||||||
|
of the License, and in such case Affirmer hereby affirms that he or she
|
||||||
|
will not (i) exercise any of his or her remaining Copyright and Related
|
||||||
|
Rights in the Work or (ii) assert any associated claims and causes of
|
||||||
|
action with respect to the Work, in either case contrary to Affirmer's
|
||||||
|
express Statement of Purpose.
|
||||||
|
|
||||||
|
4. Limitations and Disclaimers.
|
||||||
|
|
||||||
|
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||||
|
surrendered, licensed or otherwise affected by this document.
|
||||||
|
b. Affirmer offers the Work as-is and makes no representations or
|
||||||
|
warranties of any kind concerning the Work, express, implied,
|
||||||
|
statutory or otherwise, including without limitation warranties of
|
||||||
|
title, merchantability, fitness for a particular purpose, non
|
||||||
|
infringement, or the absence of latent or other defects, accuracy, or
|
||||||
|
the present or absence of errors, whether or not discoverable, all to
|
||||||
|
the greatest extent permissible under applicable law.
|
||||||
|
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||||
|
that may apply to the Work or any use thereof, including without
|
||||||
|
limitation any person's Copyright and Related Rights in the Work.
|
||||||
|
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||||
|
consents, permissions or other rights required for any use of the
|
||||||
|
Work.
|
||||||
|
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||||
|
party to this document and has no duty or obligation with respect to
|
||||||
|
this CC0 or use of the Work.
|
89
Makefile
@ -1,4 +1,3 @@
|
|||||||
# https://github.com/nextcloud/appstore/blob/fixed-templates/nextcloudappstore/scaffolding/app-templates/26/app/Makefile
|
|
||||||
# Generic Makefile for building and packaging a Nextcloud app which uses npm and
|
# Generic Makefile for building and packaging a Nextcloud app which uses npm and
|
||||||
# Composer.
|
# Composer.
|
||||||
#
|
#
|
||||||
@ -103,14 +102,14 @@ dist: build
|
|||||||
source:
|
source:
|
||||||
rm -rf $(source_build_directory)
|
rm -rf $(source_build_directory)
|
||||||
mkdir -p $(source_build_directory)
|
mkdir -p $(source_build_directory)
|
||||||
tar -C .. -cvzf $(source_package_name).tar.gz \
|
tar cvzf $(source_package_name).tar.gz \
|
||||||
--exclude-vcs \
|
--exclude-vcs \
|
||||||
--exclude="$(app_name)/build" \
|
--exclude="../$(app_name)/build" \
|
||||||
--exclude="$(app_name)/js/node_modules" \
|
--exclude="../$(app_name)/js/node_modules" \
|
||||||
--exclude="$(app_name)/node_modules" \
|
--exclude="../$(app_name)/node_modules" \
|
||||||
--exclude="$(app_name)/*.log" \
|
--exclude="../$(app_name)/*.log" \
|
||||||
--exclude="$(app_name)/js/*.log" \
|
--exclude="../$(app_name)/js/*.log" \
|
||||||
$(app_name)
|
../$(app_name)
|
||||||
|
|
||||||
# Builds the source package for the app store, ignores php tests, js tests
|
# Builds the source package for the app store, ignores php tests, js tests
|
||||||
# and build related folders that are unnecessary for an appstore release
|
# and build related folders that are unnecessary for an appstore release
|
||||||
@ -118,43 +117,43 @@ source:
|
|||||||
appstore:
|
appstore:
|
||||||
rm -rf $(appstore_build_directory)
|
rm -rf $(appstore_build_directory)
|
||||||
mkdir -p $(appstore_build_directory)
|
mkdir -p $(appstore_build_directory)
|
||||||
tar -C .. -cvzf $(appstore_package_name).tar.gz \
|
tar cvzf $(appstore_package_name).tar.gz \
|
||||||
--exclude="$(app_name)/build" \
|
--exclude="../$(app_name)/build" \
|
||||||
--exclude="$(app_name)/tests" \
|
--exclude="../$(app_name)/tests" \
|
||||||
--exclude="$(app_name)/Makefile" \
|
--exclude="../$(app_name)/Makefile" \
|
||||||
--exclude="$(app_name)/*.log" \
|
--exclude="../$(app_name)/*.log" \
|
||||||
--exclude="$(app_name)/phpunit*xml" \
|
--exclude="../$(app_name)/phpunit*xml" \
|
||||||
--exclude="$(app_name)/composer.*" \
|
--exclude="../$(app_name)/composer.*" \
|
||||||
--exclude="$(app_name)/node_modules" \
|
--exclude="../$(app_name)/node_modules" \
|
||||||
--exclude="$(app_name)/js/node_modules" \
|
--exclude="../$(app_name)/js/node_modules" \
|
||||||
--exclude="$(app_name)/js/tests" \
|
--exclude="../$(app_name)/js/tests" \
|
||||||
--exclude="$(app_name)/js/test" \
|
--exclude="../$(app_name)/js/test" \
|
||||||
--exclude="$(app_name)/js/*.log" \
|
--exclude="../$(app_name)/js/*.log" \
|
||||||
--exclude="$(app_name)/js/package.json" \
|
--exclude="../$(app_name)/js/package.json" \
|
||||||
--exclude="$(app_name)/js/bower.json" \
|
--exclude="../$(app_name)/js/bower.json" \
|
||||||
--exclude="$(app_name)/js/karma.*" \
|
--exclude="../$(app_name)/js/karma.*" \
|
||||||
--exclude="$(app_name)/js/protractor.*" \
|
--exclude="../$(app_name)/js/protractor.*" \
|
||||||
--exclude="$(app_name)/package.json" \
|
--exclude="../$(app_name)/package.json" \
|
||||||
--exclude="$(app_name)/bower.json" \
|
--exclude="../$(app_name)/bower.json" \
|
||||||
--exclude="$(app_name)/karma.*" \
|
--exclude="../$(app_name)/karma.*" \
|
||||||
--exclude="$(app_name)/protractor\.*" \
|
--exclude="../$(app_name)/protractor\.*" \
|
||||||
--exclude="$(app_name)/.*" \
|
--exclude="../$(app_name)/.*" \
|
||||||
--exclude="$(app_name)/js/.*" \
|
--exclude="../$(app_name)/js/.*" \
|
||||||
--exclude="$(app_name)/tsconfig.json" \
|
--exclude="../$(app_name)/webpack.config.js" \
|
||||||
--exclude="$(app_name)/stylelint.config.cjs" \
|
--exclude="../$(app_name)/stylelint.config.js" \
|
||||||
--exclude="$(app_name)/README.md" \
|
--exclude="../$(app_name)/README.md" \
|
||||||
--exclude="$(app_name)/package-lock.json" \
|
--exclude="../$(app_name)/package-lock.json" \
|
||||||
--exclude="$(app_name)/LICENSE" \
|
--exclude="../$(app_name)/LICENSES" \
|
||||||
--exclude="$(app_name)/src" \
|
--exclude="../$(app_name)/src" \
|
||||||
--exclude="$(app_name)/stubs" \
|
--exclude="../$(app_name)/stubs" \
|
||||||
--exclude="$(app_name)/screens" \
|
--exclude="../$(app_name)/screens" \
|
||||||
--exclude="$(app_name)/vendor" \
|
--exclude="../$(app_name)/vendor" \
|
||||||
--exclude="$(app_name)/translationfiles" \
|
--exclude="../$(app_name)/translationfiles" \
|
||||||
--exclude="$(app_name)/Dockerfile" \
|
--exclude="../$(app_name)/babel.config.js" \
|
||||||
--exclude="$(app_name)/psalm.xml" \
|
--exclude="../$(app_name)/Dockerfile" \
|
||||||
--exclude="$(app_name)/renovate.json" \
|
--exclude="../$(app_name)/psalm.xml" \
|
||||||
--exclude="$(app_name)/vite.config.ts" \
|
--exclude="../$(app_name)/renovate.json" \
|
||||||
$(app_name)
|
../$(app_name)
|
||||||
|
|
||||||
# Start a nextcloud server on Docker to kickstart developement
|
# Start a nextcloud server on Docker to kickstart developement
|
||||||
.PHONY: dev
|
.PHONY: dev
|
||||||
|
30
README.md
@ -12,36 +12,13 @@ You need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) inst
|
|||||||
- Import and export subscriptions
|
- Import and export subscriptions
|
||||||
- Mobile friendly interface
|
- Mobile friendly interface
|
||||||
- Unified search integration
|
- Unified search integration
|
||||||
|
- Interface in multiple languages
|
||||||
## Comparaison with similar apps for Nextcloud
|
|
||||||
|
|
||||||
| | [RePod](https://apps.nextcloud.com/apps/repod) | [NextPod](https://apps.nextcloud.com/apps/nextpod) | [Music](https://apps.nextcloud.com/apps/music) | [Podcast](https://apps.nextcloud.com/apps/podcast) |
|
|
||||||
| --- | --- | --- | --- | --- |
|
|
||||||
| Actively maintened | ✅ | ✅ | ✅ | ❌ |
|
|
||||||
| Play your local music files | ❌ | ❌ | ✅ | ❌ |
|
|
||||||
| Sync with [GPodder clients](#clients-supporting-sync-of-gpoddersync) | ✅ | ✅ | ❌ | ❌ |
|
|
||||||
| Add and manage subscriptions | ✅ | ❌ | ✅ | ✅ |
|
|
||||||
| Listen synced episodes by another clients | ✅ | ✅ | ❌ | ❌ |
|
|
||||||
| Fetch and listen new epidodes | ✅ | ❌ | ✅ | ✅ |
|
|
||||||
| Keep track of listened episodes | ✅ | ✅ | ❌ | ✅ |
|
|
||||||
| Download epidodes | ✅ | ✅ | ❌ | ✅ |
|
|
||||||
| Import and export subscriptions | ✅ | ❌ | ❌ | ❌ |
|
|
||||||
| Search and discover new podcasts | ✅ | ❌ | ❌ | ✅ |
|
|
||||||
| Open episode website and RSS feed | ✅ | ✅ | ❌ | ✅ |
|
|
||||||
| Integrate with Nextcloud search engine | ✅ | ❌ | ❌ | ✅ |
|
|
||||||
| Integrate with [Nextcloud Notes](https://apps.nextcloud.com/apps/notes) | ❌ | ✅ | ❌ | ❌ |
|
|
||||||
| Mobile friendly interface | ✅ | ❌ | ✅ | ✅ |
|
|
||||||
| Support chapters | ❌ | ❌ | ❌ | ✅ |
|
|
||||||
| Available in multiple languages | ⭕ (en/fr/de) | ❌ | ✅ | ⭕ (en/de) |
|
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
### Homepage
|
### Homepage
|
||||||
![homepage](./screens/index.png)
|
![homepage](./screens/index.png)
|
||||||
|
|
||||||
### Discover
|
|
||||||
![homepage](./screens/discover.png)
|
|
||||||
|
|
||||||
### Search
|
### Search
|
||||||
![search](./screens/search.png)
|
![search](./screens/search.png)
|
||||||
|
|
||||||
@ -58,16 +35,11 @@ You need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) inst
|
|||||||
| [AntennaPod](https://antennapod.org) | Initial purpose for this project, as a synchronization endpoint for this client.<br> Support is available [as of version 2.5.1](https://github.com/AntennaPod/AntennaPod/pull/5243/). |
|
| [AntennaPod](https://antennapod.org) | Initial purpose for this project, as a synchronization endpoint for this client.<br> Support is available [as of version 2.5.1](https://github.com/AntennaPod/AntennaPod/pull/5243/). |
|
||||||
| [KDE Kasts](https://apps.kde.org/de/kasts/) | Supported since version 21.12 |
|
| [KDE Kasts](https://apps.kde.org/de/kasts/) | Supported since version 21.12 |
|
||||||
| [Podcast Merlin](https://github.com/yoyoooooooooo/Podcast-Merlin--Nextcloud-Gpodder-Client-For-Windows) | Full sync support podcast client for Windows |
|
| [Podcast Merlin](https://github.com/yoyoooooooooo/Podcast-Merlin--Nextcloud-Gpodder-Client-For-Windows) | Full sync support podcast client for Windows |
|
||||||
| [Cardo](https://cardo-podcast.github.io/#/cardo) | Podcast client with sync support, for Windows, Mac and Linux |
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Either from the official Nextcloud [app store](https://apps.nextcloud.com/apps/repod) or by downloading the [latest release](https://git.crystalyx.net/Xefir/repod/releases/latest) and extracting it into your Nextcloud `apps/` directory.
|
Either from the official Nextcloud [app store](https://apps.nextcloud.com/apps/repod) or by downloading the [latest release](https://git.crystalyx.net/Xefir/repod/releases/latest) and extracting it into your Nextcloud `apps/` directory.
|
||||||
|
|
||||||
## Known issues
|
|
||||||
|
|
||||||
- Conflict with Plasma Integration Firefox addon ([#164](https://git.crystalyx.net/Xefir/repod/issues/164))
|
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
- [GPodder Sync](https://github.com/thrillfall/nextcloud-gpodder) for the database API
|
- [GPodder Sync](https://github.com/thrillfall/nextcloud-gpodder) for the database API
|
||||||
|
@ -7,14 +7,11 @@
|
|||||||
<description><![CDATA[## Features
|
<description><![CDATA[## Features
|
||||||
- 🔍 Browse and subscribe huge collection of podcasts
|
- 🔍 Browse and subscribe huge collection of podcasts
|
||||||
- 🔊 Listen to episodes directly in Nextcloud
|
- 🔊 Listen to episodes directly in Nextcloud
|
||||||
- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/) and [other apps](https://git.crystalyx.net/Xefir/repod#clients-supporting-sync-of-gpoddersync)
|
- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/)
|
||||||
- 📱 Mobile friendly interface
|
|
||||||
- 📡 Import and export your subscriptions
|
|
||||||
- ➡️ Full features comparison [here](https://git.crystalyx.net/Xefir/repod#comparaison-with-similar-apps-for-nextcloud)
|
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
You need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installed to use this app!]]></description>
|
You need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installed to use this app!]]></description>
|
||||||
<version>3.4.0</version>
|
<version>1.5.8</version>
|
||||||
<licence>agpl</licence>
|
<licence>agpl</licence>
|
||||||
<author mail="xefir@crystalyx.net" homepage="https://crystalyx.net">Michel Roux</author>
|
<author mail="xefir@crystalyx.net" homepage="https://crystalyx.net">Michel Roux</author>
|
||||||
<namespace>RePod</namespace>
|
<namespace>RePod</namespace>
|
||||||
@ -23,21 +20,17 @@ You need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) inst
|
|||||||
<website>https://git.crystalyx.net/Xefir/repod</website>
|
<website>https://git.crystalyx.net/Xefir/repod</website>
|
||||||
<bugs>https://git.crystalyx.net/Xefir/repod/issues</bugs>
|
<bugs>https://git.crystalyx.net/Xefir/repod/issues</bugs>
|
||||||
<screenshot>https://git.crystalyx.net/Xefir/repod/raw/branch/main/screens/index.png</screenshot>
|
<screenshot>https://git.crystalyx.net/Xefir/repod/raw/branch/main/screens/index.png</screenshot>
|
||||||
<screenshot>https://git.crystalyx.net/Xefir/repod/raw/branch/main/screens/discover.png</screenshot>
|
|
||||||
<screenshot>https://git.crystalyx.net/Xefir/repod/raw/branch/main/screens/search.png</screenshot>
|
<screenshot>https://git.crystalyx.net/Xefir/repod/raw/branch/main/screens/search.png</screenshot>
|
||||||
<screenshot>https://git.crystalyx.net/Xefir/repod/raw/branch/main/screens/episodes.png</screenshot>
|
<screenshot>https://git.crystalyx.net/Xefir/repod/raw/branch/main/screens/episodes.png</screenshot>
|
||||||
<screenshot>https://git.crystalyx.net/Xefir/repod/raw/branch/main/screens/modal.png</screenshot>
|
<screenshot>https://git.crystalyx.net/Xefir/repod/raw/branch/main/screens/modal.png</screenshot>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<php min-version="8.1"/>
|
<php min-version="8.0"/>
|
||||||
<nextcloud min-version="29" max-version="30"/>
|
<nextcloud min-version="26" max-version="28"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<navigations>
|
<navigations>
|
||||||
<navigation>
|
<navigation>
|
||||||
<id>repod</id>
|
|
||||||
<name>Podcast</name>
|
<name>Podcast</name>
|
||||||
<route>repod.page.index</route>
|
<route>repod.page.index</route>
|
||||||
<icon>app.svg</icon>
|
|
||||||
<type>link</type>
|
|
||||||
</navigation>
|
</navigation>
|
||||||
</navigations>
|
</navigations>
|
||||||
</info>
|
</info>
|
||||||
|
25
appinfo/routes.php
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create your routes in here. The name is the lowercase name of the controller
|
||||||
|
* without the controller part, the stuff after the hash is the method.
|
||||||
|
* e.g. page#index -> OCA\RePod\Controller\PageController->index().
|
||||||
|
*
|
||||||
|
* The controller class has to be registered in the application.php file since
|
||||||
|
* it's instantiated in there
|
||||||
|
*/
|
||||||
|
return [
|
||||||
|
'routes' => [
|
||||||
|
['name' => 'page#index', 'url' => '/', 'verb' => 'GET'],
|
||||||
|
['name' => 'episodes#action', 'url' => '/episodes/action', 'verb' => 'GET'],
|
||||||
|
['name' => 'episodes#list', 'url' => '/episodes/list', 'verb' => 'GET'],
|
||||||
|
['name' => 'opml#export', 'url' => '/opml/export', 'verb' => 'GET'],
|
||||||
|
['name' => 'opml#import', 'url' => '/opml/import', 'verb' => 'POST'],
|
||||||
|
['name' => 'podcast#index', 'url' => '/podcast', 'verb' => 'GET'],
|
||||||
|
['name' => 'search#index', 'url' => '/search', 'verb' => 'GET'],
|
||||||
|
['name' => 'tops#hot', 'url' => '/tops/hot', 'verb' => 'GET'],
|
||||||
|
['name' => 'tops#new', 'url' => '/tops/new', 'verb' => 'GET'],
|
||||||
|
],
|
||||||
|
];
|
3
babel.config.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
const babelConfig = require('@nextcloud/babel-config')
|
||||||
|
|
||||||
|
module.exports = babelConfig
|
@ -1,30 +1,30 @@
|
|||||||
{
|
{
|
||||||
"name": "nextcloud/repod",
|
"name": "nextcloud/repod",
|
||||||
"description": "🔊 Browse, manage and listen to podcasts",
|
"description": "🔊 Browse, manage and listen to podcasts",
|
||||||
|
"type": "project",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
|
"version": "1.5.8",
|
||||||
|
"require-dev": {
|
||||||
|
"nextcloud/ocp": "^28.0.2",
|
||||||
|
"psalm/phar": "^5.21.1",
|
||||||
|
"nextcloud/coding-standard": "^1.2.1"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l",
|
||||||
|
"cs:check": "php-cs-fixer fix --dry-run --diff",
|
||||||
|
"cs:fix": "php-cs-fixer fix",
|
||||||
|
"psalm:check": "psalm.phar --threads=1 --no-cache --show-info=true",
|
||||||
|
"psalm:fix": "psalm.phar --no-cache --alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType"
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"OCA\\RePod\\": "lib/",
|
"OCA\\RePod\\": "lib/",
|
||||||
"OCA\\GPodderSync\\": "stubs/OCA/GPodderSync/"
|
"OCA\\GPodderSync\\": "stubs/OCA/GPodderSync/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
|
||||||
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './vendor-bin/*' -not -path './build/*' -print0 | xargs -0 -n1 php -l",
|
|
||||||
"cs:check": "php-cs-fixer fix --dry-run --diff",
|
|
||||||
"cs:fix": "php-cs-fixer fix",
|
|
||||||
"psalm": "psalm --threads=1 --no-cache --show-info=true"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"nextcloud/ocp": "^30.0.2",
|
|
||||||
"roave/security-advisories": "dev-latest",
|
|
||||||
"nextcloud/coding-standard": "^1.3.2",
|
|
||||||
"vimeo/psalm": "^5.26.1"
|
|
||||||
},
|
|
||||||
"config": {
|
"config": {
|
||||||
"optimize-autoloader": true,
|
|
||||||
"sort-packages": true,
|
|
||||||
"platform": {
|
"platform": {
|
||||||
"php": "8.1"
|
"php": "8.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2937
composer.lock
generated
58
l10n/de.js
@ -1,58 +0,0 @@
|
|||||||
OC.L10N.register(
|
|
||||||
"repod",
|
|
||||||
{
|
|
||||||
"RePod Subscriptions" : "RePod Abonnements",
|
|
||||||
"Podcast" : "Podcast",
|
|
||||||
"RePod" : "RePod",
|
|
||||||
"🔊 Browse, manage and listen to podcasts" : "🔊 Suchen, Verwalten und Anhören von Podcasts",
|
|
||||||
"## Features\n- 🔍 Browse and subscribe huge collection of podcasts\n- 🔊 Listen to episodes directly in Nextcloud\n- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/) and [other apps](https://git.crystalyx.net/Xefir/repod#clients-supporting-sync-of-gpoddersync)\n- 📱 Mobile friendly interface\n- 📡 Import and export your subscriptions\n- ➡️ Full features comparison [here](https://git.crystalyx.net/Xefir/repod#comparaison-with-similar-apps-for-nextcloud)\n\n## Requirements\nYou need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installed to use this app!" : "## Funktionen\n- 🔍 Durchsuchen und abonnieren einer großen Sammlung von Podcasts\n- 🔊 Episoden direkt in Nextcloud anhören\n- 🌐 Synchronisiere deine Aktivität mit [AntennaPod](https://antennapod.org/)\n- 📱 Mobile-freundliche Schnittstelle\n- 📡 Importieren und Exportieren Ihrer Abonnements\n\n## Voraussetzungen\nDu musst [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installiert haben, um diese App zu benutzen!",
|
|
||||||
"Download" : "Herunterladen",
|
|
||||||
"Add a RSS link" : "Einen RSS-Link hinzufügen",
|
|
||||||
"Subscribe" : "Abonnieren",
|
|
||||||
"Error while adding the feed" : "Fehler beim Hinzufügen des Feeds",
|
|
||||||
"Could not fetch search results" : "Suchergebnisse können nicht geladen werden",
|
|
||||||
"New podcasts" : "Neue Podcasts",
|
|
||||||
"Hot podcasts" : "Beliebte Podcasts",
|
|
||||||
"Could not fetch tops" : "Titel können nicht abgerufen werden",
|
|
||||||
"Copy feed" : "Feed kopieren",
|
|
||||||
"Link copied to the clipboard" : "Der Link des Feeds wurde in die Zwischenablage kopiert",
|
|
||||||
"Play" : "Abspielen",
|
|
||||||
"Stop" : "Stopp",
|
|
||||||
"Read" : "Gelesen",
|
|
||||||
"Open website" : "Webseite aufrufen",
|
|
||||||
"Could not change the status of the episode" : "Kann den Status der Folge nicht ändern",
|
|
||||||
"Could not fetch episodes" : "Folgen können nicht abgerufen werden",
|
|
||||||
"Rewind 10 seconds" : "10 Sekunden zurückspulen",
|
|
||||||
"Pause" : "Pause",
|
|
||||||
"Fast forward 30 seconds" : "30 Sekunden vorspulen",
|
|
||||||
"Mute" : "Stumm",
|
|
||||||
"Unmute" : "Stummschalten",
|
|
||||||
"Export subscriptions" : "Abonnements exportieren",
|
|
||||||
"Filtering episodes" : "Folgen filtern",
|
|
||||||
"Show all" : "Zeige alles",
|
|
||||||
"Listened" : "Gehört",
|
|
||||||
"Listening" : "Läuft",
|
|
||||||
"Unlistened" : "Nicht angehört",
|
|
||||||
"Import subscriptions" : "Importiere Abonnements",
|
|
||||||
"Import OPML file" : "Importiere OPML-Datei",
|
|
||||||
"Rate RePod ❤️" : "Bewerte RePod ❤️",
|
|
||||||
"Sleep timer" : "Einschlaftimer",
|
|
||||||
"Minutes" : "Minuten",
|
|
||||||
"_%n min_::_%n mins_" : ["%n min","%n mins"],
|
|
||||||
"_%n sec_::_%n secs_" : ["%s sec","%n secs"],
|
|
||||||
"Playback speed" : "Wiedergabegeschwindigkeit",
|
|
||||||
"Favorite" : "Favorit",
|
|
||||||
"Are you sure you want to delete this subscription?" : "Bist Du sicher, dass Du das Abonnement löschen möchtest?",
|
|
||||||
"Error while removing the feed" : "Fehler beim Löschen des Feeds",
|
|
||||||
"You can only have 10 favorites" : "Du kannst nur 10 Favoriten haben",
|
|
||||||
"Add a podcast" : "Einen Podcast hinzufügen",
|
|
||||||
"Could not fetch subscriptions" : "Abonnements können nicht abgerufen werden",
|
|
||||||
"Find a podcast" : "Finde einen Podcast",
|
|
||||||
"Error loading feed" : "Fehler beim Laden des Feeds",
|
|
||||||
"Missing required app" : "Benötigte App fehlt",
|
|
||||||
"Install GPodder Sync" : "Installiere GPodder Sync",
|
|
||||||
"Pin some subscriptions to see their latest updates" : "Pinne einige Abonnements, um ihre neuesten Updates zu sehen",
|
|
||||||
"No favorites" : "Keine Favoriten",
|
|
||||||
"A browser extension conflict with RePod" : "Ein Browser-Erweiterungskonflikt mit RePod"
|
|
||||||
},
|
|
||||||
"");
|
|
56
l10n/de.json
@ -1,56 +0,0 @@
|
|||||||
{ "translations": {
|
|
||||||
"RePod Subscriptions" : "RePod Abonnements",
|
|
||||||
"Podcast" : "Podcast",
|
|
||||||
"RePod" : "RePod",
|
|
||||||
"🔊 Browse, manage and listen to podcasts" : "🔊 Suchen, Verwalten und Anhören von Podcasts",
|
|
||||||
"## Features\n- 🔍 Browse and subscribe huge collection of podcasts\n- 🔊 Listen to episodes directly in Nextcloud\n- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/) and [other apps](https://git.crystalyx.net/Xefir/repod#clients-supporting-sync-of-gpoddersync)\n- 📱 Mobile friendly interface\n- 📡 Import and export your subscriptions\n- ➡️ Full features comparison [here](https://git.crystalyx.net/Xefir/repod#comparaison-with-similar-apps-for-nextcloud)\n\n## Requirements\nYou need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installed to use this app!" : "## Funktionen\n- 🔍 Durchsuchen und abonnieren einer großen Sammlung von Podcasts\n- 🔊 Episoden direkt in Nextcloud anhören\n- 🌐 Synchronisiere deine Aktivität mit [AntennaPod](https://antennapod.org/)\n- 📱 Mobile-freundliche Schnittstelle\n- 📡 Importieren und Exportieren Ihrer Abonnements\n\n## Voraussetzungen\nDu musst [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installiert haben, um diese App zu benutzen!",
|
|
||||||
"Download" : "Herunterladen",
|
|
||||||
"Add a RSS link" : "Einen RSS-Link hinzufügen",
|
|
||||||
"Subscribe" : "Abonnieren",
|
|
||||||
"Error while adding the feed" : "Fehler beim Hinzufügen des Feeds",
|
|
||||||
"Could not fetch search results" : "Suchergebnisse können nicht geladen werden",
|
|
||||||
"New podcasts" : "Neue Podcasts",
|
|
||||||
"Hot podcasts" : "Beliebte Podcasts",
|
|
||||||
"Could not fetch tops" : "Titel können nicht abgerufen werden",
|
|
||||||
"Copy feed" : "Feed kopieren",
|
|
||||||
"Link copied to the clipboard" : "Der Link des Feeds wurde in die Zwischenablage kopiert",
|
|
||||||
"Play" : "Abspielen",
|
|
||||||
"Stop" : "Stopp",
|
|
||||||
"Read" : "Gelesen",
|
|
||||||
"Open website" : "Webseite aufrufen",
|
|
||||||
"Could not change the status of the episode" : "Kann den Status der Folge nicht ändern",
|
|
||||||
"Could not fetch episodes" : "Folgen können nicht abgerufen werden",
|
|
||||||
"Rewind 10 seconds" : "10 Sekunden zurückspulen",
|
|
||||||
"Pause" : "Pause",
|
|
||||||
"Fast forward 30 seconds" : "30 Sekunden vorspulen",
|
|
||||||
"Mute" : "Stumm",
|
|
||||||
"Unmute" : "Stummschalten",
|
|
||||||
"Export subscriptions" : "Abonnements exportieren",
|
|
||||||
"Filtering episodes" : "Folgen filtern",
|
|
||||||
"Show all" : "Zeige alles",
|
|
||||||
"Listened" : "Gehört",
|
|
||||||
"Listening" : "Läuft",
|
|
||||||
"Unlistened" : "Nicht angehört",
|
|
||||||
"Import subscriptions" : "Importiere Abonnements",
|
|
||||||
"Import OPML file" : "Importiere OPML-Datei",
|
|
||||||
"Rate RePod ❤️" : "Bewerte RePod ❤️",
|
|
||||||
"Sleep timer" : "Einschlaftimer",
|
|
||||||
"Minutes" : "Minuten",
|
|
||||||
"_%n min_::_%n mins_" : ["%n min","%n mins"],
|
|
||||||
"_%n sec_::_%n secs_" : ["%s sec","%n secs"],
|
|
||||||
"Playback speed" : "Wiedergabegeschwindigkeit",
|
|
||||||
"Favorite" : "Favorit",
|
|
||||||
"Are you sure you want to delete this subscription?" : "Bist Du sicher, dass Du das Abonnement löschen möchtest?",
|
|
||||||
"Error while removing the feed" : "Fehler beim Löschen des Feeds",
|
|
||||||
"You can only have 10 favorites" : "Du kannst nur 10 Favoriten haben",
|
|
||||||
"Add a podcast" : "Einen Podcast hinzufügen",
|
|
||||||
"Could not fetch subscriptions" : "Abonnements können nicht abgerufen werden",
|
|
||||||
"Find a podcast" : "Finde einen Podcast",
|
|
||||||
"Error loading feed" : "Fehler beim Laden des Feeds",
|
|
||||||
"Missing required app" : "Benötigte App fehlt",
|
|
||||||
"Install GPodder Sync" : "Installiere GPodder Sync",
|
|
||||||
"Pin some subscriptions to see their latest updates" : "Pinne einige Abonnements, um ihre neuesten Updates zu sehen",
|
|
||||||
"No favorites" : "Keine Favoriten",
|
|
||||||
"A browser extension conflict with RePod" : "Ein Browser-Erweiterungskonflikt mit RePod"
|
|
||||||
},"pluralForm" :""
|
|
||||||
}
|
|
28
l10n/fr.js
@ -5,28 +5,20 @@ OC.L10N.register(
|
|||||||
"Podcast" : "Podcast",
|
"Podcast" : "Podcast",
|
||||||
"RePod" : "RePod",
|
"RePod" : "RePod",
|
||||||
"🔊 Browse, manage and listen to podcasts" : "🔊 Parcourir, gérer et écouter vos podcasts",
|
"🔊 Browse, manage and listen to podcasts" : "🔊 Parcourir, gérer et écouter vos podcasts",
|
||||||
"## Features\n- 🔍 Browse and subscribe huge collection of podcasts\n- 🔊 Listen to episodes directly in Nextcloud\n- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/) and [other apps](https://git.crystalyx.net/Xefir/repod#clients-supporting-sync-of-gpoddersync)\n- 📱 Mobile friendly interface\n- 📡 Import and export your subscriptions\n- ➡️ Full features comparison [here](https://git.crystalyx.net/Xefir/repod#comparaison-with-similar-apps-for-nextcloud)\n\n## Requirements\nYou need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installed to use this app!" : "## Fonctionnalités\n- 🔍 Parcourir et s'abonner à une grande collections de podcasts\n- 🔊 Écouter vos épisodes directement sur Nextcloud\n- 🌐 Synchroniser son activité avec [AntennaPod](https://antennapod.org/) et d'autres [applications](https://git.crystalyx.net/Xefir/repod#clients-supporting-sync-of-gpoddersync)\n- 📱 Interface optimisée pour mobiles et ordinateurs\n- 📡 Import/export de ses abonnements\n- ➡️ Tableau récapitulatif complet des fonctionnalitées [ici](https://git.crystalyx.net/Xefir/repod#comparaison-with-similar-apps-for-nextcloud)\n\n## Pré-requis\nVous devez avoir [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installé pour utiliser cette application !",
|
"## Features\n- 🔍 Browse and subscribe huge collection of podcasts\n- 🔊 Listen to episodes directly in Nextcloud\n- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/)\n\n## Requirements\nYou need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installed to use this app!" : "## Fonctionnalités\n- 🔍 Parcourir et s'abonner à une grande collections de podcasts\n- 🔊 Écouter vos épisodes directement sur Nextcloud\n- 🌐 Synchroniser son activité avec [AntennaPod](https://antennapod.org/)\n\n## Pré-requis\nVous devez avoir [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installé pour utiliser cette application !",
|
||||||
"Download" : "Télécharger",
|
"Download" : "Télécharger",
|
||||||
"Add a RSS link" : "Ajouter un lien RSS",
|
"Add a RSS link" : "Ajouter un lien RSS",
|
||||||
"Subscribe" : "S'abonner",
|
|
||||||
"Error while adding the feed" : "Erreur lors de l'ajout du flux",
|
|
||||||
"Could not fetch search results" : "Impossible de récupérer les resultats de la recherche",
|
"Could not fetch search results" : "Impossible de récupérer les resultats de la recherche",
|
||||||
"New podcasts" : "Nouveautés",
|
"New podcasts" : "Nouveautés",
|
||||||
"Hot podcasts" : "Tendances",
|
"Hot podcasts" : "Tendances",
|
||||||
"Could not fetch tops" : "Impossible de récupérer les tops",
|
"Could not fetch tops" : "Impossible de récupérer les tops",
|
||||||
"Copy feed" : "Copier le flux",
|
"Copy feed" : "Copier le flux",
|
||||||
"Link copied to the clipboard" : "Lien vers le flux copié dans le presse-papiers",
|
"Subscribe" : "S'abonner",
|
||||||
|
"Error while adding the feed" : "Erreur lors de l'ajout du flux",
|
||||||
|
"Feed's link copied to the clipboard" : "Lien vers le flux copié dans le presse-papiers",
|
||||||
"Play" : "Lecture",
|
"Play" : "Lecture",
|
||||||
"Stop" : "Arrêter",
|
"Stop" : "Arrêter",
|
||||||
"Read" : "Lu",
|
|
||||||
"Open website" : "Ouvrir le site web",
|
|
||||||
"Could not change the status of the episode" : "Impossible de changer le status de l'épisode",
|
|
||||||
"Could not fetch episodes" : "Impossible de récuprer les épisodes",
|
"Could not fetch episodes" : "Impossible de récuprer les épisodes",
|
||||||
"Rewind 10 seconds" : "Retour rapide de 10 secondes",
|
|
||||||
"Pause" : "Pause",
|
|
||||||
"Fast forward 30 seconds" : "Avance rapide de 30 secondes",
|
|
||||||
"Mute" : "Silencer",
|
|
||||||
"Unmute" : "Paroler",
|
|
||||||
"Export subscriptions" : "Exporter les abonnements",
|
"Export subscriptions" : "Exporter les abonnements",
|
||||||
"Filtering episodes" : "Filtrage des épisodes",
|
"Filtering episodes" : "Filtrage des épisodes",
|
||||||
"Show all" : "Montrer tout",
|
"Show all" : "Montrer tout",
|
||||||
@ -35,24 +27,14 @@ OC.L10N.register(
|
|||||||
"Unlistened" : "Non lus",
|
"Unlistened" : "Non lus",
|
||||||
"Import subscriptions" : "Importer les abonnements",
|
"Import subscriptions" : "Importer les abonnements",
|
||||||
"Import OPML file" : "Importer un fichier OPML",
|
"Import OPML file" : "Importer un fichier OPML",
|
||||||
"Rate RePod ❤️" : "Donnez votre avis ❤️",
|
|
||||||
"Sleep timer" : "Minuteur",
|
|
||||||
"Minutes" : "Minutes",
|
|
||||||
"_%n min_::_%n mins_" : ["%n min","%n mins"],
|
|
||||||
"_%n sec_::_%n secs_" : ["%s sec","%n secs"],
|
|
||||||
"Playback speed" : "Vitesse de lecture",
|
"Playback speed" : "Vitesse de lecture",
|
||||||
"Favorite" : "Favori",
|
|
||||||
"Are you sure you want to delete this subscription?" : "Êtes-vous sûr de vouloir supprimer ce flux ?",
|
"Are you sure you want to delete this subscription?" : "Êtes-vous sûr de vouloir supprimer ce flux ?",
|
||||||
"Error while removing the feed" : "Erreur lors de la suppression du flux",
|
"Error while removing the feed" : "Erreur lors de la suppression du flux",
|
||||||
"You can only have 10 favorites" : "Vous ne pouvez avoir que 10 favoris",
|
|
||||||
"Add a podcast" : "Ajouter un podcast",
|
"Add a podcast" : "Ajouter un podcast",
|
||||||
"Could not fetch subscriptions" : "Impossible de récupérer les flux",
|
"Could not fetch subscriptions" : "Impossible de récupérer les flux",
|
||||||
"Find a podcast" : "Chercher un podcast",
|
"Find a podcast" : "Chercher un podcast",
|
||||||
"Error loading feed" : "Erreur lors du chargement du flux",
|
"Error loading feed" : "Erreur lors du chargement du flux",
|
||||||
"Missing required app" : "Une application requise est manquante",
|
"Missing required app" : "Une application requise est manquante",
|
||||||
"Install GPodder Sync" : "Installer GPodder Sync",
|
"Install GPodder Sync" : "Installer GPodder Sync"
|
||||||
"Pin some subscriptions to see their latest updates" : "Ajoutez des abonnements en favoris pour obtenir les dernières nouvelles ici",
|
|
||||||
"No favorites" : "Aucun favoris",
|
|
||||||
"A browser extension conflict with RePod" : "Une extension de votre navigateur entre en conflit avec RePod"
|
|
||||||
},
|
},
|
||||||
"");
|
"");
|
||||||
|
28
l10n/fr.json
@ -3,28 +3,20 @@
|
|||||||
"Podcast" : "Podcast",
|
"Podcast" : "Podcast",
|
||||||
"RePod" : "RePod",
|
"RePod" : "RePod",
|
||||||
"🔊 Browse, manage and listen to podcasts" : "🔊 Parcourir, gérer et écouter vos podcasts",
|
"🔊 Browse, manage and listen to podcasts" : "🔊 Parcourir, gérer et écouter vos podcasts",
|
||||||
"## Features\n- 🔍 Browse and subscribe huge collection of podcasts\n- 🔊 Listen to episodes directly in Nextcloud\n- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/) and [other apps](https://git.crystalyx.net/Xefir/repod#clients-supporting-sync-of-gpoddersync)\n- 📱 Mobile friendly interface\n- 📡 Import and export your subscriptions\n- ➡️ Full features comparison [here](https://git.crystalyx.net/Xefir/repod#comparaison-with-similar-apps-for-nextcloud)\n\n## Requirements\nYou need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installed to use this app!" : "## Fonctionnalités\n- 🔍 Parcourir et s'abonner à une grande collections de podcasts\n- 🔊 Écouter vos épisodes directement sur Nextcloud\n- 🌐 Synchroniser son activité avec [AntennaPod](https://antennapod.org/) et d'autres [applications](https://git.crystalyx.net/Xefir/repod#clients-supporting-sync-of-gpoddersync)\n- 📱 Interface optimisée pour mobiles et ordinateurs\n- 📡 Import/export de ses abonnements\n- ➡️ Tableau récapitulatif complet des fonctionnalitées [ici](https://git.crystalyx.net/Xefir/repod#comparaison-with-similar-apps-for-nextcloud)\n\n## Pré-requis\nVous devez avoir [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installé pour utiliser cette application !",
|
"## Features\n- 🔍 Browse and subscribe huge collection of podcasts\n- 🔊 Listen to episodes directly in Nextcloud\n- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/)\n\n## Requirements\nYou need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installed to use this app!" : "## Fonctionnalités\n- 🔍 Parcourir et s'abonner à une grande collections de podcasts\n- 🔊 Écouter vos épisodes directement sur Nextcloud\n- 🌐 Synchroniser son activité avec [AntennaPod](https://antennapod.org/)\n\n## Pré-requis\nVous devez avoir [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installé pour utiliser cette application !",
|
||||||
"Download" : "Télécharger",
|
"Download" : "Télécharger",
|
||||||
"Add a RSS link" : "Ajouter un lien RSS",
|
"Add a RSS link" : "Ajouter un lien RSS",
|
||||||
"Subscribe" : "S'abonner",
|
|
||||||
"Error while adding the feed" : "Erreur lors de l'ajout du flux",
|
|
||||||
"Could not fetch search results" : "Impossible de récupérer les resultats de la recherche",
|
"Could not fetch search results" : "Impossible de récupérer les resultats de la recherche",
|
||||||
"New podcasts" : "Nouveautés",
|
"New podcasts" : "Nouveautés",
|
||||||
"Hot podcasts" : "Tendances",
|
"Hot podcasts" : "Tendances",
|
||||||
"Could not fetch tops" : "Impossible de récupérer les tops",
|
"Could not fetch tops" : "Impossible de récupérer les tops",
|
||||||
"Copy feed" : "Copier le flux",
|
"Copy feed" : "Copier le flux",
|
||||||
"Link copied to the clipboard" : "Lien vers le flux copié dans le presse-papiers",
|
"Subscribe" : "S'abonner",
|
||||||
|
"Error while adding the feed" : "Erreur lors de l'ajout du flux",
|
||||||
|
"Feed's link copied to the clipboard" : "Lien vers le flux copié dans le presse-papiers",
|
||||||
"Play" : "Lecture",
|
"Play" : "Lecture",
|
||||||
"Stop" : "Arrêter",
|
"Stop" : "Arrêter",
|
||||||
"Read" : "Lu",
|
|
||||||
"Open website" : "Ouvrir le site web",
|
|
||||||
"Could not change the status of the episode" : "Impossible de changer le status de l'épisode",
|
|
||||||
"Could not fetch episodes" : "Impossible de récuprer les épisodes",
|
"Could not fetch episodes" : "Impossible de récuprer les épisodes",
|
||||||
"Rewind 10 seconds" : "Retour rapide de 10 secondes",
|
|
||||||
"Pause" : "Pause",
|
|
||||||
"Fast forward 30 seconds" : "Avance rapide de 30 secondes",
|
|
||||||
"Mute" : "Silencer",
|
|
||||||
"Unmute" : "Paroler",
|
|
||||||
"Export subscriptions" : "Exporter les abonnements",
|
"Export subscriptions" : "Exporter les abonnements",
|
||||||
"Filtering episodes" : "Filtrage des épisodes",
|
"Filtering episodes" : "Filtrage des épisodes",
|
||||||
"Show all" : "Montrer tout",
|
"Show all" : "Montrer tout",
|
||||||
@ -33,24 +25,14 @@
|
|||||||
"Unlistened" : "Non lus",
|
"Unlistened" : "Non lus",
|
||||||
"Import subscriptions" : "Importer les abonnements",
|
"Import subscriptions" : "Importer les abonnements",
|
||||||
"Import OPML file" : "Importer un fichier OPML",
|
"Import OPML file" : "Importer un fichier OPML",
|
||||||
"Rate RePod ❤️" : "Donnez votre avis ❤️",
|
|
||||||
"Sleep timer" : "Minuteur",
|
|
||||||
"Minutes" : "Minutes",
|
|
||||||
"_%n min_::_%n mins_" : ["%n min","%n mins"],
|
|
||||||
"_%n sec_::_%n secs_" : ["%s sec","%n secs"],
|
|
||||||
"Playback speed" : "Vitesse de lecture",
|
"Playback speed" : "Vitesse de lecture",
|
||||||
"Favorite" : "Favori",
|
|
||||||
"Are you sure you want to delete this subscription?" : "Êtes-vous sûr de vouloir supprimer ce flux ?",
|
"Are you sure you want to delete this subscription?" : "Êtes-vous sûr de vouloir supprimer ce flux ?",
|
||||||
"Error while removing the feed" : "Erreur lors de la suppression du flux",
|
"Error while removing the feed" : "Erreur lors de la suppression du flux",
|
||||||
"You can only have 10 favorites" : "Vous ne pouvez avoir que 10 favoris",
|
|
||||||
"Add a podcast" : "Ajouter un podcast",
|
"Add a podcast" : "Ajouter un podcast",
|
||||||
"Could not fetch subscriptions" : "Impossible de récupérer les flux",
|
"Could not fetch subscriptions" : "Impossible de récupérer les flux",
|
||||||
"Find a podcast" : "Chercher un podcast",
|
"Find a podcast" : "Chercher un podcast",
|
||||||
"Error loading feed" : "Erreur lors du chargement du flux",
|
"Error loading feed" : "Erreur lors du chargement du flux",
|
||||||
"Missing required app" : "Une application requise est manquante",
|
"Missing required app" : "Une application requise est manquante",
|
||||||
"Install GPodder Sync" : "Installer GPodder Sync",
|
"Install GPodder Sync" : "Installer GPodder Sync"
|
||||||
"Pin some subscriptions to see their latest updates" : "Ajoutez des abonnements en favoris pour obtenir les dernières nouvelles ici",
|
|
||||||
"No favorites" : "Aucun favoris",
|
|
||||||
"A browser extension conflict with RePod" : "Une extension de votre navigateur entre en conflit avec RePod"
|
|
||||||
},"pluralForm" :""
|
},"pluralForm" :""
|
||||||
}
|
}
|
@ -32,10 +32,6 @@ class Application extends App implements IBootstrap
|
|||||||
/** @var IInitialState $initialState */
|
/** @var IInitialState $initialState */
|
||||||
$initialState = $appContainer->get(IInitialState::class);
|
$initialState = $appContainer->get(IInitialState::class);
|
||||||
|
|
||||||
if (null === $appManager->getAppInfo(self::GPODDERSYNC_ID)) {
|
|
||||||
$appManager->disableApp(self::GPODDERSYNC_ID);
|
|
||||||
}
|
|
||||||
|
|
||||||
$gpoddersync = $appManager->isEnabledForUser(self::GPODDERSYNC_ID);
|
$gpoddersync = $appManager->isEnabledForUser(self::GPODDERSYNC_ID);
|
||||||
if (!$gpoddersync) {
|
if (!$gpoddersync) {
|
||||||
try {
|
try {
|
||||||
|
@ -11,9 +11,6 @@ use OCA\RePod\Core\EpisodeAction\EpisodeActionReader;
|
|||||||
use OCA\RePod\Service\UserService;
|
use OCA\RePod\Service\UserService;
|
||||||
use OCP\AppFramework\Controller;
|
use OCP\AppFramework\Controller;
|
||||||
use OCP\AppFramework\Http;
|
use OCP\AppFramework\Http;
|
||||||
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
|
|
||||||
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
|
||||||
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
|
||||||
use OCP\AppFramework\Http\JSONResponse;
|
use OCP\AppFramework\Http\JSONResponse;
|
||||||
use OCP\Http\Client\IClientService;
|
use OCP\Http\Client\IClientService;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
@ -30,9 +27,6 @@ class EpisodesController extends Controller
|
|||||||
parent::__construct(Application::APP_ID, $request);
|
parent::__construct(Application::APP_ID, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[NoAdminRequired]
|
|
||||||
#[NoCSRFRequired]
|
|
||||||
#[FrontpageRoute(verb: 'GET', url: '/episodes/list')]
|
|
||||||
public function list(string $url): JSONResponse {
|
public function list(string $url): JSONResponse {
|
||||||
$client = $this->clientService->newClient();
|
$client = $this->clientService->newClient();
|
||||||
$feed = $client->get($url);
|
$feed = $client->get($url);
|
||||||
@ -43,9 +37,6 @@ class EpisodesController extends Controller
|
|||||||
return new JSONResponse($episodes, $feed->getStatusCode());
|
return new JSONResponse($episodes, $feed->getStatusCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[NoAdminRequired]
|
|
||||||
#[NoCSRFRequired]
|
|
||||||
#[FrontpageRoute(verb: 'GET', url: '/episodes/action')]
|
|
||||||
public function action(string $url): JSONResponse {
|
public function action(string $url): JSONResponse {
|
||||||
$action = $this->episodeActionRepository->findByEpisodeUrl($url, $this->userService->getUserUID());
|
$action = $this->episodeActionRepository->findByEpisodeUrl($url, $this->userService->getUserUID());
|
||||||
|
|
||||||
|
@ -10,9 +10,6 @@ use OCA\GPodderSync\Core\SubscriptionChange\SubscriptionChangeSaver;
|
|||||||
use OCA\RePod\AppInfo\Application;
|
use OCA\RePod\AppInfo\Application;
|
||||||
use OCA\RePod\Service\UserService;
|
use OCA\RePod\Service\UserService;
|
||||||
use OCP\AppFramework\Controller;
|
use OCP\AppFramework\Controller;
|
||||||
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
|
|
||||||
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
|
||||||
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
|
||||||
use OCP\AppFramework\Http\DataDownloadResponse;
|
use OCP\AppFramework\Http\DataDownloadResponse;
|
||||||
use OCP\AppFramework\Http\Response;
|
use OCP\AppFramework\Http\Response;
|
||||||
use OCP\IL10N;
|
use OCP\IL10N;
|
||||||
@ -31,9 +28,10 @@ class OpmlController extends Controller
|
|||||||
parent::__construct(Application::APP_ID, $request);
|
parent::__construct(Application::APP_ID, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[NoAdminRequired]
|
/**
|
||||||
#[NoCSRFRequired]
|
* @NoAdminRequired
|
||||||
#[FrontpageRoute(verb: 'GET', url: '/opml/export')]
|
* @NoCSRFRequired
|
||||||
|
*/
|
||||||
public function export(): DataDownloadResponse {
|
public function export(): DataDownloadResponse {
|
||||||
// https://github.com/AntennaPod/AntennaPod/blob/master/core/src/main/java/de/danoeh/antennapod/core/export/opml/OpmlWriter.java
|
// https://github.com/AntennaPod/AntennaPod/blob/master/core/src/main/java/de/danoeh/antennapod/core/export/opml/OpmlWriter.java
|
||||||
$xml = new \SimpleXMLElement('<opml/>', namespaceOrPrefix: 'http://xmlpull.org/v1/doc/features.html#indent-output');
|
$xml = new \SimpleXMLElement('<opml/>', namespaceOrPrefix: 'http://xmlpull.org/v1/doc/features.html#indent-output');
|
||||||
@ -84,9 +82,10 @@ class OpmlController extends Controller
|
|||||||
return new DataDownloadResponse((string) $xml->asXML(), 'repod-'.$dateCreated->getTimestamp().'.opml', ' application/xml');
|
return new DataDownloadResponse((string) $xml->asXML(), 'repod-'.$dateCreated->getTimestamp().'.opml', ' application/xml');
|
||||||
}
|
}
|
||||||
|
|
||||||
#[NoAdminRequired]
|
/**
|
||||||
#[NoCSRFRequired]
|
* @NoAdminRequired
|
||||||
#[FrontpageRoute(verb: 'POST', url: '/opml/import')]
|
* @NoCSRFRequired
|
||||||
|
*/
|
||||||
public function import(): Response {
|
public function import(): Response {
|
||||||
$file = $this->request->getUploadedFile('import');
|
$file = $this->request->getUploadedFile('import');
|
||||||
|
|
||||||
|
@ -6,9 +6,6 @@ namespace OCA\RePod\Controller;
|
|||||||
|
|
||||||
use OCA\RePod\AppInfo\Application;
|
use OCA\RePod\AppInfo\Application;
|
||||||
use OCP\AppFramework\Controller;
|
use OCP\AppFramework\Controller;
|
||||||
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
|
|
||||||
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
|
||||||
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
|
||||||
use OCP\AppFramework\Http\ContentSecurityPolicy;
|
use OCP\AppFramework\Http\ContentSecurityPolicy;
|
||||||
use OCP\AppFramework\Http\TemplateResponse;
|
use OCP\AppFramework\Http\TemplateResponse;
|
||||||
use OCP\IConfig;
|
use OCP\IConfig;
|
||||||
@ -24,12 +21,12 @@ class PageController extends Controller
|
|||||||
parent::__construct(Application::APP_ID, $request);
|
parent::__construct(Application::APP_ID, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[NoAdminRequired]
|
/**
|
||||||
#[NoCSRFRequired]
|
* @NoAdminRequired
|
||||||
#[FrontpageRoute(verb: 'GET', url: '/')]
|
* @NoCSRFRequired
|
||||||
|
*/
|
||||||
public function index(): TemplateResponse {
|
public function index(): TemplateResponse {
|
||||||
Util::addScript(Application::APP_ID, Application::APP_ID.'-main');
|
Util::addScript(Application::APP_ID, 'repod-main');
|
||||||
Util::addStyle(Application::APP_ID, Application::APP_ID.'-main');
|
|
||||||
|
|
||||||
$csp = new ContentSecurityPolicy();
|
$csp = new ContentSecurityPolicy();
|
||||||
$csp->addAllowedImageDomain('*');
|
$csp->addAllowedImageDomain('*');
|
||||||
@ -40,18 +37,4 @@ class PageController extends Controller
|
|||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[NoAdminRequired]
|
|
||||||
#[NoCSRFRequired]
|
|
||||||
#[FrontpageRoute(verb: 'GET', url: '/discover')]
|
|
||||||
public function discover(): TemplateResponse {
|
|
||||||
return $this->index();
|
|
||||||
}
|
|
||||||
|
|
||||||
#[NoAdminRequired]
|
|
||||||
#[NoCSRFRequired]
|
|
||||||
#[FrontpageRoute(verb: 'GET', url: '/feed/{path}', requirements: ['path' => '.+'])]
|
|
||||||
public function feed(): TemplateResponse {
|
|
||||||
return $this->index();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -8,36 +8,25 @@ use OCA\GPodderSync\Core\PodcastData\PodcastData;
|
|||||||
use OCA\GPodderSync\Core\PodcastData\PodcastDataReader;
|
use OCA\GPodderSync\Core\PodcastData\PodcastDataReader;
|
||||||
use OCA\RePod\AppInfo\Application;
|
use OCA\RePod\AppInfo\Application;
|
||||||
use OCP\AppFramework\Controller;
|
use OCP\AppFramework\Controller;
|
||||||
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
|
|
||||||
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
|
||||||
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
|
||||||
use OCP\AppFramework\Http\JSONResponse;
|
use OCP\AppFramework\Http\JSONResponse;
|
||||||
use OCP\Http\Client\IClientService;
|
use OCP\Http\Client\IClientService;
|
||||||
use OCP\ICacheFactory;
|
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
|
|
||||||
class PodcastController extends Controller
|
class PodcastController extends Controller
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
IRequest $request,
|
IRequest $request,
|
||||||
private ICacheFactory $cacheFactory,
|
|
||||||
private IClientService $clientService,
|
private IClientService $clientService,
|
||||||
private PodcastDataReader $podcastDataReader
|
private PodcastDataReader $podcastDataReader
|
||||||
) {
|
) {
|
||||||
parent::__construct(Application::APP_ID, $request);
|
parent::__construct(Application::APP_ID, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[NoAdminRequired]
|
|
||||||
#[NoCSRFRequired]
|
|
||||||
#[FrontpageRoute(verb: 'GET', url: '/podcast')]
|
|
||||||
public function index(string $url): JSONResponse {
|
public function index(string $url): JSONResponse {
|
||||||
$podcast = null;
|
|
||||||
|
|
||||||
if ($this->cacheFactory->isLocalCacheAvailable()) {
|
|
||||||
try {
|
try {
|
||||||
$podcast = $this->podcastDataReader->tryGetCachedPodcastData($url);
|
$podcast = $this->podcastDataReader->tryGetCachedPodcastData($url);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
}
|
$podcast = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($podcast) {
|
if ($podcast) {
|
||||||
@ -48,12 +37,10 @@ class PodcastController extends Controller
|
|||||||
$feed = $client->get($url);
|
$feed = $client->get($url);
|
||||||
$podcast = PodcastData::parseRssXml((string) $feed->getBody());
|
$podcast = PodcastData::parseRssXml((string) $feed->getBody());
|
||||||
|
|
||||||
if ($this->cacheFactory->isLocalCacheAvailable()) {
|
|
||||||
try {
|
try {
|
||||||
$this->podcastDataReader->trySetCachedPodcastData($url, $podcast);
|
$this->podcastDataReader->trySetCachedPodcastData($url, $podcast);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return new JSONResponse($podcast, $feed->getStatusCode());
|
return new JSONResponse($podcast, $feed->getStatusCode());
|
||||||
}
|
}
|
||||||
|
@ -7,9 +7,6 @@ namespace OCA\RePod\Controller;
|
|||||||
use OCA\RePod\AppInfo\Application;
|
use OCA\RePod\AppInfo\Application;
|
||||||
use OCA\RePod\Service\MultiPodService;
|
use OCA\RePod\Service\MultiPodService;
|
||||||
use OCP\AppFramework\Controller;
|
use OCP\AppFramework\Controller;
|
||||||
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
|
|
||||||
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
|
||||||
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
|
||||||
use OCP\AppFramework\Http\JSONResponse;
|
use OCP\AppFramework\Http\JSONResponse;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
|
|
||||||
@ -22,10 +19,7 @@ class SearchController extends Controller
|
|||||||
parent::__construct(Application::APP_ID, $request);
|
parent::__construct(Application::APP_ID, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[NoAdminRequired]
|
public function index(string $value): JSONResponse {
|
||||||
#[NoCSRFRequired]
|
return new JSONResponse($this->multiPodService->search($value));
|
||||||
#[FrontpageRoute(verb: 'GET', url: '/search')]
|
|
||||||
public function index(string $q): JSONResponse {
|
|
||||||
return new JSONResponse($this->multiPodService->search($q));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,13 +7,10 @@ namespace OCA\RePod\Controller;
|
|||||||
use OCA\RePod\AppInfo\Application;
|
use OCA\RePod\AppInfo\Application;
|
||||||
use OCA\RePod\Service\FyydService;
|
use OCA\RePod\Service\FyydService;
|
||||||
use OCP\AppFramework\Controller;
|
use OCP\AppFramework\Controller;
|
||||||
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
|
|
||||||
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
|
||||||
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
|
||||||
use OCP\AppFramework\Http\JSONResponse;
|
use OCP\AppFramework\Http\JSONResponse;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
|
|
||||||
class ToplistController extends Controller
|
class TopsController extends Controller
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
IRequest $request,
|
IRequest $request,
|
||||||
@ -22,16 +19,10 @@ class ToplistController extends Controller
|
|||||||
parent::__construct(Application::APP_ID, $request);
|
parent::__construct(Application::APP_ID, $request);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[NoAdminRequired]
|
|
||||||
#[NoCSRFRequired]
|
|
||||||
#[FrontpageRoute(verb: 'GET', url: '/toplist/hot')]
|
|
||||||
public function hot(): JSONResponse {
|
public function hot(): JSONResponse {
|
||||||
return new JSONResponse($this->fyydService->hot());
|
return new JSONResponse($this->fyydService->hot());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[NoAdminRequired]
|
|
||||||
#[NoCSRFRequired]
|
|
||||||
#[FrontpageRoute(verb: 'GET', url: '/toplist/new')]
|
|
||||||
public function new(): JSONResponse {
|
public function new(): JSONResponse {
|
||||||
return new JSONResponse($this->fyydService->latest());
|
return new JSONResponse($this->fyydService->latest());
|
||||||
}
|
}
|
@ -55,24 +55,22 @@ class EpisodeActionReader extends CoreEpisodeActionReader
|
|||||||
$link = $this->stringOrNull($item->link);
|
$link = $this->stringOrNull($item->link);
|
||||||
|
|
||||||
// Get episode image
|
// Get episode image
|
||||||
if (isset($iTunesItemChildren)) {
|
$image = $this->stringOrNull($item->image->url);
|
||||||
|
|
||||||
|
if (!isset($image) && isset($iTunesItemChildren)) {
|
||||||
$imageAttributes = $iTunesItemChildren->image->attributes();
|
$imageAttributes = $iTunesItemChildren->image->attributes();
|
||||||
$image = $this->stringOrNull(isset($imageAttributes) ? (string) $imageAttributes->href : '');
|
$image = $this->stringOrNull(isset($imageAttributes) ? (string) $imageAttributes->href : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($image)) {
|
||||||
|
$image = $this->stringOrNull($channel->image->url);
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset($image) && isset($iTunesChannelChildren)) {
|
if (!isset($image) && isset($iTunesChannelChildren)) {
|
||||||
$imageAttributes = $iTunesChannelChildren->image->attributes();
|
$imageAttributes = $iTunesChannelChildren->image->attributes();
|
||||||
$image = $this->stringOrNull(isset($imageAttributes) ? (string) $imageAttributes->href : '');
|
$image = $this->stringOrNull(isset($imageAttributes) ? (string) $imageAttributes->href : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($image)) {
|
|
||||||
$image = $this->stringOrNull($item->image->url);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($image)) {
|
|
||||||
$image = $this->stringOrNull($channel->image->url);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($image)) {
|
if (!isset($image)) {
|
||||||
preg_match('/<itunes:image\s+href="([^"]+)"/', $xmlString, $matches);
|
preg_match('/<itunes:image\s+href="([^"]+)"/', $xmlString, $matches);
|
||||||
if (count($matches) > 1) {
|
if (count($matches) > 1) {
|
||||||
|
17777
package-lock.json
generated
79
package.json
@ -1,51 +1,46 @@
|
|||||||
{
|
{
|
||||||
"name": "repod",
|
"name": "repod",
|
||||||
"license": "AGPL-3.0-or-later",
|
"description": "🔊 Browse, manage and listen to podcasts",
|
||||||
"scripts": {
|
"version": "1.5.8",
|
||||||
"build": "vue-tsc && vite build",
|
"bugs": {
|
||||||
"dev": "vite --mode development build",
|
"url": "https://git.crystalyx.net/Xefir/repod/issues"
|
||||||
"watch": "vite --mode development build --watch",
|
},
|
||||||
"lint": "vue-tsc && eslint src",
|
"license": "agpl",
|
||||||
"lint:fix": "vue-tsc && eslint src --fix",
|
"private": true,
|
||||||
"stylelint": "stylelint src/**/*.vue src/**/*.scss src/**/*.css",
|
"scripts": {
|
||||||
"stylelint:fix": "stylelint src/**/*.vue src/**/*.scss src/**/*.css --fix"
|
"build": "webpack --node-env production --progress",
|
||||||
|
"dev": "webpack --node-env development --progress",
|
||||||
|
"watch": "webpack --node-env development --progress --watch",
|
||||||
|
"serve": "webpack --node-env development serve --progress",
|
||||||
|
"lint": "eslint --ext .js,.vue src",
|
||||||
|
"lint:fix": "eslint --ext .js,.vue src --fix",
|
||||||
|
"stylelint": "stylelint css/*.css css/*.scss src/**/*.scss src/**/*.vue",
|
||||||
|
"stylelint:fix": "stylelint css/*.css css/*.scss src/**/*.scss src/**/*.vue --fix"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@nextcloud/axios": "^2.4.0",
|
||||||
|
"@nextcloud/dialogs": "^5.1.1",
|
||||||
|
"@nextcloud/initial-state": "^2.1.0",
|
||||||
|
"@nextcloud/l10n": "^2.2.0",
|
||||||
|
"@nextcloud/router": "^3.0.0",
|
||||||
|
"@nextcloud/vue": "^8.6.2",
|
||||||
|
"vue": "^2",
|
||||||
|
"vue-material-design-icons": "^5.3.0",
|
||||||
|
"vue-router": "^3",
|
||||||
|
"vuex": "^3"
|
||||||
},
|
},
|
||||||
"type": "module",
|
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"extends @nextcloud/browserslist-config"
|
"extends @nextcloud/browserslist-config"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"engines": {
|
||||||
"@formatjs/intl-segmenter": "^11.7.3",
|
"node": "^20.0.0",
|
||||||
"@nextcloud/axios": "^2.5.1",
|
"npm": "^9.0.0"
|
||||||
"@nextcloud/initial-state": "^2.2.0",
|
|
||||||
"@nextcloud/l10n": "^3.1.0",
|
|
||||||
"@nextcloud/router": "^3.0.1",
|
|
||||||
"@nextcloud/vite-config": "^2.2.2",
|
|
||||||
"@nextcloud/vue": "9.0.0-alpha.5",
|
|
||||||
"dompurify": "^3.1.7",
|
|
||||||
"linkify-html": "^4.1.3",
|
|
||||||
"pinia": "^2.2.6",
|
|
||||||
"toastify-js": "^1.12.0",
|
|
||||||
"vite": "^5.4.10",
|
|
||||||
"vue": "^3.5.12",
|
|
||||||
"vue-material-design-icons": "^5.3.1",
|
|
||||||
"vue-router": "^4.4.5"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@nextcloud/browserslist-config": "^3.0.1",
|
"@nextcloud/babel-config": "^1.0.0",
|
||||||
"@nextcloud/eslint-config": "^8.4.1",
|
"@nextcloud/browserslist-config": "^3.0.0",
|
||||||
"@nextcloud/prettier-config": "^1.1.0",
|
"@nextcloud/eslint-config": "^8.3.0",
|
||||||
"@nextcloud/stylelint-config": "^3.0.1",
|
"@nextcloud/stylelint-config": "^2.4.0",
|
||||||
"@types/toastify-js": "^1.12.3",
|
"@nextcloud/webpack-vue-config": "^6.0.1"
|
||||||
"@vue/eslint-config-typescript": "^13",
|
}
|
||||||
"@vue/tsconfig": "^0.5.1",
|
|
||||||
"eslint-config-prettier": "^9.1.0",
|
|
||||||
"eslint-plugin-pinia": "^0.4.1",
|
|
||||||
"eslint-plugin-prettier": "^5.2.1",
|
|
||||||
"ts-node": "^10.9.2",
|
|
||||||
"typescript": "5.5",
|
|
||||||
"vue-eslint-parser": "^9.4.3",
|
|
||||||
"vue-tsc": "^2.1.10"
|
|
||||||
},
|
|
||||||
"prettier": "@nextcloud/prettier-config"
|
|
||||||
}
|
}
|
||||||
|
19
psalm.xml
@ -2,12 +2,11 @@
|
|||||||
<psalm
|
<psalm
|
||||||
errorLevel="1"
|
errorLevel="1"
|
||||||
resolveFromConfigFile="true"
|
resolveFromConfigFile="true"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xmlns="https://getpsalm.org/schema/config"
|
|
||||||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
|
|
||||||
findUnusedBaselineEntry="true"
|
findUnusedBaselineEntry="true"
|
||||||
findUnusedCode="false"
|
findUnusedCode="false"
|
||||||
phpVersion="8.1"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns="https://getpsalm.org/schema/config"
|
||||||
|
xsi:schemaLocation="https://getpsalm.org/schema/config https://raw.githubusercontent.com/vimeo/psalm/master/config.xsd"
|
||||||
>
|
>
|
||||||
<projectFiles>
|
<projectFiles>
|
||||||
<directory name="lib" />
|
<directory name="lib" />
|
||||||
@ -18,8 +17,20 @@
|
|||||||
</projectFiles>
|
</projectFiles>
|
||||||
<extraFiles>
|
<extraFiles>
|
||||||
<directory name="vendor" />
|
<directory name="vendor" />
|
||||||
|
<ignoreFiles>
|
||||||
|
<directory name="vendor/psalm" />
|
||||||
|
</ignoreFiles>
|
||||||
</extraFiles>
|
</extraFiles>
|
||||||
<issueHandlers>
|
<issueHandlers>
|
||||||
|
<UndefinedDocblockClass>
|
||||||
|
<errorLevel type="suppress">
|
||||||
|
<referencedClass name="OC\AppFramework\OCS\BaseResponse"/>
|
||||||
|
<referencedClass name="Doctrine\DBAL\Schema\Schema" />
|
||||||
|
<referencedClass name="Doctrine\DBAL\Schema\SchemaException" />
|
||||||
|
<referencedClass name="Doctrine\DBAL\Driver\Statement" />
|
||||||
|
<referencedClass name="Doctrine\DBAL\Schema\Table" />
|
||||||
|
</errorLevel>
|
||||||
|
</UndefinedDocblockClass>
|
||||||
<InvalidReturnType>
|
<InvalidReturnType>
|
||||||
<errorLevel type="suppress">
|
<errorLevel type="suppress">
|
||||||
<directory name="stubs" />
|
<directory name="stubs" />
|
||||||
|
Before Width: | Height: | Size: 1.7 MiB |
Before Width: | Height: | Size: 857 KiB After Width: | Height: | Size: 282 KiB |
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 429 KiB |
Before Width: | Height: | Size: 817 KiB After Width: | Height: | Size: 171 KiB |
Before Width: | Height: | Size: 961 KiB After Width: | Height: | Size: 214 KiB |
13
src/App.vue
@ -7,15 +7,13 @@
|
|||||||
</NcContent>
|
</NcContent>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script>
|
||||||
import 'toastify-js/src/toastify.css'
|
import '@nextcloud/dialogs/style.css'
|
||||||
import { mapActions, mapState } from 'pinia'
|
|
||||||
import Bar from './components/Player/Bar.vue'
|
import Bar from './components/Player/Bar.vue'
|
||||||
import GPodder from './views/GPodder.vue'
|
import GPodder from './views/GPodder.vue'
|
||||||
import { NcContent } from '@nextcloud/vue'
|
import { NcContent } from '@nextcloud/vue'
|
||||||
import Subscriptions from './components/Sidebar/Subscriptions.vue'
|
import Subscriptions from './components/Sidebar/Subscriptions.vue'
|
||||||
import { loadState } from '@nextcloud/initial-state'
|
import { loadState } from '@nextcloud/initial-state'
|
||||||
import { usePlayer } from './store/player.ts'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'App',
|
name: 'App',
|
||||||
@ -26,16 +24,9 @@ export default {
|
|||||||
Subscriptions,
|
Subscriptions,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(usePlayer, ['paused']),
|
|
||||||
gpodder() {
|
gpodder() {
|
||||||
return loadState('repod', 'gpodder', false)
|
return loadState('repod', 'gpodder', false)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
|
||||||
this.init()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
...mapActions(usePlayer, ['init']),
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<NcAppContent :class="{ episode }">
|
<NcAppContent :class="episode ? 'padding' : ''">
|
||||||
<slot />
|
<slot />
|
||||||
</NcAppContent>
|
</NcAppContent>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script>
|
||||||
import { NcAppContent } from '@nextcloud/vue'
|
import { NcAppContent } from '@nextcloud/vue'
|
||||||
import { mapState } from 'pinia'
|
|
||||||
import { usePlayer } from '../../store/player.ts'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AppContent',
|
name: 'AppContent',
|
||||||
@ -15,13 +13,15 @@ export default {
|
|||||||
NcAppContent,
|
NcAppContent,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(usePlayer, ['episode']),
|
episode() {
|
||||||
|
return this.$store.state.player.episode
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.episode {
|
.padding {
|
||||||
padding-bottom: 6rem;
|
padding-bottom: 6rem;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<NcAppNavigation :class="{ episode }">
|
<NcAppNavigation :class="episode ? 'padding' : ''">
|
||||||
<slot />
|
<slot />
|
||||||
<template #list>
|
<template #list>
|
||||||
<slot name="list" />
|
<slot name="list" />
|
||||||
@ -10,10 +10,8 @@
|
|||||||
</NcAppNavigation>
|
</NcAppNavigation>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script>
|
||||||
import { NcAppNavigation } from '@nextcloud/vue'
|
import { NcAppNavigation } from '@nextcloud/vue'
|
||||||
import { mapState } from 'pinia'
|
|
||||||
import { usePlayer } from '../../store/player.ts'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AppNavigation',
|
name: 'AppNavigation',
|
||||||
@ -21,13 +19,15 @@ export default {
|
|||||||
NcAppNavigation,
|
NcAppNavigation,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(usePlayer, ['episode']),
|
episode() {
|
||||||
|
return this.$store.state.player.episode
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.episode {
|
.padding {
|
||||||
padding-bottom: 6rem;
|
padding-bottom: 6rem;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
<template>
|
|
||||||
<NcEmptyContent class="empty">
|
|
||||||
<slot />
|
|
||||||
<template #icon>
|
|
||||||
<slot name="icon" />
|
|
||||||
</template>
|
|
||||||
<template #name>
|
|
||||||
<slot name="name" />
|
|
||||||
</template>
|
|
||||||
<template #description>
|
|
||||||
<slot name="description" />
|
|
||||||
</template>
|
|
||||||
<template #action>
|
|
||||||
<slot name="action" />
|
|
||||||
</template>
|
|
||||||
</NcEmptyContent>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import { NcEmptyContent } from '@nextcloud/vue'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'EmptyContent',
|
|
||||||
components: {
|
|
||||||
NcEmptyContent,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.empty {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -2,7 +2,7 @@
|
|||||||
<NcLoadingIcon class="loading" />
|
<NcLoadingIcon class="loading" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script>
|
||||||
import { NcLoadingIcon } from '@nextcloud/vue'
|
import { NcLoadingIcon } from '@nextcloud/vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -14,7 +14,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.loading {
|
.loading {
|
||||||
margin: 2rem 0;
|
margin: 2rem 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,73 +1,95 @@
|
|||||||
|
<!-- eslint-disable vue/no-v-html -->
|
||||||
<template>
|
<template>
|
||||||
<div class="flex">
|
<div>
|
||||||
<NcAvatar
|
<NcAvatar :display-name="name"
|
||||||
:display-name="episode.name"
|
|
||||||
:is-no-user="true"
|
:is-no-user="true"
|
||||||
:size="256"
|
:size="256"
|
||||||
:url="episode.image" />
|
:url="image" />
|
||||||
<h2>{{ episode.name }}</h2>
|
<h2>{{ name }}</h2>
|
||||||
<SafeHtml :source="episode.description || ''" />
|
<p v-html="strippedDescription" />
|
||||||
<div class="flex">
|
<div>
|
||||||
<NcButton v-if="episode.link" :href="episode.link" target="_blank">
|
<NcButton v-if="link"
|
||||||
<template #icon>
|
:href="link"
|
||||||
<OpenInNewIcon :size="20" />
|
|
||||||
</template>
|
|
||||||
{{ episode.title }}
|
|
||||||
</NcButton>
|
|
||||||
<NcButton
|
|
||||||
v-if="episode.url"
|
|
||||||
:download="filenameFromUrl(episode.url)"
|
|
||||||
:href="episode.url"
|
|
||||||
target="_blank">
|
target="_blank">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<DownloadIcon :size="20" />
|
<OpenInNew :size="20" />
|
||||||
</template>
|
</template>
|
||||||
{{ t('repod', 'Download') }}
|
{{ title }}
|
||||||
{{ episode.size ? `(${humanFileSize(episode.size)})` : '' }}
|
</NcButton>
|
||||||
|
<NcButton v-if="url"
|
||||||
|
:href="url"
|
||||||
|
target="_blank">
|
||||||
|
<template #icon>
|
||||||
|
<Download :size="20" />
|
||||||
|
</template>
|
||||||
|
{{ t('repod', 'Download') }} {{ size ? `(${episodeFileSize})` : '' }}
|
||||||
</NcButton>
|
</NcButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script>
|
||||||
import { NcAvatar, NcButton } from '@nextcloud/vue'
|
import { NcAvatar, NcButton } from '@nextcloud/vue'
|
||||||
import DownloadIcon from 'vue-material-design-icons/Download.vue'
|
import Download from 'vue-material-design-icons/Download.vue'
|
||||||
import type { EpisodeInterface } from '../../utils/types.ts'
|
import OpenInNew from 'vue-material-design-icons/OpenInNew.vue'
|
||||||
import OpenInNewIcon from 'vue-material-design-icons/OpenInNew.vue'
|
import { cleanHtml } from '../../utils/text.js'
|
||||||
import SafeHtml from './SafeHtml.vue'
|
import { humanFileSize } from '../../utils/size.js'
|
||||||
import { filenameFromUrl } from '../../utils/url.ts'
|
|
||||||
import { humanFileSize } from '../../utils/size.ts'
|
|
||||||
import { t } from '@nextcloud/l10n'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Modal',
|
name: 'Modal',
|
||||||
components: {
|
components: {
|
||||||
DownloadIcon,
|
Download,
|
||||||
NcAvatar,
|
NcAvatar,
|
||||||
NcButton,
|
NcButton,
|
||||||
OpenInNewIcon,
|
OpenInNew,
|
||||||
SafeHtml,
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
episode: {
|
description: {
|
||||||
type: Object as () => EpisodeInterface,
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
image: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
link: {
|
||||||
|
type: String,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
name: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
size: {
|
||||||
|
type: Number,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
url: {
|
||||||
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
computed: {
|
||||||
filenameFromUrl,
|
episodeFileSize() {
|
||||||
humanFileSize,
|
return humanFileSize(this.size)
|
||||||
t,
|
},
|
||||||
|
strippedDescription() {
|
||||||
|
return cleanHtml(this.description)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.flex {
|
div {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
margin: 2rem;
|
margin: 2rem;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div v-sanitize="source" class="html" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import dompurify from 'dompurify'
|
|
||||||
import linkifyHtml from 'linkify-html'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'SafeHtml',
|
|
||||||
directives: {
|
|
||||||
sanitize: {
|
|
||||||
mounted(el, binding) {
|
|
||||||
el.innerHTML = dompurify.sanitize(
|
|
||||||
linkifyHtml(binding.value, {
|
|
||||||
nl2br: true,
|
|
||||||
target: '_blank',
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
source: {
|
|
||||||
type: String,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.html a {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,37 +1,34 @@
|
|||||||
<template>
|
<template>
|
||||||
<NcAppNavigationList class="list">
|
<ul>
|
||||||
<NcAppNavigationNewItem
|
<NcAppNavigationNewItem :name="t('repod', 'Add a RSS link')" @new-item="addSubscription">
|
||||||
:name="t('repod', 'Add a RSS link')"
|
|
||||||
@new-item="(url) => $router.push(toFeedUrl(url))">
|
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<PlusIcon :size="20" />
|
<Plus :size="20" />
|
||||||
</template>
|
</template>
|
||||||
</NcAppNavigationNewItem>
|
</NcAppNavigationNewItem>
|
||||||
</NcAppNavigationList>
|
</ul>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script>
|
||||||
import { NcAppNavigationList, NcAppNavigationNewItem } from '@nextcloud/vue'
|
import { NcAppNavigationNewItem } from '@nextcloud/vue'
|
||||||
import PlusIcon from 'vue-material-design-icons/Plus.vue'
|
import Plus from 'vue-material-design-icons/Plus.vue'
|
||||||
import { t } from '@nextcloud/l10n'
|
import { encodeUrl } from '../../utils/url.js'
|
||||||
import { toFeedUrl } from '../../utils/url.ts'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AddRss',
|
name: 'AddRss',
|
||||||
components: {
|
components: {
|
||||||
NcAppNavigationList,
|
|
||||||
NcAppNavigationNewItem,
|
NcAppNavigationNewItem,
|
||||||
PlusIcon,
|
Plus,
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
t,
|
addSubscription(feedUrl) {
|
||||||
toFeedUrl,
|
this.$router.push(encodeUrl(feedUrl))
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.list {
|
ul {
|
||||||
margin-top: 2rem;
|
margin-top: 2rem;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -2,60 +2,40 @@
|
|||||||
<div>
|
<div>
|
||||||
<Loading v-if="loading" />
|
<Loading v-if="loading" />
|
||||||
<ul v-if="!loading">
|
<ul v-if="!loading">
|
||||||
<NcListItem
|
<NcListItem v-for="feed in feeds"
|
||||||
v-for="feed in feeds"
|
|
||||||
:key="feed.link"
|
:key="feed.link"
|
||||||
:details="formatLocaleDate(new Date(feed.fetchedAtUnix * 1000))"
|
:details="formatLocaleDate(new Date(feed.fetchedAtUnix*1000))"
|
||||||
:name="feed.title"
|
:name="feed.title"
|
||||||
:to="toFeedUrl(feed.link)">
|
:to="toUrl(feed.link)">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<NcAvatar
|
<NcAvatar :display-name="feed.author"
|
||||||
:display-name="feed.author"
|
|
||||||
:is-no-user="true"
|
:is-no-user="true"
|
||||||
:url="feed.imageUrl" />
|
:url="feed.imageUrl" />
|
||||||
</template>
|
</template>
|
||||||
<template #subname>
|
<template #subname>
|
||||||
{{ feed.author }}
|
{{ feed.author }}
|
||||||
</template>
|
</template>
|
||||||
<template #actions>
|
|
||||||
<NcActionButton
|
|
||||||
v-if="!getSubByUrl(feed.link)"
|
|
||||||
:aria-label="t('repod', 'Subscribe')"
|
|
||||||
:name="t('repod', 'Subscribe')"
|
|
||||||
:title="t('repod', 'Subscribe')"
|
|
||||||
@click="addSubscription(feed.link)">
|
|
||||||
<template #icon>
|
|
||||||
<PlusIcon :size="20" />
|
|
||||||
</template>
|
|
||||||
</NcActionButton>
|
|
||||||
</template>
|
|
||||||
</NcListItem>
|
</NcListItem>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script>
|
||||||
import { NcActionButton, NcAvatar, NcListItem } from '@nextcloud/vue'
|
import { NcAvatar, NcListItem } from '@nextcloud/vue'
|
||||||
import { mapActions, mapState } from 'pinia'
|
|
||||||
import Loading from '../Atoms/Loading.vue'
|
import Loading from '../Atoms/Loading.vue'
|
||||||
import PlusIcon from 'vue-material-design-icons/Plus.vue'
|
|
||||||
import type { PodcastDataInterface } from '../../utils/types.ts'
|
|
||||||
import axios from '@nextcloud/axios'
|
import axios from '@nextcloud/axios'
|
||||||
import { formatLocaleDate } from '../../utils/time.ts'
|
import { debounce } from '../../utils/debounce.js'
|
||||||
|
import { formatLocaleDate } from '../../utils/time.js'
|
||||||
import { generateUrl } from '@nextcloud/router'
|
import { generateUrl } from '@nextcloud/router'
|
||||||
import { showError } from '../../utils/toast.ts'
|
import { showError } from '@nextcloud/dialogs'
|
||||||
import { t } from '@nextcloud/l10n'
|
import { toUrl } from '../../utils/url.js'
|
||||||
import { toFeedUrl } from '../../utils/url.ts'
|
|
||||||
import { useSubscriptions } from '../../store/subscriptions.ts'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Search',
|
name: 'Search',
|
||||||
components: {
|
components: {
|
||||||
Loading,
|
Loading,
|
||||||
NcActionButton,
|
|
||||||
NcAvatar,
|
NcAvatar,
|
||||||
NcListItem,
|
NcListItem,
|
||||||
PlusIcon,
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
value: {
|
value: {
|
||||||
@ -63,55 +43,27 @@ export default {
|
|||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data: () => ({
|
data() {
|
||||||
feeds: [] as PodcastDataInterface[],
|
return {
|
||||||
|
feeds: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
timeout: null as NodeJS.Timeout | null,
|
}
|
||||||
}),
|
|
||||||
computed: {
|
|
||||||
...mapState(useSubscriptions, ['getSubByUrl']),
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
value() {
|
value() {
|
||||||
if (this.timeout) {
|
this.search()
|
||||||
clearTimeout(this.timeout)
|
|
||||||
}
|
|
||||||
this.timeout = setTimeout(this.search, 200)
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(useSubscriptions, ['fetch']),
|
|
||||||
formatLocaleDate,
|
formatLocaleDate,
|
||||||
t,
|
toUrl,
|
||||||
toFeedUrl,
|
search: debounce(async function value() {
|
||||||
async addSubscription(url: string) {
|
|
||||||
try {
|
|
||||||
await axios.post(
|
|
||||||
generateUrl('/apps/gpoddersync/subscription_change/create'),
|
|
||||||
{
|
|
||||||
add: [url],
|
|
||||||
remove: [],
|
|
||||||
},
|
|
||||||
)
|
|
||||||
} catch (e) {
|
|
||||||
console.error(e)
|
|
||||||
showError(t('repod', 'Error while adding the feed'))
|
|
||||||
}
|
|
||||||
this.fetch()
|
|
||||||
},
|
|
||||||
async search() {
|
|
||||||
try {
|
try {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const currentSearch = this.value
|
const currentSearch = this.value
|
||||||
const feeds = await axios.get<PodcastDataInterface[]>(
|
const feeds = await axios.get(generateUrl('/apps/repod/search?value={value}', { value: currentSearch }))
|
||||||
generateUrl('/apps/repod/search?q={value}', {
|
|
||||||
value: currentSearch,
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
if (currentSearch === this.value) {
|
if (currentSearch === this.value) {
|
||||||
this.feeds = [...feeds.data].sort(
|
this.feeds = [...feeds.data].sort((a, b) => b.fetchedAtUnix - a.fetchedAtUnix)
|
||||||
(a, b) => b.fetchedAtUnix - a.fetchedAtUnix,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
@ -121,7 +73,7 @@ export default {
|
|||||||
this.loading = false
|
this.loading = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}, 200),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,92 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<h2>{{ title }}</h2>
|
|
||||||
<Loading v-if="loading" />
|
|
||||||
<ul v-if="!loading">
|
|
||||||
<li v-for="top in tops" :key="top.link">
|
|
||||||
<router-link :to="toFeedUrl(top.link)">
|
|
||||||
<img :src="top.imageUrl" :title="top.author" />
|
|
||||||
</router-link>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import Loading from '../Atoms/Loading.vue'
|
|
||||||
import type { PodcastDataInterface } from '../../utils/types.ts'
|
|
||||||
import axios from '@nextcloud/axios'
|
|
||||||
import { generateUrl } from '@nextcloud/router'
|
|
||||||
import { showError } from '../../utils/toast.ts'
|
|
||||||
import { t } from '@nextcloud/l10n'
|
|
||||||
import { toFeedUrl } from '../../utils/url.ts'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'Toplist',
|
|
||||||
components: {
|
|
||||||
Loading,
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
type: {
|
|
||||||
type: String,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data: () => ({
|
|
||||||
loading: true,
|
|
||||||
tops: [] as PodcastDataInterface[],
|
|
||||||
}),
|
|
||||||
computed: {
|
|
||||||
title() {
|
|
||||||
switch (this.type) {
|
|
||||||
case 'new':
|
|
||||||
return t('repod', 'New podcasts')
|
|
||||||
case 'hot':
|
|
||||||
return t('repod', 'Hot podcasts')
|
|
||||||
default:
|
|
||||||
return this.type
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
async mounted() {
|
|
||||||
try {
|
|
||||||
this.loading = true
|
|
||||||
const tops = await axios.get<PodcastDataInterface[]>(
|
|
||||||
generateUrl('/apps/repod/toplist/{type}', { type: this.type }),
|
|
||||||
)
|
|
||||||
this.tops = tops.data
|
|
||||||
} catch (e) {
|
|
||||||
console.error(e)
|
|
||||||
showError(t('repod', 'Could not fetch tops'))
|
|
||||||
} finally {
|
|
||||||
this.loading = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
toFeedUrl,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
h2 {
|
|
||||||
margin: 1rem 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
height: 100%;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
li {
|
|
||||||
flex-basis: 10rem;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul {
|
|
||||||
display: flex;
|
|
||||||
gap: 2rem;
|
|
||||||
overflow: scroll hidden;
|
|
||||||
padding-bottom: 0.5rem;
|
|
||||||
}
|
|
||||||
</style>
|
|
90
src/components/Discover/Tops.vue
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<h2>{{ title }}</h2>
|
||||||
|
<Loading v-if="loading" />
|
||||||
|
<ul v-if="!loading">
|
||||||
|
<li v-for="top in tops" :key="top.link">
|
||||||
|
<router-link :to="toUrl(top.link)">
|
||||||
|
<img :src="top.imageUrl" :title="top.author">
|
||||||
|
</router-link>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import Loading from '../Atoms/Loading.vue'
|
||||||
|
import axios from '@nextcloud/axios'
|
||||||
|
import { generateUrl } from '@nextcloud/router'
|
||||||
|
import { showError } from '@nextcloud/dialogs'
|
||||||
|
import { toUrl } from '../../utils/url.js'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Tops',
|
||||||
|
components: {
|
||||||
|
Loading,
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: true,
|
||||||
|
tops: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
title() {
|
||||||
|
switch (this.type) {
|
||||||
|
case 'new':
|
||||||
|
return t('repod', 'New podcasts')
|
||||||
|
case 'hot':
|
||||||
|
return t('repod', 'Hot podcasts')
|
||||||
|
default:
|
||||||
|
return this.type
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
async mounted() {
|
||||||
|
try {
|
||||||
|
this.loading = true
|
||||||
|
const tops = await axios.get(generateUrl(`/apps/repod/tops/${this.type}`))
|
||||||
|
this.tops = tops.data
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e)
|
||||||
|
showError(t('repod', 'Could not fetch tops'))
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toUrl,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
h2 {
|
||||||
|
margin: 1rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
flex-basis: 10rem;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul {
|
||||||
|
display: flex;
|
||||||
|
gap: 2rem;
|
||||||
|
overflow: scroll hidden;
|
||||||
|
padding-bottom: .5rem;
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,33 +1,34 @@
|
|||||||
|
<!-- eslint-disable vue/no-v-html -->
|
||||||
<template>
|
<template>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<img class="background" :src="feed.imageUrl" />
|
<img class="background" :src="imageUrl">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div>
|
<div>
|
||||||
<NcAvatar
|
<NcAvatar :display-name="author || title"
|
||||||
:display-name="feed.author || feed.title"
|
|
||||||
:is-no-user="true"
|
:is-no-user="true"
|
||||||
:size="128"
|
:size="128"
|
||||||
:url="feed.imageUrl" />
|
:url="imageUrl" />
|
||||||
<a class="feed" :href="url" @click.prevent="copyFeed">
|
<a class="feed" :href="url" @click.prevent="copyFeed">
|
||||||
<RssIcon :size="20" />
|
<Rss :size="20" />
|
||||||
<i>{{ t('repod', 'Copy feed') }}</i>
|
<i>{{ t('repod', 'Copy feed') }}</i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<div class="infos">
|
<div class="infos">
|
||||||
<h2>{{ feed.title }}</h2>
|
<h2>{{ title }}</h2>
|
||||||
<a :href="feed.link" target="_blank">
|
<a :href="link" target="_blank">
|
||||||
<i>{{ feed.author }}</i>
|
<i>{{ author }}</i>
|
||||||
</a>
|
</a>
|
||||||
<br /><br />
|
<br><br>
|
||||||
<SafeHtml :source="feed.description || ''" />
|
<p>
|
||||||
|
<small v-html="strippedDescription" />
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<NcAppNavigationNew
|
<NcAppNavigationNew v-if="!isSubscribed"
|
||||||
v-if="!getSubByUrl(url)"
|
|
||||||
:text="t('repod', 'Subscribe')"
|
:text="t('repod', 'Subscribe')"
|
||||||
@click="addSubscription">
|
@click="addSubscription">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<PlusIcon :size="20" />
|
<Plus :size="20" />
|
||||||
</template>
|
</template>
|
||||||
</NcAppNavigationNew>
|
</NcAppNavigationNew>
|
||||||
</div>
|
</div>
|
||||||
@ -35,112 +36,119 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script>
|
||||||
import { NcAppNavigationNew, NcAvatar } from '@nextcloud/vue'
|
import { NcAppNavigationNew, NcAvatar } from '@nextcloud/vue'
|
||||||
import { mapActions, mapState } from 'pinia'
|
import { showError, showSuccess } from '@nextcloud/dialogs'
|
||||||
import { showError, showSuccess } from '../../utils/toast.ts'
|
import Plus from 'vue-material-design-icons/Plus.vue'
|
||||||
import PlusIcon from 'vue-material-design-icons/Plus.vue'
|
import Rss from 'vue-material-design-icons/Rss.vue'
|
||||||
import type { PodcastDataInterface } from '../../utils/types.ts'
|
|
||||||
import RssIcon from 'vue-material-design-icons/Rss.vue'
|
|
||||||
import SafeHtml from '../Atoms/SafeHtml.vue'
|
|
||||||
import axios from '@nextcloud/axios'
|
import axios from '@nextcloud/axios'
|
||||||
import { decodeUrl } from '../../utils/url.ts'
|
import { cleanHtml } from '../../utils/text.js'
|
||||||
|
import { decodeUrl } from '../../utils/url.js'
|
||||||
import { generateUrl } from '@nextcloud/router'
|
import { generateUrl } from '@nextcloud/router'
|
||||||
import { t } from '@nextcloud/l10n'
|
|
||||||
import { useSubscriptions } from '../../store/subscriptions.ts'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Banner',
|
name: 'Banner',
|
||||||
components: {
|
components: {
|
||||||
NcAvatar,
|
NcAvatar,
|
||||||
NcAppNavigationNew,
|
NcAppNavigationNew,
|
||||||
PlusIcon,
|
Plus,
|
||||||
RssIcon,
|
Rss,
|
||||||
SafeHtml,
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
feed: {
|
author: {
|
||||||
type: Object as () => PodcastDataInterface,
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
description: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
imageUrl: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
link: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(useSubscriptions, ['getSubByUrl']),
|
|
||||||
url() {
|
url() {
|
||||||
return decodeUrl(this.$route.params.url as string)
|
return decodeUrl(this.$route.params.url)
|
||||||
|
},
|
||||||
|
isSubscribed() {
|
||||||
|
return this.$store.state.subscriptions.subscriptions.includes(this.url)
|
||||||
|
},
|
||||||
|
strippedDescription() {
|
||||||
|
return cleanHtml(this.description)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(useSubscriptions, ['fetch']),
|
|
||||||
t,
|
|
||||||
async addSubscription() {
|
async addSubscription() {
|
||||||
try {
|
try {
|
||||||
await axios.post(
|
await axios.post(generateUrl('/apps/gpoddersync/subscription_change/create'), { add: [this.url], remove: [] })
|
||||||
generateUrl('/apps/gpoddersync/subscription_change/create'),
|
|
||||||
{
|
|
||||||
add: [this.url],
|
|
||||||
remove: [],
|
|
||||||
},
|
|
||||||
)
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
showError(t('repod', 'Error while adding the feed'))
|
showError(t('repod', 'Error while adding the feed'))
|
||||||
}
|
}
|
||||||
this.fetch()
|
|
||||||
|
this.$store.dispatch('subscriptions/fetch')
|
||||||
},
|
},
|
||||||
copyFeed() {
|
copyFeed() {
|
||||||
window.navigator.clipboard.writeText(this.url)
|
window.navigator.clipboard.writeText(this.url)
|
||||||
showSuccess(t('repod', 'Link copied to the clipboard'))
|
showSuccess(t('repod', 'Feed\'s link copied to the clipboard'))
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.background {
|
.background {
|
||||||
filter: blur(1rem) brightness(50%);
|
filter: blur(1rem) brightness(50%);
|
||||||
height: auto;
|
height: auto;
|
||||||
left: 0;
|
left: 0;
|
||||||
opacity: 0.4;
|
opacity: .4;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
height: 10rem;
|
height: 10rem;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.feed {
|
.feed {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 0.2rem;
|
gap: .2rem;
|
||||||
margin: 0.5rem;
|
margin: .5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
height: 14rem;
|
height: 14rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.infos {
|
.infos {
|
||||||
flex: 1;
|
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inner {
|
.inner {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@media only screen and (max-width: 768px) {
|
@media only screen and (max-width: 768px) {
|
||||||
.inner {
|
.inner {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,222 +0,0 @@
|
|||||||
<template>
|
|
||||||
<NcListItem
|
|
||||||
:active="isCurrentEpisode(episode)"
|
|
||||||
class="episode"
|
|
||||||
:details="
|
|
||||||
!oneLine && episode.pubDate
|
|
||||||
? formatLocaleDate(new Date(episode.pubDate?.date))
|
|
||||||
: ''
|
|
||||||
"
|
|
||||||
:force-display-actions="true"
|
|
||||||
:name="episode.name"
|
|
||||||
:one-line="oneLine"
|
|
||||||
:style="{ opacity: hasEnded(episode) ? 0.4 : 1 }"
|
|
||||||
:title="episode.description"
|
|
||||||
@click="modalEpisode = episode">
|
|
||||||
<template #actions>
|
|
||||||
<NcActionButton
|
|
||||||
v-if="!isCurrentEpisode(episode)"
|
|
||||||
:aria-label="t('repod', 'Play')"
|
|
||||||
:title="t('repod', 'Play')"
|
|
||||||
@click="load(episode, url)">
|
|
||||||
<template #icon>
|
|
||||||
<PlayIcon :size="20" />
|
|
||||||
</template>
|
|
||||||
</NcActionButton>
|
|
||||||
<NcActionButton
|
|
||||||
v-if="isCurrentEpisode(episode)"
|
|
||||||
:aria-label="t('repod', 'Stop')"
|
|
||||||
:title="t('repod', 'Stop')"
|
|
||||||
@click="load(null)">
|
|
||||||
<template #icon>
|
|
||||||
<StopIcon :size="20" />
|
|
||||||
</template>
|
|
||||||
</NcActionButton>
|
|
||||||
</template>
|
|
||||||
<template #extra>
|
|
||||||
<NcActions>
|
|
||||||
<NcActionButton
|
|
||||||
v-if="episode.duration"
|
|
||||||
:aria-label="t('repod', 'Read')"
|
|
||||||
:disabled="loading"
|
|
||||||
:model-value="hasEnded(episode)"
|
|
||||||
:name="t('repod', 'Read')"
|
|
||||||
:title="t('repod', 'Read')"
|
|
||||||
@click="markAs(episode, !hasEnded(episode))">
|
|
||||||
<template #icon>
|
|
||||||
<PlaylistPlayIcon v-if="!hasEnded(episode)" :size="20" />
|
|
||||||
<PlaylistRemoveIcon v-if="hasEnded(episode)" :size="20" />
|
|
||||||
</template>
|
|
||||||
</NcActionButton>
|
|
||||||
<NcActionLink
|
|
||||||
v-if="episode.link"
|
|
||||||
:href="episode.link"
|
|
||||||
:name="t('repod', 'Open website')"
|
|
||||||
target="_blank"
|
|
||||||
:title="t('repod', 'Open website')">
|
|
||||||
<template #icon>
|
|
||||||
<OpenInNewIcon :size="20" />
|
|
||||||
</template>
|
|
||||||
</NcActionLink>
|
|
||||||
<NcActionLink
|
|
||||||
v-if="episode.url"
|
|
||||||
:download="filenameFromUrl(episode.url)"
|
|
||||||
:href="episode.url"
|
|
||||||
:name="t('repod', 'Download')"
|
|
||||||
target="_blank"
|
|
||||||
:title="t('repod', 'Download')">
|
|
||||||
<template #icon>
|
|
||||||
<DownloadIcon :size="20" />
|
|
||||||
</template>
|
|
||||||
</NcActionLink>
|
|
||||||
</NcActions>
|
|
||||||
<NcModal v-if="modalEpisode" @close="modalEpisode = null">
|
|
||||||
<Modal :episode="episode" />
|
|
||||||
</NcModal>
|
|
||||||
</template>
|
|
||||||
<template #icon>
|
|
||||||
<NcAvatar
|
|
||||||
:display-name="episode.name"
|
|
||||||
:is-no-user="true"
|
|
||||||
:url="episode.image" />
|
|
||||||
</template>
|
|
||||||
<template #indicator>
|
|
||||||
<NcProgressBar
|
|
||||||
v-if="episode.action && isListening(episode) && !oneLine"
|
|
||||||
class="progress"
|
|
||||||
:value="(episode.action.position * 100) / episode.action.total" />
|
|
||||||
</template>
|
|
||||||
<template #subname>
|
|
||||||
{{ episode.duration }}
|
|
||||||
</template>
|
|
||||||
</NcListItem>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import {
|
|
||||||
NcActionButton,
|
|
||||||
NcActionLink,
|
|
||||||
NcActions,
|
|
||||||
NcAvatar,
|
|
||||||
NcListItem,
|
|
||||||
NcModal,
|
|
||||||
NcProgressBar,
|
|
||||||
} from '@nextcloud/vue'
|
|
||||||
import {
|
|
||||||
durationToSeconds,
|
|
||||||
formatEpisodeTimestamp,
|
|
||||||
formatLocaleDate,
|
|
||||||
} from '../../utils/time.ts'
|
|
||||||
import { hasEnded, isListening } from '../../utils/status.ts'
|
|
||||||
import { mapActions, mapState } from 'pinia'
|
|
||||||
import DownloadIcon from 'vue-material-design-icons/Download.vue'
|
|
||||||
import type { EpisodeInterface } from '../../utils/types.ts'
|
|
||||||
import Modal from '../Atoms/Modal.vue'
|
|
||||||
import OpenInNewIcon from 'vue-material-design-icons/OpenInNew.vue'
|
|
||||||
import PlayIcon from 'vue-material-design-icons/Play.vue'
|
|
||||||
import PlaylistPlayIcon from 'vue-material-design-icons/PlaylistPlay.vue'
|
|
||||||
import PlaylistRemoveIcon from 'vue-material-design-icons/PlaylistRemove.vue'
|
|
||||||
import StopIcon from 'vue-material-design-icons/Stop.vue'
|
|
||||||
import axios from '@nextcloud/axios'
|
|
||||||
import { filenameFromUrl } from '../../utils/url.ts'
|
|
||||||
import { generateUrl } from '@nextcloud/router'
|
|
||||||
import { showError } from '../../utils/toast.ts'
|
|
||||||
import { t } from '@nextcloud/l10n'
|
|
||||||
import { usePlayer } from '../../store/player.ts'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'Episode',
|
|
||||||
components: {
|
|
||||||
DownloadIcon,
|
|
||||||
Modal,
|
|
||||||
NcActionButton,
|
|
||||||
NcActionLink,
|
|
||||||
NcActions,
|
|
||||||
NcAvatar,
|
|
||||||
NcListItem,
|
|
||||||
NcModal,
|
|
||||||
NcProgressBar,
|
|
||||||
OpenInNewIcon,
|
|
||||||
PlayIcon,
|
|
||||||
PlaylistPlayIcon,
|
|
||||||
PlaylistRemoveIcon,
|
|
||||||
StopIcon,
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
episode: {
|
|
||||||
type: Object as () => EpisodeInterface,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
oneLine: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
url: {
|
|
||||||
type: String,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data: () => ({
|
|
||||||
loading: false,
|
|
||||||
modalEpisode: null as EpisodeInterface | null,
|
|
||||||
}),
|
|
||||||
computed: {
|
|
||||||
...mapState(usePlayer, { playerEpisode: 'episode' }),
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
...mapActions(usePlayer, ['load']),
|
|
||||||
filenameFromUrl,
|
|
||||||
formatLocaleDate,
|
|
||||||
hasEnded,
|
|
||||||
isListening,
|
|
||||||
t,
|
|
||||||
isCurrentEpisode(episode: EpisodeInterface) {
|
|
||||||
return this.playerEpisode?.url === episode.url
|
|
||||||
},
|
|
||||||
async markAs(episode: EpisodeInterface, read: boolean) {
|
|
||||||
try {
|
|
||||||
this.loading = true
|
|
||||||
episode.action = {
|
|
||||||
podcast: this.url,
|
|
||||||
episode: episode.url,
|
|
||||||
guid: episode.guid,
|
|
||||||
action: 'play',
|
|
||||||
timestamp: formatEpisodeTimestamp(new Date()),
|
|
||||||
started: episode.action?.started || 0,
|
|
||||||
position: read ? durationToSeconds(episode.duration || '') : 0,
|
|
||||||
total: durationToSeconds(episode.duration || ''),
|
|
||||||
}
|
|
||||||
await axios.post(
|
|
||||||
generateUrl('/apps/gpoddersync/episode_action/create'),
|
|
||||||
[episode.action],
|
|
||||||
)
|
|
||||||
if (read && this.isCurrentEpisode(episode)) {
|
|
||||||
this.load(null)
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
console.error(e)
|
|
||||||
showError(t('repod', 'Could not change the status of the episode'))
|
|
||||||
} finally {
|
|
||||||
this.loading = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.progress {
|
|
||||||
margin-top: 0.4rem;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.episode .list-item-content__name {
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.episode .list-item-content__subname {
|
|
||||||
flex-basis: auto;
|
|
||||||
flex-grow: 0;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -2,82 +2,121 @@
|
|||||||
<div>
|
<div>
|
||||||
<Loading v-if="loading" />
|
<Loading v-if="loading" />
|
||||||
<ul v-if="!loading">
|
<ul v-if="!loading">
|
||||||
<Episode
|
<NcListItem v-for="episode in filteredEpisodes"
|
||||||
v-for="episode in filteredEpisodes"
|
|
||||||
:key="episode.guid"
|
:key="episode.guid"
|
||||||
:episode="episode"
|
:active="isCurrentEpisode(episode)"
|
||||||
:url="url" />
|
:class="hasEnded(episode) ? 'ended': ''"
|
||||||
|
:details="formatLocaleDate(new Date(episode.pubDate?.date))"
|
||||||
|
:force-display-actions="true"
|
||||||
|
:name="episode.name"
|
||||||
|
:title="episode.description"
|
||||||
|
@click="modalEpisode = episode">
|
||||||
|
<template #actions>
|
||||||
|
<NcActionButton v-if="!isCurrentEpisode(episode)" @click="load(episode)">
|
||||||
|
<template #icon>
|
||||||
|
<PlayButton :size="20" />
|
||||||
|
</template>
|
||||||
|
{{ t('repod', 'Play') }}
|
||||||
|
</NcActionButton>
|
||||||
|
<NcActionButton v-if="isCurrentEpisode(episode)" @click="load(null)">
|
||||||
|
<template #icon>
|
||||||
|
<StopButton :size="20" />
|
||||||
|
</template>
|
||||||
|
{{ t('repod', 'Stop') }}
|
||||||
|
</NcActionButton>
|
||||||
|
</template>
|
||||||
|
<template #icon>
|
||||||
|
<NcAvatar :display-name="episode.name"
|
||||||
|
:is-no-user="true"
|
||||||
|
:url="episode.image" />
|
||||||
|
</template>
|
||||||
|
<template #indicator>
|
||||||
|
<NcProgressBar v-if="isListening(episode)"
|
||||||
|
class="progress"
|
||||||
|
:value="episode.action.position * 100 / episode.action.total" />
|
||||||
|
</template>
|
||||||
|
<template #subname>
|
||||||
|
{{ episode.duration }}
|
||||||
|
</template>
|
||||||
|
</NcListItem>
|
||||||
</ul>
|
</ul>
|
||||||
|
<NcModal v-if="modalEpisode" @close="modalEpisode = null">
|
||||||
|
<Modal :description="modalEpisode.description"
|
||||||
|
:image="modalEpisode.image"
|
||||||
|
:link="modalEpisode.link"
|
||||||
|
:name="modalEpisode.name"
|
||||||
|
:size="modalEpisode.size"
|
||||||
|
:title="modalEpisode.title"
|
||||||
|
:url="modalEpisode.url" />
|
||||||
|
</NcModal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script>
|
||||||
import { hasEnded, isListening } from '../../utils/status.ts'
|
import { NcActionButton, NcAvatar, NcListItem, NcModal, NcProgressBar } from '@nextcloud/vue'
|
||||||
import Episode from './Episode.vue'
|
|
||||||
import type { EpisodeInterface } from '../../utils/types.ts'
|
|
||||||
import Loading from '../Atoms/Loading.vue'
|
import Loading from '../Atoms/Loading.vue'
|
||||||
|
import Modal from '../Atoms/Modal.vue'
|
||||||
|
import PlayButton from 'vue-material-design-icons/Play.vue'
|
||||||
|
import StopButton from 'vue-material-design-icons/Stop.vue'
|
||||||
import axios from '@nextcloud/axios'
|
import axios from '@nextcloud/axios'
|
||||||
import { decodeUrl } from '../../utils/url.ts'
|
import { decodeUrl } from '../../utils/url.js'
|
||||||
|
import { formatLocaleDate } from '../../utils/time.js'
|
||||||
import { generateUrl } from '@nextcloud/router'
|
import { generateUrl } from '@nextcloud/router'
|
||||||
import { mapState } from 'pinia'
|
import { showError } from '@nextcloud/dialogs'
|
||||||
import { showError } from '../../utils/toast.ts'
|
|
||||||
import { t } from '@nextcloud/l10n'
|
|
||||||
import { usePlayer } from '../../store/player.ts'
|
|
||||||
import { useSettings } from '../../store/settings.ts'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Episodes',
|
name: 'Episodes',
|
||||||
components: {
|
components: {
|
||||||
Episode,
|
|
||||||
Loading,
|
Loading,
|
||||||
|
Modal,
|
||||||
|
NcActionButton,
|
||||||
|
NcAvatar,
|
||||||
|
NcListItem,
|
||||||
|
NcModal,
|
||||||
|
NcProgressBar,
|
||||||
|
PlayButton,
|
||||||
|
StopButton,
|
||||||
},
|
},
|
||||||
data: () => ({
|
data() {
|
||||||
episodes: [] as EpisodeInterface[],
|
return {
|
||||||
|
episodes: [],
|
||||||
loading: true,
|
loading: true,
|
||||||
}),
|
modalEpisode: null,
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(usePlayer, ['episode']),
|
currentEpisode() {
|
||||||
...mapState(useSettings, ['filters']),
|
return this.$store.state.player.episode
|
||||||
|
},
|
||||||
|
filters() {
|
||||||
|
return this.$store.state.settings.filters
|
||||||
|
},
|
||||||
filteredEpisodes() {
|
filteredEpisodes() {
|
||||||
return this.episodes.filter((episode) => {
|
return this.episodes.filter((episode) => {
|
||||||
if (!this.filters.listened && this.hasEnded(episode)) {
|
if (!this.filters.listened && this.hasEnded(episode)) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.filters.listening && this.isListening(episode)) {
|
if (!this.filters.listening && this.isListening(episode)) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.filters.unlistened && !this.isListening(episode)) {
|
if (!this.filters.unlistened && !this.isListening(episode)) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
url() {
|
url() {
|
||||||
return decodeUrl(this.$route.params.url as string)
|
return decodeUrl(this.$route.params.url)
|
||||||
},
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
episode() {
|
|
||||||
if (this.episode) {
|
|
||||||
this.episodes = this.episodes.map((e) =>
|
|
||||||
e.url === this.episode?.url ? this.episode : e,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
try {
|
try {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const episodes = await axios.get<EpisodeInterface[]>(
|
const episodes = await axios.get(generateUrl('/apps/repod/episodes/list?url={url}', { url: this.url }))
|
||||||
generateUrl('/apps/repod/episodes/list?url={url}', {
|
this.episodes = [...episodes.data].sort((a, b) => new Date(b.pubDate?.date) - new Date(a.pubDate?.date))
|
||||||
url: this.url,
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
this.episodes = [...episodes.data].sort(
|
|
||||||
(a, b) =>
|
|
||||||
new Date(b.pubDate?.date || '').getTime() -
|
|
||||||
new Date(a.pubDate?.date || '').getTime(),
|
|
||||||
)
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
showError(t('repod', 'Could not fetch episodes'))
|
showError(t('repod', 'Could not fetch episodes'))
|
||||||
@ -86,8 +125,33 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
hasEnded,
|
formatLocaleDate,
|
||||||
isListening,
|
hasEnded(episode) {
|
||||||
|
return episode.action && (episode.action.action === 'DELETE' || (
|
||||||
|
episode.action.position > 0
|
||||||
|
&& episode.action.total > 0
|
||||||
|
&& episode.action.position >= episode.action.total
|
||||||
|
))
|
||||||
|
},
|
||||||
|
isCurrentEpisode(episode) {
|
||||||
|
return this.currentEpisode && this.currentEpisode.url === episode.url
|
||||||
|
},
|
||||||
|
isListening(episode) {
|
||||||
|
return episode.action && episode.action.action === 'PLAY' && !this.hasEnded(episode)
|
||||||
|
},
|
||||||
|
load(episode) {
|
||||||
|
this.$store.dispatch('player/load', episode)
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.ended {
|
||||||
|
opacity: .4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress {
|
||||||
|
margin-top: .4rem;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -1,106 +0,0 @@
|
|||||||
<template>
|
|
||||||
<NcGuestContent class="guest">
|
|
||||||
<Loading v-if="!feed.data" />
|
|
||||||
<NcAvatar
|
|
||||||
v-if="feed.data"
|
|
||||||
class="avatar"
|
|
||||||
:display-name="feed.data.author || feed.data.title"
|
|
||||||
:is-no-user="true"
|
|
||||||
:size="222"
|
|
||||||
:title="feed.data.author"
|
|
||||||
:url="feed.data.imageUrl" />
|
|
||||||
<div v-if="feed.data" class="list">
|
|
||||||
<h2 class="title">{{ feed.data.title }}</h2>
|
|
||||||
<Loading v-if="loading" />
|
|
||||||
<ul v-if="!loading">
|
|
||||||
<Episode
|
|
||||||
v-for="episode in episodes"
|
|
||||||
:key="episode.guid"
|
|
||||||
:episode="episode"
|
|
||||||
:one-line="true"
|
|
||||||
:url="feed.metrics.url" />
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</NcGuestContent>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import type { EpisodeInterface, SubscriptionInterface } from '../../utils/types.ts'
|
|
||||||
import { NcAvatar, NcGuestContent } from '@nextcloud/vue'
|
|
||||||
import Episode from './Episode.vue'
|
|
||||||
import Loading from '../Atoms/Loading.vue'
|
|
||||||
import axios from '@nextcloud/axios'
|
|
||||||
import { generateUrl } from '@nextcloud/router'
|
|
||||||
import { hasEnded } from '../../utils/status.ts'
|
|
||||||
import { showError } from '../../utils/toast.ts'
|
|
||||||
import { t } from '@nextcloud/l10n'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'Favorite',
|
|
||||||
components: {
|
|
||||||
Episode,
|
|
||||||
Loading,
|
|
||||||
NcAvatar,
|
|
||||||
NcGuestContent,
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
feed: {
|
|
||||||
type: Object as () => SubscriptionInterface,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data: () => ({
|
|
||||||
episodes: [] as EpisodeInterface[],
|
|
||||||
loading: true,
|
|
||||||
}),
|
|
||||||
async mounted() {
|
|
||||||
try {
|
|
||||||
this.loading = true
|
|
||||||
const episodes = await axios.get<EpisodeInterface[]>(
|
|
||||||
generateUrl('/apps/repod/episodes/list?url={url}', {
|
|
||||||
url: this.feed.metrics.url,
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
this.episodes = [...episodes.data]
|
|
||||||
.sort(
|
|
||||||
(a, b) =>
|
|
||||||
new Date(b.pubDate?.date || '').getTime() -
|
|
||||||
new Date(a.pubDate?.date || '').getTime(),
|
|
||||||
)
|
|
||||||
.filter((episode) => !this.hasEnded(episode))
|
|
||||||
.slice(0, 4)
|
|
||||||
} catch (e) {
|
|
||||||
console.error(e)
|
|
||||||
showError(t('repod', 'Could not fetch episodes'))
|
|
||||||
} finally {
|
|
||||||
this.loading = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
hasEnded,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.guest {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 1rem;
|
|
||||||
margin: 20px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.list {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media only screen and (max-width: 768px) {
|
|
||||||
.avatar {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="episode" class="footer">
|
<div v-if="player.episode" class="footer">
|
||||||
<img class="background" :src="episode.image" />
|
<img class="background" :src="player.episode.image">
|
||||||
<Loading v-if="!loaded" />
|
<Loading v-if="!player.loaded" />
|
||||||
<ProgressBar v-if="loaded" />
|
<ProgressBar v-if="player.loaded" />
|
||||||
<div v-if="loaded" class="player">
|
<div v-if="player.loaded" class="player">
|
||||||
<img :src="episode.image" />
|
<img :src="player.episode.image">
|
||||||
<Infos class="infos" />
|
<Infos class="infos" />
|
||||||
<Controls class="controls" />
|
<Controls class="controls" />
|
||||||
<Timer class="timer" />
|
<Timer class="timer" />
|
||||||
@ -13,15 +13,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script>
|
||||||
import Controls from './Controls.vue'
|
import Controls from './Controls.vue'
|
||||||
import Infos from './Infos.vue'
|
import Infos from './Infos.vue'
|
||||||
import Loading from '../Atoms/Loading.vue'
|
import Loading from '../Atoms/Loading.vue'
|
||||||
import ProgressBar from './ProgressBar.vue'
|
import ProgressBar from './ProgressBar.vue'
|
||||||
import Timer from './Timer.vue'
|
import Timer from './Timer.vue'
|
||||||
import Volume from './Volume.vue'
|
import Volume from './Volume.vue'
|
||||||
import { mapState } from 'pinia'
|
|
||||||
import { usePlayer } from '../../store/player.ts'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Bar',
|
name: 'Bar',
|
||||||
@ -34,24 +32,26 @@ export default {
|
|||||||
Volume,
|
Volume,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(usePlayer, ['episode', 'loaded']),
|
player() {
|
||||||
|
return this.$store.state.player
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.background {
|
.background {
|
||||||
filter: blur(1rem) brightness(50%);
|
filter: blur(1rem) brightness(50%);
|
||||||
height: auto;
|
height: auto;
|
||||||
left: 0;
|
left: 0;
|
||||||
opacity: 0.4;
|
opacity: .4;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
background-color: var(--color-main-background);
|
background-color: var(--color-main-background);
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
height: 6rem;
|
height: 6rem;
|
||||||
@ -59,31 +59,30 @@ export default {
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: 2000;
|
z-index: 2000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.player {
|
.player {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
height: 6rem;
|
height: 6rem;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
|
||||||
|
|
||||||
.timer {
|
|
||||||
width: 30%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.volume {
|
|
||||||
width: 10%;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media only screen and (max-width: 768px) {
|
|
||||||
.infos {
|
|
||||||
flex: 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.timer,
|
.timer {
|
||||||
|
width: 30%;
|
||||||
|
}
|
||||||
|
|
||||||
.volume {
|
.volume {
|
||||||
|
width: 10%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 768px) {
|
||||||
|
.infos {
|
||||||
|
flex: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.timer, .volume {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,70 +1,40 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<Rewind10Icon
|
<PauseButton v-if="!player.paused"
|
||||||
class="pointer rewind"
|
|
||||||
:size="20"
|
|
||||||
:title="t('repod', 'Rewind 10 seconds')"
|
|
||||||
@click="seek((currentTime ?? 0) - 10)" />
|
|
||||||
<PauseIcon
|
|
||||||
v-if="!paused"
|
|
||||||
class="pointer"
|
class="pointer"
|
||||||
:size="50"
|
:size="50"
|
||||||
:title="t('repod', 'Pause')"
|
@click="$store.dispatch('player/pause')" />
|
||||||
@click="pause" />
|
<PlayButton v-if="player.paused"
|
||||||
<PlayIcon
|
|
||||||
v-if="paused"
|
|
||||||
class="pointer"
|
class="pointer"
|
||||||
:size="50"
|
:size="50"
|
||||||
:title="t('repod', 'Play')"
|
@click="$store.dispatch('player/play')" />
|
||||||
@click="play" />
|
|
||||||
<FastForward30Icon
|
|
||||||
class="pointer forward"
|
|
||||||
:size="20"
|
|
||||||
:title="t('repod', 'Fast forward 30 seconds')"
|
|
||||||
@click="seek((currentTime ?? 0) + 30)" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script>
|
||||||
import { mapActions, mapState } from 'pinia'
|
import PauseButton from 'vue-material-design-icons/Pause.vue'
|
||||||
import FastForward30Icon from 'vue-material-design-icons/FastForward30.vue'
|
import PlayButton from 'vue-material-design-icons/Play.vue'
|
||||||
import PauseIcon from 'vue-material-design-icons/Pause.vue'
|
|
||||||
import PlayIcon from 'vue-material-design-icons/Play.vue'
|
|
||||||
import Rewind10Icon from 'vue-material-design-icons/Rewind10.vue'
|
|
||||||
import { t } from '@nextcloud/l10n'
|
|
||||||
import { usePlayer } from '../../store/player.ts'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Controls',
|
name: 'Controls',
|
||||||
components: {
|
components: {
|
||||||
FastForward30Icon,
|
PauseButton,
|
||||||
PauseIcon,
|
PlayButton,
|
||||||
PlayIcon,
|
|
||||||
Rewind10Icon,
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(usePlayer, ['currentTime', 'paused']),
|
player() {
|
||||||
|
return this.$store.state.player
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
...mapActions(usePlayer, ['play', 'pause', 'seek']),
|
|
||||||
t,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.controls {
|
.controls {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
|
||||||
|
|
||||||
.pointer {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media only screen and (max-width: 768px) {
|
|
||||||
.forward,
|
|
||||||
.rewind {
|
|
||||||
display: none;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
.pointer {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,23 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="episode && podcastUrl" class="root">
|
<div class="root">
|
||||||
<strong class="pointer" @click="modal = true">
|
<strong class="pointer" @click="modal = true">
|
||||||
{{ episode.name }}
|
{{ player.episode.name }}
|
||||||
</strong>
|
</strong>
|
||||||
<router-link :to="toFeedUrl(podcastUrl)">
|
<router-link :to="hash">
|
||||||
<i>{{ episode.title }}</i>
|
<i>{{ player.episode.title }}</i>
|
||||||
</router-link>
|
</router-link>
|
||||||
<NcModal v-if="modal" @close="modal = false">
|
<NcModal v-if="modal" @close="modal = false">
|
||||||
<Modal :episode="episode" />
|
<Modal :description="player.episode.description"
|
||||||
|
:image="player.episode.image"
|
||||||
|
:link="player.episode.link"
|
||||||
|
:name="player.episode.name"
|
||||||
|
:size="player.episode.size"
|
||||||
|
:title="player.episode.title"
|
||||||
|
:url="player.episode.url" />
|
||||||
</NcModal>
|
</NcModal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script>
|
||||||
import Modal from '../Atoms/Modal.vue'
|
import Modal from '../Atoms/Modal.vue'
|
||||||
import { NcModal } from '@nextcloud/vue'
|
import { NcModal } from '@nextcloud/vue'
|
||||||
import { mapState } from 'pinia'
|
import { toUrl } from '../../utils/url.js'
|
||||||
import { toFeedUrl } from '../../utils/url.ts'
|
|
||||||
import { usePlayer } from '../../store/player.ts'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Infos',
|
name: 'Infos',
|
||||||
@ -25,27 +29,31 @@ export default {
|
|||||||
Modal,
|
Modal,
|
||||||
NcModal,
|
NcModal,
|
||||||
},
|
},
|
||||||
data: () => ({
|
data() {
|
||||||
|
return {
|
||||||
modal: false,
|
modal: false,
|
||||||
}),
|
}
|
||||||
computed: {
|
},
|
||||||
...mapState(usePlayer, ['episode', 'podcastUrl']),
|
computed: {
|
||||||
|
player() {
|
||||||
|
return this.$store.state.player
|
||||||
|
},
|
||||||
|
hash() {
|
||||||
|
return toUrl(this.player.podcastUrl)
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
toFeedUrl,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.pointer {
|
.pointer {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.root {
|
.root {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 40%;
|
width: 40%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,37 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<input
|
<input class="progress"
|
||||||
v-if="duration"
|
:max="player.duration"
|
||||||
class="progress"
|
|
||||||
:max="duration"
|
|
||||||
min="0"
|
min="0"
|
||||||
type="range"
|
type="range"
|
||||||
:value="currentTime"
|
:value="player.currentTime"
|
||||||
@change="
|
@change="(event) => $store.dispatch('player/seek', event.target.value)">
|
||||||
(event) => seek(parseInt((event.target as HTMLInputElement).value))
|
|
||||||
" />
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script>
|
||||||
import { mapActions, mapState } from 'pinia'
|
|
||||||
import { usePlayer } from '../../store/player.ts'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ProgressBar',
|
name: 'ProgressBar',
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(usePlayer, ['duration', 'currentTime']),
|
player() {
|
||||||
|
return this.$store.state.player
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
...mapActions(usePlayer, ['seek']),
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.progress {
|
.progress {
|
||||||
height: 4px;
|
height: 4px;
|
||||||
min-height: 4px;
|
min-height: 4px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -2px;
|
top: -2px;
|
||||||
width: 99%;
|
width: 99%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,20 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="currentTime && duration" class="root">
|
<div>
|
||||||
<span>{{ formatTimer(new Date(currentTime * 1000)) }}</span>
|
<span>{{ formatTimer(new Date(player.currentTime*1000)) }}</span>
|
||||||
<span>/</span>
|
<span>/</span>
|
||||||
<span>{{ formatTimer(new Date(duration * 1000)) }}</span>
|
<span>{{ formatTimer(new Date(player.duration*1000)) }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script>
|
||||||
import { formatTimer } from '../../utils/time.ts'
|
import { formatTimer } from '../../utils/time.js'
|
||||||
import { mapState } from 'pinia'
|
|
||||||
import { usePlayer } from '../../store/player.ts'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Timer',
|
name: 'Timer',
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(usePlayer, ['duration', 'currentTime']),
|
player() {
|
||||||
|
return this.$store.state.player
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
formatTimer,
|
formatTimer,
|
||||||
@ -23,10 +23,10 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.root {
|
div {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 5px;
|
gap: 5px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,90 +1,77 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<VolumeHighIcon
|
<VolumeHigh v-if="player.volume > 0.7"
|
||||||
v-if="volume > 0.7"
|
|
||||||
class="pointer"
|
class="pointer"
|
||||||
:size="30"
|
:size="30"
|
||||||
:title="t('repod', 'Mute')"
|
|
||||||
@click="mute" />
|
@click="mute" />
|
||||||
<VolumeLowIcon
|
<VolumeLow v-if="player.volume > 0 && player.volume <= 0.3"
|
||||||
v-if="volume > 0 && volume <= 0.3"
|
|
||||||
class="pointer"
|
class="pointer"
|
||||||
:size="30"
|
:size="30"
|
||||||
:title="t('repod', 'Mute')"
|
|
||||||
@click="mute" />
|
@click="mute" />
|
||||||
<VolumeMediumIcon
|
<VolumeMedium v-if="player.volume > 0.3 && player.volume <= 0.7"
|
||||||
v-if="volume > 0.3 && volume <= 0.7"
|
|
||||||
class="pointer"
|
class="pointer"
|
||||||
:size="30"
|
:size="30"
|
||||||
:title="t('repod', 'Mute')"
|
|
||||||
@click="mute" />
|
@click="mute" />
|
||||||
<VolumeMuteIcon
|
<VolumeMute v-if="player.volume === 0"
|
||||||
v-if="volume === 0"
|
|
||||||
class="pointer"
|
class="pointer"
|
||||||
:size="30"
|
:size="30"
|
||||||
:title="t('repod', 'Unmute')"
|
@click="$store.dispatch('player/volume', volumeMuted)" />
|
||||||
@click="setVolume(volumeMuted)" />
|
<input max="1"
|
||||||
<input
|
|
||||||
max="1"
|
|
||||||
min="0"
|
min="0"
|
||||||
step="0.1"
|
step="0.1"
|
||||||
type="range"
|
type="range"
|
||||||
:value="volume"
|
:value="player.volume"
|
||||||
@change="
|
@change="(event) => $store.dispatch('player/volume', event.target.value)">
|
||||||
(event) =>
|
|
||||||
setVolume(parseFloat((event.target as HTMLInputElement).value))
|
|
||||||
" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script>
|
||||||
import { mapActions, mapState } from 'pinia'
|
import VolumeHigh from 'vue-material-design-icons/VolumeHigh.vue'
|
||||||
import VolumeHighIcon from 'vue-material-design-icons/VolumeHigh.vue'
|
import VolumeLow from 'vue-material-design-icons/VolumeLow.vue'
|
||||||
import VolumeLowIcon from 'vue-material-design-icons/VolumeLow.vue'
|
import VolumeMedium from 'vue-material-design-icons/VolumeMedium.vue'
|
||||||
import VolumeMediumIcon from 'vue-material-design-icons/VolumeMedium.vue'
|
import VolumeMute from 'vue-material-design-icons/VolumeMute.vue'
|
||||||
import VolumeMuteIcon from 'vue-material-design-icons/VolumeMute.vue'
|
|
||||||
import { t } from '@nextcloud/l10n'
|
|
||||||
import { usePlayer } from '../../store/player.ts'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Volume',
|
name: 'Volume',
|
||||||
components: {
|
components: {
|
||||||
VolumeHighIcon,
|
VolumeHigh,
|
||||||
VolumeLowIcon,
|
VolumeLow,
|
||||||
VolumeMediumIcon,
|
VolumeMedium,
|
||||||
VolumeMuteIcon,
|
VolumeMute,
|
||||||
},
|
},
|
||||||
data: () => ({
|
data() {
|
||||||
|
return {
|
||||||
volumeMuted: 0,
|
volumeMuted: 0,
|
||||||
}),
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(usePlayer, ['volume']),
|
player() {
|
||||||
|
return this.$store.state.player
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(usePlayer, ['setVolume']),
|
|
||||||
mute() {
|
mute() {
|
||||||
this.volumeMuted = this.volume
|
this.volumeMuted = this.player.volume
|
||||||
this.setVolume(0)
|
this.$store.dispatch('player/volume', 0)
|
||||||
},
|
},
|
||||||
t,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
div {
|
div {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 5px;
|
gap: 5px;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
transform: rotate(270deg);
|
transform: rotate(270deg);
|
||||||
width: 4rem;
|
width: 4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pointer {
|
.pointer {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<NcAppNavigationItem
|
<NcAppNavigationItem :href="generateUrl('/apps/repod/opml/export')"
|
||||||
:href="generateUrl('/apps/repod/opml/export')"
|
|
||||||
:name="t('repod', 'Export subscriptions')">
|
:name="t('repod', 'Export subscriptions')">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<ExportIcon :size="20" />
|
<ExportIcon :size="20" />
|
||||||
@ -8,11 +7,10 @@
|
|||||||
</NcAppNavigationItem>
|
</NcAppNavigationItem>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script>
|
||||||
import ExportIcon from 'vue-material-design-icons/Export.vue'
|
import ExportIcon from 'vue-material-design-icons/Export.vue'
|
||||||
import { NcAppNavigationItem } from '@nextcloud/vue'
|
import { NcAppNavigationItem } from '@nextcloud/vue'
|
||||||
import { generateUrl } from '@nextcloud/router'
|
import { generateUrl } from '@nextcloud/router'
|
||||||
import { t } from '@nextcloud/l10n'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Export',
|
name: 'Export',
|
||||||
@ -22,7 +20,6 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
generateUrl,
|
generateUrl,
|
||||||
t,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,72 +1,53 @@
|
|||||||
<template>
|
<template>
|
||||||
<NcAppNavigationItem
|
<NcAppNavigationItem :allow-collapse="true"
|
||||||
menu-placement="top"
|
menu-placement="top"
|
||||||
:name="t('repod', 'Filtering episodes')">
|
:name="t('repod', 'Filtering episodes')">
|
||||||
<template #actions>
|
<template #actions>
|
||||||
<NcActionCheckbox
|
<NcActionCheckbox :checked="all"
|
||||||
:disabled="all"
|
:disabled="all"
|
||||||
:model-value="all"
|
@update:checked="(checked) => $store.commit('settings/filters', { listened: checked, listening: checked, unlistened: checked })">
|
||||||
@change="
|
|
||||||
setFilters({
|
|
||||||
listened: true,
|
|
||||||
listening: true,
|
|
||||||
unlistened: true,
|
|
||||||
})
|
|
||||||
">
|
|
||||||
{{ t('repod', 'Show all') }}
|
{{ t('repod', 'Show all') }}
|
||||||
</NcActionCheckbox>
|
</NcActionCheckbox>
|
||||||
<NcActionCheckbox
|
<NcActionCheckbox :checked="filters.listened"
|
||||||
:model-value="filters.listened"
|
@update:checked="(checked) => $store.commit('settings/filters', { listened: checked })">
|
||||||
@change="setFilters({ listened: !filters.listened })">
|
|
||||||
{{ t('repod', 'Listened') }}
|
{{ t('repod', 'Listened') }}
|
||||||
</NcActionCheckbox>
|
</NcActionCheckbox>
|
||||||
<NcActionCheckbox
|
<NcActionCheckbox :checked="filters.listening"
|
||||||
:model-value="filters.listening"
|
@update:checked="(checked) => $store.commit('settings/filters', { listening: checked })">
|
||||||
@change="setFilters({ listening: !filters.listening })">
|
|
||||||
{{ t('repod', 'Listening') }}
|
{{ t('repod', 'Listening') }}
|
||||||
</NcActionCheckbox>
|
</NcActionCheckbox>
|
||||||
<NcActionCheckbox
|
<NcActionCheckbox :checked="filters.unlistened"
|
||||||
:model-value="filters.unlistened"
|
@update:checked="(checked) => $store.commit('settings/filters', { unlistened: checked })">
|
||||||
@change="setFilters({ unlistened: !filters.unlistened })">
|
|
||||||
{{ t('repod', 'Unlistened') }}
|
{{ t('repod', 'Unlistened') }}
|
||||||
</NcActionCheckbox>
|
</NcActionCheckbox>
|
||||||
</template>
|
</template>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<FilterIcon v-if="all" :size="20" />
|
<FilterIcon v-if="all" :size="20" />
|
||||||
<FilterSettingsIcon v-if="!all" :size="20" />
|
<FilterSettings v-if="!all" :size="20" />
|
||||||
</template>
|
</template>
|
||||||
</NcAppNavigationItem>
|
</NcAppNavigationItem>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script>
|
||||||
import { NcActionCheckbox, NcAppNavigationItem } from '@nextcloud/vue'
|
import { NcActionCheckbox, NcAppNavigationItem } from '@nextcloud/vue'
|
||||||
import { mapActions, mapState } from 'pinia'
|
|
||||||
import FilterIcon from 'vue-material-design-icons/Filter.vue'
|
import FilterIcon from 'vue-material-design-icons/Filter.vue'
|
||||||
import FilterSettingsIcon from 'vue-material-design-icons/FilterSettings.vue'
|
import FilterSettings from 'vue-material-design-icons/FilterSettings.vue'
|
||||||
import { t } from '@nextcloud/l10n'
|
|
||||||
import { useSettings } from '../../store/settings.ts'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Filters',
|
name: 'Filters',
|
||||||
components: {
|
components: {
|
||||||
FilterIcon,
|
FilterIcon,
|
||||||
FilterSettingsIcon,
|
FilterSettings,
|
||||||
NcAppNavigationItem,
|
NcAppNavigationItem,
|
||||||
NcActionCheckbox,
|
NcActionCheckbox,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(useSettings, ['filters']),
|
|
||||||
all() {
|
all() {
|
||||||
return (
|
return this.filters.listened && this.filters.listening && this.filters.unlistened
|
||||||
this.filters.listened &&
|
|
||||||
this.filters.listening &&
|
|
||||||
this.filters.unlistened
|
|
||||||
)
|
|
||||||
},
|
},
|
||||||
|
filters() {
|
||||||
|
return this.$store.state.settings.filters
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
...mapActions(useSettings, ['setFilters']),
|
|
||||||
t,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,23 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<NcAppNavigationItem
|
<NcAppNavigationItem :name="t('repod', 'Import subscriptions')" @click="modal = true">
|
||||||
:name="t('repod', 'Import subscriptions')"
|
|
||||||
@click="modal = true">
|
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<NcModal v-if="modal" @close="modal = false">
|
<NcModal v-if="modal" @close="modal = false">
|
||||||
<div class="modal">
|
<div class="modal">
|
||||||
<h2>{{ t('repod', 'Import OPML file') }}</h2>
|
<h2>{{ t('repod', 'Import OPML file') }}</h2>
|
||||||
<form
|
<form v-if="!loading"
|
||||||
v-if="!loading"
|
|
||||||
:action="generateUrl('/apps/repod/opml/import')"
|
:action="generateUrl('/apps/repod/opml/import')"
|
||||||
enctype="multipart/form-data"
|
enctype="multipart/form-data"
|
||||||
method="post"
|
method="post"
|
||||||
@submit.prevent="importOpml">
|
@submit.prevent="importOpml">
|
||||||
<input
|
<input accept="application/xml,.opml"
|
||||||
accept="application/xml,.opml"
|
|
||||||
name="import"
|
name="import"
|
||||||
required
|
required
|
||||||
type="file" />
|
type="file">
|
||||||
<input type="submit" />
|
<input type="submit">
|
||||||
</form>
|
</form>
|
||||||
<Loading v-if="loading" />
|
<Loading v-if="loading" />
|
||||||
</div>
|
</div>
|
||||||
@ -29,13 +25,12 @@
|
|||||||
</NcAppNavigationItem>
|
</NcAppNavigationItem>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script>
|
||||||
import { NcAppNavigationItem, NcModal } from '@nextcloud/vue'
|
import { NcAppNavigationItem, NcModal } from '@nextcloud/vue'
|
||||||
import ImportIcon from 'vue-material-design-icons/Import.vue'
|
import ImportIcon from 'vue-material-design-icons/Import.vue'
|
||||||
import Loading from '../Atoms/Loading.vue'
|
import Loading from '../Atoms/Loading.vue'
|
||||||
import axios from '@nextcloud/axios'
|
import axios from '@nextcloud/axios'
|
||||||
import { generateUrl } from '@nextcloud/router'
|
import { generateUrl } from '@nextcloud/router'
|
||||||
import { t } from '@nextcloud/l10n'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Import',
|
name: 'Import',
|
||||||
@ -45,19 +40,19 @@ export default {
|
|||||||
NcAppNavigationItem,
|
NcAppNavigationItem,
|
||||||
NcModal,
|
NcModal,
|
||||||
},
|
},
|
||||||
data: () => ({
|
data() {
|
||||||
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
modal: false,
|
modal: false,
|
||||||
}),
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
generateUrl,
|
generateUrl,
|
||||||
t,
|
async importOpml(event) {
|
||||||
async importOpml(event: Event) {
|
|
||||||
try {
|
try {
|
||||||
const target = event.target as HTMLFormElement
|
const formData = new FormData(event.target)
|
||||||
const formData = new FormData(target)
|
this.importLoading = true
|
||||||
this.loading = true
|
await axios.post(event.target.action, formData)
|
||||||
await axios.post(target.action, formData)
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
} finally {
|
} finally {
|
||||||
@ -69,10 +64,10 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.modal {
|
.modal {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin: 2rem;
|
margin: 2rem;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
<template>
|
|
||||||
<NcAppNavigationItem
|
|
||||||
href="https://apps.nextcloud.com/apps/repod#comments"
|
|
||||||
:name="t('repod', 'Rate RePod ❤️')">
|
|
||||||
<template #icon>
|
|
||||||
<StarIcon :size="20" />
|
|
||||||
</template>
|
|
||||||
</NcAppNavigationItem>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import { NcAppNavigationItem } from '@nextcloud/vue'
|
|
||||||
import StarIcon from 'vue-material-design-icons/Star.vue'
|
|
||||||
import { t } from '@nextcloud/l10n'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'Rate',
|
|
||||||
components: {
|
|
||||||
NcAppNavigationItem,
|
|
||||||
StarIcon,
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
t,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
@ -1,33 +0,0 @@
|
|||||||
<template>
|
|
||||||
<NcAppNavigationSettings>
|
|
||||||
<Filters />
|
|
||||||
<Sleep />
|
|
||||||
<Speed />
|
|
||||||
<Import />
|
|
||||||
<Export />
|
|
||||||
<Rate />
|
|
||||||
</NcAppNavigationSettings>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import Export from './Export.vue'
|
|
||||||
import Filters from './Filters.vue'
|
|
||||||
import Import from './Import.vue'
|
|
||||||
import { NcAppNavigationSettings } from '@nextcloud/vue'
|
|
||||||
import Rate from './Rate.vue'
|
|
||||||
import Sleep from './Sleep.vue'
|
|
||||||
import Speed from './Speed.vue'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'Settings',
|
|
||||||
components: {
|
|
||||||
Export,
|
|
||||||
Filters,
|
|
||||||
Import,
|
|
||||||
NcAppNavigationSettings,
|
|
||||||
Rate,
|
|
||||||
Sleep,
|
|
||||||
Speed,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
@ -1,103 +0,0 @@
|
|||||||
<template>
|
|
||||||
<NcAppNavigationItem menu-placement="top" :name="t('repod', 'Sleep timer')">
|
|
||||||
<template #actions>
|
|
||||||
<NcActionInput
|
|
||||||
v-if="!sleep"
|
|
||||||
v-model="input"
|
|
||||||
:label="t('repod', 'Minutes')"
|
|
||||||
:label-outside="false"
|
|
||||||
type="number"
|
|
||||||
@submit="setTimer">
|
|
||||||
<template #icon>
|
|
||||||
<ClockVue :size="20" />
|
|
||||||
</template>
|
|
||||||
</NcActionInput>
|
|
||||||
</template>
|
|
||||||
<template #extra>
|
|
||||||
<div v-if="sleep" class="extra">
|
|
||||||
{{ label }}
|
|
||||||
<BellCancel class="pointer" :size="20" @click="stopTimer" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template #icon>
|
|
||||||
<BellSleepIcon v-if="sleep" :size="20" />
|
|
||||||
<BellSleepOutlineIcon v-if="!sleep" :size="20" />
|
|
||||||
</template>
|
|
||||||
</NcAppNavigationItem>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import { NcActionInput, NcAppNavigationItem } from '@nextcloud/vue'
|
|
||||||
import { n, t } from '@nextcloud/l10n'
|
|
||||||
import BellCancel from 'vue-material-design-icons/BellCancel.vue'
|
|
||||||
import BellSleepIcon from 'vue-material-design-icons/BellSleep.vue'
|
|
||||||
import BellSleepOutlineIcon from 'vue-material-design-icons/BellSleepOutline.vue'
|
|
||||||
import ClockVue from 'vue-material-design-icons/Clock.vue'
|
|
||||||
import { mapActions } from 'pinia'
|
|
||||||
import { usePlayer } from '../../store/player.ts'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'Sleep',
|
|
||||||
components: {
|
|
||||||
BellCancel,
|
|
||||||
BellSleepIcon,
|
|
||||||
BellSleepOutlineIcon,
|
|
||||||
ClockVue,
|
|
||||||
NcActionInput,
|
|
||||||
NcAppNavigationItem,
|
|
||||||
},
|
|
||||||
data: () => ({
|
|
||||||
input: 10,
|
|
||||||
sleep: null as NodeJS.Timeout | null,
|
|
||||||
timer: 0,
|
|
||||||
}),
|
|
||||||
computed: {
|
|
||||||
label() {
|
|
||||||
if (this.timer > 60) {
|
|
||||||
return this.n(
|
|
||||||
'repod',
|
|
||||||
'%n min',
|
|
||||||
'%n mins',
|
|
||||||
Math.round(this.timer / 60),
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
return this.n('repod', '%n sec', '%n secs', this.timer)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
...mapActions(usePlayer, ['stop']),
|
|
||||||
n,
|
|
||||||
t,
|
|
||||||
setTimer() {
|
|
||||||
this.timer = this.input * 60
|
|
||||||
this.sleep = setInterval(() => {
|
|
||||||
if (this.timer > 0) {
|
|
||||||
this.timer--
|
|
||||||
} else if (this.sleep) {
|
|
||||||
this.stopTimer()
|
|
||||||
this.stop()
|
|
||||||
}
|
|
||||||
}, 1000)
|
|
||||||
},
|
|
||||||
stopTimer() {
|
|
||||||
if (this.sleep) {
|
|
||||||
clearTimeout(this.sleep)
|
|
||||||
this.sleep = null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.extra {
|
|
||||||
align-items: center;
|
|
||||||
display: flex;
|
|
||||||
gap: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pointer {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -2,67 +2,70 @@
|
|||||||
<NcAppNavigationItem :name="t('repod', 'Playback speed')">
|
<NcAppNavigationItem :name="t('repod', 'Playback speed')">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<div class="extra">
|
<div class="extra">
|
||||||
<MinusIcon class="pointer" :size="20" @click="changeRate(-0.1)" />
|
<Minus class="pointer"
|
||||||
<NcCounterBubble class="counter">x{{ rate }}</NcCounterBubble>
|
:size="20"
|
||||||
<PlusIcon class="pointer" :size="20" @click="changeRate(0.1)" />
|
@click="changeRate(-.1)" />
|
||||||
|
<NcCounterBubble class="counter">
|
||||||
|
x{{ player.rate }}
|
||||||
|
</NcCounterBubble>
|
||||||
|
<Plus class="pointer"
|
||||||
|
:size="20"
|
||||||
|
@click="changeRate(.1)" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<SpeedometerSlowIcon v-if="rate < 1" :size="20" />
|
<SpeedometerSlow v-if="player.rate < 1" :size="20" />
|
||||||
<SpeedometerMediumIcon v-if="rate === 1" :size="20" />
|
<SpeedometerMedium v-if="player.rate === 1" :size="20" />
|
||||||
<SpeedometerIcon v-if="rate > 1" :size="20" />
|
<Speedometer v-if="player.rate > 1" :size="20" />
|
||||||
</template>
|
</template>
|
||||||
</NcAppNavigationItem>
|
</NcAppNavigationItem>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script>
|
||||||
import { NcAppNavigationItem, NcCounterBubble } from '@nextcloud/vue'
|
import { NcAppNavigationItem, NcCounterBubble } from '@nextcloud/vue'
|
||||||
import { mapActions, mapState } from 'pinia'
|
import Minus from 'vue-material-design-icons/Minus.vue'
|
||||||
import MinusIcon from 'vue-material-design-icons/Minus.vue'
|
import Plus from 'vue-material-design-icons/Plus.vue'
|
||||||
import PlusIcon from 'vue-material-design-icons/Plus.vue'
|
import Speedometer from 'vue-material-design-icons/Speedometer.vue'
|
||||||
import SpeedometerIcon from 'vue-material-design-icons/Speedometer.vue'
|
import SpeedometerMedium from 'vue-material-design-icons/SpeedometerMedium.vue'
|
||||||
import SpeedometerMediumIcon from 'vue-material-design-icons/SpeedometerMedium.vue'
|
import SpeedometerSlow from 'vue-material-design-icons/SpeedometerSlow.vue'
|
||||||
import SpeedometerSlowIcon from 'vue-material-design-icons/SpeedometerSlow.vue'
|
|
||||||
import { t } from '@nextcloud/l10n'
|
|
||||||
import { usePlayer } from '../../store/player.ts'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Speed',
|
name: 'Speed',
|
||||||
components: {
|
components: {
|
||||||
NcAppNavigationItem,
|
NcAppNavigationItem,
|
||||||
NcCounterBubble,
|
NcCounterBubble,
|
||||||
MinusIcon,
|
Minus,
|
||||||
PlusIcon,
|
Plus,
|
||||||
SpeedometerIcon,
|
Speedometer,
|
||||||
SpeedometerMediumIcon,
|
SpeedometerMedium,
|
||||||
SpeedometerSlowIcon,
|
SpeedometerSlow,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(usePlayer, ['rate']),
|
player() {
|
||||||
|
return this.$store.state.player
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(usePlayer, ['setRate']),
|
changeRate(diff) {
|
||||||
t,
|
const newRate = (this.player.rate + diff).toPrecision(2)
|
||||||
changeRate(diff: number) {
|
this.$store.dispatch('player/rate', newRate > 0 ? newRate : this.player.rate)
|
||||||
const newRate = parseFloat((this.rate + diff).toPrecision(2))
|
|
||||||
this.setRate(newRate > 0 ? newRate : this.rate)
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.counter {
|
.counter {
|
||||||
height: 20px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.extra {
|
.extra {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 0.5rem;
|
gap: .5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pointer {
|
.pointer {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
87
src/components/Sidebar/Item.vue
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
<template>
|
||||||
|
<NcAppNavigationItem :loading="loading"
|
||||||
|
:name="feed ? feed.title : url"
|
||||||
|
:to="hash">
|
||||||
|
<template #actions>
|
||||||
|
<NcActionButton @click="deleteSubscription">
|
||||||
|
<template #icon>
|
||||||
|
<Delete :size="20" />
|
||||||
|
</template>
|
||||||
|
{{ t(`core`, 'Delete') }}
|
||||||
|
</NcActionButton>
|
||||||
|
</template>
|
||||||
|
<template #icon>
|
||||||
|
<NcAvatar v-if="feed"
|
||||||
|
:display-name="feed.author || feed.title"
|
||||||
|
:is-no-user="true"
|
||||||
|
:url="feed.imageUrl" />
|
||||||
|
<Alert v-if="failed" />
|
||||||
|
</template>
|
||||||
|
</NcAppNavigationItem>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { NcActionButton, NcAppNavigationItem, NcAvatar } from '@nextcloud/vue'
|
||||||
|
import Alert from 'vue-material-design-icons/Alert.vue'
|
||||||
|
import Delete from 'vue-material-design-icons/Delete.vue'
|
||||||
|
import axios from '@nextcloud/axios'
|
||||||
|
import { generateUrl } from '@nextcloud/router'
|
||||||
|
import { showError } from '@nextcloud/dialogs'
|
||||||
|
import { toUrl } from '../../utils/url.js'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Item',
|
||||||
|
components: {
|
||||||
|
Alert,
|
||||||
|
Delete,
|
||||||
|
NcActionButton,
|
||||||
|
NcAppNavigationItem,
|
||||||
|
NcAvatar,
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
url: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
failed: false,
|
||||||
|
loading: true,
|
||||||
|
feed: null,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
hash() {
|
||||||
|
return toUrl(this.url)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
async mounted() {
|
||||||
|
try {
|
||||||
|
const podcastData = await axios.get(generateUrl('/apps/gpoddersync/personal_settings/podcast_data?url={url}', { url: this.url }))
|
||||||
|
this.feed = podcastData.data.data
|
||||||
|
} catch (e) {
|
||||||
|
this.failed = true
|
||||||
|
console.error(e)
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async deleteSubscription() {
|
||||||
|
if (confirm(t('repod', 'Are you sure you want to delete this subscription?'))) {
|
||||||
|
try {
|
||||||
|
this.loading = true
|
||||||
|
await axios.post(generateUrl('/apps/gpoddersync/subscription_change/create'), { add: [], remove: [this.url] })
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e)
|
||||||
|
showError(t('repod', 'Error while removing the feed'))
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
this.$store.dispatch('subscriptions/fetch')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
@ -1,149 +0,0 @@
|
|||||||
<template>
|
|
||||||
<NcAppNavigationItem
|
|
||||||
:loading="loading"
|
|
||||||
:name="feed?.data?.title || url"
|
|
||||||
:to="toFeedUrl(url)">
|
|
||||||
<template #actions>
|
|
||||||
<NcActionButton
|
|
||||||
:aria-label="t('repod', 'Favorite')"
|
|
||||||
:model-value="feed?.isFavorite"
|
|
||||||
:name="t('repod', 'Favorite')"
|
|
||||||
:title="t('repod', 'Favorite')"
|
|
||||||
@update:modelValue="switchFavorite($event)">
|
|
||||||
<template #icon>
|
|
||||||
<StarPlusIcon v-if="!feed?.isFavorite" :size="20" />
|
|
||||||
<StarRemoveIcon v-if="feed?.isFavorite" :size="20" />
|
|
||||||
</template>
|
|
||||||
</NcActionButton>
|
|
||||||
<NcActionButton
|
|
||||||
:aria-label="t(`core`, 'Delete')"
|
|
||||||
:name="t(`core`, 'Delete')"
|
|
||||||
:title="t(`core`, 'Delete')"
|
|
||||||
@click="deleteSubscription">
|
|
||||||
<template #icon>
|
|
||||||
<DeleteIcon :size="20" />
|
|
||||||
</template>
|
|
||||||
</NcActionButton>
|
|
||||||
</template>
|
|
||||||
<template #icon>
|
|
||||||
<NcAvatar
|
|
||||||
:display-name="feed?.data?.author || feed?.data?.title"
|
|
||||||
:is-no-user="true"
|
|
||||||
:title="feed?.data?.author"
|
|
||||||
:url="feed?.data?.imageUrl" />
|
|
||||||
<StarIcon v-if="feed?.isFavorite" class="star" :size="20" />
|
|
||||||
<AlertIcon v-if="failed" />
|
|
||||||
</template>
|
|
||||||
</NcAppNavigationItem>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import { NcActionButton, NcAppNavigationItem, NcAvatar } from '@nextcloud/vue'
|
|
||||||
import { mapActions, mapState } from 'pinia'
|
|
||||||
import AlertIcon from 'vue-material-design-icons/Alert.vue'
|
|
||||||
import DeleteIcon from 'vue-material-design-icons/Delete.vue'
|
|
||||||
import type { PersonalSettingsPodcastDataInterface } from '../../utils/types.ts'
|
|
||||||
import StarIcon from 'vue-material-design-icons/Star.vue'
|
|
||||||
import StarPlusIcon from 'vue-material-design-icons/StarPlus.vue'
|
|
||||||
import StarRemoveIcon from 'vue-material-design-icons/StarRemove.vue'
|
|
||||||
import axios from '@nextcloud/axios'
|
|
||||||
import { generateUrl } from '@nextcloud/router'
|
|
||||||
import { showError } from '../../utils/toast.ts'
|
|
||||||
import { t } from '@nextcloud/l10n'
|
|
||||||
import { toFeedUrl } from '../../utils/url.ts'
|
|
||||||
import { useSubscriptions } from '../../store/subscriptions.ts'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'Subscription',
|
|
||||||
components: {
|
|
||||||
AlertIcon,
|
|
||||||
DeleteIcon,
|
|
||||||
NcActionButton,
|
|
||||||
NcAppNavigationItem,
|
|
||||||
NcAvatar,
|
|
||||||
StarIcon,
|
|
||||||
StarPlusIcon,
|
|
||||||
StarRemoveIcon,
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
url: {
|
|
||||||
type: String,
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
data: () => ({
|
|
||||||
failed: false,
|
|
||||||
loading: true,
|
|
||||||
}),
|
|
||||||
computed: {
|
|
||||||
...mapState(useSubscriptions, ['getSubByUrl', 'subs']),
|
|
||||||
feed() {
|
|
||||||
return this.getSubByUrl(this.url)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
async mounted() {
|
|
||||||
try {
|
|
||||||
const podcastData =
|
|
||||||
await axios.get<PersonalSettingsPodcastDataInterface>(
|
|
||||||
generateUrl(
|
|
||||||
'/apps/gpoddersync/personal_settings/podcast_data?url={url}',
|
|
||||||
{
|
|
||||||
url: this.url,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
)
|
|
||||||
this.addMetadatas(this.url, podcastData.data.data)
|
|
||||||
} catch (e) {
|
|
||||||
this.failed = true
|
|
||||||
console.error(e)
|
|
||||||
} finally {
|
|
||||||
this.loading = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
...mapActions(useSubscriptions, ['fetch', 'addMetadatas', 'setFavorite']),
|
|
||||||
t,
|
|
||||||
toFeedUrl,
|
|
||||||
async deleteSubscription() {
|
|
||||||
if (
|
|
||||||
confirm(
|
|
||||||
t('repod', 'Are you sure you want to delete this subscription?'),
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
try {
|
|
||||||
this.loading = true
|
|
||||||
await axios.post(
|
|
||||||
generateUrl('/apps/gpoddersync/subscription_change/create'),
|
|
||||||
{ add: [], remove: [this.url] },
|
|
||||||
)
|
|
||||||
} catch (e) {
|
|
||||||
console.error(e)
|
|
||||||
showError(t('repod', 'Error while removing the feed'))
|
|
||||||
} finally {
|
|
||||||
this.setFavorite(this.url, false)
|
|
||||||
this.loading = false
|
|
||||||
this.fetch()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
switchFavorite(value: boolean) {
|
|
||||||
if (value) {
|
|
||||||
if (this.subs.filter((sub) => sub.isFavorite).length >= 10) {
|
|
||||||
showError(t('repod', 'You can only have 10 favorites'))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.setFavorite(this.url, value)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.star {
|
|
||||||
bottom: 2px;
|
|
||||||
color: yellow;
|
|
||||||
left: 22px;
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -2,69 +2,72 @@
|
|||||||
<AppNavigation>
|
<AppNavigation>
|
||||||
<template #list>
|
<template #list>
|
||||||
<NcAppContentList>
|
<NcAppContentList>
|
||||||
<router-link to="/discover">
|
<router-link to="/">
|
||||||
<NcAppNavigationNew :text="t('repod', 'Add a podcast')">
|
<NcAppNavigationNew :text="t('repod', 'Add a podcast')">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<PlusIcon :size="20" />
|
<Plus :size="20" />
|
||||||
</template>
|
</template>
|
||||||
</NcAppNavigationNew>
|
</NcAppNavigationNew>
|
||||||
</router-link>
|
</router-link>
|
||||||
<Loading v-if="loading" />
|
<Loading v-if="loading" />
|
||||||
<NcAppNavigationList v-if="!loading">
|
<ul v-if="!loading">
|
||||||
<Subscription
|
<Item v-for="subscriptionUrl of subscriptions"
|
||||||
v-for="sub of subs.filter((sub) => sub.isFavorite)"
|
:key="subscriptionUrl"
|
||||||
:key="sub.metrics.url"
|
:url="subscriptionUrl" />
|
||||||
:url="sub.metrics.url" />
|
</ul>
|
||||||
<Subscription
|
|
||||||
v-for="sub of subs.filter((sub) => !sub.isFavorite)"
|
|
||||||
:key="sub.metrics.url"
|
|
||||||
:url="sub.metrics.url" />
|
|
||||||
</NcAppNavigationList>
|
|
||||||
</NcAppContentList>
|
</NcAppContentList>
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<Settings />
|
<NcAppNavigationSettings>
|
||||||
|
<Filters />
|
||||||
|
<Speed />
|
||||||
|
<Import />
|
||||||
|
<Export />
|
||||||
|
</NcAppNavigationSettings>
|
||||||
</template>
|
</template>
|
||||||
</AppNavigation>
|
</AppNavigation>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script>
|
||||||
import {
|
import { NcAppContentList, NcAppNavigationNew, NcAppNavigationSettings } from '@nextcloud/vue'
|
||||||
NcAppContentList,
|
|
||||||
NcAppNavigationList,
|
|
||||||
NcAppNavigationNew,
|
|
||||||
} from '@nextcloud/vue'
|
|
||||||
import { mapActions, mapState } from 'pinia'
|
|
||||||
import AppNavigation from '../Atoms/AppNavigation.vue'
|
import AppNavigation from '../Atoms/AppNavigation.vue'
|
||||||
|
import Export from '../Settings/Export.vue'
|
||||||
|
import Filters from '../Settings/Filters.vue'
|
||||||
|
import Import from '../Settings/Import.vue'
|
||||||
|
import Item from './Item.vue'
|
||||||
import Loading from '../Atoms/Loading.vue'
|
import Loading from '../Atoms/Loading.vue'
|
||||||
import PlusIcon from 'vue-material-design-icons/Plus.vue'
|
import Plus from 'vue-material-design-icons/Plus.vue'
|
||||||
import Settings from '../Settings/Settings.vue'
|
import Speed from '../Settings/Speed.vue'
|
||||||
import Subscription from './Subscription.vue'
|
import { showError } from '@nextcloud/dialogs'
|
||||||
import { showError } from '../../utils/toast.ts'
|
|
||||||
import { t } from '@nextcloud/l10n'
|
|
||||||
import { useSubscriptions } from '../../store/subscriptions.ts'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Subscriptions',
|
name: 'Subscriptions',
|
||||||
components: {
|
components: {
|
||||||
AppNavigation,
|
AppNavigation,
|
||||||
|
Export,
|
||||||
|
Filters,
|
||||||
|
Import,
|
||||||
|
Item,
|
||||||
Loading,
|
Loading,
|
||||||
NcAppContentList,
|
NcAppContentList,
|
||||||
NcAppNavigationList,
|
|
||||||
NcAppNavigationNew,
|
NcAppNavigationNew,
|
||||||
PlusIcon,
|
NcAppNavigationSettings,
|
||||||
Settings,
|
Plus,
|
||||||
Subscription,
|
Speed,
|
||||||
},
|
},
|
||||||
data: () => ({
|
data() {
|
||||||
|
return {
|
||||||
loading: true,
|
loading: true,
|
||||||
}),
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(useSubscriptions, ['subs']),
|
subscriptions() {
|
||||||
|
return this.$store.state.subscriptions.subscriptions
|
||||||
|
},
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
try {
|
try {
|
||||||
await this.fetch()
|
await this.$store.dispatch('subscriptions/fetch')
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
showError(t('repod', 'Could not fetch subscriptions'))
|
showError(t('repod', 'Could not fetch subscriptions'))
|
||||||
@ -72,9 +75,5 @@ export default {
|
|||||||
this.loading = false
|
this.loading = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
...mapActions(useSubscriptions, ['fetch']),
|
|
||||||
t,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
18
src/main.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import { translatePlural as n, translate as t } from '@nextcloud/l10n'
|
||||||
|
import App from './App.vue'
|
||||||
|
import Vue from 'vue'
|
||||||
|
import { generateFilePath } from '@nextcloud/router'
|
||||||
|
import router from './router.js'
|
||||||
|
import store from './store/main.js'
|
||||||
|
|
||||||
|
// eslint-disable-next-line
|
||||||
|
__webpack_public_path__ = generateFilePath(appName, '', 'js/')
|
||||||
|
|
||||||
|
Vue.mixin({ methods: { t, n } })
|
||||||
|
|
||||||
|
export default new Vue({
|
||||||
|
el: '#content',
|
||||||
|
router,
|
||||||
|
store,
|
||||||
|
render: h => h(App),
|
||||||
|
})
|
12
src/main.ts
@ -1,12 +0,0 @@
|
|||||||
import '@formatjs/intl-segmenter/polyfill'
|
|
||||||
import App from './App.vue'
|
|
||||||
import { createApp } from 'vue'
|
|
||||||
import { createPinia } from 'pinia'
|
|
||||||
import router from './router.ts'
|
|
||||||
|
|
||||||
const Vue = createApp(App)
|
|
||||||
const pinia = createPinia()
|
|
||||||
|
|
||||||
Vue.use(pinia)
|
|
||||||
Vue.use(router)
|
|
||||||
Vue.mount('#content')
|
|
23
src/router.js
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import Discover from './views/Discover.vue'
|
||||||
|
import Feed from './views/Feed.vue'
|
||||||
|
import Router from 'vue-router'
|
||||||
|
import Vue from 'vue'
|
||||||
|
import { generateUrl } from '@nextcloud/router'
|
||||||
|
|
||||||
|
Vue.use(Router)
|
||||||
|
|
||||||
|
const router = new Router({
|
||||||
|
base: generateUrl('apps/repod'),
|
||||||
|
routes: [
|
||||||
|
{
|
||||||
|
path: '/',
|
||||||
|
component: Discover,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/:url',
|
||||||
|
component: Feed,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
})
|
||||||
|
|
||||||
|
export default router
|
@ -1,25 +0,0 @@
|
|||||||
import { createRouter, createWebHistory } from 'vue-router'
|
|
||||||
import Discover from './views/Discover.vue'
|
|
||||||
import Feed from './views/Feed.vue'
|
|
||||||
import Home from './views/Home.vue'
|
|
||||||
import { generateUrl } from '@nextcloud/router'
|
|
||||||
|
|
||||||
const router = createRouter({
|
|
||||||
history: createWebHistory(generateUrl('apps/repod')),
|
|
||||||
routes: [
|
|
||||||
{
|
|
||||||
path: '/',
|
|
||||||
component: Home,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/discover',
|
|
||||||
component: Discover,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/feed/:url',
|
|
||||||
component: Feed,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
})
|
|
||||||
|
|
||||||
export default router
|
|
17
src/store/main.js
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import Vuex, { Store } from 'vuex'
|
||||||
|
import Vue from 'vue'
|
||||||
|
import { player } from './player.js'
|
||||||
|
import { settings } from './settings.js'
|
||||||
|
import { subscriptions } from './subscriptions.js'
|
||||||
|
|
||||||
|
Vue.use(Vuex)
|
||||||
|
|
||||||
|
const store = new Store({
|
||||||
|
modules: {
|
||||||
|
player,
|
||||||
|
settings,
|
||||||
|
subscriptions,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
export default store
|
129
src/store/player.js
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
import axios from '@nextcloud/axios'
|
||||||
|
import { decodeUrl } from '../utils/url.js'
|
||||||
|
import { formatEpisodeTimestamp } from '../utils/time.js'
|
||||||
|
import { generateUrl } from '@nextcloud/router'
|
||||||
|
import router from '../router.js'
|
||||||
|
import store from './main.js'
|
||||||
|
|
||||||
|
const audio = new Audio()
|
||||||
|
audio.ondurationchange = () => store.commit('player/duration', audio.duration)
|
||||||
|
audio.onended = () => store.dispatch('player/stop')
|
||||||
|
audio.onloadeddata = () => store.commit('player/loaded', true)
|
||||||
|
audio.onplay = () => store.commit('player/paused', false)
|
||||||
|
audio.onpause = () => store.commit('player/paused', true)
|
||||||
|
audio.onratechange = () => store.commit('player/rate', audio.playbackRate)
|
||||||
|
audio.onseeked = () => store.commit('player/currentTime', audio.currentTime)
|
||||||
|
audio.ontimeupdate = () => store.commit('player/currentTime', audio.currentTime)
|
||||||
|
audio.onvolumechange = () => store.commit('player/volume', audio.volume)
|
||||||
|
|
||||||
|
export const player = {
|
||||||
|
namespaced: true,
|
||||||
|
state: {
|
||||||
|
currentTime: null,
|
||||||
|
duration: null,
|
||||||
|
episode: null,
|
||||||
|
loaded: false,
|
||||||
|
paused: null,
|
||||||
|
podcastUrl: null,
|
||||||
|
volume: 1,
|
||||||
|
rate: 1,
|
||||||
|
started: 0,
|
||||||
|
},
|
||||||
|
mutations: {
|
||||||
|
action: (state, action) => {
|
||||||
|
state.episode.action = action
|
||||||
|
|
||||||
|
if (action && action.position && action.position < action.total) {
|
||||||
|
audio.currentTime = action.position
|
||||||
|
state.started = audio.currentTime
|
||||||
|
}
|
||||||
|
},
|
||||||
|
currentTime: (state, currentTime) => {
|
||||||
|
state.currentTime = currentTime
|
||||||
|
},
|
||||||
|
duration: (state, duration) => {
|
||||||
|
state.duration = duration
|
||||||
|
},
|
||||||
|
episode: (state, episode) => {
|
||||||
|
state.episode = episode
|
||||||
|
|
||||||
|
if (episode) {
|
||||||
|
state.podcastUrl = decodeUrl(router.currentRoute.params.url)
|
||||||
|
audio.src = episode.url
|
||||||
|
audio.load()
|
||||||
|
audio.play()
|
||||||
|
|
||||||
|
if (episode.action && episode.action.position && episode.action.position < episode.action.total) {
|
||||||
|
audio.currentTime = episode.action.position
|
||||||
|
state.started = audio.currentTime
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
state.loaded = false
|
||||||
|
state.podcastUrl = null
|
||||||
|
audio.src = ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
loaded: (state, loaded) => {
|
||||||
|
state.loaded = loaded
|
||||||
|
},
|
||||||
|
paused: (state, paused) => {
|
||||||
|
state.paused = paused
|
||||||
|
},
|
||||||
|
volume: (state, volume) => {
|
||||||
|
state.volume = volume
|
||||||
|
},
|
||||||
|
rate: (state, rate) => {
|
||||||
|
state.rate = rate
|
||||||
|
},
|
||||||
|
started: (state, started) => {
|
||||||
|
state.started = started
|
||||||
|
},
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
load: async (context, episode) => {
|
||||||
|
context.commit('episode', episode)
|
||||||
|
try {
|
||||||
|
const action = await axios.get(generateUrl('/apps/repod/episodes/action?url={url}', { url: episode.url }))
|
||||||
|
context.commit('action', action.data)
|
||||||
|
} catch {}
|
||||||
|
},
|
||||||
|
pause: (context) => {
|
||||||
|
audio.pause()
|
||||||
|
context.dispatch('time')
|
||||||
|
},
|
||||||
|
play: (context) => {
|
||||||
|
audio.play()
|
||||||
|
context.commit('started', audio.currentTime)
|
||||||
|
},
|
||||||
|
seek: (context, currentTime) => {
|
||||||
|
audio.currentTime = currentTime
|
||||||
|
context.dispatch('time')
|
||||||
|
},
|
||||||
|
stop: (context) => {
|
||||||
|
context.dispatch('pause')
|
||||||
|
context.commit('episode', null)
|
||||||
|
},
|
||||||
|
time: async (context) => axios.post(generateUrl('/apps/gpoddersync/episode_action/create'), [{
|
||||||
|
podcast: context.state.podcastUrl,
|
||||||
|
episode: context.state.episode.url,
|
||||||
|
guid: context.state.episode.guid,
|
||||||
|
action: 'play',
|
||||||
|
timestamp: formatEpisodeTimestamp(new Date()),
|
||||||
|
started: Math.round(context.state.started),
|
||||||
|
position: Math.round(audio.currentTime),
|
||||||
|
total: Math.round(audio.duration),
|
||||||
|
}]),
|
||||||
|
volume: (_, volume) => {
|
||||||
|
audio.volume = volume
|
||||||
|
},
|
||||||
|
rate: (_, rate) => {
|
||||||
|
audio.playbackRate = rate
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
setInterval(() => {
|
||||||
|
if (player.state.paused === false) {
|
||||||
|
store.dispatch('player/time')
|
||||||
|
}
|
||||||
|
}, 40000)
|
@ -1,137 +0,0 @@
|
|||||||
import type { EpisodeActionInterface, EpisodeInterface } from '../utils/types.ts'
|
|
||||||
import { getCookie, setCookie } from '../utils/cookies.ts'
|
|
||||||
import axios from '@nextcloud/axios'
|
|
||||||
import { defineStore } from 'pinia'
|
|
||||||
import { formatEpisodeTimestamp } from '../utils/time.ts'
|
|
||||||
import { generateUrl } from '@nextcloud/router'
|
|
||||||
import { showError } from '../utils/toast.ts'
|
|
||||||
import { t } from '@nextcloud/l10n'
|
|
||||||
|
|
||||||
const audio = new Audio()
|
|
||||||
|
|
||||||
export const usePlayer = defineStore('player', {
|
|
||||||
state: () => ({
|
|
||||||
currentTime: null as number | null,
|
|
||||||
duration: null as number | null,
|
|
||||||
episode: null as EpisodeInterface | null,
|
|
||||||
loaded: false,
|
|
||||||
paused: true,
|
|
||||||
playCount: 0,
|
|
||||||
podcastUrl: null as string | null,
|
|
||||||
volume: 1,
|
|
||||||
rate: 1,
|
|
||||||
started: 0,
|
|
||||||
}),
|
|
||||||
actions: {
|
|
||||||
init() {
|
|
||||||
audio.playbackRate = parseFloat(getCookie('repod.rate') || '1')
|
|
||||||
audio.volume = parseFloat(getCookie('repod.volume') || '1')
|
|
||||||
|
|
||||||
audio.ondurationchange = () => (this.duration = audio.duration)
|
|
||||||
audio.onended = () => this.stop()
|
|
||||||
audio.onloadeddata = () => (this.loaded = true)
|
|
||||||
audio.onpause = () => this.pause()
|
|
||||||
audio.onplay = () => this.play()
|
|
||||||
audio.onratechange = () => (this.rate = audio.playbackRate)
|
|
||||||
audio.onseeked = () => (this.currentTime = audio.currentTime)
|
|
||||||
audio.ontimeupdate = () => (this.currentTime = audio.currentTime)
|
|
||||||
audio.onvolumechange = () => (this.volume = audio.volume)
|
|
||||||
|
|
||||||
setInterval(this.act, 40000)
|
|
||||||
setInterval(this.conflict, 1000)
|
|
||||||
},
|
|
||||||
act() {
|
|
||||||
if (this.paused === false) {
|
|
||||||
this.time()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
conflict() {
|
|
||||||
this.playCount = 0
|
|
||||||
},
|
|
||||||
async load(episode: EpisodeInterface | null, podcastUrl?: string) {
|
|
||||||
this.episode = episode
|
|
||||||
this.podcastUrl = podcastUrl || null
|
|
||||||
|
|
||||||
if (this.episode?.url) {
|
|
||||||
audio.src = this.episode.url
|
|
||||||
audio.load()
|
|
||||||
|
|
||||||
try {
|
|
||||||
const action = await axios.get<EpisodeActionInterface>(
|
|
||||||
generateUrl('/apps/repod/episodes/action?url={url}', {
|
|
||||||
url: this.episode.url,
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
|
|
||||||
this.episode.action = action.data
|
|
||||||
} catch {}
|
|
||||||
|
|
||||||
if (
|
|
||||||
this.episode.action &&
|
|
||||||
this.episode.action.position < this.episode.action.total
|
|
||||||
) {
|
|
||||||
audio.currentTime = this.episode.action.position
|
|
||||||
this.started = audio.currentTime
|
|
||||||
}
|
|
||||||
|
|
||||||
audio.play()
|
|
||||||
} else {
|
|
||||||
this.loaded = false
|
|
||||||
this.podcastUrl = null
|
|
||||||
audio.src = ''
|
|
||||||
}
|
|
||||||
},
|
|
||||||
pause() {
|
|
||||||
audio.pause()
|
|
||||||
this.paused = true
|
|
||||||
this.time()
|
|
||||||
},
|
|
||||||
play() {
|
|
||||||
this.playCount++
|
|
||||||
|
|
||||||
if (this.playCount > 10) {
|
|
||||||
showError(t('repod', 'A browser extension conflict with RePod'))
|
|
||||||
} else {
|
|
||||||
audio.play()
|
|
||||||
this.paused = false
|
|
||||||
this.started = audio.currentTime
|
|
||||||
}
|
|
||||||
},
|
|
||||||
seek(currentTime: number) {
|
|
||||||
audio.currentTime = currentTime
|
|
||||||
this.time()
|
|
||||||
},
|
|
||||||
stop() {
|
|
||||||
this.pause()
|
|
||||||
this.episode = null
|
|
||||||
},
|
|
||||||
time() {
|
|
||||||
if (!this.podcastUrl || !this.episode?.url) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
this.episode.action = {
|
|
||||||
podcast: this.podcastUrl,
|
|
||||||
episode: this.episode.url,
|
|
||||||
guid: this.episode.guid,
|
|
||||||
action: 'play',
|
|
||||||
timestamp: formatEpisodeTimestamp(new Date()),
|
|
||||||
started: Math.round(this.started),
|
|
||||||
position: Math.round(audio.currentTime),
|
|
||||||
total: Math.round(audio.duration),
|
|
||||||
}
|
|
||||||
|
|
||||||
axios.post(generateUrl('/apps/gpoddersync/episode_action/create'), [
|
|
||||||
this.episode.action,
|
|
||||||
])
|
|
||||||
},
|
|
||||||
setVolume(volume: number) {
|
|
||||||
audio.volume = volume
|
|
||||||
setCookie('repod.volume', volume.toString(), 365)
|
|
||||||
},
|
|
||||||
setRate(rate: number) {
|
|
||||||
audio.playbackRate = rate
|
|
||||||
setCookie('repod.rate', rate.toString(), 365)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
15
src/store/settings.js
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
export const settings = {
|
||||||
|
namespaced: true,
|
||||||
|
state: {
|
||||||
|
filters: {
|
||||||
|
listened: true,
|
||||||
|
listening: true,
|
||||||
|
unlistened: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mutations: {
|
||||||
|
filters: (state, filters) => {
|
||||||
|
state.filters = { ...state.filters, ...filters }
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
@ -1,37 +0,0 @@
|
|||||||
import { getCookie, setCookie } from '../utils/cookies.ts'
|
|
||||||
import type { FiltersInterface } from '../utils/types.ts'
|
|
||||||
import { defineStore } from 'pinia'
|
|
||||||
|
|
||||||
export const useSettings = defineStore('settings', {
|
|
||||||
state: () => {
|
|
||||||
try {
|
|
||||||
const filters = JSON.parse(getCookie('repod.filters') || '{}') || {}
|
|
||||||
|
|
||||||
if (!filters.length) {
|
|
||||||
throw new Error('Empty cookie')
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
filters: {
|
|
||||||
listened: filters.listened,
|
|
||||||
listening: filters.listening,
|
|
||||||
unlistened: filters.unlistened,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
return {
|
|
||||||
filters: {
|
|
||||||
listened: true,
|
|
||||||
listening: true,
|
|
||||||
unlistened: true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
actions: {
|
|
||||||
setFilters(filters: Partial<FiltersInterface>) {
|
|
||||||
this.filters = { ...this.filters, ...filters }
|
|
||||||
setCookie('repod.filters', JSON.stringify(this.filters), 365)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
21
src/store/subscriptions.js
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import axios from '@nextcloud/axios'
|
||||||
|
import { generateUrl } from '@nextcloud/router'
|
||||||
|
|
||||||
|
export const subscriptions = {
|
||||||
|
namespaced: true,
|
||||||
|
state: {
|
||||||
|
subscriptions: [],
|
||||||
|
},
|
||||||
|
mutations: {
|
||||||
|
set: (state, subscriptions) => {
|
||||||
|
state.subscriptions = subscriptions
|
||||||
|
},
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
fetch: async (context) => {
|
||||||
|
const metrics = await axios.get(generateUrl('/apps/gpoddersync/personal_settings/metrics'))
|
||||||
|
const subs = [...metrics.data.subscriptions].sort((a, b) => b.listenedSeconds - a.listenedSeconds)
|
||||||
|
context.commit('set', subs.map(sub => sub.url))
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
@ -1,59 +0,0 @@
|
|||||||
import type {
|
|
||||||
PersonalSettingsMetricsInterface,
|
|
||||||
PodcastDataInterface,
|
|
||||||
SubscriptionInterface,
|
|
||||||
} from '../utils/types.ts'
|
|
||||||
import { getCookie, setCookie } from '../utils/cookies.ts'
|
|
||||||
import axios from '@nextcloud/axios'
|
|
||||||
import { defineStore } from 'pinia'
|
|
||||||
import { generateUrl } from '@nextcloud/router'
|
|
||||||
|
|
||||||
export const useSubscriptions = defineStore('subscriptions', {
|
|
||||||
state: () => ({
|
|
||||||
subs: [] as SubscriptionInterface[],
|
|
||||||
}),
|
|
||||||
getters: {
|
|
||||||
getSubByUrl: (state) => (url: string) =>
|
|
||||||
state.subs.find((sub) => sub.metrics.url === url),
|
|
||||||
},
|
|
||||||
actions: {
|
|
||||||
async fetch() {
|
|
||||||
let favorites: string[] = []
|
|
||||||
try {
|
|
||||||
favorites = JSON.parse(getCookie('repod.favorites') || '[]') || []
|
|
||||||
} catch {}
|
|
||||||
|
|
||||||
const metrics = await axios.get<PersonalSettingsMetricsInterface>(
|
|
||||||
generateUrl('/apps/gpoddersync/personal_settings/metrics'),
|
|
||||||
)
|
|
||||||
|
|
||||||
this.subs = [...metrics.data.subscriptions]
|
|
||||||
.sort((a, b) => b.listenedSeconds - a.listenedSeconds)
|
|
||||||
.map((sub) => ({
|
|
||||||
metrics: sub,
|
|
||||||
isFavorite: favorites.includes(sub.url),
|
|
||||||
data: this.getSubByUrl(sub.url)?.data,
|
|
||||||
}))
|
|
||||||
},
|
|
||||||
addMetadatas(link: string, data: PodcastDataInterface) {
|
|
||||||
this.subs = this.subs.map((sub) =>
|
|
||||||
sub.metrics.url === link ? { ...sub, data } : sub,
|
|
||||||
)
|
|
||||||
},
|
|
||||||
setFavorite(link: string, isFavorite: boolean) {
|
|
||||||
this.subs = this.subs.map((sub) =>
|
|
||||||
sub.metrics.url === link ? { ...sub, isFavorite } : sub,
|
|
||||||
)
|
|
||||||
|
|
||||||
setCookie(
|
|
||||||
'repod.favorites',
|
|
||||||
JSON.stringify(
|
|
||||||
this.subs
|
|
||||||
.filter((sub) => sub.isFavorite)
|
|
||||||
.map((sub) => sub.metrics.url),
|
|
||||||
),
|
|
||||||
365,
|
|
||||||
)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
@ -1,26 +0,0 @@
|
|||||||
// https://grafikart.fr/tutoriels/javascript-cookies-2079
|
|
||||||
/**
|
|
||||||
* Récupère les données associées à un cookie
|
|
||||||
* @param {string} name Nom du cookie à récupérer
|
|
||||||
* @return {string|null}
|
|
||||||
*/
|
|
||||||
export const getCookie = (name: string): string | null => {
|
|
||||||
const cookies = document.cookie.split('; ')
|
|
||||||
const value = cookies.find((c) => c.startsWith(name + '='))?.split('=')[1]
|
|
||||||
if (value === undefined) {
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
return decodeURIComponent(value)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Créer ou modifie la valeur d'un cookie avec une durée spécifique
|
|
||||||
* @param {string} name Nom du cookie
|
|
||||||
* @param {string} value Value du cookie
|
|
||||||
* @param {number} days Durée de vie du cookie (en jours)
|
|
||||||
*/
|
|
||||||
export const setCookie = (name: string, value: string, days: number) => {
|
|
||||||
const date = new Date()
|
|
||||||
date.setDate(date.getDate() + days)
|
|
||||||
document.cookie = `${name}=${encodeURIComponent(value)}; expires=${date.toUTCString()}; SameSite=Strict;`
|
|
||||||
}
|
|
12
src/utils/debounce.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
// https://stackoverflow.com/a/53486112
|
||||||
|
export const debounce = (fn, delay) => {
|
||||||
|
let timeoutID = null
|
||||||
|
return function() {
|
||||||
|
clearTimeout(timeoutID)
|
||||||
|
const args = arguments
|
||||||
|
const that = this
|
||||||
|
timeoutID = setTimeout(function() {
|
||||||
|
fn.apply(that, args)
|
||||||
|
}, delay)
|
||||||
|
}
|
||||||
|
}
|
5
src/utils/size.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
// https://stackoverflow.com/a/20732091
|
||||||
|
export const humanFileSize = (size) => {
|
||||||
|
const i = size === 0 ? 0 : Math.floor(Math.log(size) / Math.log(1024))
|
||||||
|
return (size / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + ['B', 'kB', 'MB', 'GB', 'TB'][i]
|
||||||
|
}
|
@ -1,9 +0,0 @@
|
|||||||
// https://stackoverflow.com/a/20732091
|
|
||||||
export const humanFileSize = (size: number) => {
|
|
||||||
const i = size === 0 ? 0 : Math.floor(Math.log(size) / Math.log(1024))
|
|
||||||
return (
|
|
||||||
(size / Math.pow(1024, i)).toFixed(2) +
|
|
||||||
' ' +
|
|
||||||
['B', 'kB', 'MB', 'GB', 'TB'][i]
|
|
||||||
)
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
import type { EpisodeInterface } from './types'
|
|
||||||
|
|
||||||
export const hasEnded = (episode: EpisodeInterface) =>
|
|
||||||
episode.action &&
|
|
||||||
episode.action.action &&
|
|
||||||
(episode.action.action.toLowerCase() === 'delete' ||
|
|
||||||
(episode.action.position > 0 &&
|
|
||||||
episode.action.total > 0 &&
|
|
||||||
episode.action.position >= episode.action.total))
|
|
||||||
|
|
||||||
export const isListening = (episode: EpisodeInterface) =>
|
|
||||||
episode.action &&
|
|
||||||
episode.action.action &&
|
|
||||||
episode.action.action.toLowerCase() === 'play' &&
|
|
||||||
episode.action.position > 0 &&
|
|
||||||
!hasEnded(episode)
|
|
7
src/utils/text.js
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
// https://stackoverflow.com/a/5002618
|
||||||
|
export const cleanHtml = (text) => {
|
||||||
|
const pre = document.createElement('pre')
|
||||||
|
pre.innerHTML = text.replace(/<br\s*\/?>/mg, '\n')
|
||||||
|
const strippedText = pre.textContent || pre.innerText || ''
|
||||||
|
return strippedText.replace(/\n/mg, '<br>')
|
||||||
|
}
|
39
src/utils/time.js
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
* Format a date to a timer
|
||||||
|
* @param {Date} date The date
|
||||||
|
* @return {string}
|
||||||
|
*/
|
||||||
|
export const formatTimer = (date) => {
|
||||||
|
const minutes = date.getUTCMinutes().toString().padStart(2, 0)
|
||||||
|
const seconds = date.getUTCSeconds().toString().padStart(2, 0)
|
||||||
|
let timer = `${minutes}:${seconds}`
|
||||||
|
|
||||||
|
if (date.getUTCHours()) {
|
||||||
|
timer = `${date.getUTCHours()}:${timer}`
|
||||||
|
}
|
||||||
|
|
||||||
|
return timer
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Format a date to a usefull timestamp string for the gPodder API
|
||||||
|
* @param {Date} date The date
|
||||||
|
* @return {string}
|
||||||
|
*/
|
||||||
|
export const formatEpisodeTimestamp = (date) => {
|
||||||
|
const year = date.getFullYear()
|
||||||
|
const month = (date.getMonth() + 1).toString().padStart(2, '0')
|
||||||
|
const day = date.getDate().toString().padStart(2, '0')
|
||||||
|
const hours = date.getHours().toString().padStart(2, '0')
|
||||||
|
const mins = date.getMinutes().toString().padStart(2, '0')
|
||||||
|
const secs = date.getSeconds().toString().padStart(2, '0')
|
||||||
|
|
||||||
|
return `${year}-${month}-${day}T${hours}:${mins}:${secs}`
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Format a date to a localized date string
|
||||||
|
* @param {Date} date The date
|
||||||
|
* @return {string}
|
||||||
|
*/
|
||||||
|
export const formatLocaleDate = (date) => date.toLocaleDateString(undefined, { dateStyle: 'medium' })
|
@ -1,53 +0,0 @@
|
|||||||
/**
|
|
||||||
* Format a date to a timer
|
|
||||||
* @param {Date} date The date
|
|
||||||
* @return {string}
|
|
||||||
*/
|
|
||||||
export const formatTimer = (date: Date): string => {
|
|
||||||
const minutes = date.getUTCMinutes().toString().padStart(2, '0')
|
|
||||||
const seconds = date.getUTCSeconds().toString().padStart(2, '0')
|
|
||||||
let timer = `${minutes}:${seconds}`
|
|
||||||
|
|
||||||
if (date.getUTCHours()) {
|
|
||||||
timer = `${date.getUTCHours()}:${timer}`
|
|
||||||
}
|
|
||||||
|
|
||||||
return timer
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Format a date to a usefull timestamp string for the gPodder API
|
|
||||||
* @param {Date} date The date
|
|
||||||
* @return {string}
|
|
||||||
*/
|
|
||||||
export const formatEpisodeTimestamp = (date: Date): string => {
|
|
||||||
const year = date.getFullYear()
|
|
||||||
const month = (date.getMonth() + 1).toString().padStart(2, '0')
|
|
||||||
const day = date.getDate().toString().padStart(2, '0')
|
|
||||||
const hours = date.getHours().toString().padStart(2, '0')
|
|
||||||
const mins = date.getMinutes().toString().padStart(2, '0')
|
|
||||||
const secs = date.getSeconds().toString().padStart(2, '0')
|
|
||||||
|
|
||||||
return `${year}-${month}-${day}T${hours}:${mins}:${secs}`
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Format a date to a localized date string
|
|
||||||
* @param {Date} date The date
|
|
||||||
* @return {string}
|
|
||||||
*/
|
|
||||||
export const formatLocaleDate = (date: Date): string =>
|
|
||||||
date.toLocaleDateString(undefined, { dateStyle: 'medium' })
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the number of seconds from a duration feed's entry
|
|
||||||
* @param {string} duration The duration feed's entry
|
|
||||||
* @return {number}
|
|
||||||
*/
|
|
||||||
export const durationToSeconds = (duration: string): number => {
|
|
||||||
const splitDuration = duration.split(':').reverse()
|
|
||||||
let seconds = parseInt(splitDuration[0])
|
|
||||||
seconds += splitDuration.length > 1 ? parseInt(splitDuration[1]) * 60 : 0
|
|
||||||
seconds += splitDuration.length > 2 ? parseInt(splitDuration[2]) * 60 * 60 : 0
|
|
||||||
return seconds
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
import toastify from 'toastify-js'
|
|
||||||
|
|
||||||
export const showMessage = (text: string, backgroundColor: string) =>
|
|
||||||
toastify({
|
|
||||||
text,
|
|
||||||
backgroundColor,
|
|
||||||
}).showToast()
|
|
||||||
|
|
||||||
export const showError = (text: string) => showMessage(text, 'var(--color-error)')
|
|
||||||
export const showWarning = (text: string) =>
|
|
||||||
showMessage(text, 'var(--color-warning)')
|
|
||||||
export const showInfo = (text: string) => showMessage(text, 'var(--color-primary)')
|
|
||||||
export const showSuccess = (text: string) =>
|
|
||||||
showMessage(text, 'var(--color-success)')
|
|
@ -1,73 +0,0 @@
|
|||||||
export interface EpisodeActionInterface {
|
|
||||||
podcast: string
|
|
||||||
episode: string
|
|
||||||
action: string
|
|
||||||
timestamp: string
|
|
||||||
started: number
|
|
||||||
position: number
|
|
||||||
total: number
|
|
||||||
guid?: string
|
|
||||||
id?: number
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface EpisodeInterface {
|
|
||||||
title: string
|
|
||||||
url: string
|
|
||||||
name: string
|
|
||||||
link?: string
|
|
||||||
image?: string
|
|
||||||
description?: string
|
|
||||||
fetchedAtUnix: number
|
|
||||||
guid: string
|
|
||||||
type?: string
|
|
||||||
size?: number
|
|
||||||
pubDate?: {
|
|
||||||
date: string
|
|
||||||
timezone_type: number
|
|
||||||
timezone: string
|
|
||||||
}
|
|
||||||
duration?: string
|
|
||||||
action?: EpisodeActionInterface
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface FiltersInterface {
|
|
||||||
listened: boolean
|
|
||||||
listening: boolean
|
|
||||||
unlistened: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface PodcastDataInterface {
|
|
||||||
title: string
|
|
||||||
author?: string
|
|
||||||
link: string
|
|
||||||
description?: string
|
|
||||||
imageUrl?: string
|
|
||||||
fetchedAtUnix: number
|
|
||||||
imageBlob?: string | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface PodcastMetricsInterface {
|
|
||||||
url: string
|
|
||||||
listenedSeconds: number
|
|
||||||
actionCounts: {
|
|
||||||
delete: number
|
|
||||||
download: number
|
|
||||||
flattr: number
|
|
||||||
new: number
|
|
||||||
play: number
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface SubscriptionInterface {
|
|
||||||
data?: PodcastDataInterface
|
|
||||||
isFavorite?: boolean
|
|
||||||
metrics: PodcastMetricsInterface
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface PersonalSettingsMetricsInterface {
|
|
||||||
subscriptions: PodcastMetricsInterface[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface PersonalSettingsPodcastDataInterface {
|
|
||||||
data: PodcastDataInterface
|
|
||||||
}
|
|
3
src/utils/url.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export const encodeUrl = (url) => encodeURIComponent(btoa(url))
|
||||||
|
export const decodeUrl = (url) => atob(decodeURIComponent(url))
|
||||||
|
export const toUrl = (url) => `/${encodeUrl(url)}`
|
@ -1,5 +0,0 @@
|
|||||||
export const encodeUrl = (url: string) => encodeURIComponent(btoa(url))
|
|
||||||
export const decodeUrl = (url: string) => atob(decodeURIComponent(url))
|
|
||||||
export const toFeedUrl = (url: string) => `/feed/${encodeUrl(url)}`
|
|
||||||
export const filenameFromUrl = (url: string) =>
|
|
||||||
new URL(url).pathname.split('/').pop()
|
|
@ -1,25 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppContent class="padding">
|
<AppContent class="main">
|
||||||
<NcTextField v-model="search" :label="t('repod', 'Find a podcast')">
|
<NcTextField :label="t('repod', 'Find a podcast')" :value.sync="search">
|
||||||
<template #icon>
|
|
||||||
<Magnify :size="20" />
|
<Magnify :size="20" />
|
||||||
</template>
|
|
||||||
</NcTextField>
|
</NcTextField>
|
||||||
<Search v-if="search" :value="search" />
|
<Search v-if="search" :value="search" />
|
||||||
<Toplist v-if="!search" type="hot" />
|
<Tops v-if="!search" type="hot" />
|
||||||
<Toplist v-if="!search" type="new" />
|
<Tops v-if="!search" type="new" />
|
||||||
<AddRss v-if="!search" />
|
<AddRss v-if="!search" />
|
||||||
</AppContent>
|
</AppContent>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script>
|
||||||
import AddRss from '../components/Discover/AddRss.vue'
|
import AddRss from '../components/Discover/AddRss.vue'
|
||||||
import AppContent from '../components/Atoms/AppContent.vue'
|
import AppContent from '../components/Atoms/AppContent.vue'
|
||||||
import Magnify from 'vue-material-design-icons/Magnify.vue'
|
import Magnify from 'vue-material-design-icons/Magnify.vue'
|
||||||
import { NcTextField } from '@nextcloud/vue'
|
import { NcTextField } from '@nextcloud/vue'
|
||||||
import Search from '../components/Discover/Search.vue'
|
import Search from '../components/Discover/Search.vue'
|
||||||
import Toplist from '../components/Discover/Toplist.vue'
|
import Tops from '../components/Discover/Tops.vue'
|
||||||
import { t } from '@nextcloud/l10n'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Discover',
|
name: 'Discover',
|
||||||
@ -29,19 +26,18 @@ export default {
|
|||||||
Magnify,
|
Magnify,
|
||||||
NcTextField,
|
NcTextField,
|
||||||
Search,
|
Search,
|
||||||
Toplist,
|
Tops,
|
||||||
},
|
},
|
||||||
data: () => ({
|
data() {
|
||||||
|
return {
|
||||||
search: '',
|
search: '',
|
||||||
}),
|
}
|
||||||
methods: {
|
|
||||||
t,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.padding {
|
.main {
|
||||||
padding: 15px 51px;
|
padding: 15px 51px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,28 +1,33 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppContent>
|
<AppContent>
|
||||||
<Loading v-if="loading" />
|
<Loading v-if="loading" />
|
||||||
<EmptyContent v-if="failed" :name="t('repod', 'Error loading feed')">
|
<NcEmptyContent v-if="failed"
|
||||||
|
class="error"
|
||||||
|
:name="t('repod', 'Error loading feed')">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<Alert />
|
<Alert />
|
||||||
</template>
|
</template>
|
||||||
</EmptyContent>
|
</NcEmptyContent>
|
||||||
<Banner v-if="feed" :feed="feed" />
|
<Banner v-if="feed"
|
||||||
|
:author="feed.author"
|
||||||
|
:description="feed.description"
|
||||||
|
:image-url="feed.imageUrl"
|
||||||
|
:link="feed.link"
|
||||||
|
:title="feed.title" />
|
||||||
<Episodes v-if="feed" />
|
<Episodes v-if="feed" />
|
||||||
</AppContent>
|
</AppContent>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script>
|
||||||
import Alert from 'vue-material-design-icons/Alert.vue'
|
import Alert from 'vue-material-design-icons/Alert.vue'
|
||||||
import AppContent from '../components/Atoms/AppContent.vue'
|
import AppContent from '../components/Atoms/AppContent.vue'
|
||||||
import Banner from '../components/Feed/Banner.vue'
|
import Banner from '../components/Feed/Banner.vue'
|
||||||
import EmptyContent from '../components/Atoms/EmptyContent.vue'
|
|
||||||
import Episodes from '../components/Feed/Episodes.vue'
|
import Episodes from '../components/Feed/Episodes.vue'
|
||||||
import Loading from '../components/Atoms/Loading.vue'
|
import Loading from '../components/Atoms/Loading.vue'
|
||||||
import type { PodcastDataInterface } from '../utils/types.ts'
|
import { NcEmptyContent } from '@nextcloud/vue'
|
||||||
import axios from '@nextcloud/axios'
|
import axios from '@nextcloud/axios'
|
||||||
import { decodeUrl } from '../utils/url.ts'
|
import { decodeUrl } from '../utils/url.js'
|
||||||
import { generateUrl } from '@nextcloud/router'
|
import { generateUrl } from '@nextcloud/router'
|
||||||
import { t } from '@nextcloud/l10n'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Feed',
|
name: 'Feed',
|
||||||
@ -30,26 +35,25 @@ export default {
|
|||||||
Alert,
|
Alert,
|
||||||
AppContent,
|
AppContent,
|
||||||
Banner,
|
Banner,
|
||||||
EmptyContent,
|
|
||||||
Episodes,
|
Episodes,
|
||||||
Loading,
|
Loading,
|
||||||
|
NcEmptyContent,
|
||||||
},
|
},
|
||||||
data: () => ({
|
data() {
|
||||||
|
return {
|
||||||
failed: false,
|
failed: false,
|
||||||
loading: true,
|
loading: true,
|
||||||
feed: null as PodcastDataInterface | null,
|
feed: null,
|
||||||
}),
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
url() {
|
url() {
|
||||||
return decodeUrl(this.$route.params.url as string)
|
return decodeUrl(this.$route.params.url)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
try {
|
try {
|
||||||
this.loading = true
|
const podcastData = await axios.get(generateUrl('/apps/repod/podcast?url={url}', { url: this.url }))
|
||||||
const podcastData = await axios.get<PodcastDataInterface>(
|
|
||||||
generateUrl('/apps/repod/podcast?url={url}', { url: this.url }),
|
|
||||||
)
|
|
||||||
this.feed = podcastData.data
|
this.feed = podcastData.data
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.failed = true
|
this.failed = true
|
||||||
@ -58,8 +62,11 @@ export default {
|
|||||||
this.loading = false
|
this.loading = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
t,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.error {
|
||||||
|
margin: 2rem;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppContent>
|
<NcAppContent class="content">
|
||||||
<EmptyContent :name="t('repod', 'Missing required app')">
|
<NcEmptyContent :name="t('repod', 'Missing required app')">
|
||||||
<template #action>
|
<template #action>
|
||||||
<NcButton :href="gPodderSyncUrl">
|
<NcButton :href="gPodderSyncUrl">
|
||||||
{{ t('repod', 'Install GPodder Sync') }}
|
{{ t('repod', 'Install GPodder Sync') }}
|
||||||
@ -9,33 +9,31 @@
|
|||||||
<template #icon>
|
<template #icon>
|
||||||
<Alert />
|
<Alert />
|
||||||
</template>
|
</template>
|
||||||
</EmptyContent>
|
</NcEmptyContent>
|
||||||
</AppContent>
|
</NcAppContent>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script>
|
||||||
|
import {
|
||||||
|
NcAppContent,
|
||||||
|
NcButton,
|
||||||
|
NcEmptyContent,
|
||||||
|
} from '@nextcloud/vue'
|
||||||
import Alert from 'vue-material-design-icons/Alert.vue'
|
import Alert from 'vue-material-design-icons/Alert.vue'
|
||||||
import AppContent from '../components/Atoms/AppContent.vue'
|
|
||||||
import EmptyContent from '../components/Atoms/EmptyContent.vue'
|
|
||||||
import { NcButton } from '@nextcloud/vue'
|
|
||||||
import { generateUrl } from '@nextcloud/router'
|
import { generateUrl } from '@nextcloud/router'
|
||||||
import { t } from '@nextcloud/l10n'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'GPodder',
|
name: 'GPodder',
|
||||||
components: {
|
components: {
|
||||||
Alert,
|
Alert,
|
||||||
AppContent,
|
NcAppContent,
|
||||||
EmptyContent,
|
|
||||||
NcButton,
|
NcButton,
|
||||||
|
NcEmptyContent,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
gPodderSyncUrl() {
|
gPodderSyncUrl() {
|
||||||
return generateUrl('/settings/apps/installed/gpoddersync')
|
return generateUrl('/settings/apps/installed/gpoddersync')
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
t,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,55 +0,0 @@
|
|||||||
<template>
|
|
||||||
<AppContent>
|
|
||||||
<EmptyContent
|
|
||||||
v-if="!favorites.length"
|
|
||||||
class="padding"
|
|
||||||
:description="
|
|
||||||
t('repod', 'Pin some subscriptions to see their latest updates')
|
|
||||||
"
|
|
||||||
:name="t('repod', 'No favorites')">
|
|
||||||
<template #icon>
|
|
||||||
<StarOffIcon />
|
|
||||||
</template>
|
|
||||||
</EmptyContent>
|
|
||||||
<ul v-if="favorites.length">
|
|
||||||
<li v-for="favorite in favorites" :key="favorite.metrics.url">
|
|
||||||
<Favorite :feed="favorite" />
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</AppContent>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import AppContent from '../components/Atoms/AppContent.vue'
|
|
||||||
import EmptyContent from '../components/Atoms/EmptyContent.vue'
|
|
||||||
import Favorite from '../components/Feed/Favorite.vue'
|
|
||||||
import StarOffIcon from 'vue-material-design-icons/StarOff.vue'
|
|
||||||
import { mapState } from 'pinia'
|
|
||||||
import { t } from '@nextcloud/l10n'
|
|
||||||
import { useSubscriptions } from '../store/subscriptions.ts'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'Home',
|
|
||||||
components: {
|
|
||||||
AppContent,
|
|
||||||
EmptyContent,
|
|
||||||
Favorite,
|
|
||||||
StarOffIcon,
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapState(useSubscriptions, ['subs']),
|
|
||||||
favorites() {
|
|
||||||
return this.subs.filter((sub) => sub.isFavorite)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
t,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.padding {
|
|
||||||
padding: 15px 51px;
|
|
||||||
}
|
|
||||||
</style>
|
|