Skip to content

Commit

Permalink
mirror close when click again
Browse files Browse the repository at this point in the history
  • Loading branch information
git committed Sep 30, 2024
1 parent 37b9851 commit a3e3020
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 6 deletions.
19 changes: 19 additions & 0 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,25 @@

![](./screenshots/cn/appmanage.png)

## 安装使用

### Windows

- 访问 [https://linkandroid.com](https://linkandroid.com) 下载 Windows 安装包,一键安装即可

### MacOS

- 访问 [https://linkandroid.com](https://linkandroid.com) 下载 MacOS 安装包,一键安装完成;
- 手动安装 `scrcpy`,可参考 [scrcpy 教程](https://github.com/Genymobile/scrcpy)
- [https://github.com/Genymobile/scrcpy/blob/master/doc/macos.md](https://github.com/Genymobile/scrcpy/blob/master/doc/macos.md)

### Linux

- 访问 [https://linkandroid.com](https://linkandroid.com) 下载 Linux 安装包,一键安装完成;
- 手动安装 `scrcpy`,可参考 [scrcpy 教程](https://github.com/Genymobile/scrcpy)
- [https://github.com/Genymobile/scrcpy/blob/master/doc/linux.md](https://github.com/Genymobile/scrcpy/blob/master/doc/linux.md)


## 技术栈

- `electron`
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,24 @@

![](./screenshots/cn/appmanage.png)

## Get the app

### Windows

- download Windows installer from [https://linkandroid.com](https://linkandroid.com)

### MacOS

- download MacOS installer from [https://linkandroid.com](https://linkandroid.com)
- install `scrcpy` manually, refer to [scrcpy tutorial](https://github.com/Genymobile/scrcpy)
- [https://github.com/Genymobile/scrcpy/blob/master/doc/macos.md](https://github.com/Genymobile/scrcpy/blob/master/doc/macos.md)

### Linux

- download Linux installer from [https://linkandroid.com](https://linkandroid.com)
- install `scrcpy` manually, refer to [scrcpy tutorial](https://github.com/Genymobile/scrcpy)
- [https://github.com/Genymobile/scrcpy/blob/master/doc/linux.md](https://github.com/Genymobile/scrcpy/blob/master/doc/linux.md)

## We uses

- `electron`
Expand Down
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- 新增:断开网络设备端口功能,关闭adb打开的5555端口
- 新增:已投屏设备再次点击投屏关闭投屏
- 优化:投屏窗口取消置顶
- 优化:用户头像功能显示

## v0.0.9

Expand Down
1 change: 1 addition & 0 deletions electron/mapi/scrcpy/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import which from 'which'
import Config from "../config/render";
import {extraResolve} from "../../lib/env";
import {Apps} from "../app";
import fs from "node:fs";

const exec = util.promisify(_exec)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "linkandroid",
"version": "0.0.10-beta",
"version": "0.0.10",
"main": "dist-electron/main/index.js",
"description": "Link android to PC easily",
"author": "ModStartLib",
Expand Down
26 changes: 21 additions & 5 deletions src/components/PageNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {computed} from 'vue'
import {useRouter} from 'vue-router'
import {AppConfig} from "../config";
import {useUserStore} from "../store/modules/user";
import {t} from "../lang";
const route = useRouter()
const user = useUserStore()
Expand All @@ -18,6 +19,10 @@ const activeTab = computed(() => {
}
})
const userTip = computed(() => {
return user.user.id ? user.user.name : t('未登录')
})
const doUser = async () => {
if (!AppConfig.userEnable) {
return
Expand All @@ -29,11 +34,22 @@ const doUser = async () => {

<template>
<div class="page-nav-container flex flex-col h-full">
<div class="py-4 px-3 cursor-pointer"
@click="doUser">
<img v-if="!user.isInit||!user.user.id" class="rounded-full border border-solid border-gray-200"
src="./../assets/image/avatar.svg"/>
<img v-else :src="user.user.avatar as string" class="rounded-full border border-solid border-gray-200"/>
<div class="py-4 px-3 " :class="AppConfig.userEnable?'cursor-pointer':''" @click="doUser">
<a-tooltip v-if="AppConfig.userEnable"
:content="userTip as string" position="right">
<img v-if="!user.isInit||!user.user.id"
class="rounded-full border border-solid border-gray-200"
src="./../assets/image/avatar.svg"/>
<img v-else :src="user.user.avatar as string"
class="rounded-full border border-solid border-gray-200"/>
</a-tooltip>
<div v-else>
<img v-if="!user.isInit||!user.user.id"
class="rounded-full border border-solid border-gray-200"
src="./../assets/image/avatar.svg"/>
<img v-else :src="user.user.avatar as string"
class="rounded-full border border-solid border-gray-200"/>
</div>
</div>
<div class="flex-grow mt-2">
<a class="page-nav-item block text-center py-3"
Expand Down
1 change: 1 addition & 0 deletions src/lang/source.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
"暂无记录": "3028a9c3",
"更多内容,请查看": "3d718795",
"服务": "000ccd34",
"未登录": "0191fce4",
"本产品为开源软件,遵循 GPL-3.0 license 协议。": "1bb341a5",
"格式": "000cfe53",
"检测更新": "31450307",
Expand Down
1 change: 1 addition & 0 deletions src/lang/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"016d5865": "已断开",
"016f137c": "开发中",
"017278f9": "已连接",
"0191fce4": "未登录",
"01d45331": "关闭网络设备端口成功",
"02286f86": "连接中",
"03b9a935": "断开设备成功",
Expand Down

0 comments on commit a3e3020

Please sign in to comment.