-
@@ -65,7 +69,6 @@ import { computed, defineAsyncComponent, onMounted, provide, ref } from 'vue';
import { useRoute } from 'vue-router';
import DownloadDrawer from '@/components/common/DownloadDrawer.vue';
-import InstallAppModal from '@/components/common/InstallAppModal.vue';
import PlayBottom from '@/components/common/PlayBottom.vue';
import UpdateModal from '@/components/common/UpdateModal.vue';
import SleepTimerTop from '@/components/player/SleepTimerTop.vue';
@@ -76,6 +79,9 @@ import { usePlayerStore } from '@/store/modules/player';
import { useSettingsStore } from '@/store/modules/settings';
import { isElectron } from '@/utils';
+// 移动端专用布局
+import MobileLayout from './MobileLayout.vue';
+
const keepAliveInclude = computed(() => {
const allRoutes = [...homeRouter, ...otherRouter];
@@ -118,6 +124,9 @@ const shouldShowMobileMenu = computed(() => {
provide('shouldShowMobileMenu', shouldShowMobileMenu);
+// 使用 settingsStore.isMobile 进行移动端检测而不是 Capacitor 设备检测
+const isPhone = computed(() => settingsStore.isMobile);
+
onMounted(() => {
settingsStore.initializeSettings();
settingsStore.initializeTheme();
@@ -144,7 +153,7 @@ provide('openPlaylistDrawer', openPlaylistDrawer);
}
.layout-main {
- @apply w-full h-full relative text-gray-900 dark:text-white;
+ @apply w-full h-full relative text-gray-900 dark:text-white;
}
.layout-main-page {
@@ -173,10 +182,12 @@ provide('openPlaylistDrawer', openPlaylistDrawer);
overflow: auto;
display: block;
flex: none;
+ position: relative;
}
.mobile-content {
height: calc(100vh - 75px);
+ position: relative;
}
}
diff --git a/src/renderer/layout/MobileLayout.vue b/src/renderer/layout/MobileLayout.vue
new file mode 100644
index 0000000..ea503f2
--- /dev/null
+++ b/src/renderer/layout/MobileLayout.vue
@@ -0,0 +1,133 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/renderer/layout/components/AppMenu.vue b/src/renderer/layout/components/AppMenu.vue
index 7cc7af8..0ba4b05 100644
--- a/src/renderer/layout/components/AppMenu.vue
+++ b/src/renderer/layout/components/AppMenu.vue
@@ -172,9 +172,11 @@ const toggleMenu = () => {
.app-menu {
max-width: 100%;
width: 100vw;
- position: fixed;
+ position: relative;
bottom: 0;
left: 0;
+ z-index: 99;
+ @apply bg-light dark:bg-black border-t border-gray-200 dark:border-gray-700;
z-index: 99999;
@apply bg-light dark:bg-black border-none border-gray-200 dark:border-gray-700;
diff --git a/src/renderer/layout/components/MobileHeader.vue b/src/renderer/layout/components/MobileHeader.vue
new file mode 100644
index 0000000..894fc47
--- /dev/null
+++ b/src/renderer/layout/components/MobileHeader.vue
@@ -0,0 +1,113 @@
+
+
+
+
+
+
+
diff --git a/src/renderer/layout/components/SearchBar.vue b/src/renderer/layout/components/SearchBar.vue
index a1aa6b0..ba51d96 100644
--- a/src/renderer/layout/components/SearchBar.vue
+++ b/src/renderer/layout/components/SearchBar.vue
@@ -1,5 +1,5 @@
-
+
@@ -364,14 +364,9 @@ const checkForUpdates = async () => {
};
const toGithubRelease = () => {
- if (updateInfo.value.hasUpdate) {
- settingsStore.showUpdateModal = true;
- } else {
- window.open('https://github.com/algerkong/AlgerMusicPlayer/releases', '_blank');
- }
+ window.location.href = 'https://donate.alger.fun/download';
};
-// ==================== 搜索建议相关的状态和方法 ====================
const suggestions = ref
([]);
const showSuggestions = ref(false);
const suggestionsLoading = ref(false);
@@ -446,8 +441,6 @@ const handleKeydown = (event: KeyboardEvent) => {
break;
}
};
-
-// ================================================================
diff --git a/src/renderer/views/mobile-search/index.vue b/src/renderer/views/mobile-search/index.vue
new file mode 100644
index 0000000..99717f0
--- /dev/null
+++ b/src/renderer/views/mobile-search/index.vue
@@ -0,0 +1,392 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ t('search.suggestions') }}
+
+
+
+
+
+
+
+
+
{{ t('search.hot') }}
+
+
+
{{ index + 1 }}
+
{{ item.searchWord }}
+
+
+
+
+
+
+
+
+
+
+
+
+