There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
fix(electron): update settings styles (#10193)
pengx1778346be4fe95
diff --git a/packages/frontend/core/src/desktop/dialogs/setting/workspace-setting/storage/index.tsx b/packages/frontend/core/src/desktop/dialogs/setting/workspace-setting/storage/index.tsxindex 96468c51ad..fb2bafa80e 100644--- a/packages/frontend/core/src/desktop/dialogs/setting/workspace-setting/storage/index.tsx+++ b/packages/frontend/core/src/desktop/dialogs/setting/workspace-setting/storage/index.tsx@@ -2,9 +2,10 @@ import {SettingHeader,SettingWrapper,} from '@affine/component/setting-components';+import { WorkspacePermissionService } from '@affine/core/modules/permissions';import { WorkspaceService } from '@affine/core/modules/workspace';import { useI18n } from '@affine/i18n';-import { useService } from '@toeverything/infra';+import { useLiveData, useService } from '@toeverything/infra';import { EnableCloudPanel } from '../preference/enable-cloud';import { BlobManagementPanel } from './blob-management';@@ -18,6 +19,10 @@ export const WorkspaceSettingStorage = ({}) => {const t = useI18n();const workspace = useService(WorkspaceService).workspace;+ const workspacePermissionService = useService(+ WorkspacePermissionService+ ).permission;+ const isTeam = useLiveData(workspacePermissionService.isTeam$);return (<><SettingHeader@@ -25,23 +30,33 @@ export const WorkspaceSettingStorage = ({subtitle={t['com.affine.settings.workspace.storage.subtitle']()}/>{workspace.flavour === 'local' ? (- <EnableCloudPanel onCloseSetting={onCloseSetting} />+ <>+ <EnableCloudPanel onCloseSetting={onCloseSetting} />{' '}+ {BUILD_CONFIG.isElectron && (+ <SettingWrapper>+ <DesktopExportPanel workspace={workspace} />+ </SettingWrapper>+ )}+ </>) : (<>- <SettingWrapper>- <WorkspaceQuotaPanel />- </SettingWrapper>+ {isTeam ? (+ <SettingWrapper>+ <WorkspaceQuotaPanel />+ </SettingWrapper>+ ) : null}++ {BUILD_CONFIG.isElectron && (+ <SettingWrapper>+ <DesktopExportPanel workspace={workspace} />+ </SettingWrapper>+ )}<SettingWrapper><BlobManagementPanel /></SettingWrapper></>)}- {BUILD_CONFIG.isElectron && (- <SettingWrapper>- <DesktopExportPanel workspace={workspace} />- </SettingWrapper>- )}</>);};diff --git a/packages/frontend/core/src/desktop/dialogs/setting/workspace-setting/storage/workspace-quota.tsx b/packages/frontend/core/src/desktop/dialogs/setting/workspace-setting/storage/workspace-quota.tsxindex be782eeb14..672895471c 100644--- a/packages/frontend/core/src/desktop/dialogs/setting/workspace-setting/storage/workspace-quota.tsx+++ b/packages/frontend/core/src/desktop/dialogs/setting/workspace-setting/storage/workspace-quota.tsx@@ -1,6 +1,5 @@import { ErrorMessage, Skeleton } from '@affine/component';import { SettingRow } from '@affine/component/setting-components';-import { WorkspacePermissionService } from '@affine/core/modules/permissions';import { WorkspaceQuotaService } from '@affine/core/modules/quota';import { useI18n } from '@affine/i18n';import { useLiveData, useService } from '@toeverything/infra';@@ -11,14 +10,6 @@ import * as styles from './style.css';export const WorkspaceQuotaPanel = () => {const t = useI18n();- const workspacePermissionService = useService(- WorkspacePermissionService- ).permission;- const isTeam = useLiveData(workspacePermissionService.isTeam$);-- if (!isTeam) {- return null;- }return (<SettingRowdiff --git a/packages/frontend/i18n/src/resources/en.json b/packages/frontend/i18n/src/resources/en.jsonindex a7192903e8..9b4e728823 100644--- a/packages/frontend/i18n/src/resources/en.json+++ b/packages/frontend/i18n/src/resources/en.json@@ -1426,10 +1426,10 @@"com.affine.settings.workspace.affine-ai.title": "AFFiNE AI","com.affine.settings.workspace.affine-ai.label": "Allow AFFiNE AI Assistant","com.affine.settings.workspace.affine-ai.description": "Allow workspace members to use AFFiNE AI features. This setting doesn't affect billing. Workspace members use AFFiNE AI through their personal accounts.",- "com.affine.settings.workspace.backup": "Achieved workspaces",- "com.affine.settings.workspace.backup.subtitle": "Management in local workspace backup files",- "com.affine.settings.workspace.backup.empty": "No backup files found",- "com.affine.settings.workspace.backup.delete": "Delete backup workspace",+ "com.affine.settings.workspace.backup": "Archived workspaces",+ "com.affine.settings.workspace.backup.subtitle": "Manage archived local workspace files",+ "com.affine.settings.workspace.backup.empty": "No archived workspace files found",+ "com.affine.settings.workspace.backup.delete": "Delete archived workspace","com.affine.settings.workspace.backup.delete.warning": "Are you sure you want to delete this workspace. This action cannot be undone. Make sure you no longer need them before proceeding.","com.affine.settings.workspace.backup.delete.success": "Workspace backup deleted successfully","com.affine.settings.workspace.backup.import.success": "Workspace enabled successfully",diff --git a/packages/frontend/native/index.d.ts b/packages/frontend/native/index.d.tsindex f5ceb6f305..09a573ad53 100644--- a/packages/frontend/native/index.d.ts+++ b/packages/frontend/native/index.d.ts@@ -1,5 +1,27 @@/* auto-generated by NAPI-RS *//* eslint-disable */+export declare class Application {+ static tapGlobalAudio(excludedProcesses: Array<Application> | undefined | null, audioStreamCallback: ((err: Error | null, arg: Float32Array) => void)): AudioTapStream+ get processId(): number+ get bundleIdentifier(): string+ get name(): string+ get icon(): Buffer+ get isRunning(): boolean+ tapAudio(audioStreamCallback: ((err: Error | null, arg: Float32Array) => void)): AudioTapStream+}++export declare class ApplicationListChangedSubscriber {+ unsubscribe(): void+}++export declare class ApplicationStateChangedSubscriber {+ unsubscribe(): void+}++export declare class AudioTapStream {+ stop(): void+}+export declare class DocStorage {constructor(path: string)validate(): Promise<boolean>@@ -38,6 +60,20 @@ export declare class DocStoragePool {clearClocks(universalId: string): Promise<void>}+export declare class RecordingPermissions {+ audio: boolean+ screen: boolean+}++export declare class ShareableContent {+ static onApplicationListChanged(callback: ((err: Error | null, ) => void)): ApplicationListChangedSubscriber+ static onAppStateChanged(app: Application, callback: ((err: Error | null, ) => void)): ApplicationStateChangedSubscriber+ constructor()+ applications(): Array<Application>+ applicationWithProcessId(processId: number): Application+ checkRecordingPermissions(): RecordingPermissions+}+export declare class SqliteConnection {constructor(path: string)connect(): Promise<void>diff --git a/packages/frontend/native/index.js b/packages/frontend/native/index.jsindex 3ec93c1995..1e7d719035 100644--- a/packages/frontend/native/index.js+++ b/packages/frontend/native/index.js@@ -364,8 +364,14 @@ if (!nativeBinding) {throw new Error(`Failed to load native binding`)}+module.exports.Application = nativeBinding.Application+module.exports.ApplicationListChangedSubscriber = nativeBinding.ApplicationListChangedSubscriber+module.exports.ApplicationStateChangedSubscriber = nativeBinding.ApplicationStateChangedSubscriber+module.exports.AudioTapStream = nativeBinding.AudioTapStreammodule.exports.DocStorage = nativeBinding.DocStoragemodule.exports.DocStoragePool = nativeBinding.DocStoragePool+module.exports.RecordingPermissions = nativeBinding.RecordingPermissions+module.exports.ShareableContent = nativeBinding.ShareableContentmodule.exports.SqliteConnection = nativeBinding.SqliteConnectionmodule.exports.mintChallengeResponse = nativeBinding.mintChallengeResponsemodule.exports.ValidationResult = nativeBinding.ValidationResult