fix bug, 解决tauri打包没有网络访问的问题

This commit is contained in:
zilong 2021-10-25 19:11:19 +08:00
parent d40c8eea47
commit e766634a42
6 changed files with 36 additions and 32 deletions

2
.gitignore vendored
View File

@ -4,7 +4,7 @@ node_modules
/dist_electron /dist_electron
*.local *.local
target target
# local env files # local env files
.env.local .env.local
.env.*.local .env.*.local

40
src-tauri/Cargo.lock generated
View File

@ -167,9 +167,9 @@ dependencies = [
[[package]] [[package]]
name = "blake3" name = "blake3"
version = "1.0.0" version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcd555c66291d5f836dbb6883b48660ece810fe25a31f3bdfb911945dff2691f" checksum = "2607a74355ce2e252d0c483b2d8a348e1bba36036e786ccc2dcd777213c86ffd"
dependencies = [ dependencies = [
"arrayref", "arrayref",
"arrayvec 0.7.1", "arrayvec 0.7.1",
@ -197,9 +197,9 @@ dependencies = [
[[package]] [[package]]
name = "bumpalo" name = "bumpalo"
version = "3.7.1" version = "3.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9df67f7bf9ef8498769f994239c45613ef0c5899415fb58e9add412d2c1a538" checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c"
[[package]] [[package]]
name = "byteorder" name = "byteorder"
@ -242,9 +242,9 @@ checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba"
[[package]] [[package]]
name = "cairo-rs" name = "cairo-rs"
version = "0.14.7" version = "0.14.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9164355c892b026d6257e696dde5f3cb39beb3718297f0f161b562fe2ee3ab86" checksum = "33b5725979db0c586d98abad2193cdb612dd40ef95cd26bd99851bf93b3cb482"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"cairo-sys-rs", "cairo-sys-rs",
@ -255,9 +255,9 @@ dependencies = [
[[package]] [[package]]
name = "cairo-sys-rs" name = "cairo-sys-rs"
version = "0.14.0" version = "0.14.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7c9c3928781e8a017ece15eace05230f04b647457d170d2d9641c94a444ff80" checksum = "b448b876970834fda82ba3aeaccadbd760206b75388fc5c1b02f1e343b697570"
dependencies = [ dependencies = [
"glib-sys 0.14.0", "glib-sys 0.14.0",
"libc", "libc",
@ -1355,9 +1355,9 @@ dependencies = [
[[package]] [[package]]
name = "instant" name = "instant"
version = "0.1.11" version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "716d3d89f35ac6a34fd0eed635395f4c3b76fa889338a4632e5231a8684216bd" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if 1.0.0",
] ]
@ -1440,9 +1440,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.103" version = "0.2.105"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd8f7255a17a627354f321ef0055d63b898c6fb27eff628af4d1b66b7331edf6" checksum = "869d572136620d55835903746bcb5cdc54cb2851fd0aeec53220b4bb65ef3013"
[[package]] [[package]]
name = "lock_api" name = "lock_api"
@ -2036,9 +2036,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]] [[package]]
name = "pkg-config" name = "pkg-config"
version = "0.3.20" version = "0.3.22"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c9b1041b4387893b91ee6746cddfc28516aff326a3519fb2adf820932c5e6cb" checksum = "12295df4f294471248581bc09bef3c38a5e46f1e36d6a37353621a0c6c357e1f"
[[package]] [[package]]
name = "png" name = "png"
@ -2079,9 +2079,9 @@ dependencies = [
[[package]] [[package]]
name = "ppv-lite86" name = "ppv-lite86"
version = "0.2.10" version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba"
[[package]] [[package]]
name = "precomputed-hash" name = "precomputed-hash"
@ -3403,9 +3403,9 @@ dependencies = [
[[package]] [[package]]
name = "webview2" name = "webview2"
version = "0.1.3" version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b132bb76313456e93b17037262a030d54c9fe0f11838ef1593f845e3807ef8a" checksum = "283bf6b0ed9c83faea8c7bfe40bb261592147a109effaa4077eed294863d5031"
dependencies = [ dependencies = [
"com", "com",
"once_cell", "once_cell",
@ -3435,9 +3435,9 @@ dependencies = [
[[package]] [[package]]
name = "widestring" name = "widestring"
version = "0.4.3" version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c168940144dd21fd8046987c16a46a33d5fc84eec29ef9dcddc2ac9e31526b7c" checksum = "17882f045410753661207383517a6f62ec3dbeb6a4ed2acce01f0728238d1983"
[[package]] [[package]]
name = "wildmatch" name = "wildmatch"

View File

@ -53,7 +53,7 @@
}, },
"windows": [ "windows": [
{ {
"title": "zmusic window", "title": "zmusic",
"width": 800, "width": 800,
"height": 600, "height": 600,
"resizable": true, "resizable": true,

View File

@ -154,12 +154,12 @@ const route = useRoute();
<div class="lmt-width"> <div class="lmt-width">
<n-layout> <n-layout>
<n-layout-header <n-layout-header
style="padding: 6px 12px; font-size: 10px" style="padding: 6px 12px; font-size: 12px"
> >
{{ lastPlayed.length }}最多100 {{ lastPlayed.length }}最多100
</n-layout-header> </n-layout-header>
<n-layout has-sider> <n-layout has-sider>
<n-layout-content style="padding: 6px 12px"> <n-layout-content style="padding: 0px 12px 6px 12px">
<n-button-group size="small"> <n-button-group size="small">
<n-button <n-button
type="primary" type="primary"
@ -175,7 +175,7 @@ const route = useRoute();
type="primary" type="primary"
round round
style=" style="
font-size: 26px; font-size: 20px;
padding: 0 6px 0 2px; padding: 0 6px 0 2px;
" "
> >

View File

@ -84,7 +84,7 @@ onUnmounted(() => {
<template> <template>
<div id="songInfo"> <div id="songInfo">
<NAvatar <NAvatar style="border: 1px #ccc solid;"
:size="40" :size="40"
v-show="showInfo" v-show="showInfo"
:src="info.album.picUrl" :src="info.album.picUrl"
@ -124,13 +124,15 @@ export default {};
display: flex; display: flex;
align-items: center; align-items: center;
.song-name{ .song-name{
.text-el-line(); // flex: 1;
.text-el-line-normal();
} }
.song-author { .song-author {
// flex: 1;
margin-left: 4px; margin-left: 4px;
color: #aaa; color: #aaa;
font-size: 13px; font-size: 13px;
.text-el-line(); .text-el-line-normal();
} }
} }
.song-time { .song-time {

View File

@ -190,7 +190,7 @@ const arLeave = () => {
class="mn" class="mn"
text text
type="primary" type="primary"
style="font-size: 20px" style="font-size: 18px"
> >
<NIcon> <NIcon>
<svg-dots /> <svg-dots />
@ -268,7 +268,7 @@ export default {};
width: 20px; width: 20px;
} }
.name { .name {
flex: 1; flex: 3;
.text-el-line-normal(); .text-el-line-normal();
display: flex; display: flex;
align-items: center; align-items: center;
@ -282,11 +282,13 @@ export default {};
} }
} }
.ar { .ar {
width: 120px; // width: 120px;
flex: 2;
.text-el-line-normal(); .text-el-line-normal();
} }
.al { .al {
width: 80px; // width: 80px;
flex: 1;
margin-top: 1px; margin-top: 1px;
color: #999; color: #999;
font-size: 12px; font-size: 12px;