mirror of
https://github.com/beekeeper-studio/beekeeper-studio.git
synced 2026-03-13 10:12:54 +08:00
fix: hide 'Move to top level' option in cloud workspaces
Cloud connections/queries must always be in a folder. The option was silently moving items to the owner's personal folder when null folder_id was submitted. Hidden in the UI; backend now rejects null folder_id for workspace records. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -203,7 +203,7 @@ export default {
|
||||
|
||||
if (this.isCloud || this.foldersSupported) {
|
||||
options.push({ type: 'divider' })
|
||||
if (this.config.connectionFolderId) {
|
||||
if (!this.isCloud && this.config.connectionFolderId) {
|
||||
options.push({ name: 'Move to top level', handler: () => this.moveToRoot() })
|
||||
}
|
||||
options.push(...this.moveToOptions)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
import _ from 'lodash'
|
||||
import { IQueryFolder } from '@/common/interfaces/IQueryFolder'
|
||||
import Vue from 'vue'
|
||||
import { mapState } from 'vuex'
|
||||
import { mapState, mapGetters } from 'vuex'
|
||||
import TimeAgo from 'javascript-time-ago'
|
||||
|
||||
export default Vue.extend({
|
||||
@@ -31,6 +31,7 @@ export default Vue.extend({
|
||||
timeAgo: new TimeAgo('en-US')
|
||||
}),
|
||||
computed: {
|
||||
...mapGetters(['isCloud']),
|
||||
...mapState('data/queryFolders', {'folders': 'items', 'foldersUnsupported': 'unsupported'}),
|
||||
foldersSupported() {
|
||||
return !this.foldersUnsupported
|
||||
@@ -121,7 +122,7 @@ export default Vue.extend({
|
||||
]
|
||||
if (this.foldersSupported || this.folders.length > 0) {
|
||||
options.push({ type: 'divider' })
|
||||
if (this.item.queryFolderId) {
|
||||
if (!this.isCloud && this.item.queryFolderId) {
|
||||
options.push({ name: 'Move to top level', handler: ({ item }) => this.moveToRoot(item) })
|
||||
}
|
||||
options.push(...this.moveToOptions)
|
||||
|
||||
Reference in New Issue
Block a user