From 23d9a1607f8edd7866c96aae30c89840553cd277 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Tue, 5 Jul 2022 12:33:12 +0800 Subject: [PATCH] fix: revise passsword & download rendering logic on share view dialog --- .../components/SpreadsheetNavDrawer.vue | 27 ++----------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/packages/nc-gui/components/project/spreadsheet/components/SpreadsheetNavDrawer.vue b/packages/nc-gui/components/project/spreadsheet/components/SpreadsheetNavDrawer.vue index dcc277d79b..fcfeaa83ac 100644 --- a/packages/nc-gui/components/project/spreadsheet/components/SpreadsheetNavDrawer.vue +++ b/packages/nc-gui/components/project/spreadsheet/components/SpreadsheetNavDrawer.vue @@ -868,34 +868,11 @@ export default { this.$e('a:view:delete', { view: view.type }) }, 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) - // todo: url this.shareLink = shared + this.passwordProtect = shared.password !== null + this.allowDownload = shared.download this.showShareModel = true }, copyView(view, i) {