11const $ = new Env ( 'BoxJs' )
22$ . domain = '8.8.8.8'
33
4- $ . version = '0.4.10 '
4+ $ . version = '0.4.11 '
55$ . versionType = 'beta'
66$ . KEY_sessions = 'chavy_boxjs_sessions'
77$ . KEY_versions = 'chavy_boxjs_versions'
@@ -575,7 +575,7 @@ async function handleApi() {
575575}
576576
577577async function getBoxData ( ) {
578- return {
578+ const box = {
579579 sessions : getSessions ( ) ,
580580 versions : await getVersions ( ) ,
581581 sysapps : getSystemApps ( ) ,
@@ -586,6 +586,11 @@ async function getBoxData() {
586586 globalbaks : getGlobalBaks ( ) ,
587587 colors : getSystemThemes ( )
588588 }
589+ const apps = [ ]
590+ apps . push ( ...box . sysapps )
591+ box . appsubs . forEach ( ( sub ) => apps . push ( ...sub . apps ) )
592+ box . usercfgs . favapps = box . usercfgs . favapps . filter ( ( favappId ) => apps . find ( ( app ) => app . id === favappId ) )
593+ return box
589594}
590595
591596async function handleHome ( ) {
@@ -915,11 +920,11 @@ function printHtml(data, curapp = null, curview = 'app') {
915920 <v-switch :label="setting.name" v-model="setting.val" :hint="setting.desc" :placeholder="setting.placeholder" v-else-if="setting.type === 'boolean'"></v-switch>
916921 <v-textarea :label="setting.name" v-model="setting.val" :hint="setting.desc" :auto-grow="setting.autoGrow" :placeholder="setting.placeholder" v-else-if="setting.type === 'textarea'"></v-textarea>
917922 <v-radio-group :label="setting.name" v-model="setting.val" :hint="setting.desc" :placeholder="setting.placeholder" v-else-if="setting.type === 'radios'">
918- <v-radio :class="itemIdx === 0 ? 'mt-2' : ''" v-for="(item, itemIdx) in setting.items" :label="item.label" :value="item.key"></v-radio>
923+ <v-radio :class="itemIdx === 0 ? 'mt-2' : ''" v-for="(item, itemIdx) in setting.items" :label="item.label" :value="item.key" :key="item.key" ></v-radio>
919924 </v-radio-group>
920925 <template v-else-if="setting.type === 'checkboxes'">
921926 <label>{{ setting.name }}</label>
922- <v-checkbox class="mt-0" :hide-details="itemIdx + 1 !== setting.items.length" v-model="setting.val" :label="item.label" :value="item.key" v-for="(item, itemIdx) in setting.items" multiple></v-checkbox>
927+ <v-checkbox class="mt-0" :hide-details="itemIdx + 1 !== setting.items.length" v-model="setting.val" :label="item.label" :value="item.key" v-for="(item, itemIdx) in setting.items" :key="item.key" multiple></v-checkbox>
923928 </template>
924929 <v-text-field :label="setting.name" v-model="setting.val" :hint="setting.desc" :placeholder="setting.placeholder" v-else="setting.type === 'text'"></v-text-field>
925930 </template>
@@ -1715,15 +1720,6 @@ function printHtml(data, curapp = null, curview = 'app') {
17151720 },
17161721 onReload() {
17171722 window.location.reload()
1718- // const refreshsecs = this.box.usercfgs.refreshsecs
1719- // const sec = [undefined, null, 'null', 'undefined', ''].includes(refreshsecs) ? 3 : refreshsecs * 1
1720- // if (sec === 0) {
1721- // this.reload()
1722- // } else {
1723- // this.ui.overlay.show = false
1724- // this.ui.reloadConfirmDialog.show = true
1725- // this.ui.reloadConfirmDialog.sec = sec
1726- // }
17271723 },
17281724 onDelSession(session) {
17291725 this.ui.overlay.show = true
0 commit comments