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

Commitb400c8d

Browse files
authored
feat: Add AltScene Tooltip to StashDB (#1776)
1 parente98bdf7 commitb400c8d

File tree

1 file changed

+24
-21
lines changed

1 file changed

+24
-21
lines changed

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

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@
6868
{{format(parseISO(item.release_date), "yyyy-MM-dd")}}
6969
</span>
7070
</span>
71-
<divclass="image-row"v-if="getAlternateSceneSources != 0">
72-
<divv-for="(altsrc, idx) inalternateSourcesWithTitles":key="idx"class="altsrc-image-wrapper">
71+
<divclass="image-row"v-if="getAlternateSceneSourcesWithTitles != 0">
72+
<divv-for="(altsrc, idx) inthis.alternateSources":key="idx"class="altsrc-image-wrapper">
7373
<b-tooltiptype="is-light":label="altsrc.title":delay="100">
7474
<a:href="altsrc.url"target="_blank">
7575
<vue-load-image>
@@ -155,31 +155,34 @@ export default {
155155
}
156156
returnthis.$store.state.optionsWeb.web.isAvailOpacity/100
157157
},
158-
asyncgetAlternateSceneSources() {
159-
try {
158+
asyncgetAlternateSceneSourcesWithTitles() {
159+
try {
160160
constresponse=awaitky.get('/api/scene/alternate_source/'+this.item.id).json();
161161
this.alternateSources= [];
162-
if (response==null){
163-
return0
162+
if (response==null){
163+
return0;
164164
}
165-
response.forEach(altsrc=> {
166-
if (altsrc.external_source.startsWith("alternate scene")||altsrc.external_source=="stashdb scene") {
167-
this.alternateSources.push(altsrc)
168-
}
169-
});
165+
166+
this.alternateSources= response
167+
.filter(altsrc=>altsrc.external_source.startsWith("alternate scene")||altsrc.external_source=="stashdb scene")
168+
.map(altsrc=> {
169+
constextdata=JSON.parse(altsrc.external_data);
170+
let title;
171+
if (altsrc.external_source.startsWith("alternate scene")) {
172+
title=extdata.scene?.title||'No Title';
173+
}elseif (altsrc.external_source=="stashdb scene") {
174+
title=extdata.title||'No Title';
175+
}
176+
return {
177+
...altsrc,
178+
title: title
179+
};
180+
});
181+
170182
returnthis.alternateSources.length;
171-
}catch (error) {
183+
}catch (error) {
172184
return0;// Return 0 or handle error as needed
173185
}
174-
},
175-
alternateSourcesWithTitles() {
176-
returnthis.alternateSources.map(altsrc=> {
177-
constextdata=JSON.parse(altsrc.external_data);
178-
return {
179-
...altsrc,
180-
title:extdata.scene?.title||'No Title'
181-
};
182-
});
183186
}
184187
},
185188
methods: {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp