Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perf/release #9

Merged
merged 7 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ jobs:
fail-fast: false
matrix:
include:
- platform: 'macos-latest' # for Arm based macs (M1 and above).
args: '--target aarch64-apple-darwin'
- platform: 'macos-latest' # for Intel based macs.
args: '--target x86_64-apple-darwin'
- platform: macos-latest # for Arm based macs (M1 and above).
args: --target aarch64-apple-darwin
- platform: macos-latest # for Intel based macs.
args: --target x86_64-apple-darwin

- platform: 'ubuntu-latest' # for Tauri v1 you could replace this with ubuntu-20.04.
- platform: ubuntu-latest # for Tauri v1 you could replace this with ubuntu-20.04.
args: ''
# - platform: 'ubuntu-latest'
# args: '--target aarch64-unknown-linux-gnu --bundles deb'

- platform: 'windows-latest'
- platform: windows-latest
args: ''

runs-on: ${{ matrix.platform }}
Expand All @@ -45,7 +45,7 @@ jobs:
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: './src-tauri -> target'
workspaces: ./src-tauri -> target

- name: Install dependencies (ubuntu only)
if: ${{ contains(matrix.platform, 'ubuntu') }} # This must match the platform value defined above.
Expand Down Expand Up @@ -125,8 +125,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: v__VERSION__
releaseName: 'EasyLink v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseName: EasyLink v__VERSION__
releaseBody: See the assets to download this version and install.
releaseDraft: true
prerelease: false
args: --verbose ${{ matrix.args }}
args: --verbose ${{ matrix.args }}
16 changes: 12 additions & 4 deletions src-tauri/src/invoke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,19 +247,27 @@ pub async fn start_network_instance(app: AppHandle, cfg: NetworkConfig) -> Resul

if !EMIT_INSTANCE_INFO.load(Ordering::Relaxed) {
EMIT_INSTANCE_INFO.store(true, Ordering::Relaxed);
tracing::info!("instance info emit started");
tokio::spawn(async move {
let mut ret = vec![];
let mut flag = 0;
loop {
for instance in INSTANCE_MAP.iter() {
if let Some(info) = instance.info() {
ret.push(info);
}
}

// if ret.is_empty() {
// EMIT_INSTANCE_INFO.store(false, Ordering::Relaxed);
// break;
// }
if ret.is_empty() {
flag += 1;
if flag > 5 {
EMIT_INSTANCE_INFO.store(false, Ordering::Relaxed);
tracing::info!("instance info emit stopped");
break;
}
} else {
flag = 0;
}

let _ = app.emit("network_instance_info", &ret);
ret.clear();
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{
"title": "EasyLink",
"width": 685,
"height": 320,
"height": 400,
"minHeight": 320,
"minWidth": 685
}
Expand Down
5 changes: 5 additions & 0 deletions src/auto-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ declare global {
const mapWritableState: typeof import('pinia')['mapWritableState']
const markRaw: typeof import('vue')['markRaw']
const needShowWatermark: typeof import('./composables/dev')['needShowWatermark']
const networkTopology: typeof import('./composables/network')['networkTopology']
const network_topology: typeof import('./composables/network')['network_topology']
const nextTick: typeof import('vue')['nextTick']
const onActivated: typeof import('vue')['onActivated']
const onBeforeMount: typeof import('vue')['onBeforeMount']
Expand All @@ -86,6 +88,7 @@ declare global {
const onUpdated: typeof import('vue')['onUpdated']
const parseNetworkConfig: typeof import('./composables/network')['parseNetworkConfig']
const pausableWatch: typeof import('@vueuse/core')['pausableWatch']
const peerRoutePairToStatusData: typeof import('./composables/networkInfo')['peerRoutePairToStatusData']
const preferredDark: typeof import('./composables/dark')['preferredDark']
const provide: typeof import('vue')['provide']
const provideLocal: typeof import('@vueuse/core')['provideLocal']
Expand Down Expand Up @@ -416,6 +419,7 @@ declare module 'vue' {
readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
readonly parseNetworkConfig: UnwrapRef<typeof import('./composables/network')['parseNetworkConfig']>
readonly pausableWatch: UnwrapRef<typeof import('@vueuse/core')['pausableWatch']>
readonly peerRoutePairToStatusData: UnwrapRef<typeof import('./composables/networkInfo')['peerRoutePairToStatusData']>
readonly provide: UnwrapRef<typeof import('vue')['provide']>
readonly provideLocal: UnwrapRef<typeof import('@vueuse/core')['provideLocal']>
readonly reactify: UnwrapRef<typeof import('@vueuse/core')['reactify']>
Expand Down Expand Up @@ -733,6 +737,7 @@ declare module '@vue/runtime-core' {
readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
readonly parseNetworkConfig: UnwrapRef<typeof import('./composables/network')['parseNetworkConfig']>
readonly pausableWatch: UnwrapRef<typeof import('@vueuse/core')['pausableWatch']>
readonly peerRoutePairToStatusData: UnwrapRef<typeof import('./composables/networkInfo')['peerRoutePairToStatusData']>
readonly provide: UnwrapRef<typeof import('vue')['provide']>
readonly provideLocal: UnwrapRef<typeof import('@vueuse/core')['provideLocal']>
readonly reactify: UnwrapRef<typeof import('@vueuse/core')['reactify']>
Expand Down
2 changes: 1 addition & 1 deletion src/components/NetworkConfig.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ onMounted(async () => {
</n-flex>
</template>
<n-input
v-model:value="currentNetwork.config.ipv4" :disabled="currentNetwork.config.dhcp"
v-model:value="currentNetwork.config.ipv4" :disabled="currentNetwork.config.dhcp || isCurrentNetworkRunning"
:placeholder="t('component.networkConfig.virtualIPPlaceholder')"
/>
</n-form-item>
Expand Down
2 changes: 1 addition & 1 deletion src/components/NetworkList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function setActive(id: string) {

<template>
<n-scrollbar :style="{ 'max-height': 'calc(100vh - 55px)' }">
<n-list hoverable clickable>
<n-list clickable hoverable>
<n-flex v-if="networkFilter" justify="center" align="center" mb-2>
{{ `${t('component.networkList.filterResults')}: ${filterList.length} / ${networkList.length}` }}
</n-flex>
Expand Down
Loading