为剪贴板添加面包屑

This commit is contained in:
undefined committed 2020-05-04 10:59:15 +08:00
1 parent 9bb94f101d
commit 649f65b17d
11 files changed
+28 -9

No files matched your search

+11 -1
View File
@@ -6,7 +6,12 @@ const { nav } = global.Hydro.lib;
class PasteShowHandler extends Handler {
async get({ docId }) {
const doc = await pastebin.get(docId);
this.response.body = { doc };
const path = [
['Hydro', '/'],
['paste_show', null],
[doc.title, null, true],
];
this.response.body = { path, doc };
this.response.template = 'paste_show.html';
}
}
@@ -17,6 +22,11 @@ class PasteCreateHandler extends Handler {
}
async get() {
const path = [
['Hydro', '/'],
['paste_create', null],
];
this.response.body = { path };
this.response.template = 'paste_create.html';
}