[Client] 良い感じにした
This commit is contained in:
parent
c9b4a9e5e9
commit
2943cf4899
1 changed files with 12 additions and 8 deletions
|
@ -25,27 +25,31 @@
|
||||||
@Progress.done!
|
@Progress.done!
|
||||||
|
|
||||||
@refs.ui.refs.browser.on \move-root ~>
|
@refs.ui.refs.browser.on \move-root ~>
|
||||||
@ui.trigger \title '<i class="fa fa-cloud"></i>ドライブ'
|
|
||||||
|
|
||||||
# Rewrite URL
|
# Rewrite URL
|
||||||
history.push-state null null '/i/drive'
|
history.push-state null null '/i/drive'
|
||||||
|
|
||||||
@refs.ui.refs.browser.on \open-folder (folder, silent) ~>
|
document.title = 'Misskey Drive'
|
||||||
# TODO: escape html characters in folder.name
|
@ui.trigger \title '<i class="fa fa-cloud"></i>ドライブ'
|
||||||
@ui.trigger \title '<i class="fa fa-folder-open"></i>' + folder.name
|
|
||||||
|
|
||||||
|
@refs.ui.refs.browser.on \open-folder (folder, silent) ~>
|
||||||
if !silent
|
if !silent
|
||||||
# Rewrite URL
|
# Rewrite URL
|
||||||
history.push-state null null '/i/drive/folder/' + folder.id
|
history.push-state null null '/i/drive/folder/' + folder.id
|
||||||
|
|
||||||
|
document.title = folder.name + ' | Misskey Drive'
|
||||||
|
# TODO: escape html characters in folder.name
|
||||||
|
@ui.trigger \title '<i class="fa fa-folder-open"></i>' + folder.name
|
||||||
|
|
||||||
@refs.ui.refs.browser.on \open-file (file, silent) ~>
|
@refs.ui.refs.browser.on \open-file (file, silent) ~>
|
||||||
|
if !silent
|
||||||
|
# Rewrite URL
|
||||||
|
history.push-state null null '/i/drive/file/' + file.id
|
||||||
|
|
||||||
|
document.title = file.name + ' | Misskey Drive'
|
||||||
# TODO: escape html characters in file.name
|
# TODO: escape html characters in file.name
|
||||||
@ui.trigger \title '<mk-file-type-icon class="icon"></mk-file-type-icon>' + file.name
|
@ui.trigger \title '<mk-file-type-icon class="icon"></mk-file-type-icon>' + file.name
|
||||||
riot.mount \mk-file-type-icon do
|
riot.mount \mk-file-type-icon do
|
||||||
type: file.type
|
type: file.type
|
||||||
|
|
||||||
if !silent
|
|
||||||
# Rewrite URL
|
|
||||||
history.push-state null null '/i/drive/file/' + file.id
|
|
||||||
</script>
|
</script>
|
||||||
</mk-drive-page>
|
</mk-drive-page>
|
||||||
|
|
Loading…
Reference in a new issue