diff --git a/frontend/src/components/Main/Explore/QueryConsole/SaveSnippetDialog.vue b/frontend/src/components/Main/Explore/QueryConsole/SaveSnippetDialog.vue index a373732..fbb0b03 100644 --- a/frontend/src/components/Main/Explore/QueryConsole/SaveSnippetDialog.vue +++ b/frontend/src/components/Main/Explore/QueryConsole/SaveSnippetDialog.vue @@ -4,12 +4,17 @@ :title="$tc('SaveSQL')" :visible.sync="iVisible" :modal="false" + :append-to-body="true" width="40%" > + + {{ $tc('Private') }} + {{ $tc('Public') }} + @@ -39,7 +44,8 @@ export default { data() { return { form: { - name: '' + name: '', + scope: 'private' } } }, @@ -69,7 +75,8 @@ export default { axios.post('/api/v1/ops/adhocs/', { name: this.form.name, args: this.content, - module: store.getters.profile?.dbType + module: store.getters.profile?.dbType, + scope: this.form.scope }, { headers: { 'X-CSRFToken': csrfToken diff --git a/frontend/src/i18n/langs/en.json b/frontend/src/i18n/langs/en.json index 3b4c929..df4e35f 100644 --- a/frontend/src/i18n/langs/en.json +++ b/frontend/src/i18n/langs/en.json @@ -7,6 +7,8 @@ "notAlphanumericUnderscore": "Only alphanumeric characters and underscores are allowed.", "notParenthesis": "Parentheses are not allowed.", "InvalidJson": "Invalid JSON format.", - "requiredHasUserNameMapped": "Username attr is required." + "requiredHasUserNameMapped": "Username attr is required.", + "Public": "Public", + "Private": "Private" } diff --git a/frontend/src/i18n/langs/ja.json b/frontend/src/i18n/langs/ja.json index cd77652..097eb6c 100644 --- a/frontend/src/i18n/langs/ja.json +++ b/frontend/src/i18n/langs/ja.json @@ -7,5 +7,7 @@ "notAlphanumericUnderscore": "仅支持字母、数字和下划线。", "notParenthesis": "不能包含括号。", "InvalidJson": "JSON 格式错误.", - "requiredHasUserNameMapped": "用户名属性是必需的。" + "requiredHasUserNameMapped": "用户名属性是必需的。", + "Public": "公開", + "Private": "非公開" } diff --git a/frontend/src/i18n/langs/zh.json b/frontend/src/i18n/langs/zh.json index cd77652..708b4ea 100644 --- a/frontend/src/i18n/langs/zh.json +++ b/frontend/src/i18n/langs/zh.json @@ -7,5 +7,7 @@ "notAlphanumericUnderscore": "仅支持字母、数字和下划线。", "notParenthesis": "不能包含括号。", "InvalidJson": "JSON 格式错误.", - "requiredHasUserNameMapped": "用户名属性是必需的。" + "requiredHasUserNameMapped": "用户名属性是必需的。", + "Public": "公有", + "Private": "私有" } diff --git a/frontend/src/i18n/langs/zh_Hant.json b/frontend/src/i18n/langs/zh_Hant.json index cd77652..708b4ea 100644 --- a/frontend/src/i18n/langs/zh_Hant.json +++ b/frontend/src/i18n/langs/zh_Hant.json @@ -7,5 +7,7 @@ "notAlphanumericUnderscore": "仅支持字母、数字和下划线。", "notParenthesis": "不能包含括号。", "InvalidJson": "JSON 格式错误.", - "requiredHasUserNameMapped": "用户名属性是必需的。" + "requiredHasUserNameMapped": "用户名属性是必需的。", + "Public": "公有", + "Private": "私有" }