@@ -2,6 +2,7 @@ const $ = new Env('chavy.box.js')
22$ . domain = '8.8.8.8'
33
44$ . KEY_sessions = 'chavy_boxjs_sessions'
5+ $ . KEY_userCfgs = 'chavy_boxjs_userCfgs'
56
67$ . json = $ . name
78$ . html = $ . name
@@ -50,10 +51,20 @@ function getSystemCfgs() {
5051 return {
5152 env : $ . isSurge ( ) ? 'Surge' : $ . isQuanX ? 'QuanX' : 'Loon' ,
5253 envs : [
53- { id : 'Surge' , icon : 'https://is3-ssl.mzstatic.com/image/thumb/Purple123/v4/21/0a/0d/210a0df9-cbe1-b9dc-7549-4c10cd996279/AppIcon-0-0-1x_U007emarketing-0-0-0-6-0-0-sRGB-0-0-0-GLES2_U002c0-512MB-85-220-0-0.png/492x0w.png' } ,
54- { id : 'QuanX' , icon : 'https://is4-ssl.mzstatic.com/image/thumb/Purple123/v4/ae/7c/a2/ae7ca2fb-c4b6-d3a9-885a-935c1ea34cdb/AppIcon-1x_U007emarketing-0-7-0-0-85-220.png/492x0w.png' } ,
55- { id : 'Loon' , icon : 'https://is2-ssl.mzstatic.com/image/thumb/Purple123/v4/59/2c/fb/592cfb3b-162e-83dc-4e96-7a2175e1d29f/AppIcon-0-1x_U007emarketing-0-7-0-0-85-220.png/492x0w.png' }
56- ]
54+ { id : 'Surge' , icon : 'https://raw.githubusercontent.com/Orz-3/task/master/surge.png' } ,
55+ { id : 'QuanX' , icon : 'https://raw.githubusercontent.com/Orz-3/task/master/quantumultx.png' } ,
56+ { id : 'Loon' , icon : 'https://raw.githubusercontent.com/Orz-3/task/master/loon.png' }
57+ ] ,
58+ chavy : {
59+ id : 'Chavy Scripts' ,
60+ icon : 'https://avatars3.githubusercontent.com/u/29748519?s=460&u=392a19e85465abbcb1791c9b8b32184a16e6795e&v=4' ,
61+ repo : 'https://github.com/chavyleung/scripts'
62+ } ,
63+ orz3 : {
64+ id : 'Orz-3' ,
65+ icon : 'https://raw.githubusercontent.com/Orz-3/task/master/Orz-3.png' ,
66+ repo : 'https://github.com/Orz-3/'
67+ }
5768 }
5869}
5970
@@ -65,23 +76,23 @@ function getSystemApps() {
6576 keys : [ 'chavy_tokenurl_10010' , 'chavy_tokenheader_10010' , 'chavy_signurl_10010' , 'chavy_signheader_10010' , 'chavy_loginlotteryurl_10010' , 'chavy_loginlotteryheader_10010' , 'chavy_findlotteryurl_10010' , 'chavy_findlotteryheader_10010' ] ,
6677 author : '@chavyleung' ,
6778 repo : 'https://github.com/chavyleung/scripts/tree/master/10010' ,
68- icon : 'https://is4-ssl.mzstatic .com/image/thumb/Purple113/v4/f7/03/75/f70375ee-7462-d5fc-4b76-79809e63a325/AppIcon-0-0-1x_U007emarketing-0-0-0-6-0-0-85-220.png/492x0w .png'
79+ icons : [ 'https://raw.githubusercontent .com/Orz-3/mini/master/10010.png' , 'https://raw.githubusercontent.com/Orz-3/task/master/10010 .png']
6980 } ,
7081 {
7182 id : '52poje' ,
7283 name : '吾爱破解' ,
7384 keys : [ 'CookieWA' ] ,
7485 author : '@NobyDa' ,
7586 repo : 'https://github.com/NobyDa/Script/blob/master/52pojie-DailyBonus/52pojie.js' ,
76- icon : 'https://raw.githubusercontent.com/Orz-3/mini/master/52pj.png'
87+ icons : [ 'https://raw.githubusercontent.com/Orz-3/mini/master/52pj.png' , 'https://raw.githubusercontent.com/Orz-3/task/master/52pj.png' ]
7788 } ,
7889 {
7990 id : 'AcFun' ,
8091 name : 'AcFun' ,
8192 keys : [ 'chavy_cookie_acfun' , 'chavy_token_acfun' ] ,
8293 author : '@chavyleung' ,
8394 repo : 'https://github.com/chavyleung/scripts/tree/master/acfun' ,
84- icon : 'https://is5-ssl.mzstatic .com/image/thumb/Purple123/v4/41/f0/11/41f011f8-1bbc-188f-220f-3db5164a9ae9/AppIcon-1x_U007emarketing-0-7-0-0-85-220.png/492x0w .png'
95+ icons : [ 'https://raw.githubusercontent .com/Orz-3/mini/master/acfun.png' , 'https://raw.githubusercontent.com/Orz-3/task/master/acfun .png']
8596 } ,
8697 {
8798 id : 'ApkTw' ,
@@ -90,7 +101,7 @@ function getSystemApps() {
90101 author : '@chavyleung' ,
91102 repo : 'https://github.com/chavyleung/scripts/tree/master/apktw' ,
92103 url : 'https://apk.tw/' ,
93- icon : 'https://raw.githubusercontent.com/Orz-3/mini/master/apktw.png' ,
104+ icons : [ 'https://raw.githubusercontent.com/Orz-3/mini/master/apktw.png' , 'https://raw.githubusercontent.com/Orz-3/task/master/apktw.png' ] ,
94105 tasks : [ { cron : '3 0 * * *' , script : 'apktw.js' } ] ,
95106 rewrites : [ { type : 'request' , pattern : '^https://apk.tw/member.php(.*?)action=login' , script : 'apktw.cookie.js' , body : true } ]
96107 } ,
@@ -106,23 +117,23 @@ function getSystemApps() {
106117 ] ,
107118 author : '@chavyleung' ,
108119 repo : 'https://github.com/chavyleung/scripts/tree/master/tieba' ,
109- icon : 'https://is4-ssl.mzstatic .com/image/thumb/Purple113/v4/0a/33/50/0a335055-952a-6860-76aa-c657b2627a78/AppIcon-0-0-1x_U007emarketing-0-0-0-7-0-0-sRGB-85-220.jpeg/434x0w.jpg'
120+ icons : [ 'https://raw.githubusercontent .com/Orz-3/mini/master/baidu.png' , 'https://raw.githubusercontent.com/Orz-3/task/master/baidu.png' ]
110121 } ,
111122 {
112123 id : 'iQIYI' ,
113124 name : '爱奇艺' ,
114125 keys : [ 'CookieQY' ] ,
115126 author : '@NobyDa' ,
116127 repo : 'https://github.com/NobyDa/Script/blob/master/iQIYI-DailyBonus/iQIYI.js' ,
117- icon : 'https://is3-ssl.mzstatic .com/image/thumb/Purple113/v4/fa/dd/9a/fadd9a15-6b01-e4f7-0e59-920b23e58490/AppIcon-0-0-1x_U007emarketing-0-0-0-5-0-0-85-220.png/492x0w .png'
128+ icons : [ 'https://raw.githubusercontent .com/Orz-3/mini/master/iQIYI.png' , 'https://raw.githubusercontent.com/Orz-3/task/master/iQIYI .png']
118129 } ,
119130 {
120131 id : 'JD' ,
121132 name : '京东' ,
122133 keys : [ 'CookieJD' , 'CookieJD2' ] ,
123134 author : '@NobyDa' ,
124135 repo : 'https://github.com/NobyDa/Script/blob/master/JD-DailyBonus/JD_DailyBonus.js' ,
125- icon : 'https://is4-ssl.mzstatic .com/image/thumb/Purple113/v4/0b/7c/08/0b7c08b3-4c03-1d92-5461-32c176a6fc30/AppIcon-0-0-1x_U007emarketing-0-0-0-6-0-0-85-220.png/460x0w .png'
136+ icons : [ 'https://raw.githubusercontent .com/Orz-3/mini/master/jd.png' , 'https://raw.githubusercontent.com/Orz-3/task/master/jd .png']
126137 } ,
127138 {
128139 id : 'JD618' ,
@@ -138,23 +149,23 @@ function getSystemApps() {
138149 ] ,
139150 author : '@chavyleung' ,
140151 repo : 'https://github.com/chavyleung/scripts/tree/master/jd' ,
141- icon : 'https://is4-ssl.mzstatic .com/image/thumb/Purple113/v4/0b/7c/08/0b7c08b3-4c03-1d92-5461-32c176a6fc30/AppIcon-0-0-1x_U007emarketing-0-0-0-6-0-0-85-220.png/460x0w .png'
152+ icons : [ 'https://raw.githubusercontent .com/Orz-3/mini/master/jd.png' , 'https://raw.githubusercontent.com/Orz-3/task/master/jd .png']
142153 } ,
143154 {
144155 id : 'videoqq' ,
145156 name : '腾讯视频' ,
146157 keys : [ 'chavy_cookie_videoqq' , 'chavy_auth_url_videoqq' , 'chavy_auth_header_videoqq' , 'chavy_msign_url_videoqq' , 'chavy_msign_header_videoqq' ] ,
147158 author : '@chavyleung' ,
148159 repo : 'https://github.com/chavyleung/scripts/tree/master/videoqq' ,
149- icon : 'https://is3-ssl.mzstatic .com/image/thumb/Purple113/v4/f1/b4/87/f1b4871f-717d-50c6-3151-b087733768ec/AppIcon-0-0-1x_U007emarketing-0-0-0-8-0-85-220.png/492x0w .png'
160+ icons : [ 'https://raw.githubusercontent .com/Orz-3/mini/master/videoqq.png' , 'https://raw.githubusercontent.com/Orz-3/task/master/videoqq .png']
150161 } ,
151162 {
152163 id : 'V2EX' ,
153164 name : 'V2EX' ,
154165 keys : [ 'chavy_cookie_v2ex' ] ,
155166 author : '@chavyleung' ,
156167 repo : 'https://github.com/chavyleung/scripts/tree/master/v2ex' ,
157- icon : 'https://raw.githubusercontent.com/Orz-3/mini/master/v2ex.png'
168+ icons : [ 'https://raw.githubusercontent.com/Orz-3/mini/master/v2ex.png' , 'https://raw.githubusercontent.com/Orz-3/task/master/v2ex.png' ]
158169 } ,
159170 {
160171 id : 'NeteaseMusic' ,
@@ -166,15 +177,15 @@ function getSystemApps() {
166177 ] ,
167178 author : '@chavyleung' ,
168179 repo : 'https://github.com/chavyleung/scripts/tree/master/neteasemusic' ,
169- icon : 'https://is3-ssl.mzstatic .com/image/thumb/Purple113/v4/ef/e3/f4/efe3f4fa-288f-65fc-fc59-eacf6c1cea01/AppIcon-0-0-1x_U007emarketing-0-0-0-6-0-0-sRGB-0-0-0-GLES2_U002c0-512MB-85-220-0-0.png/460x0w .png'
180+ icons : [ 'https://raw.githubusercontent .com/Orz-3/mini/master/Netease.png' , 'https://raw.githubusercontent.com/Orz-3/task/master/Netease .png']
170181 } ,
171182 {
172183 id : 'WPS' ,
173184 name : 'WPS' ,
174185 keys : [ 'chavy_signhomeurl_wps' , 'chavy_signhomeheader_wps' ] ,
175186 author : '@chavyleung' ,
176187 repo : 'https://github.com/chavyleung/scripts/tree/master/wps' ,
177- icon : 'https://is3-ssl.mzstatic .com/image/thumb/Purple123/v4/a0/15/bc/a015bcec-e853-cdb3-a97b-573c15771265/AppIcon-0-1x_U007emarketing-0-7-0-0-0-0-85-220.png/492x0w .png'
188+ icons : [ 'https://raw.githubusercontent .com/Orz-3/mini/master/wps.png' , 'https://raw.githubusercontent.com/Orz-3/task/master/wps .png']
178189 } ,
179190 {
180191 id : 'NoteYoudao' ,
@@ -183,87 +194,94 @@ function getSystemApps() {
183194 author : '@chavyleung' ,
184195 repo : 'https://github.com/chavyleung/scripts/tree/master/noteyoudao' ,
185196 url : 'https://apps.apple.com/cn/app/有道云笔记-扫描王版/id450748070' ,
186- icon : 'https://is1-ssl.mzstatic .com/image/thumb/Purple113/v4/25/6a/00/256a002d-b5f0-46e1-ef55-841d41f8aafc/AppIcon-0-1x_U007emarketing-0-7-0-0-85-220.png/460x0w .png' ,
197+ icons : [ 'https://raw.githubusercontent .com/Orz-3/mini/master/noteyoudao.png' , 'https://raw.githubusercontent.com/Orz-3/task/master/noteyoudao .png'] ,
187198 tasks : [ { cron : '3 0 * * *' , script : 'noteyoudao.js' } ] ,
188199 rewrites : [ { type : 'request' , pattern : '^https://note.youdao.com/yws/mapi/user?method=checkin' , script : 'noteyoudao.cookie.js' , body : true } ]
189200 } ,
190201 {
191202 id : 'QTT' ,
192203 name : '趣头条' ,
193- keys : [ 'senku_signKey_qtt' , 'senku_signXTK_qtt' , 'senku_readKey_qtt' , 'senku_navCoinKey_qtt' ] ,
204+ keys : [ 'senku_signKey_qtt' , 'senku_signXTK_qtt' , 'senku_readKey_qtt' , 'senku_navCoinKey_qtt' ] ,
194205 author : '@GideonSenku' ,
195206 repo : 'https://github.com/chavyleung/scripts/tree/master/qtt' ,
196- icon : 'https://raw.githubusercontent.com/Orz-3/mini/master/qtt.png' ,
207+ icons : [ 'https://raw.githubusercontent.com/Orz-3/mini/master/qtt.png' , 'https://raw.githubusercontent.com/Orz-3/task/master/qtt.png' ]
197208 } ,
198209 {
199210 id : 'qmkg' ,
200211 name : '全民K歌' ,
201212 keys : [ 'senku_signurl_qmkg' , 'senku_signheader_qmkg' , 'senku_signbody_qmkg' ] ,
202213 author : '@GideonSenku' ,
203214 repo : 'https://github.com/chavyleung/scripts/tree/master/qmkg' ,
204- icon : 'https://raw.githubusercontent.com/Orz-3/mini/master/qmkg.png' ,
215+ icons : [ 'https://raw.githubusercontent.com/Orz-3/mini/master/qmkg.png' , 'https://raw.githubusercontent.com/Orz-3/task/master/qmkg.png' ]
205216 } ,
206217 {
207218 id : 'bcz' ,
208219 name : '百词斩' ,
209220 keys : [ 'senku_cookie_bcz' , 'senku_key_bcz' ] ,
210221 author : '@GideonSenku' ,
211222 repo : 'https://github.com/chavyleung/scripts/tree/master/bcz' ,
212- icon : 'https://raw.githubusercontent.com/Orz-3/mini/master/midu.png' ,
223+ icons : [ 'https://raw.githubusercontent.com/Orz-3/mini/master/midu.png' , 'https://raw.githubusercontent.com/Orz-3/task/master/midu.png' ]
213224 } ,
214225 {
215226 id : 'zxhc' ,
216227 name : '智行火车票' ,
217- keys : [ 'senku_signurl_zxhc' , 'senku_signheader_zxhc' , 'senku_signbody_zxhc' ] ,
228+ keys : [ 'senku_signurl_zxhc' , 'senku_signheader_zxhc' , 'senku_signbody_zxhc' ] ,
218229 author : '@GideonSenku' ,
219230 repo : 'https://github.com/chavyleung/scripts/tree/master/zxhc' ,
220- icon : 'https://raw.githubusercontent.com/Orz-3/mini/master/zxhc.png' ,
231+ icons : [ 'https://raw.githubusercontent.com/Orz-3/mini/master/zxhc.png' , 'https://raw.githubusercontent.com/Orz-3/task/master/zxhc.png' ]
221232 } ,
222233 {
223234 id : 'fenqile' ,
224235 name : '分期乐' ,
225- keys : [ 'senku_signurl_fenqile' , 'senku_signheader_fenqile' , 'senku_signbody_fenqile' , 'senku_signDailyKey_fenqile' , 'senku_signDailyUrlKey_fenqile' ] ,
236+ keys : [ 'senku_signurl_fenqile' , 'senku_signheader_fenqile' , 'senku_signbody_fenqile' , 'senku_signDailyKey_fenqile' , 'senku_signDailyUrlKey_fenqile' ] ,
226237 author : '@GideonSenku' ,
227238 repo : 'https://github.com/chavyleung/scripts/tree/master/fenqile' ,
228- icon : 'https://raw.githubusercontent.com/Orz-3/mini/master/fenqile.png' ,
239+ icons : [ 'https://raw.githubusercontent.com/Orz-3/mini/master/fenqile.png' , 'https://raw.githubusercontent.com/Orz-3/task/master/fenqile.png' ]
229240 } ,
230241 {
231242 id : 'fandeng' ,
232243 name : '樊登读书' ,
233- keys : [ 'senku_signurl_pandeng' , 'senku_signheader_pandeng' , 'senku_signbody_pandeng' ] ,
244+ keys : [ 'senku_signurl_pandeng' , 'senku_signheader_pandeng' , 'senku_signbody_pandeng' ] ,
234245 author : '@GideonSenku' ,
235246 repo : 'https://github.com/chavyleung/scripts/tree/master/fandeng' ,
236- icon : 'https://raw.githubusercontent.com/Orz-3/mini/master/fandeng.png' ,
247+ icons : [ 'https://raw.githubusercontent.com/Orz-3/mini/master/fandeng.png' , 'https://raw.githubusercontent.com/Orz-3/task/master/fandeng.png' ]
237248 } ,
238249 {
239250 id : 'dbsj' ,
240251 name : '豆瓣时间' ,
241- keys : [ 'senku_signurl_dbsj' , 'senku_signheader_dbsj' , 'senku_signbody_dbsj' ] ,
252+ keys : [ 'senku_signurl_dbsj' , 'senku_signheader_dbsj' , 'senku_signbody_dbsj' ] ,
242253 author : '@GideonSenku' ,
243254 repo : 'https://github.com/chavyleung/scripts/tree/master/dbsj' ,
244- icon : 'https://raw.githubusercontent.com/Orz-3/mini/master/dbsj.png' ,
245- } ,
255+ icons : [ 'https://raw.githubusercontent.com/Orz-3/mini/master/dbsj.png' , 'https://raw.githubusercontent.com/Orz-3/task/master/dbsj.png' ]
256+ }
246257 ]
247- sysapps . forEach ( ( app ) => {
248- app . datas = Array . isArray ( app . datas ) ? app . datas : [ ]
249- app . keys . forEach ( ( key ) => {
250- app . datas . push ( { key, val : $ . getdata ( key ) } )
251- } )
252- Array . isArray ( app . settings ) &&
253- app . settings . forEach ( ( setting ) => {
254- const val = $ . getdata ( setting . id )
255- if ( setting . type === 'boolean' ) {
256- setting . val = val === null ? setting . val : val === 'true'
257- } else if ( setting . type === 'int' ) {
258- setting . val = val * 1 || setting . val
259- } else {
260- setting . val = val || setting . val
261- }
258+ sysapps
259+ . sort ( ( a , b ) => a . id . localeCompare ( b . id ) )
260+ . forEach ( ( app ) => {
261+ app . datas = Array . isArray ( app . datas ) ? app . datas : [ ]
262+ app . keys . forEach ( ( key ) => {
263+ app . datas . push ( { key, val : $ . getdata ( key ) } )
262264 } )
263- } )
265+ Array . isArray ( app . settings ) &&
266+ app . settings . forEach ( ( setting ) => {
267+ const val = $ . getdata ( setting . id )
268+ if ( setting . type === 'boolean' ) {
269+ setting . val = val === null ? setting . val : val === 'true'
270+ } else if ( setting . type === 'int' ) {
271+ setting . val = val * 1 || setting . val
272+ } else {
273+ setting . val = val || setting . val
274+ }
275+ } )
276+ } )
264277 return sysapps
265278}
266279
280+ function getUserCfgs ( ) {
281+ const userCfgsStr = $ . getdata ( $ . KEY_userCfgs )
282+ return userCfgsStr ? JSON . parse ( userCfgsStr ) : { }
283+ }
284+
267285function getUserApps ( ) {
268286 return [ ]
269287}
@@ -305,7 +323,7 @@ function handleApi() {
305323 }
306324 }
307325 // 保存当前会话
308- if ( data . cmd === 'saveCurAppSession' ) {
326+ else if ( data . cmd === 'saveCurAppSession' ) {
309327 const app = data . val
310328 const isExistsApp = getSystemApps ( ) . find ( ( _app ) => _app . id === app . id )
311329 if ( isExistsApp ) {
@@ -369,6 +387,11 @@ function handleApi() {
369387 $ . msg ( $ . name , $ . subt , $ . desc . join ( '\n' ) )
370388 }
371389 }
390+ // 保存用户偏好
391+ else if ( data . cmd === 'saveUserCfgs' ) {
392+ const usercfgs = data . val
393+ $ . setdata ( JSON . stringify ( usercfgs ) , $ . KEY_userCfgs )
394+ }
372395}
373396
374397function handleApp ( appId ) {
@@ -377,6 +400,7 @@ function handleApp(appId) {
377400 sysapps : getSystemApps ( ) ,
378401 userapps : getUserApps ( ) ,
379402 syscfgs : getSystemCfgs ( ) ,
403+ usercfgs : getUserCfgs ( ) ,
380404 colors : getSystemThemes ( )
381405 }
382406 const curapp = appId ? box . sysapps . find ( ( app ) => app . id === appId ) : null
@@ -391,6 +415,7 @@ function handleHome() {
391415 sysapps : getSystemApps ( ) ,
392416 userapps : getUserApps ( ) ,
393417 syscfgs : getSystemCfgs ( ) ,
418+ usercfgs : getUserCfgs ( ) ,
394419 colors : getSystemThemes ( )
395420 } )
396421 )
@@ -404,6 +429,7 @@ function printHtml(data, curapp = null) {
404429 <head>
405430 <title>BoxJs</title>
406431 <meta charset="utf-8" />
432+ <link rel="icon" href="https://raw.githubusercontent.com/chavyleung/scripts/master/BOXJS.png"/>
407433 <link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet" />
408434 <link href="https://cdn.jsdelivr.net/npm/@mdi/font@5.x/css/materialdesignicons.min.css" rel="stylesheet" />
409435 <link href="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.min.css" rel="stylesheet" />
@@ -440,16 +466,41 @@ function printHtml(data, curapp = null) {
440466 </v-menu>
441467 <v-btn icon @click="ui.curview = ui.bfview" v-else><v-icon>mdi-chevron-left</v-icon></v-btn>
442468 <v-autocomplete :label="ui.curapp ? ui.curapp.name + ' ' + ui.curapp.author : 'chavy.box.js'" no-data-text="未实现" dense hide-details solo> </v-autocomplete>
443- <v-app-bar-nav-icon @click="ui.drawer.show = true"></v-app-bar-nav-icon>
469+ <v-btn icon @click="ui.drawer.show = true">
470+ <v-avatar size="24">
471+ <img :src="box.syscfgs.orz3.icon" :alt="box.syscfgs.orz3.repo" />
472+ </v-avatar>
473+ </v-btn>
444474 </v-app-bar>
445- <v-navigation-drawer v-model="ui.drawer.show" app temporary right> </v-navigation-drawer>
475+ <v-navigation-drawer v-model="ui.drawer.show" app temporary right>
476+ <v-list dense nav>
477+ <v-list-item two-line dense @click="onLink(box.syscfgs.chavy.repo)">
478+ <v-list-item-avatar>
479+ <img src="https://avatars3.githubusercontent.com/u/29748519?s=460&u=392a19e85465abbcb1791c9b8b32184a16e6795e&v=4" />
480+ </v-list-item-avatar>
481+ <v-list-item-content>
482+ <v-list-item-title>{{ box.syscfgs.chavy.id }}</v-list-item-title>
483+ <v-list-item-subtitle>{{ box.syscfgs.chavy.repo }}</v-list-item-subtitle>
484+ </v-list-item-content>
485+ </v-list-item>
486+ <v-divider></v-divider>
487+ <v-list-item>
488+ <v-list-item-content>
489+ <v-switch label="透明图标" v-model="box.usercfgs.isTransparentIcons" @change="onIconChange"></v-switch>
490+ </v-list-item-content>
491+ <v-list-item-action @click="onLink(box.syscfgs.orz3.repo)">
492+ <v-avatar size="32"><img :src="box.syscfgs.orz3.icon" :alt="box.syscfgs.orz3.repo" /></v-avatar>
493+ </v-list-item-action>
494+ </v-list-item>
495+ </v-list>
496+ </v-navigation-drawer>
446497 <v-content>
447498 <v-container fluid v-if="ui.curview === 'app'">
448499 <v-card class="mx-auto" tile>
449500 <v-list nav dense>
450501 <v-subheader inset>内置应用 ({{ box.sysapps.length }})</v-subheader>
451502 <v-list-item three-line dense v-for="(app, appIdx) in box.sysapps" :key="app.id" @click="goAppSessionView(app)">
452- <v-list-item-avatar><v-img :src="app.icon "></v-img></v-list-item-avatar>
503+ <v-list-item-avatar><v-img :src="app.icons[box.usercfgs.isTransparentIcons ? 0 : 1] "></v-img></v-list-item-avatar>
453504 <v-list-item-content>
454505 <v-list-item-title>{{ app.name }} ({{ app.id }})</v-list-item-title>
455506 <v-list-item-subtitle>{{ app.repo }}</v-list-item-subtitle>
@@ -644,6 +695,12 @@ function printHtml(data, curapp = null) {
644695 }
645696 },
646697 methods: {
698+ onLink(link) {
699+ window.open(link)
700+ },
701+ onIconChange() {
702+ axios.post('/api', JSON.stringify({ cmd: 'saveUserCfgs', val: this.box.usercfgs }))
703+ },
647704 goAppSessionView(app) {
648705 this.ui.bfview = this.ui.curview
649706 this.ui.curapp = app
@@ -678,7 +735,7 @@ function printHtml(data, curapp = null) {
678735 navigator.clipboard.readText().then((text) => {
679736 this.ui.impSessionDialog.impval = ''
680737 this.ui.impSessionDialog.impval = text
681- });
738+ })
682739 },
683740 onImpSession() {
684741 const impjson = this.ui.impSessionDialog.impval
0 commit comments