Skip to content
Merged
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
5 changes: 0 additions & 5 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { defineConfig } from 'cypress';
import registerCodeCoverageTasks from '@cypress/code-coverage/task';

import { addMatchImageSnapshotPlugin } from 'cypress-image-snapshot/plugin';

export default defineConfig({
env: {
Expand All @@ -16,8 +13,6 @@ export default defineConfig({
bundler: 'vite',
},
setupNodeEvents(on, config) {
registerCodeCoverageTasks(on, config);
addMatchImageSnapshotPlugin(on, config);
return config;
},
supportFile: 'cypress/support/component.ts',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"coverage": "pnpm run test:unit && pnpm run test:components"
},
"dependencies": {
"@appflowyinc/ai-chat": "0.0.15",
"@appflowyinc/editor": "^0.1.6",
"@appflowyinc/ai-chat": "0.1.24",
"@appflowyinc/editor": "^0.1.10",
"@atlaskit/primitives": "^5.5.3",
"@emoji-mart/data": "^1.1.2",
"@emoji-mart/react": "^1.1.1",
Expand Down
143 changes: 129 additions & 14 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 29 additions & 7 deletions src/@types/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@
"questionBubble": {
"shortcuts": "Shortcuts",
"whatsNew": "What's new?",
"help": "Help & Support",
"documentation": "Help & documentation",
"help": "Get support",
"markdown": "Markdown",
"debug": {
"name": "Debug Info",
Expand Down Expand Up @@ -1687,7 +1688,9 @@
"aiWriter": "AI Writer",
"dateOrReminder": "Date or Reminder",
"photoGallery": "Photo Gallery",
"file": "File"
"file": "File",
"continueWriting": "Continue Writing",
"askAIAnything": "Ask AI Anything"
},
"subPage": {
"name": "Document",
Expand Down Expand Up @@ -2446,7 +2449,9 @@
"toggleListShortForm": "Toggle",
"quoteListShortForm": "Quote",
"mathEquationShortForm": "Formula",
"codeBlockShortForm": "Code"
"codeBlockShortForm": "Code",
"improveWriting": "Improve writing",
"askAI": "Ask AI Anything"
},
"favorite": {
"noFavorite": "No favorite page",
Expand Down Expand Up @@ -2978,6 +2983,21 @@
"priceIn": "Price in ",
"free": "Free",
"pro": "Pro",
"getAIMax": "Get AI Max",
"upgradeAIMax": "Upgrade to AI Max",
"unlock": "Unlock",
"AIMax": {
"label": "AI Max",
"removeTitle": "Remove AI Max",
"removeDescription": "Are you sure you want to remove AI Max? You will lose access to the features and benefits of AI Max immediately.",
"description": "Access the most advanced AI models including GPT-4o, GPT-o3-mini, DeepSeek R1, and Claude 3.5 Sonnet",
"pricing": "per member per month\nbilled annually",
"points": {
"first": "Unlimited AI responses",
"second": "Unlimited file uploads",
"third": "50 AI images per month"
}
},
"freeDescription": "For individuals up to 2 members to organize everything",
"proDescription": "For small teams to manage projects and team knowledge",
"proDuration": {
Expand All @@ -2995,15 +3015,17 @@
"three": "5 GB storage",
"four": "Intelligent search",
"five": "10 AI responses",
"six": "Mobile app",
"seven": "Real-time collaboration"
"six": "2 AI images",
"seven": "Mobile app",
"eight": "Real-time collaboration"
},
"proPoints": {
"first": "Unlimited storage",
"second": "Up to 10 workspace members",
"three": "Unlimited AI responses",
"four": "Unlimited file uploads",
"five": "Custom namespace"
"four": "10 AI images per month",
"five": "Unlimited file uploads",
"six": "Custom namespace"
},
"cancelPlan": {
"title": "Sorry to see you go",
Expand Down
1 change: 1 addition & 0 deletions src/application/database-yjs/__tests__/selector.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const wrapperCreator =
databaseDoc={doc}
rowDocMap={rowDocMap}
readOnly={true}
workspaceId={''}
>
{children}
</DatabaseContextProvider>
Expand Down
5 changes: 3 additions & 2 deletions src/application/database-yjs/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ export interface DatabaseContextState {
navigateToView?: (viewId: string, blockId?: string) => Promise<void>;
onRendered?: (height: number) => void;
showActions?: boolean;
workspaceId: string;
}

export const DatabaseContext = createContext<DatabaseContextState | null>(null);

export const useDatabaseContext = () => {
const context = useContext(DatabaseContext);

if (!context) {
if(!context) {
throw new Error('DatabaseContext is not provided');
}

Expand Down Expand Up @@ -89,7 +90,7 @@ export const useDatabaseView = () => {
return viewId ? database?.get(YjsDatabaseKey.views)?.get(viewId) : undefined;
};

export function useDatabaseFields () {
export function useDatabaseFields() {
const database = useDatabase();

return database.get(YjsDatabaseKey.fields);
Expand Down
16 changes: 15 additions & 1 deletion src/application/services/js-services/http/http_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1855,7 +1855,7 @@ export async function getChatMessages(workspaceId: string, chatId: string, limit
data?: RepeatedChatMessage;
message: string;
}>(url, {
params: { limit: limit},
params: { limit: limit },
});

const data = response?.data;
Expand All @@ -1866,3 +1866,17 @@ export async function getChatMessages(workspaceId: string, chatId: string, limit

return Promise.reject(data);
}

export async function duplicatePage(workspaceId: string, viewId: string) {
const url = `/api/workspace/${workspaceId}/page-view/${viewId}/duplicate`;
const response = await axiosInstance?.post<{
code: number;
message: string;
}>(url, {});

if(response?.data.code === 0) {
return;
}

return Promise.reject(response?.data);
}
Loading
Loading