File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 131
131
<!-- SD-Card Tab -->
132
132
<ElTabPane name =" SDCard" class =" well-transparent container-flex-no-submit" :label =" $t('SDCard.tab')" >
133
133
<iframe ref =" sdcardFrame" class =" sdcard-frame" src =" /sdcard" />
134
- <div class =" media-size" >
134
+ <div v-if = " showMediaSize " class =" media-size" >
135
135
{{ $t('SDCard.remainingCapacity') }}: {{ Math.round(mediaAvailable / 1024 / 1024 * 10) / 10 }}GB / {{ Math.round(mediaSize / 1024 / 1024 * 10) / 10 }}GB
136
136
</div >
137
137
</ElTabPane >
604
604
watermarkUploaded: false ,
605
605
mediaSize: 0 ,
606
606
mediaAvailable: 0 ,
607
+ showMediaSize: false ,
607
608
};
608
609
},
609
610
computed: {
1098
1099
this .selectedTabIndex = parseInt (tab .index );
1099
1100
if (this .selectedTab === ' CameraSettings' ) this .GetCameraProperty ();
1100
1101
if (this .selectedTab === ' maintenance' ) this .GetLatestVer ();
1102
+ if (this .selectedTab === ' SDCard' ) {
1103
+ if (! this .sdcardIntervalID ) this .sdcardIntervalID = setInterval (() => {
1104
+ this .showMediaSize = this .$refs .sdcardFrame ? .contentDocument ? .title ? .indexOf (' Index of' ) === 0 ;
1105
+ }, 500 );
1106
+ } else {
1107
+ if (this .sdcardIntervalID ) {
1108
+ clearInterval (this .sdcardIntervalID );
1109
+ this .sdcardIntervalID = null ;
1110
+ }
1111
+ }
1101
1112
},
1102
1113
async Move () {
1103
1114
if (! this .posValid || ! this .moveDone ) return ;
You can’t perform that action at this time.
0 commit comments