File tree Expand file tree Collapse file tree 3 files changed +8
-13
lines changed
Expand file tree Collapse file tree 3 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ public function index(int $pruneBefore = 0) : JSONResponse {
7979 return $ note ->getData ([ 'content ' ]);
8080 }
8181 }, $ data ['notes ' ]);
82- if ($ lastViewedNote ) {
82+ if ($ lastViewedNote && ! $ pruneBefore ) {
8383 // check if note exists
8484 try {
8585 $ this ->notesService ->get ($ userId , $ lastViewedNote );
Original file line number Diff line number Diff line change @@ -180,7 +180,9 @@ export default {
180180 if (availableNotes .length > 0 ) {
181181 this .routeToNote (availableNotes[0 ].id )
182182 } else {
183- this .$router .push ({ name: ' welcome' })
183+ if (this .$route .name !== ' welcome' ) {
184+ this .$router .push ({ name: ' welcome' })
185+ }
184186 }
185187 },
186188
Original file line number Diff line number Diff line change 2020 >
2121 {{ t('notes', 'Details') }}
2222 </ActionButton >
23- <ActionButton v-if =" !preview"
24- icon =" icon-toggle"
25- v-tooltip.left =" t('notes', 'CTRL + /')"
26- @click =" onTogglePreview"
27- >
28- {{ t('notes', 'Preview') }}
29- </ActionButton >
30- <ActionButton v-else
31- icon =" icon-rename"
23+ <ActionButton
3224 v-tooltip.left =" t('notes', 'CTRL + /')"
25+ :icon =" preview ? 'icon-rename' : 'icon-toggle'"
3326 @click =" onTogglePreview"
3427 >
35- {{ t('notes', 'Edit') }}
28+ {{ preview ? t('notes', 'Edit') : t('notes', 'Preview ') }}
3629 </ActionButton >
3730 <ActionButton
3831 icon =" icon-fullscreen"
@@ -317,7 +310,7 @@ export default {
317310 const note = {
318311 ... this .note ,
319312 }
320- store .commit (' add ' , note)
313+ store .commit (' updateNote ' , note)
321314 saveNoteManually (this .note .id )
322315 },
323316 },
You can’t perform that action at this time.
0 commit comments