chore: small rss fixes

This commit is contained in:
Daan Wijns 2022-07-04 12:14:46 +02:00
parent afb2cd76b6
commit 882c263b72
4 changed files with 103 additions and 45 deletions

View file

@ -1,13 +1,15 @@
<template>
<v-dialog v-model="dialog" max-width="300px">
<v-dialog v-model="dialog" max-width="350px">
<v-card flat>
<v-card-title class="pa-0">
<v-toolbar-title class="ma-4 primarytext--text">
<h3>{{ hasInitialRule ? $t('edit') : $t('createNew') }} {{ $t('rule') }}</h3>
<h3>
{{ hasInitialRule ? $t("edit") : $t("createNew") }} {{ $t("rule") }}
</h3>
</v-toolbar-title>
</v-card-title>
<v-card-text>
<v-form ref="ruleForm" class="px-6 mt-3">
<v-card-text class="pa-2">
<v-form ref="ruleForm">
<v-container>
<v-text-field
v-model="rule.name"
@ -23,11 +25,14 @@
/>
</v-container>
<v-container>
<v-subheader>{{ $t('modals.newRule.def.affectedFeeds') }}</v-subheader>
<v-subheader class="pa-0">
{{ $t("modals.newRule.def.affectedFeeds") }}
</v-subheader>
<template v-for="(item, index) in availableFeeds">
<v-checkbox
:key="index"
v-model="rule.def.affectedFeeds"
hide-details
:label="item.name"
:value="item.url"
/>
@ -42,20 +47,13 @@
class="accent white--text elevation-0 px-4"
@click="create"
>
{{ $t('create') }}
{{ $t("create") }}
</v-btn>
<v-btn
v-else
class="accent white--text elevation-0 px-4"
@click="edit"
>
{{ $t('edit') }}
<v-btn v-else class="accent white--text elevation-0 px-4" @click="edit">
{{ $t("edit") }}
</v-btn>
<v-btn
class="error white--text elevation-0 px-4"
@click="cancel"
>
{{ $t('cancel') }}
<v-btn class="error white--text elevation-0 px-4" @click="cancel">
{{ $t("cancel") }}
</v-btn>
</v-card-actions>
</v-card>
@ -76,15 +74,17 @@ export default {
initialRule: Object
},
data: () => ({
rule: {
name: '',
def: {
rule: {
name: '',
def: {
mustContain: '',
affectedFeeds: [],
enabled: true
}
},
mdiCancel, mdiTagPlus, mdiPencil
mdiCancel,
mdiTagPlus,
mdiPencil
}),
computed: {
...mapGetters(['getSelectedRule', 'getFeeds']),
@ -92,8 +92,7 @@ export default {
return this.getFeeds()
},
hasInitialRule() {
return !!(this.initialRule &&
this.initialRule.name)
return !!(this.initialRule && this.initialRule.name)
}
},
created() {

View file

@ -1,6 +1,8 @@
<template>
<v-card flat>
<v-subheader>{{ $t('modals.settings.pageRss.pageGeneral.rssAutoProcessing') }}</v-subheader>
<v-subheader>
{{ $t("modals.settings.pageRss.pageGeneral.rssAutoProcessing") }}
</v-subheader>
<v-list-item>
<v-checkbox
v-model="settings.rss_processing_enabled"
@ -9,13 +11,42 @@
:label="$t('modals.settings.pageRss.pageGeneral.input.enableRssProcessing')"
/>
</v-list-item>
<v-subheader>{{ $t('modals.settings.pageRss.pageGeneral.rssAutoDownloader') }}</v-subheader>
<v-list-item>
<v-text-field
v-model="settings.rss_refresh_interval"
class="mb-2"
outlined
dense
type="number"
hide-details
:label="$t('modals.settings.pageRss.pageGeneral.input.feedsRefreshInterval') "
/>
</v-list-item>
<v-list-item>
<v-text-field
v-model="settings.rss_max_articles_per_feed"
class="mb-2"
outlined
dense
type="number"
hide-details
:label="$t('modals.settings.pageRss.pageGeneral.input.feedsMaxArticles') "
/>
</v-list-item>
<v-divider />
<v-subheader>
{{ $t("modals.settings.pageRss.pageGeneral.rssAutoDownloader") }}
</v-subheader>
<v-list-item>
<v-checkbox
v-model="settings.rss_auto_downloading_enabled"
hide-details
class="ma-0 pa-0"
:label="$t('modals.settings.pageRss.pageGeneral.input.enableRssAutoDownload')"
:label="
$t(
'modals.settings.pageRss.pageGeneral.input.enableRssAutoDownload'
)
"
/>
</v-list-item>
</v-card>
@ -28,3 +59,15 @@ export default {
mixins: [SettingsTab, FullScreenModal]
}
</script>
<style lang="scss" scoped>
::v-deep .v-select .v-select__selection {
padding-top: 10px !important;
padding-bottom: 10px !important;
}
// Reversed input variant
::v-deep .v-input--reverse .v-input__slot {
@import "src/styles/styles.scss";
@include reverse-switch;
}
</style>

View file

@ -40,6 +40,8 @@ const locale = {
name: 'Name',
hash: 'Hash',
magnet: 'Magnet',
feed: 'feed',
rule: 'rule',
/** Torrent */
torrent: {
@ -222,7 +224,9 @@ const locale = {
rssAutoDownloader: 'RSS Torrent Auto Downloader',
input: {
enableRssAutoDownload: 'Enable auto downloading of RSS torrents',
enableRssProcessing: 'Enable fetching RSS feeds'
enableRssProcessing: 'Enable fetching RSS feeds',
feedsRefreshInterval: 'Feeds refresh interval',
feedsMaxArticles: 'Maximum number of articles per feed'
}
}
},

View file

@ -1,6 +1,11 @@
<template>
<div class="px-1 px-sm-5 background noselect">
<v-row no-gutters class="grey--text" align="center" justify="center">
<v-row
no-gutters
class="grey--text"
align="center"
justify="center"
>
<v-col>
<h1 style="font-size: 1.6em !important" class="subtitle-1 ml-2">
{{ $t("settings") | titleCase }}
@ -8,7 +13,12 @@
</v-col>
<v-col class="align-center justify-center">
<v-card-actions class="justify-end">
<v-btn class="accent" small elevation="0" @click="saveSettings">
<v-btn
class="accent"
small
elevation="0"
@click="saveSettings"
>
<v-icon>{{ mdiContentSave }}</v-icon>
</v-btn>
<v-btn small elevation="0" @click="close">
@ -79,8 +89,8 @@
</template>
<script>
import { mapGetters } from "vuex";
import { mdiClose, mdiContentSave } from "@mdi/js";
import { mapGetters } from 'vuex'
import { mdiClose, mdiContentSave } from '@mdi/js'
import {
WebUI,
BitTorrent,
@ -88,11 +98,12 @@ import {
VueTorrent,
TagsAndCategories,
Connection,
} from "@/components/Settings/Tabs";
import { SettingsTab } from "../mixins";
Rss
} from '@/components/Settings/Tabs'
import { SettingsTab } from '../mixins'
export default {
name: "Settings",
name: 'Settings',
components: {
WebUI,
BitTorrent,
@ -100,6 +111,7 @@ export default {
VueTorrent,
TagsAndCategories,
Connection,
Rss
},
mixins: [SettingsTab],
data() {
@ -108,25 +120,25 @@ export default {
items: [],
peers: [],
mdiClose,
mdiContentSave,
};
mdiContentSave
}
},
computed: {
...mapGetters(["getSettings"]),
...mapGetters(['getSettings']),
settings() {
return this.getSettings();
return this.getSettings()
},
isPhone() {
return this.$vuetify.breakpoint.xsOnly;
},
return this.$vuetify.breakpoint.xsOnly
}
},
mounted() {
this.$store.dispatch("FETCH_SETTINGS");
this.$store.dispatch('FETCH_SETTINGS')
},
methods: {
close() {
this.$router.back();
},
},
};
this.$router.back()
}
}
}
</script>