diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-02-17 05:47:09 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-02-17 05:47:09 +0900 |
| commit | 27287b26a34cccf11d50c12ff40aa66fb55cf53b (patch) | |
| tree | b192a78b6f2f449dc8fd33ff133f7517c5b88c4e /src | |
| parent | NEW FEATURE: Add url upload (diff) | |
| download | misskey-27287b26a34cccf11d50c12ff40aa66fb55cf53b.tar.gz misskey-27287b26a34cccf11d50c12ff40aa66fb55cf53b.tar.bz2 misskey-27287b26a34cccf11d50c12ff40aa66fb55cf53b.zip | |
[Client:Mobile] Implement file rename
Diffstat (limited to 'src')
| -rw-r--r-- | src/web/app/mobile/tags/drive/file-viewer.tag | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/web/app/mobile/tags/drive/file-viewer.tag b/src/web/app/mobile/tags/drive/file-viewer.tag index 406f2f09fb..48a3758150 100644 --- a/src/web/app/mobile/tags/drive/file-viewer.tag +++ b/src/web/app/mobile/tags/drive/file-viewer.tag @@ -183,7 +183,19 @@ @bytes-to-size = require '../../../common/scripts/bytes-to-size.js' @get-gcd = require '../../../common/scripts/gcd.js' + @mixin \api + @file = @opts.file @kind = @file.type.split \/ .0 + + @rename = ~> + name = window.prompt '名前を変更' @file.name + if name? and name != '' and name != @file.name + @api \drive/files/update do + file_id: @file.id + name: name + .then ~> + @parent.cf @file + </script> </mk-drive-file-viewer> |