|
90 | 90 | ></v-system-bar> |
91 | 91 | <v-app-bar v-bind="appBarBind" v-if="!box.usercfgs.isHidedSearchBar"> |
92 | 92 | <!-- 搜索条 --> |
93 | | - <v-autocomplete |
94 | | - v-bind="ui.searchBar" |
95 | | - :label="`BoxJs - v${version}`" |
96 | | - @click="ui.searchDialog.show = true" |
97 | | - hide-no-data |
98 | | - hide-details |
99 | | - solo |
100 | | - > |
| 93 | + <v-autocomplete v-bind="ui.searchBar" :label="title" @click="ui.searchDialog.show = true" hide-no-data hide-details solo> |
101 | 94 | <template #prepend-inner> |
102 | 95 | <!-- 容器切换 Surge、QuanX、Loon --> |
103 | 96 | <v-menu bottom left v-if="!isLoading && isMainView"> |
|
132 | 125 | <v-btn icon dark @click="ui.searchDialog.show = false"> |
133 | 126 | <v-icon>mdi-chevron-left</v-icon> |
134 | 127 | </v-btn> |
135 | | - <v-text-field v-model="ui.searchBar.input" :label="`BoxJs - v${version}`" autofocus hide-details solo></v-text-field> |
| 128 | + <v-text-field v-model="ui.searchBar.input" :label="title" autofocus hide-details solo></v-text-field> |
136 | 129 | <v-btn icon @click="window.open(box.syscfgs.orz3.repo)"> |
137 | 130 | <v-avatar size="26"><img :src="box.syscfgs.orz3.icon" /></v-avatar> |
138 | 131 | </v-btn> |
139 | 132 | </v-toolbar> |
140 | 133 | <v-card-text class="px-0"> |
141 | 134 | <v-list nav> |
142 | | - <v-list-item v-for="(app, appIdx) in searchApps" @click="ui.searchDialog.show = false, switchAppView(app.id)" dense> |
| 135 | + <v-list-item |
| 136 | + v-for="(app, appIdx) in searchApps" |
| 137 | + :key="app.id" |
| 138 | + @click="ui.searchDialog.show = false, switchAppView(app.id)" |
| 139 | + dense |
| 140 | + > |
143 | 141 | <v-list-item-avatar class="elevation-3"><img :src="app.icon" /></v-list-item-avatar> |
144 | 142 | <v-list-item-content> |
145 | 143 | <v-list-item-title>{{`${app.name} (${app.id})`}}</v-list-item-title> |
|
175 | 173 | </v-list-item> |
176 | 174 | <v-divider></v-divider> |
177 | 175 | <v-list-item class="pt-1"> |
| 176 | + <v-progress-linear :active="isLoading" height="1" absolute top indeterminate></v-progress-linear> |
178 | 177 | <v-row justify="start" no-gutters> |
179 | 178 | <v-col v-for="(c, cIdx) in ui.contributors" cols="2" :key="c.id"> |
180 | 179 | <v-tooltip bottom> |
|
415 | 414 | <v-avatar size="32"><v-icon>mdi-language-html5</v-icon></v-avatar> |
416 | 415 | </v-btn> |
417 | 416 | </v-list-item> |
| 417 | + <v-list-item v-if="box.usercfgs.isDebugWeb"> |
| 418 | + <v-list-item-content> |
| 419 | + <v-text-field |
| 420 | + label="调试页面地址" |
| 421 | + v-model="box.usercfgs.debugger_web" |
| 422 | + hint="设置页面源码的获取地址" |
| 423 | + placeholder="http://ip:port/boxjs.html" |
| 424 | + persistent-hint |
| 425 | + @change="saveUserCfgs" |
| 426 | + > |
| 427 | + </v-text-field> |
| 428 | + </v-list-item-content> |
| 429 | + </v-list-item> |
418 | 430 | <v-list-item class="mt-4"></v-list-item> |
419 | 431 | </v-list> |
420 | 432 | </v-navigation-drawer> |
@@ -1216,6 +1228,13 @@ <h2 :class="version === ver.version ? 'primary--text' : undefined">v{{ver.versio |
1216 | 1228 | version() { |
1217 | 1229 | return this.box.syscfgs.version |
1218 | 1230 | }, |
| 1231 | + // 标题 |
| 1232 | + title() { |
| 1233 | + const isDebugWeb = this.box.usercfgs.isDebugWeb |
| 1234 | + const debugger_web = this.box.usercfgs.debugger_web |
| 1235 | + const isDebugMode = this.box.syscfgs.isDebugMode |
| 1236 | + return `BoxJs - v${this.version}${isDebugMode ? ` - ${debugger_web}` : ''}` |
| 1237 | + }, |
1219 | 1238 | // 判断是否有新版本 |
1220 | 1239 | hasNewVersion() { |
1221 | 1240 | const curver = this.box.syscfgs.version |
@@ -1615,7 +1634,7 @@ <h2 :class="version === ver.version ? 'primary--text' : undefined">v{{ver.versio |
1615 | 1634 | 'ui.naviDrawer.show': { |
1616 | 1635 | handler(newval, oldval) { |
1617 | 1636 | // 获取贡献者列表 |
1618 | | - if (newval === true && !this.box.syscfgs.contributors) { |
| 1637 | + if (_.isEmpty(this.ui.contributors)) { |
1619 | 1638 | this.getContributors() |
1620 | 1639 | } |
1621 | 1640 | } |
@@ -1705,16 +1724,23 @@ <h2 :class="version === ver.version ? 'primary--text' : undefined">v{{ver.versio |
1705 | 1724 | }, |
1706 | 1725 | // 页面返回 |
1707 | 1726 | back() { |
1708 | | - history.back() |
| 1727 | + if (this.view === 'bak' && !this.bfpath) { |
| 1728 | + this.path = '/#/my' |
| 1729 | + } else if (this.view === 'app' && !this.bfpath) { |
| 1730 | + this.path = '/#/app' |
| 1731 | + } else { |
| 1732 | + history.back() |
| 1733 | + } |
1709 | 1734 | }, |
1710 | 1735 | // 切换当前容器环境 |
1711 | 1736 | switchEnv(env) { |
1712 | 1737 | this.env = env |
1713 | 1738 | }, |
1714 | 1739 | // 切换当前视图 |
1715 | 1740 | switchView(path) { |
| 1741 | + path = `/#/${path}` |
1716 | 1742 | if (this.path !== path) { |
1717 | | - this.path = `/#/${path}` |
| 1743 | + this.path = path |
1718 | 1744 | } else { |
1719 | 1745 | const scrollY = this.ui.scrollY[this.path] |
1720 | 1746 | const isTopY = _.isNil(scrollY) || scrollY === 0 |
@@ -2081,7 +2107,6 @@ <h2 :class="version === ver.version ? 'primary--text' : undefined">v{{ver.versio |
2081 | 2107 | // 获取仓库贡献者 |
2082 | 2108 | getContributors() { |
2083 | 2109 | const url = 'https://api.github.com/repos/chavyleung/scripts/contributors' |
2084 | | - this.box.syscfgs.contributors = [] |
2085 | 2110 | axios.get(url).then((resp) => { |
2086 | 2111 | if (!resp) return |
2087 | 2112 | resp.data.forEach((contributor) => { |
|
0 commit comments