@@ -3,15 +3,14 @@ import CategorySecond from '../../components/CategorySecond.vue';
3
3
import TitleComponent from ' ./components/TitleComponent.vue' ;
4
4
import DownloadButtonGroup from ' ./components/DownloadButtonGroup.vue' ;
5
5
import WslDetails from ' ./components/WslDetails.vue' ;
6
- import { ref , useTemplateRef , watch , computed } from ' vue' ;
6
+ import { ref , useTemplateRef , computed } from ' vue' ;
7
7
import DownloadButton from ' ./components/DownloadButton.vue' ;
8
8
import { useRoute } from ' vue-router' ;
9
9
import useClipboard from ' vue-clipboard3' ;
10
10
import { ElMessage , ElDialog } from ' element-plus' ;
11
- import { useHighBrightnessControllerStore } from ' ../../stores/miscellaneous.js' ;
12
11
import { useDownloadPageStore } from ' ../../stores/download-page.js' ;
13
12
import { highlightElement } from ' ../../utils/animation.ts' ;
14
- import { requestGetJson } from ' ../../utils/utils.js' ;
13
+ import { requestGetJson , useHighlightWatch } from ' ../../utils/utils.js' ;
15
14
16
15
// #region Common
17
16
const archGroupInfo = {
@@ -45,8 +44,6 @@ const otherRef = useTemplateRef('otherDownload');
45
44
const afterglowRef = useTemplateRef (' afterglowDownload' );
46
45
const omaRef = useTemplateRef (' omaDownload' );
47
46
48
- const highBrightnessControllerStore = useHighBrightnessControllerStore ();
49
-
50
47
const switchHash = () => {
51
48
switch (route .hash ) {
52
49
case ' #aosc-os-download' :
@@ -63,16 +60,7 @@ const switchHash = () => {
63
60
break ;
64
61
}
65
62
};
66
-
67
- watch (
68
- () => highBrightnessControllerStore .obj [route .path ],
69
- () => {
70
- switchHash ();
71
- },
72
- {
73
- flush: ' post'
74
- }
75
- );
63
+ useHighlightWatch (switchHash);
76
64
// #endregion
77
65
78
66
// #region remote
@@ -533,6 +521,7 @@ const omaInstallScript = 'curl -sSf https://repo.aosc.io/get-oma.sh | sudo sh';
533
521
534
522
<!-- Afterglow -->
535
523
<div
524
+ id =" afterglow-download"
536
525
ref =" afterglowDownload"
537
526
class =" afterglow-container flex flex-wrap justify-between p-[30px] text-white gap-6" >
538
527
<TitleComponent
@@ -570,7 +559,7 @@ const omaInstallScript = 'curl -sSf https://repo.aosc.io/get-oma.sh | sudo sh';
570
559
<category-second class =" highlight" title =" 实用工具" />
571
560
572
561
<!-- oma -->
573
- <div ref =" omaDownload" class =" oma-container p-[30px]" >
562
+ <div id = " oma-download " ref =" omaDownload" class =" oma-container p-[30px]" >
574
563
<TitleComponent
575
564
title =" 小熊猫包管理 (oma)"
576
565
description =" 简明好用的 APT 软件包管理界面"
0 commit comments