Commit Graph

65 Commits

Author SHA1 Message Date
Gabriel Horner
b985020d1f refactor: mv file graph model fns to their own ns
All these fns are only used by file graphs. Most only act on file only
attributes e.g. :block/file, :block/pre-block? and :block/namespace
2025-05-09 02:51:54 +08:00
Tienson Qin
a1f352773b refactor: rename :block/original-name to :block/title 2024-07-10 21:43:03 +08:00
rcmerci
dc785a92a7 refactor: make journal-day page's uuid like this
00000001-2024-0620-0000-000000000000
2024-06-20 17:01:58 +08:00
Tienson Qin
9df8918f94 Remove more :block/name lookup ref usage 2024-04-04 15:57:48 +08:00
Tienson Qin
420e361381 fix: async <get-file and <get-files 2024-01-30 21:17:18 +08:00
Tienson Qin
b06b01b88b Merge branch 'master' into feat/db 2024-01-22 12:08:37 +08:00
Tienson Qin
e571c571ec wip: export refactor
1. Move fns to worker
2. Don't rely on :block/file, use db blocks to build page content
2024-01-22 10:00:26 +08:00
Tienson Qin
b7d9098e80 Move gp-util and gp-config to the common dep 2024-01-03 16:38:05 +08:00
Gabriel Horner
c7c438b85a fix: last-modified-at not being set for files
Also fixed a bug with the all-files view where the current time was
being displayed instead of a file's last modified time. Also updated
db graph's schema for files
2023-10-17 16:12:24 -04:00
Tienson Qin
cb93cc3e9a Merge branch 'master' into feat/db 2023-08-15 13:42:37 +08:00
Andelf
90db107e4d fix(fs): editing global config on windows 2023-07-28 15:23:33 +08:00
Tienson Qin
b922ef9861 fix: can't save config.edn 2023-07-07 19:00:54 +08:00
Tienson Qin
1bb93d3560 fix: can't read and write custom files 2023-06-26 17:31:49 +08:00
Konstantinos Kaloutas
d13ba8d9e7 chore: refactoring 2023-06-08 16:59:09 +03:00
Andelf
113715c8a1 chore: cleanup fixme 2023-03-28 09:14:42 +08:00
Tienson Qin
c1e8d6ed8e refactor: path/absolute? 2023-03-28 09:14:42 +08:00
Tienson Qin
9abfd4af8b fix: can't save config.edn on web 2023-03-28 09:14:42 +08:00
Gabriel Horner
89ba13d5ac Fix multiple issues with global config
- global config saved outside the app errored and had no effect on config
- global config saved in app, saved invalid state and invalid file
- removed outdated global error handling on alter-file
- Also fix validations for repo config
2023-03-28 09:14:42 +08:00
Tienson Qin
70a4870ca4 fix: custom.css can't be saved 2023-03-28 09:14:42 +08:00
Andelf
9637c464eb fix(config): global config validation 2023-03-28 09:14:42 +08:00
Andelf
2ad52eab3e fix(fs): file editing on windows 2023-03-28 09:14:42 +08:00
Andelf
97b534301b fix(fs): file editing in nfs 2023-03-28 09:14:42 +08:00
Andelf
7737053ce1 enhance(editor): use relative path when editing files 2023-03-28 09:14:42 +08:00
Andelf
98f4236309 fix(fs): global file writing in code editor 2023-03-28 09:14:42 +08:00
Andelf
1cd7f89cd9 refactor(fs): handle global file write 2023-03-28 09:14:42 +08:00
Andelf
3f467d72ec refactor(fs): rewrite url fn 2023-03-28 09:14:42 +08:00
Andelf
5a2884038b fix: regression of file editing on browser-app 2023-02-21 10:40:17 -05:00
Andelf
db356ac946 fix lint 2023-02-21 10:40:17 -05:00
Andelf
e0f9111beb fix(config): loading of config editing
Introduced: #8578
2023-02-21 10:40:17 -05:00
Gabriel Horner
047f8a8fef Fix edit global config.edn
This also effects editing any file that's not in the current repo
2023-02-21 10:40:17 -05:00
Tienson Qin
dcf9559094 fix: don't store broken config in DB (#8578)
* fix: don't store broken config in DB

Also, all configs should be clojure maps.

