diff --git a/ui/src/views/options/Options.vue b/ui/src/views/options/Options.vue index a5f8de681..d46cb2526 100644 --- a/ui/src/views/options/Options.vue +++ b/ui/src/views/options/Options.vue @@ -13,6 +13,8 @@ + + @@ -48,6 +51,7 @@ import InterfaceWeb from './sections/InterfaceWeb' import Storage from './sections/Storage' import SceneDataScrapers from './sections/OptionsSceneDataScrapers' +import SceneCreate from './sections/OptionsSceneCreate' import Funscripts from './sections/Funscripts' import SceneDataImportExport from './sections/OptionsSceneDataImportExport' import InterfaceDLNA from './sections/InterfaceDLNA.vue' @@ -56,7 +60,7 @@ import Previews from './sections/Previews.vue' import InterfaceDeoVR from './sections/InterfaceDeoVR.vue' export default { - components: { Storage, SceneDataScrapers, Funscripts, SceneDataImportExport, InterfaceWeb, InterfaceDLNA, InterfaceDeoVR, Cache, Previews }, + components: { Storage, SceneDataScrapers, SceneCreate, Funscripts, SceneDataImportExport, InterfaceWeb, InterfaceDLNA, InterfaceDeoVR, Cache, Previews }, data: function () { return { active: 'storage' diff --git a/ui/src/views/options/sections/OptionsSceneCreate.vue b/ui/src/views/options/sections/OptionsSceneCreate.vue new file mode 100644 index 000000000..9065384a6 --- /dev/null +++ b/ui/src/views/options/sections/OptionsSceneCreate.vue @@ -0,0 +1,102 @@ + + + + + + + diff --git a/ui/src/views/options/sections/OptionsSceneDataScrapers.vue b/ui/src/views/options/sections/OptionsSceneDataScrapers.vue index 882487761..dca734c56 100644 --- a/ui/src/views/options/sections/OptionsSceneDataScrapers.vue +++ b/ui/src/views/options/sections/OptionsSceneDataScrapers.vue @@ -2,104 +2,60 @@
-

{{$t('Mainstream sites')}}

+

{{$t('Scrape scenes from studios')}}

-
-
-
-
-

+ + + + + + - + -

- -
{{item.name}}
-

- - Updated {{formatDistanceToNow(parseISO(item.last_update))}} ago - {{$t('Never scraped')}} -

-

- {{$t('Scraping now...')}} -

-
- -
- -
-
-
-
- -
-
-

{{$t('JAVR scraper')}}

-
-
-
R18
- - - {{$t('Go')}} - -
+ + + + {{ props.row.sitename }} + + + {{ props.row.source }} + + + + + {{formatDistanceToNow(parseISO(props.row.last_update))}} ago + {{$t('Never scraped')}} + + + {{$t('Scraping now...')}} + + + + -
- -
-

{{$t('TPDB scraper')}}

-
-
-
API Token
- -
-
TPDB Scene URL
- - - {{$t('Go')}} - -
-
-
- -
-

{{$t('Custom scene')}}

-
-
- - - - - - - - {{$t('Add')}} - -
-
-
-
+ +
@@ -119,7 +75,6 @@ export default { }, mounted () { this.$store.dispatch('optionsSites/load') - this.$store.dispatch('optionsVendor/load') }, methods: { getImageURL (u) { @@ -129,11 +84,6 @@ export default { return u } }, - addScene() { - if (this.customSceneTitle !== '') { - ky.post('/api/scene/create', { json: { title: this.customSceneTitle, id: this.customSceneID } }) - } - }, taskScrape (site) { ky.get(`/api/task/scrape?site=${site}`) }, @@ -161,32 +111,31 @@ export default { sanitizeSiteName(site) { return site.split('(')[0].trim(); }, - scrapeJAVR () { - ky.post('/api/task/scrape-javr', { json: { q: this.javrQuery } }) - }, - scrapeTPDB () { - ky.post('/api/task/scrape-tpdb', { - json: { apiToken: this.tpdbApiToken, sceneUrl: this.tpdbSceneUrl } - }) - }, parseISO, formatDistanceToNow }, computed: { + scraperList() { + var items = this.$store.state.optionsSites.items; + let re = /(.*)\s+\((.+)\)$/; + for (let i=0; i < items.length; i++) { + items[i].sitename = items[i].name; + items[i].source = ""; + + var m = re.exec(items[i].name); + if (m) { + items[i].sitename = m[1]; + items[i].source = m[2]; + } + } + return items; + }, items () { return this.$store.state.optionsSites.items }, runningScrapers () { this.$store.dispatch('optionsSites/load') return this.$store.state.messages.runningScrapers - }, - tpdbApiToken: { - get () { - return this.$store.state.optionsVendor.tpdb.apiToken - }, - set (value) { - this.$store.state.optionsVendor.tpdb.apiToken = value - } } } } @@ -220,19 +169,31 @@ export default { margin-bottom: 0.25em !important; } - .switch { - position: absolute; - bottom: 0.25em; - right: 0em; - } - .invisible { display: none; } + .pulsate { + -webkit-animation: pulsate 0.8s linear; + -webkit-animation-iteration-count: infinite; + opacity: 0.5; + } + + @-webkit-keyframes pulsate { + 0% { + opacity: 0.5; + } + 50% { + opacity: 1.0; + } + 100% { + opacity: 0.5; + } + } + - .menu { - position: absolute; - top: 0.75em; - right: 0.5em; +