173173 input-align =" left"
174174 :left-icon =" iconKey"
175175 />
176+ <nut-input
177+ v-if =" storageType !== 'manual'"
178+ class =" input"
179+ v-model =" githubProxyInput"
180+ :disabled =" !isEditing"
181+ :placeholder =" $t(`myPage.placeholder.githubProxy`)"
182+ type =" text"
183+ input-align =" left"
184+ :left-icon =" icongithubProxy"
185+ right-icon =" tips"
186+ @click-right-icon =" githubProxyTips"
187+ />
176188 <nut-input
177189 class =" input"
178190 v-model =" proxyInput"
@@ -275,6 +287,7 @@ import avatar from "@/assets/icons/avatar.svg?url";
275287import iconKey from " @/assets/icons/key-solid.png" ;
276288import iconUser from " @/assets/icons/user-solid.png" ;
277289import iconProxy from " @/assets/icons/proxy.svg" ;
290+ import icongithubProxy from " @/assets/icons/githubProxy.svg" ;
278291import iconUA from " @/assets/icons/user-agent.svg" ;
279292import iconMax from " @/assets/icons/max.svg" ;
280293import iconTimeout from " @/assets/icons/timeout.svg" ;
@@ -298,7 +311,7 @@ const router = useRouter();
298311const { showNotify } = useAppNotifyStore ();
299312const { currentUrl : host } = useHostAPI ();
300313const settingsStore = useSettingsStore ();
301- const { githubUser, gistToken, syncTime, avatarUrl, defaultUserAgent, defaultProxy, defaultTimeout, cacheThreshold, syncPlatform } =
314+ const { githubUser, gistToken, syncTime, avatarUrl, defaultUserAgent, defaultProxy, defaultTimeout, cacheThreshold, syncPlatform, githubProxy } =
302315 storeToRefs (settingsStore );
303316
304317const displayAvatar = computed (() => {
@@ -330,6 +343,7 @@ const onClickAbout = () => {
330343const syncPlatformInput = ref (" " );
331344const userInput = ref (" " );
332345const tokenInput = ref (" " );
346+ const githubProxyInput = ref (" " );
333347const uaInput = ref (" " );
334348const proxyInput = ref (" " );
335349const timeoutInput = ref (" " );
@@ -347,6 +361,7 @@ const toggleEditMode = async () => {
347361 syncPlatform: syncPlatformInput .value ,
348362 githubUser: userInput .value ,
349363 gistToken: tokenInput .value ,
364+ githubProxy: githubProxyInput .value ,
350365 defaultUserAgent: uaInput .value ,
351366 defaultProxy: proxyInput .value ,
352367 defaultTimeout: timeoutInput .value ,
@@ -357,6 +372,7 @@ const toggleEditMode = async () => {
357372 syncPlatformInput .value = syncPlatform .value ;
358373 userInput .value = githubUser .value ;
359374 tokenInput .value = gistToken .value ;
375+ githubProxyInput .value = githubProxy .value ;
360376 uaInput .value = defaultUserAgent .value ;
361377 proxyInput .value = defaultProxy .value ;
362378 timeoutInput .value = defaultTimeout .value ;
@@ -400,6 +416,7 @@ const toggleSyncPlatform = () => {
400416const setDisplayInfo = () => {
401417 syncPlatformInput .value = syncPlatform .value || " " ;
402418 userInput .value = githubUser .value || " " ;
419+ githubProxyInput .value = githubProxy .value || " " ;
403420 tokenInput .value = gistToken .value
404421 ? ` ${gistToken .value .slice (0 , 6 )}************ `
405422 : " " ;
@@ -550,6 +567,18 @@ const downloadBtn = () => {
550567 lockScroll: false ,
551568 });
552569}
570+ const githubProxyTips = () => {
571+ Dialog ({
572+ title: ' 请填写完整 GitHub 加速代理地址' ,
573+ content: ' 后端需 >= 2.19.97\n\n 1. 仅用于上传/下载 Gist 和获取 GitHub 头像\n\n 2. 请填写完整 如 https://a.com\n\n 3. 需支持代理 https://api.github.com\n\n 测试方式:\n 浏览器打开\n https://a.com/https://api.github.com/users/xream\n 有正常的响应\n\n 4. 使用此方式时, 自行注意安全隐私问题' ,
574+ popClass: ' auto-dialog' ,
575+ textAlign: ' left' ,
576+ okText: ' OK' ,
577+ noCancelBtn: true ,
578+ closeOnPopstate: true ,
579+ lockScroll: false ,
580+ });
581+ };
553582const proxyTips = () => {
554583 Dialog ({
555584 title: ' 通过代理/节点/策略进行下载' ,
0 commit comments