* fix: editor should show the corresponding file's content from disk
2023-02-12 14:33:52 +08:00
Junyi Du
0e4037ab61 Feat: new file name escaping rules (#6134)
* feat: new file name escaping for namespace

feat: new file name decoding back to page name

* test: file name sanitization

feat: use _0x to encode %

feat: don't create title property

test: extra URL encoding for escaped file names

fix: fit pdf prefix into new file name rules

fix: encoding rules on some characters

fix: handle the buggy file names imported by users

fix: pdf block ref failed to jump

fix: #6167

* fix: enhance backward compatibility

chore: title validation

test: fix namespace queries test

chore: use index version stored in config.edn instead of search.versions

* feat: convert old version graph mechanism

ui: file conversion UI

feat: rename files for conversion

feat: don't trigger conversion when title property is manually edited

fix: file conflict notification while renaming files on some OS

feat: re-index on update version

feat: clicking NO in the re-index dialog would update the index-ver flag to suppress the dialog

feat: use html entities for reserved char escaping

dev: remove unresolved vars & minor refactor

chore: move file name sanity from gp-util to fs-util, as it's for encoding only but not parsing

test: update file name tests to html entities rule

test: convert files from dir ver 3 for repo_tests

feat: convert Windows reserved file names

fix: save index version into idb instead of file

fix: decode uri of path while parsing files on mobile

fix: couple dir version and index version to ensure only re-index on converted dirs

feat: go back to url-encode for special chars

* chore: fix lint

chore: improve codebase to address Gabriel's comments

fix: remove file remnants on add conflict

fix: remove file remnants on rename conflict

chore: add test ns to nbb runner

Also fix typoed fn and remove unused code

* fix: issues of rebase PR6134 to master after file-sync merged

* feat: switchable filename format

* fix: use  go block to replace promesa for rename all with blocking

* feat: re-index after apply rename all

* ui: file conversion enhancement

* fix: merging filename format PR with master

* fix: filename format lint & CI

* ui: filename format flow

* fix: error handling on the rare internal file path confliction case

* chore: shorten component code for files-breaking-changed

* chore: fix CI

* Minor fixes per latest code review

- Remove unused page-name-order
- Update catch usage to be consistent with what's on master
- Place state fn in right place
- Wording fixes:
  - select and apply -> manual. There are no checkboxes for the user
  - Update -> Edit. We use edit for all other settings button
  - Alternatives to starting sentences with May. Not a common way to
    start a sentence
  - update outdated template comment

* ux: rename instruction update

* ux: rename instruction update (2)

* Tweak wording of conversion modal

Simplifed first paragraph and explained the page to the user in first
sentence, may isn't a common way to start sentences and updated outdated
wording

* Fix large-var warning by splitting out a piece of component

* fix: right slash on Windows; legacy format file sanitization

* fix: triple lowbar renaming fns

Co-authored-by: Gabriel Horner <gabriel@logseq.com>
2022-10-08 15:47:45 +08:00
Charlie
01d879c18e feat!: File Sync (#5355)
- file sync for electron/ios/android
- age encryption of both file content and file path
- massive UI enhancement
- corresponding CI tasks

Co-authored-by: llcc <lzhes43@gmail.com>
Co-authored-by: rcmerci <rcmerci@gmail.com>
Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
Co-authored-by: Andelf <andelf@gmail.com>
Co-authored-by: Gabriel Horner <gabriel@logseq.com>
2022-09-01 00:31:49 +08:00
Charlie
d9c9438abf Fix/custom css not reload (#6510)
* fix: custom css not reload when switching graph
* fix(ux): sometimes code editing auto save not work with blur event
2022-08-30 09:06:45 +08:00
Tienson Qin
f49a28fa7b Merge pull request #5420 from logseq/enhance/graph-parser-part-four
Enhance: Finish up graph-parser
2022-06-02 10:00:30 +08:00
Tienson Qin
f70b7a664d fix: file content not refreshed
close #5484
2022-06-01 16:39:07 +08:00
Gabriel Horner
e999ebc149 Automatically set extract-options correctly
- Removed state paths [:config :text-formats], [:config :img-formats]
  and [:me :settins :date-formatter] as they have been unused since
  their introduction in 2020
- Converted incorrect js/Error refs
- Also merged db.config test helpers
2022-05-26 18:04:45 -04:00
Gabriel Horner
a832564782 Migrate most of extract ns to nbb 2022-05-13 11:52:35 -04:00
Tienson Qin
4fc479495e Simplify sidebar data 2022-05-09 21:30:31 +08:00
Gabriel Horner
a58a411567 Move config fns and remaining util fns that mldoc depends on 2022-05-04 12:02:36 -04:00
Tienson Qin
982eba9396 refactor: remove i18n tongue context 2022-02-08 17:31:32 +08:00
Gabriel Horner
b0d77e5d7f Use consistent datascript aliases to more easily see datascript usage 2022-02-08 14:54:17 +08:00
Gabriel Horner
b7b3375f62 Lint extensions/ and wrap up hanging frontend dirs
fs/, format/ and logseq/ also added to linting by adding todos for later
inspection
2022-01-12 16:38:17 -05:00
Gabriel Horner
89bef5b26e Merge remote-tracking branch 'origin/master' into test/add-clj-kondo-part-two 2022-01-12 15:38:57 -05:00
Gabriel Horner
f1d15b0e05 Lint components and address comments in review
Start using :clj-kondo/ignore as lint violations that need to be
revisited. They may side effect and should be removed with better
understanding of their context
2022-01-12 15:32:47 -05:00
Andelf
fd00d86d6a enhance(editor): allow edit markup files 2022-01-11 23:46:11 +08:00
Junyi Du
e5dcb014e1 enhance: yet another page-name sanity improve 2022-01-10 13:29:40 +08:00
Junyi Du
7505b0dde6 fix: introduce more page-name sanity 2022-01-10 13:29:40 +08:00
leizhe
9572354eb3 fix(iOS): decode config/css file path 2021-12-27 21:54:58 +08:00
Andelf
7024e9b4c3 fix(editor): refine file edting, fix state update
- update element state when switching files #3415
- notification when saved
- minor style change
- refine editor element id gen, use uuid
- add trailing newline to saved file

Fix #3415
2021-12-21 12:37:03 +08:00