Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
FuShengPing committed Nov 2, 2023
1 parent a908164 commit 0529aa9
Show file tree
Hide file tree
Showing 15 changed files with 19 additions and 125 deletions.
17 changes: 6 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ docker容器可视化操作,提供容器操作、运行查看等功能。
网络开发工具,提供内网穿透、流量转发功能。

## 界面预览
<img src="https://gitee.com/wsfsp4/QingLong/raw/master/static/imgs/p1.jpg" alt="登录页面" width="22%">
<img src="https://gitee.com/wsfsp4/QingLong/raw/master/static/imgs/p2.jpg" alt="模块导航" width="22%">
<img src="https://gitee.com/wsfsp4/QingLong/raw/master/static/imgs/p3.jpg" alt="代码编辑" width="22%">
<img src="https://gitee.com/wsfsp4/QingLong/raw/master/static/imgs/p4.jpg" alt="系统设置" width="22%">
<img src="https://gitee.com/wsfsp4/public-static-file/raw/master/qinglong/p1.jpg" alt="登录页面" width="22%">
<img src="https://gitee.com/wsfsp4/public-static-file/raw/master/qinglong/p2.jpg" alt="模块导航" width="22%">
<img src="https://gitee.com/wsfsp4/public-static-file/raw/master/qinglong/p3.jpg" alt="代码编辑" width="22%">
<img src="https://gitee.com/wsfsp4/public-static-file/raw/master/qinglong/p4.jpg" alt="系统设置" width="22%">

## 下载地址
[最新版本](https://gitee.com/wsfsp4/QingLong/releases/tag/V2.0)
[最新版本](https://gitee.com/wsfsp4/QingLong/releases/tag/v2.0.3)

[历史版本](https://gitee.com/wsfsp4/QingLong/releases)

Expand All @@ -92,9 +92,4 @@ docker容器可视化操作,提供容器操作、运行查看等功能。
## 交流反馈
如果你在使用过程中发现Bug或者有功能需求请创建Issue。
欢迎加入QQ交流群:**309836858**,可以获取到最新的软件资讯和最快的问题反馈!
<img src="https://gitee.com/wsfsp4/QingLong/raw/master/static/imgs/group.jpg" alt="QQ群" width="25%">

## 支持项目
开发不易,如果APP对你有所帮助,可以考虑支持下项目开发,非常感谢!
<img src="https://gitee.com/wsfsp4/QingLong/raw/master/static/imgs/donate_wx.png" alt="微信打赏" width="25%">
<img src="https://gitee.com/wsfsp4/QingLong/raw/master/static/imgs/donate_zfb.jpg" alt="支付宝打赏" width="25%">
<img src="https://gitee.com/wsfsp4/public-static-file/raw/master/qinglong/group.jpg" alt="QQ群" width="25%">
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "auto.panel"
minSdk 26
targetSdk 32
versionCode 10
versionName "2.0.1"
versionCode 12
versionName "2.0.3"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
9 changes: 3 additions & 6 deletions app/src/main/java/auto/panel/net/app/Api.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,11 @@
* 应用接口.
*/
public interface Api {
String URL_BASE_TENCENT = "https://service-m1nufffu-1306746806.gz.apigw.tencentcs.com";
String URL_BASE_TENCENT = "https://gitee.com/wsfsp4/public-static-file/raw/master/qinglong/";

@GET("panel/version")
@GET("version.json")
Call<Version> getVersion(@Header("uid") String uid);

@GET("panel/config")
@GET("config.json")
Call<Config> getConfig(@Header("uid") String uid);

@GET("panel/extensions")
Call<Extensions> getExtensions(@Header("uid") String uid);
}
33 changes: 0 additions & 33 deletions app/src/main/java/auto/panel/net/app/ApiController.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,35 +73,6 @@ public void onFailure(@NonNull Call<Config> call, @NonNull Throwable t) {
});
}

public static void getExtensions(@Nullable String uid, @NonNull ExtensionsCallBack callBack) {
Call<Extensions> call = new Retrofit.Builder()
.baseUrl(Api.URL_BASE_TENCENT)
.addConverterFactory(GsonConverterFactory.create())
.build()
.create(Api.class)
.getExtensions(uid);

call.enqueue(new Callback<Extensions>() {
@Override
public void onResponse(@NonNull Call<Extensions> call, @NonNull Response<Extensions> response) {
Extensions res = response.body();
if (res != null) {
callBack.onSuccess(res);
} else {
callBack.onFailure(ERROR_NO_BODY);
}
}

@Override
public void onFailure(@NonNull Call<Extensions> call, @NonNull Throwable t) {
if (call.isCanceled()) {
return;
}
callBack.onFailure(t.getLocalizedMessage());
}
});
}

public interface BaseCallBack {
default void onSuccess() {
}
Expand All @@ -117,8 +88,4 @@ public interface VersionCallBack extends BaseCallBack {
public interface ConfigCallBack extends BaseCallBack {
void onSuccess(Config config);
}

public interface ExtensionsCallBack extends BaseCallBack {
void onSuccess(Extensions res);
}
}
43 changes: 0 additions & 43 deletions app/src/main/java/auto/panel/ui/activity/HomeActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ protected void init() {
initDrawerBar();
//初始化第一帧页面
showFragment(PanelTaskFragment.class);
//获取拓展
//getExtension();
}

private void initDrawerBar() {
Expand Down Expand Up @@ -176,41 +174,6 @@ private void initDrawerBar() {
});
}

private void initExtension(Extensions extensions) {
if (extensions.getProxy() != null) { //拓展--代理
Extension proxy = extensions.getProxy();

LinearLayout uiExtensionProxy = uiDrawerLeft.findViewById(R.id.panel_menu_extension_proxy);
TextView uiExtensionProxyTitle = uiExtensionProxy.findViewById(R.id.panel_menu_extension_proxy_title);

uiExtensionProxy.setVisibility(View.VISIBLE);
uiExtensionProxyTitle.setText(proxy.getName());

uiExtensionProxy.setOnClickListener(v -> {
if (PackageUtil.isAppInstalled(mActivity, proxy.getPackageName())) {
Intent intent = new Intent();
intent.putExtra("from", "panel");
intent.putExtra("token", "qinglong");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
ComponentName comp = new ComponentName(proxy.getPackageName(), proxy.getActivityName());
intent.setComponent(comp);
startActivity(intent);
} else {
ConfirmPopupWindow popConfirmWindow = new ConfirmPopupWindow("模块缺失", "\n模块未安装,是否下载安装\n", "取消", "下载");
popConfirmWindow.setMaxHeight(WindowUnit.getWindowHeightPix(getBaseContext()) / 3);
popConfirmWindow.setFocusable(true);
popConfirmWindow.setOnActionListener(() -> {
WebUnit.open(mActivity, proxy.getUrl());
return true;
});
PopupWindowBuilder.buildConfirmWindow(this, popConfirmWindow);
}

});

}
}

private void showFragment(Class<?> cls) {
String name = cls.getName();
//获取指定帧
Expand Down Expand Up @@ -300,10 +263,4 @@ public void onFailure(String msg) {
}
});
}

