Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4204175

Browse files
authored
Open In New Window Links (#1827)
1 parentcffd624 commit4204175

File tree

7 files changed

+138
-57
lines changed

7 files changed

+138
-57
lines changed

‎pkg/api/options.go

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,23 @@ type VersionCheckResponse struct {
4343
}
4444

4545
typeRequestSaveOptionsWebstruct {
46-
TagSortstring`json:"tagSort"`
47-
SceneHiddenbool`json:"sceneHidden"`
48-
SceneWatchlistbool`json:"sceneWatchlist"`
49-
SceneFavouritebool`json:"sceneFavourite"`
50-
SceneWishlistbool`json:"sceneWishlist"`
51-
SceneWatchedbool`json:"sceneWatched"`
52-
SceneEditbool`json:"sceneEdit"`
53-
SceneDurationbool`json:"sceneDuration"`
54-
SceneCuepointbool`json:"sceneCuepoint"`
55-
ShowHspFilebool`json:"showHspFile"`
56-
ShowSubtitlesFilebool`json:"showSubtitlesFile"`
57-
SceneTrailerlistbool`json:"sceneTrailerlist"`
58-
ShowScriptHeatmapbool`json:"showScriptHeatmap"`
59-
ShowAllHeatmapsbool`json:"showAllHeatmaps"`
60-
UpdateCheckbool`json:"updateCheck"`
61-
IsAvailOpacityint`json:"isAvailOpacity"`
46+
TagSortstring`json:"tagSort"`
47+
SceneHiddenbool`json:"sceneHidden"`
48+
SceneWatchlistbool`json:"sceneWatchlist"`
49+
SceneFavouritebool`json:"sceneFavourite"`
50+
SceneWishlistbool`json:"sceneWishlist"`
51+
SceneWatchedbool`json:"sceneWatched"`
52+
SceneEditbool`json:"sceneEdit"`
53+
SceneDurationbool`json:"sceneDuration"`
54+
SceneCuepointbool`json:"sceneCuepoint"`
55+
ShowHspFilebool`json:"showHspFile"`
56+
ShowSubtitlesFilebool`json:"showSubtitlesFile"`
57+
SceneTrailerlistbool`json:"sceneTrailerlist"`
58+
ShowScriptHeatmapbool`json:"showScriptHeatmap"`
59+
ShowAllHeatmapsbool`json:"showAllHeatmaps"`
60+
ShowOpenInNewWindowbool`json:"showOpenInNewWindow"`
61+
UpdateCheckbool`json:"updateCheck"`
62+
IsAvailOpacityint`json:"isAvailOpacity"`
6263
}
6364

6465
typeRequestSaveOptionsAdvancedstruct {
@@ -470,6 +471,7 @@ func (i ConfigResource) saveOptionsWeb(req *restful.Request, resp *restful.Respo
470471
config.Config.Web.SceneTrailerlist=r.SceneTrailerlist
471472
config.Config.Web.ShowScriptHeatmap=r.ShowScriptHeatmap
472473
config.Config.Web.ShowAllHeatmaps=r.ShowAllHeatmaps
474+
config.Config.Web.ShowOpenInNewWindow=r.ShowOpenInNewWindow
473475
config.Config.Web.UpdateCheck=r.UpdateCheck
474476
config.Config.Web.IsAvailOpacity=r.IsAvailOpacity
475477
config.SaveConfig()

‎pkg/config/config.go

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,23 @@ type ObjectConfig struct {
3030
Passwordstring`default:"" json:"password"`
3131
}`json:"security"`
3232
Webstruct {
33-
TagSortstring`default:"by-tag-count" json:"tagSort"`
34-
SceneHiddenbool`default:"true" json:"sceneHidden"`
35-
SceneWatchlistbool`default:"true" json:"sceneWatchlist"`
36-
SceneFavouritebool`default:"true" json:"sceneFavourite"`
37-
SceneWishlistbool`default:"true" json:"sceneWishlist"`
38-
SceneWatchedbool`default:"false" json:"sceneWatched"`
39-
SceneEditbool`default:"false" json:"sceneEdit"`
40-
SceneDurationbool`default:"false" json:"sceneDuration"`
41-
SceneCuepointbool`default:"true" json:"sceneCuepoint"`
42-
ShowHspFilebool`default:"true" json:"showHspFile"`
43-
ShowSubtitlesFilebool`default:"true" json:"showSubtitlesFile"`
44-
SceneTrailerlistbool`default:"true" json:"sceneTrailerlist"`
45-
ShowScriptHeatmapbool`default:"true" json:"showScriptHeatmap"`
46-
ShowAllHeatmapsbool`default:"false" json:"showAllHeatmaps"`
47-
UpdateCheckbool`default:"true" json:"updateCheck"`
48-
IsAvailOpacityint`default:"40" json:"isAvailOpacity"`
33+
TagSortstring`default:"by-tag-count" json:"tagSort"`
34+
SceneHiddenbool`default:"true" json:"sceneHidden"`
35+
SceneWatchlistbool`default:"true" json:"sceneWatchlist"`
36+
SceneFavouritebool`default:"true" json:"sceneFavourite"`
37+
SceneWishlistbool`default:"true" json:"sceneWishlist"`
38+
SceneWatchedbool`default:"false" json:"sceneWatched"`
39+
SceneEditbool`default:"false" json:"sceneEdit"`
40+
SceneDurationbool`default:"false" json:"sceneDuration"`
41+
SceneCuepointbool`default:"true" json:"sceneCuepoint"`
42+
ShowHspFilebool`default:"true" json:"showHspFile"`
43+
ShowSubtitlesFilebool`default:"true" json:"showSubtitlesFile"`
44+
SceneTrailerlistbool`default:"true" json:"sceneTrailerlist"`
45+
ShowScriptHeatmapbool`default:"true" json:"showScriptHeatmap"`
46+
ShowAllHeatmapsbool`default:"false" json:"showAllHeatmaps"`
47+
ShowOpenInNewWindowbool`default:"true" json:"showOpenInNewWindow"`
48+
UpdateCheckbool`default:"true" json:"updateCheck"`
49+
IsAvailOpacityint`default:"40" json:"isAvailOpacity"`
4950
}`json:"web"`
5051
Advancedstruct {
5152
ShowInternalSceneIdbool`default:"false" json:"showInternalSceneId"`

‎pkg/config/state.go

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,23 @@ type ObjectState struct {
1212
BoundIP []string`json:"bound_ip"`
1313
}`json:"server"`
1414
Webstruct {
15-
TagSortstring`json:"tagSort"`
16-
SceneHiddenbool`json:"sceneHidden"`
17-
SceneWatchlistbool`json:"sceneWatchlist"`
18-
SceneFavouritebool`json:"sceneFavourite"`
19-
SceneWishlistbool`json:"sceneWishlist"`
20-
SceneWatchedbool`json:"sceneWatched"`
21-
SceneEditbool`json:"sceneEdit"`
22-
SceneDurationbool`json:"sceneDuration"`
23-
SceneCuepointbool`json:"sceneCuepoint"`
24-
ShowHspFilebool`json:"showHspFile"`
25-
ShowSubtitlesFilebool`json:"showSubtitlesFile"`
26-
SceneTrailerlistbool`json:"sceneTrailerlist"`
27-
ShowScriptHeatmapbool`json:"showScriptHeatmap"`
28-
ShowAllHeatmapsbool`json:"showAllHeatmaps"`
29-
UpdateCheckbool`json:"updateCheck"`
30-
IsAvailOpacityint`json:"isAvailOpacity"`
15+
TagSortstring`json:"tagSort"`
16+
SceneHiddenbool`json:"sceneHidden"`
17+
SceneWatchlistbool`json:"sceneWatchlist"`
18+
SceneFavouritebool`json:"sceneFavourite"`
19+
SceneWishlistbool`json:"sceneWishlist"`
20+
SceneWatchedbool`json:"sceneWatched"`
21+
SceneEditbool`json:"sceneEdit"`
22+
SceneDurationbool`json:"sceneDuration"`
23+
SceneCuepointbool`json:"sceneCuepoint"`
24+
ShowHspFilebool`json:"showHspFile"`
25+
ShowSubtitlesFilebool`json:"showSubtitlesFile"`
26+
SceneTrailerlistbool`json:"sceneTrailerlist"`
27+
ShowScriptHeatmapbool`json:"showScriptHeatmap"`
28+
ShowAllHeatmapsbool`json:"showAllHeatmaps"`
29+
ShowOpenInNewWindowbool`json:"showOpenInNewWindow"`
30+
UpdateCheckbool`json:"updateCheck"`
31+
IsAvailOpacityint`json:"isAvailOpacity"`
3132
}`json:"web"`
3233
DLNAstruct {
3334
Runningbool`json:"running"`

‎ui/src/store/optionsWeb.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const state = {
1919
isAvailOpacity:40,
2020
showScriptHeatmap:false,
2121
showAllHeatmaps:false,
22+
showOpenInNewWindow:true,
2223
updateCheck:true
2324
}
2425
}
@@ -46,7 +47,8 @@ const actions = {
4647
state.web.showScriptHeatmap=data.config.web.showScriptHeatmap
4748
state.web.showAllHeatmaps=data.config.web.showAllHeatmaps
4849
state.web.updateCheck=data.config.web.updateCheck
49-
state.web.isAvailOpacity=data.config.web.isAvailOpacity
50+
state.web.isAvailOpacity=data.config.web.isAvailOpacity
51+
state.web.showOpenInNewWindow=data.config.web.showOpenInNewWindow
5052
state.loading=false
5153
})
5254
},
@@ -71,6 +73,7 @@ const actions = {
7173
state.web.showAllHeatmaps=data.showAllHeatmaps
7274
state.web.updateCheck=data.updateCheck
7375
state.web.isAvailOpacity=data.isAvailOpacity
76+
state.web.showOpenInNewWindow=data.showOpenInNewWindow
7477
state.loading=false
7578
})
7679
}

