|
@@ -95,7 +95,6 @@ export struct WebDavMainPage {
|
|
|
@State webDavFiles: FileInfo[] = []; // 直接在页面中保存文件列表副本
|
|
@State webDavFiles: FileInfo[] = []; // 直接在页面中保存文件列表副本
|
|
|
@StorageProp('themeColor') themeColor: string = CommonConstants.DEFAULT_THEME_COLOR;
|
|
@StorageProp('themeColor') themeColor: string = CommonConstants.DEFAULT_THEME_COLOR;
|
|
|
@StorageProp('isDarkMode') isDarkMode: boolean = false;
|
|
@StorageProp('isDarkMode') isDarkMode: boolean = false;
|
|
|
- @State topRectHeight: number = 0; // 顶部安全区高度
|
|
|
|
|
@State breadcrumbs:BreadcrumbItem[] = []//面包屑导航
|
|
@State breadcrumbs:BreadcrumbItem[] = []//面包屑导航
|
|
|
|
|
|
|
|
@State visibleFoldersState: FileInfo[] = []; // 改为普通状态变量
|
|
@State visibleFoldersState: FileInfo[] = []; // 改为普通状态变量
|
|
@@ -205,8 +204,7 @@ export struct WebDavMainPage {
|
|
|
this.isLongNameRoLL = PreferencesUtil.getBooleanSync('isLongNameRoLL', true)
|
|
this.isLongNameRoLL = PreferencesUtil.getBooleanSync('isLongNameRoLL', true)
|
|
|
this.sortType = PreferencesUtil.getNumberSync('webDavSortType', 0)
|
|
this.sortType = PreferencesUtil.getNumberSync('webDavSortType', 0)
|
|
|
this.isNoJumpToHome = PreferencesUtil.getBooleanSync('isNoJumpToHome', true)
|
|
this.isNoJumpToHome = PreferencesUtil.getBooleanSync('isNoJumpToHome', true)
|
|
|
- // 获取顶部安全区高度
|
|
|
|
|
- this.getTopRectHeight();
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
// 加载账户列表
|
|
// 加载账户列表
|
|
|
this.loadAccounts();
|
|
this.loadAccounts();
|
|
@@ -220,18 +218,6 @@ export struct WebDavMainPage {
|
|
|
this.subscribeWebDavMetadataUpdates();
|
|
this.subscribeWebDavMetadataUpdates();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 获取顶部安全区高度
|
|
|
|
|
- private getTopRectHeight(): void {
|
|
|
|
|
- window.getLastWindow(getContext(this), (err, data) => {
|
|
|
|
|
- if (err.code) {
|
|
|
|
|
- Logger.error(TAG, '获取窗口失败: ' + JSON.stringify(err));
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- const area = data.getWindowAvoidArea(window.AvoidAreaType.TYPE_SYSTEM);
|
|
|
|
|
- this.topRectHeight = px2vp(area.topRect.height);
|
|
|
|
|
- Logger.info(TAG, '顶部安全区高度: ' + this.topRectHeight);
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
aboutToDisappear(): void {
|
|
aboutToDisappear(): void {
|
|
|
// 取消订阅
|
|
// 取消订阅
|