Feat/appflowy tauri 2 (#1902)
* chore: rename classes to models
* refactor: add effects and reducers folder
* chore: update user data storage path
* chore: subscribe callback
* chore: nav items persist, board layout (#1879)
* chore: load workspace items, load folders and pages from workspace, load raw document data, load raw grid data
* chore: clear folders and pages before load, new folder event
* chore: update folder name backend call
* chore: folder expand animation
* chore: hide arrow on empty folder
* chore: Board page layout, board store, board sample data
* chore: board block item
* chore: test db id
* chore: persist new page, persist page rename, create workspace on read error
* chore: boardblockitem details btn
* chore: boardblockitem multiselect data and colors
* chore: board item drag
* chore: drag start on move
* chore: remove databaseId
* chore: remove databaseId
* chore: import service classes into auth hook
* chore: sign out option
* chore: login page event
* chore: signup event
* chore: make workspace hook to use service
* chore: page and folder hooks use backend services
* chore: new folder use backend service
* chore: error handler page
* chore: try catch hooks to show error page
* chore: install i18n package and use flutters i18n files
* fix: signin signup margin
* chore: fix compile errors
* chore: remove unused codes
* chore: open workspace after user register
* chore: open workspace after user register
* chore: add create grid demo
* chore: load the cell data
* chore: print the cell data
* chore: fix project errors
* fix: tauri UI issues (#1899)
* chore: load workspace items, load folders and pages from workspace, load raw document data, load raw grid data
* chore: clear folders and pages before load, new folder event
* chore: update folder name backend call
* chore: folder expand animation
* chore: hide arrow on empty folder
* chore: Board page layout, board store, board sample data
* chore: board block item
* chore: test db id
* chore: persist new page, persist page rename, create workspace on read error
* chore: boardblockitem details btn
* chore: boardblockitem multiselect data and colors
* chore: board item drag
* chore: drag start on move
* chore: remove databaseId
* chore: remove databaseId
* chore: import service classes into auth hook
* chore: sign out option
* chore: login page event
* chore: signup event
* chore: make workspace hook to use service
* chore: page and folder hooks use backend services
* chore: new folder use backend service
* chore: error handler page
* chore: try catch hooks to show error page
* chore: install i18n package and use flutters i18n files
* fix: signin signup margin
* fix: new page overflow with folder
* fix: sign out button
* fix: sign out icon
* chore: floating navigation panel
* refactor: notify with error
* chore: config window size
* fix: test demo error
* chore: update tests
---------
Co-authored-by: Askarbek Zadauly <ascarbek@gmail.com>
2023-02-28 22:42:41 +08:00
|
|
|
import { Details2Svg } from '../_shared/svg/Details2Svg';
|
|
|
|
import AddSvg from '../_shared/svg/AddSvg';
|
2023-03-03 17:14:58 +06:00
|
|
|
import { BoardCard } from './BoardCard';
|
|
|
|
import { RowInfo } from '../../stores/effects/database/row/row_cache';
|
|
|
|
import { DatabaseController } from '../../stores/effects/database/database_controller';
|
2023-03-12 22:29:03 +06:00
|
|
|
import { RowPB } from '@/services/backend';
|
Feat/appflowy tauri 2 (#1902)
* chore: rename classes to models
* refactor: add effects and reducers folder
* chore: update user data storage path
* chore: subscribe callback
* chore: nav items persist, board layout (#1879)
* chore: load workspace items, load folders and pages from workspace, load raw document data, load raw grid data
* chore: clear folders and pages before load, new folder event
* chore: update folder name backend call
* chore: folder expand animation
* chore: hide arrow on empty folder
* chore: Board page layout, board store, board sample data
* chore: board block item
* chore: test db id
* chore: persist new page, persist page rename, create workspace on read error
* chore: boardblockitem details btn
* chore: boardblockitem multiselect data and colors
* chore: board item drag
* chore: drag start on move
* chore: remove databaseId
* chore: remove databaseId
* chore: import service classes into auth hook
* chore: sign out option
* chore: login page event
* chore: signup event
* chore: make workspace hook to use service
* chore: page and folder hooks use backend services
* chore: new folder use backend service
* chore: error handler page
* chore: try catch hooks to show error page
* chore: install i18n package and use flutters i18n files
* fix: signin signup margin
* chore: fix compile errors
* chore: remove unused codes
* chore: open workspace after user register
* chore: open workspace after user register
* chore: add create grid demo
* chore: load the cell data
* chore: print the cell data
* chore: fix project errors
* fix: tauri UI issues (#1899)
* chore: load workspace items, load folders and pages from workspace, load raw document data, load raw grid data
* chore: clear folders and pages before load, new folder event
* chore: update folder name backend call
* chore: folder expand animation
* chore: hide arrow on empty folder
* chore: Board page layout, board store, board sample data
* chore: board block item
* chore: test db id
* chore: persist new page, persist page rename, create workspace on read error
* chore: boardblockitem details btn
* chore: boardblockitem multiselect data and colors
* chore: board item drag
* chore: drag start on move
* chore: remove databaseId
* chore: remove databaseId
* chore: import service classes into auth hook
* chore: sign out option
* chore: login page event
* chore: signup event
* chore: make workspace hook to use service
* chore: page and folder hooks use backend services
* chore: new folder use backend service
* chore: error handler page
* chore: try catch hooks to show error page
* chore: install i18n package and use flutters i18n files
* fix: signin signup margin
* fix: new page overflow with folder
* fix: sign out button
* fix: sign out icon
* chore: floating navigation panel
* refactor: notify with error
* chore: config window size
* fix: test demo error
* chore: update tests
---------
Co-authored-by: Askarbek Zadauly <ascarbek@gmail.com>
2023-02-28 22:42:41 +08:00
|
|
|
|
|
|
|
export const BoardBlock = ({
|
2023-03-03 17:14:58 +06:00
|
|
|
viewId,
|
|
|
|
controller,
|
Feat/appflowy tauri 2 (#1902)
* chore: rename classes to models
* refactor: add effects and reducers folder
* chore: update user data storage path
* chore: subscribe callback
* chore: nav items persist, board layout (#1879)
* chore: load workspace items, load folders and pages from workspace, load raw document data, load raw grid data
* chore: clear folders and pages before load, new folder event
* chore: update folder name backend call
* chore: folder expand animation
* chore: hide arrow on empty folder
* chore: Board page layout, board store, board sample data
* chore: board block item
* chore: test db id
* chore: persist new page, persist page rename, create workspace on read error
* chore: boardblockitem details btn
* chore: boardblockitem multiselect data and colors
* chore: board item drag
* chore: drag start on move
* chore: remove databaseId
* chore: remove databaseId
* chore: import service classes into auth hook
* chore: sign out option
* chore: login page event
* chore: signup event
* chore: make workspace hook to use service
* chore: page and folder hooks use backend services
* chore: new folder use backend service
* chore: error handler page
* chore: try catch hooks to show error page
* chore: install i18n package and use flutters i18n files
* fix: signin signup margin
* chore: fix compile errors
* chore: remove unused codes
* chore: open workspace after user register
* chore: open workspace after user register
* chore: add create grid demo
* chore: load the cell data
* chore: print the cell data
* chore: fix project errors
* fix: tauri UI issues (#1899)
* chore: load workspace items, load folders and pages from workspace, load raw document data, load raw grid data
* chore: clear folders and pages before load, new folder event
* chore: update folder name backend call
* chore: folder expand animation
* chore: hide arrow on empty folder
* chore: Board page layout, board store, board sample data
* chore: board block item
* chore: test db id
* chore: persist new page, persist page rename, create workspace on read error
* chore: boardblockitem details btn
* chore: boardblockitem multiselect data and colors
* chore: board item drag
* chore: drag start on move
* chore: remove databaseId
* chore: remove databaseId
* chore: import service classes into auth hook
* chore: sign out option
* chore: login page event
* chore: signup event
* chore: make workspace hook to use service
* chore: page and folder hooks use backend services
* chore: new folder use backend service
* chore: error handler page
* chore: try catch hooks to show error page
* chore: install i18n package and use flutters i18n files
* fix: signin signup margin
* fix: new page overflow with folder
* fix: sign out button
* fix: sign out icon
* chore: floating navigation panel
* refactor: notify with error
* chore: config window size
* fix: test demo error
* chore: update tests
---------
Co-authored-by: Askarbek Zadauly <ascarbek@gmail.com>
2023-02-28 22:42:41 +08:00
|
|
|
title,
|
|
|
|
rows,
|
2023-03-12 22:29:03 +06:00
|
|
|
allRows,
|
Feat/appflowy tauri 2 (#1902)
* chore: rename classes to models
* refactor: add effects and reducers folder
* chore: update user data storage path
* chore: subscribe callback
* chore: nav items persist, board layout (#1879)
* chore: load workspace items, load folders and pages from workspace, load raw document data, load raw grid data
* chore: clear folders and pages before load, new folder event
* chore: update folder name backend call
* chore: folder expand animation
* chore: hide arrow on empty folder
* chore: Board page layout, board store, board sample data
* chore: board block item
* chore: test db id
* chore: persist new page, persist page rename, create workspace on read error
* chore: boardblockitem details btn
* chore: boardblockitem multiselect data and colors
* chore: board item drag
* chore: drag start on move
* chore: remove databaseId
* chore: remove databaseId
* chore: import service classes into auth hook
* chore: sign out option
* chore: login page event
* chore: signup event
* chore: make workspace hook to use service
* chore: page and folder hooks use backend services
* chore: new folder use backend service
* chore: error handler page
* chore: try catch hooks to show error page
* chore: install i18n package and use flutters i18n files
* fix: signin signup margin
* chore: fix compile errors
* chore: remove unused codes
* chore: open workspace after user register
* chore: open workspace after user register
* chore: add create grid demo
* chore: load the cell data
* chore: print the cell data
* chore: fix project errors
* fix: tauri UI issues (#1899)
* chore: load workspace items, load folders and pages from workspace, load raw document data, load raw grid data
* chore: clear folders and pages before load, new folder event
* chore: update folder name backend call
* chore: folder expand animation
* chore: hide arrow on empty folder
* chore: Board page layout, board store, board sample data
* chore: board block item
* chore: test db id
* chore: persist new page, persist page rename, create workspace on read error
* chore: boardblockitem details btn
* chore: boardblockitem multiselect data and colors
* chore: board item drag
* chore: drag start on move
* chore: remove databaseId
* chore: remove databaseId
* chore: import service classes into auth hook
* chore: sign out option
* chore: login page event
* chore: signup event
* chore: make workspace hook to use service
* chore: page and folder hooks use backend services
* chore: new folder use backend service
* chore: error handler page
* chore: try catch hooks to show error page
* chore: install i18n package and use flutters i18n files
* fix: signin signup margin
* fix: new page overflow with folder
* fix: sign out button
* fix: sign out icon
* chore: floating navigation panel
* refactor: notify with error
* chore: config window size
* fix: test demo error
* chore: update tests
---------
Co-authored-by: Askarbek Zadauly <ascarbek@gmail.com>
2023-02-28 22:42:41 +08:00
|
|
|
}: {
|
2023-03-03 17:14:58 +06:00
|
|
|
viewId: string;
|
|
|
|
controller: DatabaseController;
|
Feat/appflowy tauri 2 (#1902)
* chore: rename classes to models
* refactor: add effects and reducers folder
* chore: update user data storage path
* chore: subscribe callback
* chore: nav items persist, board layout (#1879)
* chore: load workspace items, load folders and pages from workspace, load raw document data, load raw grid data
* chore: clear folders and pages before load, new folder event
* chore: update folder name backend call
* chore: folder expand animation
* chore: hide arrow on empty folder
* chore: Board page layout, board store, board sample data
* chore: board block item
* chore: test db id
* chore: persist new page, persist page rename, create workspace on read error
* chore: boardblockitem details btn
* chore: boardblockitem multiselect data and colors
* chore: board item drag
* chore: drag start on move
* chore: remove databaseId
* chore: remove databaseId
* chore: import service classes into auth hook
* chore: sign out option
* chore: login page event
* chore: signup event
* chore: make workspace hook to use service
* chore: page and folder hooks use backend services
* chore: new folder use backend service
* chore: error handler page
* chore: try catch hooks to show error page
* chore: install i18n package and use flutters i18n files
* fix: signin signup margin
* chore: fix compile errors
* chore: remove unused codes
* chore: open workspace after user register
* chore: open workspace after user register
* chore: add create grid demo
* chore: load the cell data
* chore: print the cell data
* chore: fix project errors
* fix: tauri UI issues (#1899)
* chore: load workspace items, load folders and pages from workspace, load raw document data, load raw grid data
* chore: clear folders and pages before load, new folder event
* chore: update folder name backend call
* chore: folder expand animation
* chore: hide arrow on empty folder
* chore: Board page layout, board store, board sample data
* chore: board block item
* chore: test db id
* chore: persist new page, persist page rename, create workspace on read error
* chore: boardblockitem details btn
* chore: boardblockitem multiselect data and colors
* chore: board item drag
* chore: drag start on move
* chore: remove databaseId
* chore: remove databaseId
* chore: import service classes into auth hook
* chore: sign out option
* chore: login page event
* chore: signup event
* chore: make workspace hook to use service
* chore: page and folder hooks use backend services
* chore: new folder use backend service
* chore: error handler page
* chore: try catch hooks to show error page
* chore: install i18n package and use flutters i18n files
* fix: signin signup margin
* fix: new page overflow with folder
* fix: sign out button
* fix: sign out icon
* chore: floating navigation panel
* refactor: notify with error
* chore: config window size
* fix: test demo error
* chore: update tests
---------
Co-authored-by: Askarbek Zadauly <ascarbek@gmail.com>
2023-02-28 22:42:41 +08:00
|
|
|
title: string;
|
2023-03-12 22:29:03 +06:00
|
|
|
rows: RowPB[];
|
|
|
|
allRows: readonly RowInfo[];
|
Feat/appflowy tauri 2 (#1902)
* chore: rename classes to models
* refactor: add effects and reducers folder
* chore: update user data storage path
* chore: subscribe callback
* chore: nav items persist, board layout (#1879)
* chore: load workspace items, load folders and pages from workspace, load raw document data, load raw grid data
* chore: clear folders and pages before load, new folder event
* chore: update folder name backend call
* chore: folder expand animation
* chore: hide arrow on empty folder
* chore: Board page layout, board store, board sample data
* chore: board block item
* chore: test db id
* chore: persist new page, persist page rename, create workspace on read error
* chore: boardblockitem details btn
* chore: boardblockitem multiselect data and colors
* chore: board item drag
* chore: drag start on move
* chore: remove databaseId
* chore: remove databaseId
* chore: import service classes into auth hook
* chore: sign out option
* chore: login page event
* chore: signup event
* chore: make workspace hook to use service
* chore: page and folder hooks use backend services
* chore: new folder use backend service
* chore: error handler page
* chore: try catch hooks to show error page
* chore: install i18n package and use flutters i18n files
* fix: signin signup margin
* chore: fix compile errors
* chore: remove unused codes
* chore: open workspace after user register
* chore: open workspace after user register
* chore: add create grid demo
* chore: load the cell data
* chore: print the cell data
* chore: fix project errors
* fix: tauri UI issues (#1899)
* chore: load workspace items, load folders and pages from workspace, load raw document data, load raw grid data
* chore: clear folders and pages before load, new folder event
* chore: update folder name backend call
* chore: folder expand animation
* chore: hide arrow on empty folder
* chore: Board page layout, board store, board sample data
* chore: board block item
* chore: test db id
* chore: persist new page, persist page rename, create workspace on read error
* chore: boardblockitem details btn
* chore: boardblockitem multiselect data and colors
* chore: board item drag
* chore: drag start on move
* chore: remove databaseId
* chore: remove databaseId
* chore: import service classes into auth hook
* chore: sign out option
* chore: login page event
* chore: signup event
* chore: make workspace hook to use service
* chore: page and folder hooks use backend services
* chore: new folder use backend service
* chore: error handler page
* chore: try catch hooks to show error page
* chore: install i18n package and use flutters i18n files
* fix: signin signup margin
* fix: new page overflow with folder
* fix: sign out button
* fix: sign out icon
* chore: floating navigation panel
* refactor: notify with error
* chore: config window size
* fix: test demo error
* chore: update tests
---------
Co-authored-by: Askarbek Zadauly <ascarbek@gmail.com>
2023-02-28 22:42:41 +08:00
|
|
|
}) => {
|
|
|
|
return (
|
|
|
|
<div className={'flex h-full w-[250px] flex-col rounded-lg bg-surface-1'}>
|
|
|
|
<div className={'flex items-center justify-between p-4'}>
|
|
|
|
<div className={'flex items-center gap-2'}>
|
|
|
|
<span>{title}</span>
|
2023-03-03 17:14:58 +06:00
|
|
|
<span className={'text-shade-4'}>()</span>
|
Feat/appflowy tauri 2 (#1902)
* chore: rename classes to models
* refactor: add effects and reducers folder
* chore: update user data storage path
* chore: subscribe callback
* chore: nav items persist, board layout (#1879)
* chore: load workspace items, load folders and pages from workspace, load raw document data, load raw grid data
* chore: clear folders and pages before load, new folder event
* chore: update folder name backend call
* chore: folder expand animation
* chore: hide arrow on empty folder
* chore: Board page layout, board store, board sample data
* chore: board block item
* chore: test db id
* chore: persist new page, persist page rename, create workspace on read error
* chore: boardblockitem details btn
* chore: boardblockitem multiselect data and colors
* chore: board item drag
* chore: drag start on move
* chore: remove databaseId
* chore: remove databaseId
* chore: import service classes into auth hook
* chore: sign out option
* chore: login page event
* chore: signup event
* chore: make workspace hook to use service
* chore: page and folder hooks use backend services
* chore: new folder use backend service
* chore: error handler page
* chore: try catch hooks to show error page
* chore: install i18n package and use flutters i18n files
* fix: signin signup margin
* chore: fix compile errors
* chore: remove unused codes
* chore: open workspace after user register
* chore: open workspace after user register
* chore: add create grid demo
* chore: load the cell data
* chore: print the cell data
* chore: fix project errors
* fix: tauri UI issues (#1899)
* chore: load workspace items, load folders and pages from workspace, load raw document data, load raw grid data
* chore: clear folders and pages before load, new folder event
* chore: update folder name backend call
* chore: folder expand animation
* chore: hide arrow on empty folder
* chore: Board page layout, board store, board sample data
* chore: board block item
* chore: test db id
* chore: persist new page, persist page rename, create workspace on read error
* chore: boardblockitem details btn
* chore: boardblockitem multiselect data and colors
* chore: board item drag
* chore: drag start on move
* chore: remove databaseId
* chore: remove databaseId
* chore: import service classes into auth hook
* chore: sign out option
* chore: login page event
* chore: signup event
* chore: make workspace hook to use service
* chore: page and folder hooks use backend services
* chore: new folder use backend service
* chore: error handler page
* chore: try catch hooks to show error page
* chore: install i18n package and use flutters i18n files
* fix: signin signup margin
* fix: new page overflow with folder
* fix: sign out button
* fix: sign out icon
* chore: floating navigation panel
* refactor: notify with error
* chore: config window size
* fix: test demo error
* chore: update tests
---------
Co-authored-by: Askarbek Zadauly <ascarbek@gmail.com>
2023-02-28 22:42:41 +08:00
|
|
|
</div>
|
|
|
|
<div className={'flex items-center gap-2'}>
|
|
|
|
<button className={'h-5 w-5 rounded hover:bg-surface-2'}>
|
|
|
|
<Details2Svg></Details2Svg>
|
|
|
|
</button>
|
|
|
|
<button className={'h-5 w-5 rounded hover:bg-surface-2'}>
|
|
|
|
<AddSvg></AddSvg>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className={'flex flex-1 flex-col gap-1 overflow-auto px-2'}>
|
2023-03-12 22:29:03 +06:00
|
|
|
{rows.map((row_pb, index) => {
|
|
|
|
const row = allRows.find((r) => r.row.id === row_pb.id);
|
|
|
|
return row ? (
|
|
|
|
<BoardCard viewId={viewId} controller={controller} key={index} rowInfo={row}></BoardCard>
|
|
|
|
) : (
|
|
|
|
<span key={index}></span>
|
|
|
|
);
|
|
|
|
})}
|
Feat/appflowy tauri 2 (#1902)
* chore: rename classes to models
* refactor: add effects and reducers folder
* chore: update user data storage path
* chore: subscribe callback
* chore: nav items persist, board layout (#1879)
* chore: load workspace items, load folders and pages from workspace, load raw document data, load raw grid data
* chore: clear folders and pages before load, new folder event
* chore: update folder name backend call
* chore: folder expand animation
* chore: hide arrow on empty folder
* chore: Board page layout, board store, board sample data
* chore: board block item
* chore: test db id
* chore: persist new page, persist page rename, create workspace on read error
* chore: boardblockitem details btn
* chore: boardblockitem multiselect data and colors
* chore: board item drag
* chore: drag start on move
* chore: remove databaseId
* chore: remove databaseId
* chore: import service classes into auth hook
* chore: sign out option
* chore: login page event
* chore: signup event
* chore: make workspace hook to use service
* chore: page and folder hooks use backend services
* chore: new folder use backend service
* chore: error handler page
* chore: try catch hooks to show error page
* chore: install i18n package and use flutters i18n files
* fix: signin signup margin
* chore: fix compile errors
* chore: remove unused codes
* chore: open workspace after user register
* chore: open workspace after user register
* chore: add create grid demo
* chore: load the cell data
* chore: print the cell data
* chore: fix project errors
* fix: tauri UI issues (#1899)
* chore: load workspace items, load folders and pages from workspace, load raw document data, load raw grid data
* chore: clear folders and pages before load, new folder event
* chore: update folder name backend call
* chore: folder expand animation
* chore: hide arrow on empty folder
* chore: Board page layout, board store, board sample data
* chore: board block item
* chore: test db id
* chore: persist new page, persist page rename, create workspace on read error
* chore: boardblockitem details btn
* chore: boardblockitem multiselect data and colors
* chore: board item drag
* chore: drag start on move
* chore: remove databaseId
* chore: remove databaseId
* chore: import service classes into auth hook
* chore: sign out option
* chore: login page event
* chore: signup event
* chore: make workspace hook to use service
* chore: page and folder hooks use backend services
* chore: new folder use backend service
* chore: error handler page
* chore: try catch hooks to show error page
* chore: install i18n package and use flutters i18n files
* fix: signin signup margin
* fix: new page overflow with folder
* fix: sign out button
* fix: sign out icon
* chore: floating navigation panel
* refactor: notify with error
* chore: config window size
* fix: test demo error
* chore: update tests
---------
Co-authored-by: Askarbek Zadauly <ascarbek@gmail.com>
2023-02-28 22:42:41 +08:00
|
|
|
</div>
|
|
|
|
<div className={'p-2'}>
|
|
|
|
<button className={'flex w-full items-center gap-2 rounded-lg px-2 py-2 hover:bg-surface-2'}>
|
|
|
|
<span className={'h-5 w-5'}>
|
|
|
|
<AddSvg></AddSvg>
|
|
|
|
</span>
|
|
|
|
<span>New</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|