mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 01:38:19 +08:00
为剪贴板添加面包屑
This commit is contained in:
1 parent
9bb94f101d
commit
649f65b17d
11 files changed
+28
-9
No files matched your search
@@ -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';
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user