‎ui/src/views/actors/ActorDetails.vue

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,10 @@
151151
{{ actor.biography }}
152152
</b-message>
153153
</b-tab-item>
154-
<b-tab-item:label="`Scenes (${actor.scenes.length})`">
154+
<b-tab-item>
155+
<template #header>
156+
Scenes ({{ actor.scenes.length }}) <av-if="showOpenInNewWindow":href='getCastScenesUrl([actor.name])'target="_blank"style="padding-left:0.1em;border-bottom-style:none;"><b-iconpack="mdi"icon="open-in-new"size="is-small"style="background-color:hsl(0,0%,100%);"></b-icon></a>
157+
</template>
155158
<divv-show="activeTab == 1":class="['columns', 'is-multiline', actor.scenes.length > 6 ? 'scroll' : '']">
156159
<div:class="['column', 'is-multiline', 'is-one-third']"
157160
v-for="(scene, idx) in actor.scenes":key="idx"class="image-wrapper">
@@ -312,6 +315,9 @@ export default {
312315
showEdit () {
313316
returnthis.$store.state.overlay.actoredit.show
314317
},
318+
showOpenInNewWindow () {
319+
returnthis.$store.state.optionsWeb.web.showOpenInNewWindow
320+
},
315321
},
316322
mounted () {
317323
ky.get('/api/actor/countrylist')
@@ -595,6 +601,19 @@ export default {
595601
}
596602
returntrue
597603
},
604+
getCastScenesUrl(actor) {
605+
let newfilters=Object.assign({},this.$store.state.sceneList.filters);
606+
console.log(newfilters)
607+
newfilters.cast= actor;
608+
newfilters.dlState="any"
609+
newfilters.isAvailable=null
610+
newfilters.isAccessible=null
611+
console.log(newfilters)
612+
returnthis.$router.resolve({
613+
name:'scenes',
614+
query: { q:Buffer.from(JSON.stringify(newfilters)).toString('base64') }
615+
}).href
616+
},
598617
refreshScraper(url){
599618
if (url.includes('stashdb')) {
600619
this.$store.state.actorList.isLoading=true

‎ui/src/views/options/sections/InterfaceWeb.vue

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@
8585
show All Heatmaps
8686
</b-switch>
8787
</b-field>
88+
<b-field>
89+
<b-switchv-model="openInNewWindow"type="is-dark">
90+
show Open Tag in New Window
91+
</b-switch>
92+
</b-field>
8893
<b-fieldlabel="Opacity of unavailable scenes">
8994
<divclass="columns">
9095
<divclass="column is-two-thirds">
@@ -241,6 +246,14 @@ export default {
241246
this.$store.state.optionsWeb.web.showSubtitlesFile= value
242247
}
243248
},
249+
openInNewWindow: {
250+
get () {
251+
returnthis.$store.state.optionsWeb.web.showOpenInNewWindow
252+
},
253+
set (value) {
254+
this.$store.state.optionsWeb.web.showOpenInNewWindow= value
255+
}
256+
},
244257
isAvailOpacity: {
245258
get () {
246259
if (this.$store.state.optionsWeb.web.isAvailOpacity==undefined) {

‎ui/src/views/scenes/Details.vue

Lines changed: 49 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,19 @@
160160

161161
<divclass="block-tags block"v-if="activeTab != 1">
162162
<b-taglist>
163-
<av-for="(c, idx) in item.cast":key="'cast' + idx"@click='showCastScenes([c.name])'
164-
class="tag is-warning is-small">{{ c.name }} ({{ c.avail_count }}/{{ c.count }})</a>
165-
<a@click='showSiteScenes([item.site])'
166-
class="tag is-primary is-small">{{ item.site }}</a>
167-
<av-for="(tag, idx) in item.tags":key="'tag' + idx"@click='showTagScenes([tag.name])'
168-
class="tag is-info is-small">{{ tag.name }} ({{ tag.count }})</a>
169-
</b-taglist>
163+
<spanv-for="(c, idx) in item.cast":key="'cast' + idx" >
164+
<aclass="tag is-warning is-small"@click='showCastScenes([c.name])':style="showOpenInNewWindow ? 'margin-right: 0;': 'margin-right: .5em;'" >{{ c.name }} ({{ c.avail_count }}/{{ c.count }})</a>
165+
<av-if="showOpenInNewWindow"class="tag is-warning is-small":href='getCastScenesUrl([c.name])'target="_blank"style="margin-right:0.5em;"><b-iconpack="mdi"icon="open-in-new"size="is-small"></b-icon></a>
166+
</span>
167+
<span>
168+
<a@click='showSiteScenes([item.site])'class="tag is-primary is-small":style="showOpenInNewWindow ? 'margin-right: 0;': 'margin-right: .5em;'">{{ item.site }}</a>
169+
<av-if="showOpenInNewWindow"class="tag is-primary is-small":href='getSiteScenesUrl([item.site])'target="_blank"style="margin-right:0.5em;"><b-iconpack="mdi"icon="open-in-new"size="is-small"></b-icon></a>
170+
</span>
171+
<spanv-for="(tag, idx) in item.tags":key="'tag' + idx">
172+
<a@click='showTagScenes([tag.name])'class="tag is-info is-small":style="showOpenInNewWindow ? 'margin-right: 0;': 'margin-right: .5em;'">{{ tag.name }} ({{ tag.count }})</a>
173+
<av-if="showOpenInNewWindow"class="tag is-info is-small":href='getTagScenesUrl([tag.name])'target="_blank"style="margin-right:0.5em;"><b-iconpack="mdi"icon="open-in-new"size="is-small"></b-icon></a>
174+
</span>
175+
</b-taglist>
170176
</div>
171177

172178
<divclass="block-tags block"v-if="activeTab == 1">
@@ -581,6 +587,9 @@ export default {
581587
quickFindOverlayState() {
582588
returnthis.$store.state.overlay.quickFind.show
583589
},
590+
showOpenInNewWindow () {
591+
returnthis.$store.state.optionsWeb.web.showOpenInNewWindow
592+
},
584593
alternateSourcesWithTitles() {
585594
returnthis.alternateSources.map(altsrc=> {
586595
constextdata=JSON.parse(altsrc.external_data);
@@ -714,6 +723,17 @@ watch:{
714723
})
715724
this.close()
716725
},
726+
getCastScenesUrl(actor) {
727+
let newfilters=Object.assign({},this.$store.state.sceneList.filters);
728+
newfilters.cast= actor;
729+
newfilters.sites= []
730+
newfilters.tags= []
731+
newfilters.attributes= []
732+
returnthis.$router.resolve({
733+
name:'scenes',
734+
query: { q:Buffer.from(JSON.stringify(newfilters)).toString('base64') }
735+
}).href
736+
},
717737
showTagScenes (tag) {
718738
this.$store.state.sceneList.filters.cast= []
719739
this.$store.state.sceneList.filters.sites= []
@@ -725,6 +745,17 @@ watch:{
725745
})
726746
this.close()
727747
},
748+
getTagScenesUrl(tag) {
749+
let newfilters=Object.assign({},this.$store.state.sceneList.filters);
750+
newfilters.tags= tag;
751+
newfilters.cast= []
752+
newfilters.sites= []
753+
newfilters.attributes= []
754+
returnthis.$router.resolve({
755+
name:'scenes',
756+
query: { q:Buffer.from(JSON.stringify(newfilters)).toString('base64') }
757+
}).href
758+
},
728759
showSiteScenes (site) {
729760
this.$store.state.sceneList.filters.cast= []
730761
this.$store.state.sceneList.filters.sites= site
@@ -736,6 +767,17 @@ watch:{
736767
})
737768
this.close()
738769
},
770+
getSiteScenesUrl(site) {
771+
let newfilters=Object.assign({},this.$store.state.sceneList.filters);
772+
newfilters.sites= site;
773+
newfilters.cast= []
774+
newfilters.tags= []
775+
newfilters.attributes= []
776+
returnthis.$router.resolve({
777+
name:'scenes',
778+
query: { q:Buffer.from(JSON.stringify(newfilters)).toString('base64') }
779+
}).href
780+
},
739781
showActorDetail (actor_id) {
740782
ky.get('/api/actor/'+actor_id).json().then(data=> {
741783
if (data.id!=0){

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp