Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Commit

Permalink
✨ 自动识别桌面端/移动端浏览器并重定向到对应版本界面 Fix siyuan-note/siyuan#377
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Oct 31, 2020
1 parent 48249c9 commit d08bbad
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,40 +30,40 @@ The editor component of SiYuan is called "Vditor", which is a browser-side Markd
| Name | Shortcut key | Remarks |
| ---------------------------------------- | ------------------------------------------------------------- | ------------ |
| Content block quote | <kbd>((</kbd> / <kbd>[[</kbd> / <kbd>((</kbd> / <kbd>[[</kbd> | see below |
| Emoticons | <kbd>:</kbd> / <kbd>Alt E</kbd> / <kbd>⌥ E</kbd> | |
| Emoticons | <kbd>:</kbd> / <kbd>Alt E</kbd> / <kbd>⌥ E</kbd> | |
| Title | <kbd>Ctrl H</kbd> / <kbd>⌘ H</kbd> | see below |
| Bold | <kbd>Ctrl B</kbd> / <kbd>⌘ B</kbd> | |
| Italic | <kbd>Ctrl I</kbd> / <kbd>⌘ I</kbd> | |
| Strikethrough | <kbd>Ctrl D</kbd> / <kbd>⌘ D</kbd> | |
| Bold | <kbd>Ctrl B</kbd> / <kbd>⌘ B</kbd> | |
| Italic | <kbd>Ctrl I</kbd> / <kbd>⌘ I</kbd> | |
| Strikethrough | <kbd>Ctrl D</kbd> / <kbd>⌘ D</kbd> | |
| Link | <kbd>Ctrl K</kbd> / <kbd>⌘ K</kbd> | see below |
| Unordered List | <kbd>Ctrl L</kbd> / <kbd>⌘ L</kbd> | see below |
| Ordered list | <kbd>Ctrl O</kbd> / <kbd>⌘ O</kbd> | see below |
| Task list | <kbd>Ctrl J</kbd> / <kbd>⌘ J</kbd> | see below |
| Quote | <kbd>Ctrl ;</kbd> / <kbd>⌘ ;</kbd> | see below |
| Dividing line | <kbd>Ctrl Shift H </kbd> / <kbd>⌘ ⇧ H</kbd> | |
| Dividing line | <kbd>Ctrl Shift H </kbd> / <kbd>⌘ ⇧ H</kbd> | |
| Code block | <kbd>Ctrl U</kbd> / <kbd>⌘ U</kbd> | see below |
| Code | <kbd>Ctrl G</kbd> / <kbd>⌘ G</kbd> | |
| Insert an empty block before the element | <kbd>Ctrl Shift B</kbd> / <kbd>⌘ ⇧ B</kbd> | |
| Insert an empty block after the element | <kbd>Ctrl Shift E</kbd> / <kbd>⌘ ⇧ E</kbd> | |
| Code | <kbd>Ctrl G</kbd> / <kbd>⌘ G</kbd> | |
| Insert an empty block before the element | <kbd>Ctrl Shift B</kbd> / <kbd>⌘ ⇧ B</kbd> | |
| Insert an empty block after the element | <kbd>Ctrl Shift E</kbd> / <kbd>⌘ ⇧ E</kbd> | |
| Form | <kbd>Ctrl M</kbd> / <kbd>⌘ M</kbd> | see below |
| Undo | <kbd>Ctrl Z</kbd> / <kbd>⌘ Z</kbd> | |
| Redo | <kbd>Ctrl Y</kbd> / <kbd>⌘ Y</kbd> | |
| Preview | <kbd>Ctrl E</kbd> / <kbd>⌘ E</kbd> | |
| Full screen | <kbd>Ctrl'</kbd> / <kbd>⌘'</kbd> | |
| Undo | <kbd>Ctrl Z</kbd> / <kbd>⌘ Z</kbd> | |
| Redo | <kbd>Ctrl Y</kbd> / <kbd>⌘ Y</kbd> | |
| Preview | <kbd>Ctrl E</kbd> / <kbd>⌘ E</kbd> | |
| Full screen | <kbd>Ctrl'</kbd> / <kbd>⌘'</kbd> | |
| Move block element up | <kbd>Ctrl Shift U</kbd> / <kbd>⌘ ⇧ U</kbd> | wysiwyg mode |
| Move block element down | <kbd>Ctrl Shift D</kbd> / <kbd>⌘ ⇧ D</kbd> | wysiwyg mode |
| Remove current element | <kbd>Ctrl Shift X</kbd> / <kbd>⌘ ⇧ X</kbd> | wysiwyg mode |
| Save | <kbd>Ctrl S</kbd> / <kbd>⌘ S</kbd> | |
| Wrong input | <kbd>Backspace</kbd> | |
| Save | <kbd>Ctrl S</kbd> / <kbd>⌘ S</kbd> | |
| Wrong input | <kbd>Backspace</kbd> | |

### Content block reference <kbd>((</kbd> / <kbd>[[</kbd>

| Name | Shortcut key | Remarks |
| ------------------------------- | ---------------------------------------------- | ------------------------------------------------------------------- |
| Select | <kbd>↑</kbd> / <kbd>↓</kbd> | |
| Completion | <kbd>Enter</kbd> | |
| Select | <kbd>↑</kbd> / <kbd>↓</kbd> | |
| Completion | <kbd>Enter</kbd> | |
| Jump out of content block quote | <kbd>Tab</kbd> | Only useful in text content |
| Copy content block ID | <kbd>Ctrl Shift C</kbd> / <kbd>⌘ ⇧ X</kbd> | |
| Copy content block ID | <kbd>Ctrl Shift C</kbd> / <kbd>⌘ ⇧ X</kbd> | |
| Paste content block reference | <kbd>Ctrl V</kbd> / <kbd>⌘ v</kbd> | Only available when the content block ID is copied in the clipboard |
| Past content block embed | <kbd>Ctrl Shift V</kbd> / <kbd>⌘ ⇧ v</kbd> | Only available when the content block ID is copied in the clipboard |

Expand All @@ -88,10 +88,10 @@ The editor component of SiYuan is called "Vditor", which is a browser-side Markd
| Name | Shortcut key | Remarks |
| ----------------------------- | ---------------------------------------------- | ----------------------------------- |
| Indent 1 | <kbd>Tab</kbd> | The cursor must be at the beginning |
| Indent 2 | <kbd>Ctrl Shift I</kbd> / <kbd>⌘ ⇧ I</kbd> | |
| Indent 2 | <kbd>Ctrl Shift I</kbd> / <kbd>⌘ ⇧ I</kbd> | |
| Reverse Indent 1 | <kbd>Shift Tab</kbd> / <kbd>⇧ Tab</kbd> | The cursor must be at the beginning |
| Reverse indent 2 | <kbd>Enter</kbd> | Empty list item |
| Reverse indent 3 | <kbd>Ctrl Shift O</kbd> / <kbd>⌘ ⇧ O</kbd> | |
| Reverse indent 3 | <kbd>Ctrl Shift O</kbd> / <kbd>⌘ ⇧ O</kbd> | |
| Switch between Done and To Do | <kbd>Ctrl Shift J</kbd> / <kbd>⌘ ⇧ J</kbd> | Task List |

### Quote <kbd>Ctrl ;</kbd> / <kbd>⌘ ;</kbd>
Expand All @@ -102,7 +102,7 @@ The editor component of SiYuan is called "Vditor", which is a browser-side Markd
| Insert an empty block after the top-level quote | <kbd>Alt Enter</kbd> / <kbd>⌥ Enter</kbd> | wysiwyg mode |
| Insert block element 1 | <kbd>></kbd> | Insert reference in inline element |
| Insert block element 2 | <kbd>Ctrl Shift :</kbd> / <kbd>⌘ ⇧ :</kbd> | Block element becomes reference wysiwyg mode |
| Switch between quotes and block elements | <kbd>Ctrl ;</kbd> / <kbd>⌘ ;</kbd> | |
| Switch between quotes and block elements | <kbd>Ctrl ;</kbd> / <kbd>⌘ ;</kbd> | |

### Code block <kbd>Ctrl U</kbd> / <kbd>⌘ U</kbd>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
SiYuan Desktop is an standalone application packaged based on [Electron](https://www.electronjs.org), but this is not the only way to use it. As long as the kernel of SiYuan is started, it can be used directly on the browser, supporting mobile browsers.

* `http://127.0.0.1:6806/assets/build/`: Desktop web version, the experience is almost the same as the Electron standalone application #TODO#
* `http://127.0.0.1:6806/assets/build/`: Desktop web version, the experience is almost the same as the Electron standalone application
* `http://127.0.0.1:6806/assets/build/mobile/`: Mobile web version, specially designed for mobile-end user experience

You can also directly visit `http://127.0.0.1:6806/`, the program will automatically switch between desktop or mobile according to the browser version.

If you need to use it in a local area network, just replace `127.0.0.1` with the local area network IP address. In addition to local LAN use, here are two self-service solutions for public network use:

* Publish local kernel services on the public network through the "intranet penetration" technology (more troublesome and unstable, not recommended)
Expand Down

0 comments on commit d08bbad

Please sign in to comment.