mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-23 17:29:05 +01:00
[Client:Mobile] Implement file rename
This commit is contained in:
parent
56008dac6a
commit
7e20a544a4
@ -183,7 +183,19 @@
|
|||||||
@bytes-to-size = require '../../../common/scripts/bytes-to-size.js'
|
@bytes-to-size = require '../../../common/scripts/bytes-to-size.js'
|
||||||
@get-gcd = require '../../../common/scripts/gcd.js'
|
@get-gcd = require '../../../common/scripts/gcd.js'
|
||||||
|
|
||||||
|
@mixin \api
|
||||||
|
|
||||||
@file = @opts.file
|
@file = @opts.file
|
||||||
@kind = @file.type.split \/ .0
|
@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>
|
</script>
|
||||||
</mk-drive-file-viewer>
|
</mk-drive-file-viewer>
|
||||||
|
Loading…
Reference in New Issue
Block a user