Browse Source

fix: revise passsword & download rendering logic on share view dialog

pull/2552/head
Wing-Kam Wong 2 years ago
parent
commit
23d9a1607f
  1. 27
      packages/nc-gui/components/project/spreadsheet/components/SpreadsheetNavDrawer.vue

27
packages/nc-gui/components/project/spreadsheet/components/SpreadsheetNavDrawer.vue

@ -868,34 +868,11 @@ export default {
this.$e('a:view:delete', { view: view.type }) this.$e('a:view:delete', { view: view.type })
}, },
async genShareLink() { async genShareLink() {
// const sharedViewUrl = await this.$store.dispatch('sqlMgr/ActSqlOp', [
// { dbAlias: this.nodes.dbAlias },
// 'createSharedViewLink',
// {
// model_name: this.table,
// // meta: this.meta,
// query_params: {
// where: this.concatenatedXWhere,
// sort: this.sort,
// fields: Object.keys(this.showFields)
// .filter(f => this.showFields[f])
// .join(','),
// showFields: this.showFields,
// fieldsOrder: this.fieldsOrder,
// extraViewParams: this.extraViewParams,
// selectedViewId: this.selectedViewId,
// columnsWidth: this.columnsWidth
// },
// view_name: this.selectedView.title,
// type: this.selectedView.type,
// show_as: this.selectedView.show_as,
// password: this.sharedViewPassword
// }
// ])
const shared = await this.$api.dbViewShare.create(this.selectedViewId) const shared = await this.$api.dbViewShare.create(this.selectedViewId)
// todo: url // todo: url
this.shareLink = shared this.shareLink = shared
this.passwordProtect = shared.password !== null
this.allowDownload = shared.download
this.showShareModel = true this.showShareModel = true
}, },
copyView(view, i) { copyView(view, i) {

Loading…
Cancel
Save