File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import { useStore } from 'vuex'
18
18
import Editor from ' /components/Editor.vue'
19
19
import Doc from ' /src/models/doc'
20
20
import { EDIT_DOCUMENT } from ' /src/store/actions'
21
+ import { useRecentDocs } from ' /src/stores/useRecentDocs'
21
22
22
23
const formatTags = (tags , delimiter = ' , ' ) => {
23
24
return tags .map ((tag ) => ` #${ tag} ` ).join (delimiter)
@@ -48,10 +49,18 @@ export default defineComponent({
48
49
placeholder: new Doc ({ text: formatTags (this .$store .state .context .tags , ' ' ) }),
49
50
}
50
51
},
51
- setup () {
52
+ setup (props ) {
52
53
const appearance = inject (' appearance' )
54
+ const router = useRouter ()
53
55
const store = useStore ()
54
56
const settings = computed (() => store .state .settings .editor )
57
+ const recentDocs = useRecentDocs ()
58
+ const docId = computed (() => props .docId || router .currentRoute .value .params .docId )
59
+
60
+ // Todo: Keep a centralized list of docId exclusions.
61
+ if (docId .value && docId .value !== ' new' ) {
62
+ recentDocs .add (docId .value )
63
+ }
55
64
56
65
return {
57
66
appearance: appearance .value === ' october' ? ' dark' : appearance .value ,
You can’t perform that action at this time.
0 commit comments