fix(personalization): 移除滑动跳模块并调整用量区留白
This commit is contained in:
parent
55feb36091
commit
0ba2763696
@ -51,11 +51,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="personalization-content-shell" data-tutorial="personal-content-shell">
|
<div class="personalization-content-shell" data-tutorial="personal-content-shell">
|
||||||
<div
|
<div class="personalization-content">
|
||||||
class="personalization-content"
|
|
||||||
@touchstart.passive="handleSwipeStart"
|
|
||||||
@touchend.passive="handleSwipeEnd"
|
|
||||||
>
|
|
||||||
<transition name="personal-page-vertical" mode="out-in">
|
<transition name="personal-page-vertical" mode="out-in">
|
||||||
<section
|
<section
|
||||||
v-if="activeTab === 'preferences'"
|
v-if="activeTab === 'preferences'"
|
||||||
@ -1434,7 +1430,6 @@ const personalTabs = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const activeTab = ref<PersonalTab>('preferences');
|
const activeTab = ref<PersonalTab>('preferences');
|
||||||
const swipeState = ref<{ startY: number; active: boolean }>({ startY: 0, active: false });
|
|
||||||
|
|
||||||
type RunModeValue = 'fast' | 'thinking' | 'deep' | null;
|
type RunModeValue = 'fast' | 'thinking' | 'deep' | null;
|
||||||
type PermissionModeValue = 'readonly' | 'approval' | 'unrestricted';
|
type PermissionModeValue = 'readonly' | 'approval' | 'unrestricted';
|
||||||
@ -1739,46 +1734,6 @@ const startTutorial = () => {
|
|||||||
}, 320);
|
}, 320);
|
||||||
};
|
};
|
||||||
|
|
||||||
const shiftTab = (direction: 1 | -1) => {
|
|
||||||
const tabs = personalTabs.value;
|
|
||||||
const currentIndex = tabs.findIndex((tab) => tab.id === activeTab.value);
|
|
||||||
if (currentIndex === -1) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const nextIndex = currentIndex + direction;
|
|
||||||
if (nextIndex < 0 || nextIndex >= tabs.length) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
activeTab.value = tabs[nextIndex].id as PersonalTab;
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleSwipeStart = (event: TouchEvent) => {
|
|
||||||
// 手机端禁用滑动切换标签页
|
|
||||||
if (window.innerWidth <= 768) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!event.touches.length) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
swipeState.value = { startY: event.touches[0].clientY, active: true };
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleSwipeEnd = (event: TouchEvent) => {
|
|
||||||
// 手机端禁用滑动切换标签页
|
|
||||||
if (window.innerWidth <= 768) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!swipeState.value.active || !event.changedTouches.length) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const deltaY = event.changedTouches[0].clientY - swipeState.value.startY;
|
|
||||||
swipeState.value.active = false;
|
|
||||||
if (Math.abs(deltaY) < 60) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
shiftTab(deltaY < 0 ? 1 : -1);
|
|
||||||
};
|
|
||||||
|
|
||||||
const applyThinkingPreset = (value: number) => {
|
const applyThinkingPreset = (value: number) => {
|
||||||
personalization.setThinkingInterval(value);
|
personalization.setThinkingInterval(value);
|
||||||
};
|
};
|
||||||
@ -2016,14 +1971,14 @@ const applyThemeOption = (theme: ThemeKey) => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: stretch;
|
align-items: stretch;
|
||||||
padding: 12px 0 24px;
|
padding: 12px 4px 24px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.usage-summary-card {
|
.usage-summary-card {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 720px;
|
max-width: 720px;
|
||||||
padding: 0;
|
padding: 0 8px;
|
||||||
min-height: 320px;
|
min-height: 320px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user