diff --git a/lib/Controller/Helper.php b/lib/Controller/Helper.php index 07fac0e38..2bdf13ff0 100644 --- a/lib/Controller/Helper.php +++ b/lib/Controller/Helper.php @@ -55,7 +55,7 @@ public function getNoteWithETagCheck(int $id, IRequest $request) : Note { return $note; } - public function getNoteData(Note $note, array $exclude = [], Meta $meta = null) : array { + public function getNoteData(Note $note, array $exclude = [], ?Meta $meta = null) : array { if ($meta === null) { $meta = $this->metaService->update($this->getUID(), $note); } @@ -67,9 +67,9 @@ public function getNoteData(Note $note, array $exclude = [], Meta $meta = null) public function getNotesAndCategories( int $pruneBefore, array $exclude, - string $category = null, + ?string $category = null, int $chunkSize = 0, - string $chunkCursorStr = null + ?string $chunkCursorStr = null ) : array { $userId = $this->getUID(); $chunkCursor = $chunkCursorStr ? ChunkCursor::fromString($chunkCursorStr) : null; diff --git a/lib/Controller/NotesApiController.php b/lib/Controller/NotesApiController.php index fe98a1c1d..5c0d49617 100644 --- a/lib/Controller/NotesApiController.php +++ b/lib/Controller/NotesApiController.php @@ -46,7 +46,7 @@ public function index( string $exclude = '', int $pruneBefore = 0, int $chunkSize = 0, - string $chunkCursor = null + ?string $chunkCursor = null ) : JSONResponse { return $this->helper->handleErrorResponse(function () use ( $category, diff --git a/lib/Service/MetaService.php b/lib/Service/MetaService.php index ea055f2ed..56eb9b586 100644 --- a/lib/Service/MetaService.php +++ b/lib/Service/MetaService.php @@ -131,7 +131,7 @@ private function getIndexedArray(array $data, string $property) : array { return $result; } - private function createMeta(string $userId, Note $note, callable $onError = null) : Meta { + private function createMeta(string $userId, Note $note, ?callable $onError = null) : Meta { $meta = new Meta(); $meta->setUserId($userId); $meta->setFileId($note->getId()); diff --git a/src/components/EditorEasyMDE.vue b/src/components/EditorEasyMDE.vue index 481bb45da..e7e49b773 100644 --- a/src/components/EditorEasyMDE.vue +++ b/src/components/EditorEasyMDE.vue @@ -370,7 +370,7 @@ export default { .upload-button { position: fixed; - inset-inline-end: 64px; + inset-inline-end: 112px; z-index: 10; height: 40px; margin-inline-end: 5px; diff --git a/src/components/NotePlain.vue b/src/components/NotePlain.vue index 1a593832c..758fc706a 100644 --- a/src/components/NotePlain.vue +++ b/src/components/NotePlain.vue @@ -9,7 +9,9 @@
- {{ t('notes', 'The note has been changed in another session. Please choose which version should be saved.') }} + {{ + t('notes', 'The note has been changed in another session. Please choose which version should be saved.') + }}
- - - - + + + {{ preview ? t('notes', 'Edit') : t('notes', 'Preview') }} + + + - + {{ fullscreen ? t('notes', 'Exit full screen') : t('notes', 'Full screen') }} @@ -105,7 +111,14 @@ import NoEditIcon from 'vue-material-design-icons/PencilOff.vue' import SyncAlertIcon from 'vue-material-design-icons/SyncAlert.vue' import { config } from '../config.js' -import { fetchNote, refreshNote, saveNoteManually, queueCommand, conflictSolutionLocal, conflictSolutionRemote } from '../NotesService.js' +import { + fetchNote, + refreshNote, + saveNoteManually, + queueCommand, + conflictSolutionLocal, + conflictSolutionRemote, +} from '../NotesService.js' import { routeIsNewNote } from '../Util.js' import TheEditor from './EditorEasyMDE.vue' import ThePreview from './EditorMarkdownIt.vue' @@ -437,6 +450,7 @@ export default { .note-editor { margin: 0 auto; } + .note-container { padding-inline-end: 250px; transition-duration: var(--animation-quick); @@ -468,7 +482,7 @@ export default { position: fixed; top: 50px; inset-inline-end: 20px; - width: 44px; + width: 94px; margin-top: 1em; z-index: 2000; } diff --git a/tests/api/APIv1Test.php b/tests/api/APIv1Test.php index 5567d61af..91ed4c4c2 100644 --- a/tests/api/APIv1Test.php +++ b/tests/api/APIv1Test.php @@ -74,7 +74,7 @@ protected function checkGetChunkNotes( array $indexedRefNotes, int $chunkSize, string $messagePrefix, - string $chunkCursor = null, + ?string $chunkCursor = null, array $collectedNotes = [] ) : array { $requestCount = 0; diff --git a/tests/api/AbstractAPITest.php b/tests/api/AbstractAPITest.php index 1111f10ff..ec84ec010 100644 --- a/tests/api/AbstractAPITest.php +++ b/tests/api/AbstractAPITest.php @@ -69,7 +69,7 @@ protected function checkGetReferenceNotes( string $message, ?string $param = '', array $expectExclude = [], - array $expectedFullNotes = null + ?array $expectedFullNotes = null ) : void { $messagePrefix = 'Check reference notes '.$message; $response = $this->http->request('GET', 'notes' . $param); @@ -83,7 +83,7 @@ protected function checkReferenceNotes( array $notes, string $messagePrefix, array $expectExclude = [], - array $expectedFullNotes = null + ?array $expectedFullNotes = null ) : void { $this->assertIsArray($notes, $messagePrefix); $notesMap = $this->getNotesIdMap($notes, $messagePrefix); @@ -204,7 +204,7 @@ protected function updateNote( \stdClass &$note, \stdClass $request, \stdClass $expected, - string $etag = null, + ?string $etag = null, int $statusExp = 200 ) { $requestOptions = [ 'json' => $request ];