diff --git a/web/public/js/components/common/file-textarea.js b/web/public/js/components/common/file-textarea.js new file mode 100644 index 00000000..99c89fb9 --- /dev/null +++ b/web/public/js/components/common/file-textarea.js @@ -0,0 +1,26 @@ +Vue.component("file-textarea", { + props: ["value"], + data: function () { + let value = this.value + if (typeof value != "string") { + value = "" + } + return { + realValue: value + } + }, + mounted: function () { + }, + methods: { + drop: function (e) { + let that = this + e.dataTransfer.items[0].getAsFile().text().then(function (data) { + that.setValue(data) + }) + }, + setValue: function (value) { + this.realValue = value + } + }, + template: `` +}) \ No newline at end of file diff --git a/web/views/@default/clusters/grants/create.html b/web/views/@default/clusters/grants/create.html index ee60dda6..e1c7b84d 100644 --- a/web/views/@default/clusters/grants/create.html +++ b/web/views/@default/clusters/grants/create.html @@ -49,8 +49,8 @@ RSA私钥 * - -

用来生成登录SSH公钥的私钥

+ +

用来生成登录SSH公钥的私钥。

diff --git a/web/views/@default/clusters/grants/createPopup.html b/web/views/@default/clusters/grants/createPopup.html index 2f32a624..3725aebd 100644 --- a/web/views/@default/clusters/grants/createPopup.html +++ b/web/views/@default/clusters/grants/createPopup.html @@ -47,7 +47,7 @@ RSA私钥 * - +

用来生成登录SSH公钥的私钥

diff --git a/web/views/@default/clusters/grants/update.html b/web/views/@default/clusters/grants/update.html index c5c88696..477773fd 100644 --- a/web/views/@default/clusters/grants/update.html +++ b/web/views/@default/clusters/grants/update.html @@ -50,7 +50,7 @@ RSA私钥 * - +

用来生成登录SSH公钥的私钥

diff --git a/web/views/@default/clusters/grants/updatePopup.html b/web/views/@default/clusters/grants/updatePopup.html index 92e752b9..99673c44 100644 --- a/web/views/@default/clusters/grants/updatePopup.html +++ b/web/views/@default/clusters/grants/updatePopup.html @@ -49,8 +49,8 @@ RSA私钥 * - -

用来生成登录SSH公钥的私钥

+ +

用来生成登录SSH公钥的私钥。