Skip to content

Commit b47f5d8

Browse files
author
Hiram
committed
[change] new desgin line
1 parent 9c44641 commit b47f5d8

File tree

3 files changed

+46
-6
lines changed

3 files changed

+46
-6
lines changed

src/renderer/src/locales/lang/en_US/pages/player.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export default {
99
share: 'share',
1010
analyze: 'Analyze',
1111
anthology: 'Anthology',
12+
line: 'Line',
1213
recommend: 'Recommend',
1314
actors: 'ActingStaff',
1415
director: 'Director',

src/renderer/src/locales/lang/zh_CN/pages/player.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export default {
99
share: '分享',
1010
analyze: '解析',
1111
anthology: '选集',
12+
line: '线路',
1213
recommend: '猜你喜欢',
1314
actors: '演职员',
1415
director: '导演',

src/renderer/src/pages/Play.vue

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,26 @@
190190
<div class="box-anthology-header">
191191
<div class="left">
192192
<h4 class="box-anthology-title">{{ $t('pages.player.film.anthology') }}</h4>
193+
<div class="box-anthology-line">
194+
<t-dropdown placement="bottom" :max-height="250">
195+
<t-button size="small" theme="default" variant="text" auto-width>
196+
<span class="title">{{ $t('pages.player.film.line') }}</span>
197+
<template #suffix>
198+
<chevron-down-icon size="16" />
199+
</template>
200+
</t-button>
201+
<t-dropdown-menu>
202+
<t-dropdown-item v-for="(_, key, index) in season" :key="index" :value="key"
203+
@click="(options) => switchLineEvent(options.value as string)">
204+
<span :class="[key as any === active.flimSource ? 'active' : '']">{{ key }}</span>
205+
</t-dropdown-item>
206+
</t-dropdown-menu>
207+
</t-dropdown>
208+
</div>
193209
<div class="box-anthology-analyze" v-show="isVisible.official">
194210
<t-dropdown placement="bottom" :max-height="250">
195211
<t-button size="small" theme="default" variant="text" auto-width>
196-
<span>{{ $t('pages.player.film.analyze') }}</span>
212+
<span class="title">{{ $t('pages.player.film.analyze') }}</span>
197213
<template #suffix>
198214
<chevron-down-icon size="16" />
199215
</template>
@@ -215,12 +231,27 @@
215231
</div>
216232
</div>
217233
<div class="listbox">
218-
<t-tabs v-model="active.flimSource" class="film-tabs">
234+
<div class="tag-container">
235+
<div v-for="(item, index) in season?.[active.flimSource]" :key="item"
236+
:class='["mainVideo-num", item === active.filmIndex ? "mainVideo-selected" : ""]'
237+
@click="changeEvent(item)">
238+
<t-tooltip :content="formatName(item)">
239+
<div class="mainVideo_inner">
240+
{{ formatReverseOrder(isVisible.reverseOrder ? 'positive' : 'negative', index,
241+
season?.[active.flimSource]?.length)
242+
}}
243+
<div class="playing"></div>
244+
</div>
245+
</t-tooltip>
246+
</div>
247+
</div>
248+
<!-- <t-tabs v-model="active.flimSource" class="film-tabs">
219249
<t-tab-panel v-for="(value, key, index) in season" :key="index" :value="key" :label="key">
220250
<div class="tag-container">
221-
<div v-for="(item, index) in value" :key="item"
251+
<div v-for="(item, index) in season?.[active.flimSource]" :key="item"
222252
:class='["mainVideo-num", item === active.filmIndex ? "mainVideo-selected" : ""]'
223253
@click="changeEvent(item)">
254+
{{ index }} {{ item }}
224255
<t-tooltip :content="formatName(item)">
225256
<div class="mainVideo_inner">
226257
{{ formatReverseOrder(isVisible.reverseOrder ? 'positive' : 'negative', index, value.length)
@@ -231,7 +262,7 @@
231262
</div>
232263
</div>
233264
</t-tab-panel>
234-
</t-tabs>
265+
</t-tabs> -->
235266
</div>
236267
<div class="recommend" v-show="recommend.length != 0">
237268
<div class="component-title">{{ $t('pages.player.film.recommend') }}</div>
@@ -621,6 +652,10 @@ const fetchAnalyze = async (): Promise<void> => {
621652
if (response.default?.id) active.analyzeId = response.default?.id;
622653
};
623654
655+
const switchLineEvent = async (id: string) => {
656+
active.flimSource = id;
657+
};
658+
624659
// 切换解析接口
625660
const switchAnalyzeEvent = async (id: string) => {
626661
active.analyzeId = id;
@@ -1640,7 +1675,8 @@ window.electron.ipcRenderer.on('destroy-playerWindow', () => {
16401675
font-weight: 600;
16411676
}
16421677
1643-
.box-anthology-analyze {
1678+
.box-anthology-analyze,
1679+
.box-anthology-line {
16441680
:deep(.t-button) {
16451681
padding: 0;
16461682
}
@@ -1650,6 +1686,8 @@ window.electron.ipcRenderer.on('destroy-playerWindow', () => {
16501686
}
16511687
16521688
:deep(.t-button--variant-text) {
1689+
color: var(--td-text-color-secondary);
1690+
16531691
.t-button__suffix {
16541692
margin-left: var(--td-comp-margin-xxs);
16551693
}
@@ -1757,7 +1795,7 @@ window.electron.ipcRenderer.on('destroy-playerWindow', () => {
17571795
.component-title {
17581796
font-size: 16px;
17591797
line-height: 16px;
1760-
margin-top: 24px;
1798+
margin-top: 10px;
17611799
margin-bottom: 12px;
17621800
font-weight: 500;
17631801
color: var(--td-text-color-primary);

0 commit comments

Comments
 (0)