Skip to content

Commit

Permalink
Merge pull request #288 from GuoXiCheng/dev-c
Browse files Browse the repository at this point in the history
update
  • Loading branch information
GuoXiCheng authored Nov 12, 2024
2 parents c2ee730 + 09bfd93 commit eb77e0f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
16 changes: 16 additions & 0 deletions app/src/main/java/com/android/skip/util/NetworkUtils.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.android.skip.util

import android.content.Context
import android.net.ConnectivityManager
import android.net.NetworkCapabilities
import android.os.Build


object NetworkUtil {
fun isNetworkConnected(context: Context): Boolean {
val cm = context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
val network = cm.activeNetwork ?: return false
val capabilities = cm.getNetworkCapabilities(network) ?: return false
return capabilities.hasCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)
}
}
3 changes: 2 additions & 1 deletion docs/inspect/InspectHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<el-upload v-model:file-list="fileList" accept=".zip" multiple :show-file-list="false" :auto-upload="false">
<el-button v-loading.fullscreen.lock="fullscreenLoading">批量上传</el-button>
</el-upload>
<el-button @click="emits('onDelete')">批量删除</el-button>

<el-button @click="emits('onDelete')" class="ml-3">批量删除</el-button>
<el-button @click="handleGetExample">获取示例</el-button>
</div>
</template>
Expand Down

0 comments on commit eb77e0f

Please sign in to comment.