* Rename checkDSN to checkDataDir
* Add option to set DSN and db driver
* Add mysql driver skeleton
* Add mysql container in compose for debug
* Add basic function for mysql driver
* Cleanup go mod with tidy
* Cleanup go.sum with tidy
* Add DeleteUser support for mysql driver
* Fix UpdateUser of mysql driver
* Add DeleteTag support for mysql driver
* Add DeleteResource support for mysql driver
* Add UpdateMemo and DeleteMemo support for mysql driver
* Add MemoRelation support for mysql driver
* Add MemoOrganizer support for mysql driver
* Add Idp support for mysql driver
* Add Storage support for mysql driver
* Add FindMemosVisibilityList support for mysql driver
* Add Vacuum support for mysql driver
* Add Migration support for mysql driver
* Add Migration support for mysql driver
* Fix ListMemo failed with referece
* Change Activity.CreateTs type in MySQL
* Change User.CreateTs type in MySQL
* Fix by golangci-lint
* Change Resource.CreateTs type in MySQL
* Change MigrationHistory.CreateTs type in MySQL
* Change Memo.CreateTs type in MySQL
* Add new database interface for SQL operations
* Move SQL code of Activity into Database
* Rename `Database` into `Driver`
* Move SQL code of SystemSetting into Driver
* Fix store.New in text code
* Change database into driver in the variables
* Change sqlite3.New into sqlite3.NewDriver
* fix: database is locked
The option "_journal_mode=WAL" is currently *not* being applied when
provided in the DSN.
This issue affects only new memos installations, not older ones where
the database journal was properly set to WAL mode by the previous sqlite
library go-sqlite3.
modernc.org/sqlite DSN parsing is different from go-sqlite3. It requires
the `_pragma=` prefix and even some options order matter.
https://gitlab.com/cznic/sqlite/-/issues/115Closes#1985
* chore: upgraded notes on sqlite DSN
* Add method to query visibility list by memoIDs
* Add function to get visibility by resourceID
* Check resource visibility in /r/:resourceId/:publicId/:filename
* Check resource visibility in /r/:resourceId/:publicId
---------
Co-authored-by: Athurg Feng <athurg@gooth.org>
* Replace mattn/go-sqlite3 with modernc.org/sqlite
* Disable CGO to make binary work without special c lib
* Replace mattn/go-sqlite3 with modernc.org/sqlite in testing code
* Tidy go module
---------
Co-authored-by: Athurg Feng <athurg@gooth.org>
* Add preliminar Windows support for both
development and production environments.
Default profile.Data will be set to "C:\ProgramData\memos" on Windows.
Folder will be created if it does not exist, as this behavior is
expected for Windows applications.
System service installation can be achieved with third-party tools,
explained in docs/windows-service.md.
Not sure if it's worth using https://github.com/kardianos/service
to make service support built-in.
This could be a nice addition alongside #1583 (add Windows artifacts)
* feat: improve Windows support
- Fix local file storage path handling on Windows
- Improve Windows dev script
* feat: add max upload size setting to UI & more
- feat: add max upload size setting to UI
- feat: max upload size setting is checked on UI during upload,
but also enforced by the server
- fix: overflowing mobile layout for Create SSO, Create Storage
and other Settings dialogs
- feat: add HelpButton component with some links to docs were appropriate
- remove LearnMore component in favor of HelpButton
- refactor: change some if/else to switch statements
- refactor: inline some err == nil checks
! Existing databases without the new setting 'max-upload-size-mib'
will show an upload error, but this can be user-fixed by simply
setting the value on system settings UI.
* improvements requested by @boojack
* feat: add support for resource page on frontend
* [WIP]feat: add backend support for limit and offset search
* feat: add reducer to add resource
* support fetch all resource when first search
* beautify the fetch ui
* restore file
* feat: add all resource before clear resource
* eslint
* i18n
* chore:change the nane
* chore: change the name of param
* eslint
* feat: setIsComplete to true when first loading resource fully
* fix the bug of fetch
* feat change finally to then
* feat: add await and async to clear and search
* feat: return all resource when fetch
* chore: change variable name
* Update web/src/pages/ResourcesDashboard.tsx
Co-authored-by: boojack <stevenlgtm@gmail.com>
* fix missing const value
---------
Co-authored-by: boojack <stevenlgtm@gmail.com>