Skip to content
Open
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
10 changes: 10 additions & 0 deletions src/apps/mobile/harmonyos/entry/src/main/ets/i18n/EnUsMessages.ets
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,16 @@ export const EN_US_MESSAGES: [string, string][] = [
['sidebar.deviceOnline', 'Online'],
['sidebar.addWorkspace', 'Add workspace'],
['sidebar.selectWorkspace', 'Select workspace'],
['sidebar.selectRemoteFolder', 'Select remote folder'],
['sidebar.currentFolder', 'Current location'],
['sidebar.remoteHomeFolder', 'Device home folder'],
['sidebar.parentFolder', 'Parent folder'],
['sidebar.chooseThisFolder', 'Choose this folder'],
['sidebar.loadingFolders', 'Loading remote folders…'],
['sidebar.emptyFolders', 'No subfolders here'],
['sidebar.directoryBrowserUnsupported', 'This computer does not support remote folder selection yet. Update BitFun first.'],
['sidebar.directoryLoadFailed', 'Could not load the remote folder'],
['sidebar.directoryTruncated', 'Only the first 500 folders are shown'],
['sidebar.workspacesOffline', 'Disconnected'],
['sidebar.connectDesktop', 'Connect a computer'],
['sidebar.addConnection', 'Add connection'],
Expand Down
10 changes: 10 additions & 0 deletions src/apps/mobile/harmonyos/entry/src/main/ets/i18n/ZhCnMessages.ets
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,16 @@ export const ZH_CN_MESSAGES: [string, string][] = [
['sidebar.deviceOnline', '在线'],
['sidebar.addWorkspace', '添加工作区'],
['sidebar.selectWorkspace', '选择工作区'],
['sidebar.selectRemoteFolder', '选择远程文件夹'],
['sidebar.currentFolder', '当前位置'],
['sidebar.remoteHomeFolder', '设备主目录'],
['sidebar.parentFolder', '上一级'],
['sidebar.chooseThisFolder', '选择此文件夹'],
['sidebar.loadingFolders', '正在读取远程文件夹…'],
['sidebar.emptyFolders', '这里没有子文件夹'],
['sidebar.directoryBrowserUnsupported', '这台电脑的版本暂不支持远程文件夹选择,请先更新 BitFun'],
['sidebar.directoryLoadFailed', '远程文件夹读取失败'],
['sidebar.directoryTruncated', '文件夹较多,仅显示前 500 项'],
['sidebar.workspacesOffline', '未连接'],
['sidebar.connectDesktop', '连接电脑'],
['sidebar.addConnection', '添加连接'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export interface InitialSyncResult {
sessions: RemoteSession[];
hasMoreSessions: boolean;
authenticatedUserId: string;
capabilities?: string[];
}

export interface RecentWorkspaceEntry {
Expand All @@ -42,6 +43,18 @@ export interface RecentWorkspaceEntry {
workspaceKind: string;
}

export interface RemoteDirectoryEntry {
name: string;
path: string;
}

export interface RemoteDirectoryListing {
path: string;
parentPath: string;
directories: RemoteDirectoryEntry[];
truncated: boolean;
}

export interface RemoteSession {
id: string;
title: string;
Expand Down Expand Up @@ -162,6 +175,7 @@ export interface WorkspaceInfoResponse extends CommandStatusResponse {
git_branch?: string;
workspace_kind?: string;
assistant_id?: string;
capabilities?: string[];
}

export interface RecentWorkspaceEntryResponse {
Expand All @@ -178,6 +192,18 @@ export interface RecentWorkspaceListResponse extends CommandStatusResponse {
workspaces?: RecentWorkspaceEntryResponse[];
}

export interface RemoteDirectoryEntryResponse {
name?: string;
path?: string;
}

export interface RemoteDirectoryListResponse extends CommandStatusResponse {
path?: string;
parent?: string;
directories?: RemoteDirectoryEntryResponse[];
truncated?: boolean;
}

export interface SetWorkspaceResponse extends CommandStatusResponse {
success?: boolean;
path?: string;
Expand Down Expand Up @@ -251,6 +277,7 @@ export interface InitialSyncResponse extends CommandStatusResponse {
sessions?: SessionItemResponse[];
has_more_sessions?: boolean;
authenticated_user_id?: string;
capabilities?: string[];
}

export interface DelegatedIdentityResponse extends CommandStatusResponse {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RemotePermissionMode, RemoteSession } from '../../model/RemoteModels';
import { RemoteDirectoryListing, RemotePermissionMode, RemoteSession } from '../../model/RemoteModels';
import { CloudAccountDevice } from '../../services/CloudAccountClient';
import { DetectedUrlAction } from '../../services/ConnectScanDecisionPolicy';
import { ConversationIntent } from './ConversationIntent';
Expand Down Expand Up @@ -62,7 +62,7 @@ export interface RemoteHomePresentationActions {
readonly createInWorkspace: (path: string, agentType: string, deviceId?: string) => void;
readonly createInWorkspaceInPlace: (path: string, agentType: string, deviceId?: string) => void;
readonly selectDirectoryDevice: (deviceId: string) => void;
readonly addDirectoryWorkspace: (deviceId: string) => void;
readonly browseDirectory: (deviceId: string, path: string) => Promise<RemoteDirectoryListing>;
readonly retryDirectoryDevice: (deviceId: string) => void;
readonly openSession: (session: RemoteSession) => void;
readonly openSessionInPlace: (session: RemoteSession) => void;
Expand Down Expand Up @@ -131,7 +131,9 @@ export function emptyAppRootPresentationActions(): AppRootPresentationActions {
selectAssistant: () => {}, cancelWorkspace: () => {}, cancelAssistant: () => {}, queryChanged: () => {},
search: () => {}, loadMore: () => {}, reconnect: () => {}, disconnect: () => {}, clearPairing: () => {},
create: () => {}, createInPlace: () => {}, createAssistant: () => {}, createInWorkspace: () => {},
createInWorkspaceInPlace: () => {}, selectDirectoryDevice: () => {}, addDirectoryWorkspace: () => {},
createInWorkspaceInPlace: () => {}, selectDirectoryDevice: () => {}, browseDirectory: async () => ({
path: '', parentPath: '', directories: [], truncated: false
}),
retryDirectoryDevice: () => {},
openSession: () => {}, openSessionInPlace: () => {}, deleteSession: () => {}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export struct AppSidebarSurface {
},
onSelectDevice: this.actions.onRemoteHome.selectDirectoryDevice,
onRetryDevice: this.actions.onRemoteHome.retryDirectoryDevice,
onAddWorkspace: this.actions.onRemoteHome.addDirectoryWorkspace
onBrowseDirectory: this.actions.onRemoteHome.browseDirectory
})
}

Expand Down
Loading
Loading