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 +