private void netGetExtension() {
String uid = EncryptUtil.md5(PanelPreference.getAddress());

ApiController.getExtensions(uid, this::initExtension);
}
}
2 changes: 0 additions & 2 deletions app/src/main/java/auto/panel/ui/activity/SplashActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ protected void netQuerySystemInfo(Account account) {
auto.panel.net.panel.ApiController.getSystemInfo(account.getBaseUrl(), new ApiController.SystemInfoCallBack() {
@Override
public void onSuccess(SystemInfo system) {
LogUnit.log("querySystemInfo");
PanelPreference.setVersion(system.getVersion());
netCheckAccountToken(account);
}
Expand All @@ -81,7 +80,6 @@ private void netCheckAccountToken(Account account) {
auto.panel.net.panel.ApiController.checkAccountToken(account.getBaseUrl(), account.getAuthorization(), new auto.panel.net.panel.ApiController.BaseCallBack() {
@Override
public void onSuccess() {
LogUnit.log("querySystemInfo");
onEnter(true);
}

Expand Down
28 changes: 0 additions & 28 deletions app/src/main/res/layout/panel_activity_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -256,34 +256,6 @@
android:layout_marginVertical="10dp"
android:background="@color/divider_heavy"
android:visibility="gone" />

<LinearLayout
android:id="@+id/panel_menu_extension_proxy"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/style_press_gray"
android:clickable="true"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingVertical="15dp"
android:paddingStart="15dp"
android:visibility="gone"
tools:ignore="RtlSymmetry">

<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginEnd="10dp"
android:src="@drawable/ic_extension_proxy" />

<TextView
android:id="@+id/panel_menu_extension_proxy_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/module_extension_proxy"
android:textColor="@color/text_color_49"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
</ScrollView>

Expand Down
8 changes: 8 additions & 0 deletions base/src/main/java/auto/base/util/NetUnit.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ public class NetUnit {
private static final String TAG = "NetUnit";

public static String getHost(String str) {
if (str == null || str.isEmpty()) {
return "";
}

if (!str.startsWith("http://") && !str.startsWith("https://")) {
str = "http://" + str;
}

try {
URL url = new URL(str);
return url.getHost() + ":" + url.getPort();
Expand Down
Binary file removed static/imgs/donate_wx.png
Binary file not shown.
Binary file removed static/imgs/donate_zfb.jpg
Binary file not shown.
Binary file removed static/imgs/group.jpg
Binary file not shown.
Binary file removed static/imgs/p1.jpg
Binary file not shown.
Binary file removed static/imgs/p2.jpg
Binary file not shown.
Binary file removed static/imgs/p3.jpg
Binary file not shown.
Binary file removed static/imgs/p4.jpg
Binary file not shown.

0 comments on commit 0529aa9

Please sign in to comment.