|
46 | 46 | </el-menu-item> |
47 | 47 | </el-submenu> |
48 | 48 | <el-menu-item index="1-4" @click="showInstanceInfo">{{ labels.InstanceInfo }}</el-menu-item> |
| 49 | + <el-menu-item index="1-5" @click="showAbout">{{ labels.About }}</el-menu-item> |
49 | 50 | </el-submenu> |
50 | 51 | </el-menu> |
51 | 52 |
|
|
175 | 176 | </template> |
176 | 177 | </span> |
177 | 178 | </el-dialog> |
| 179 | + |
| 180 | + <el-dialog |
| 181 | + :before-close="() => showAboutDialog = false" |
| 182 | + :modal-append-to-body="false" |
| 183 | + :title="labels.About" |
| 184 | + :visible="showAboutDialog" |
| 185 | + width="30%"> |
| 186 | + <div style="user-select: text">{{ aboutDialogDesignerVersionText }}</div> |
| 187 | + <div style="user-select: text">{{ aboutDialogBackendVersionText }}</div> |
| 188 | + <span slot="footer" class="dialog-footer"> |
| 189 | + <el-button @click="showAboutDialog = false">{{ labels.ButtonTextOk }}</el-button> |
| 190 | + </span> |
| 191 | + </el-dialog> |
178 | 192 | </div> |
| 193 | + |
179 | 194 | <script type="application/javascript"> |
180 | 195 | function toolbar_Init(me) { |
181 | 196 | const data = me.VueConfig.data; |
182 | 197 | me.VueConfig.methods.UpdateLanguage = function () { |
183 | 198 | data.labels = { |
184 | 199 | ...WorkflowDesignerConstants.ToolbarLabel, |
185 | 200 | ...WorkflowDesignerConstants.Logs, |
| 201 | + ButtonTextOk: WorkflowDesignerConstants.ButtonTextOk, |
186 | 202 | ButtonTextYes: WorkflowDesignerConstants.ButtonTextYes, |
187 | 203 | ButtonTextCancel: WorkflowDesignerConstants.ButtonTextCancel, |
188 | 204 | InformationCopiedToClipboardAndConsole: WorkflowDesignerConstants.InformationCopiedToClipboardAndConsole, |
189 | 205 | InformationLoggedToConsole: WorkflowDesignerConstants.InformationLoggedToConsole, |
| 206 | + DesignerVersion: WorkflowDesignerConstants.DesignerVersion, |
| 207 | + BackendVersion: WorkflowDesignerConstants.BackendVersion, |
| 208 | + ClipboardAccessDenied: WorkflowDesignerConstants.ClipboardAccessDenied |
190 | 209 | }; |
191 | 210 | } |
192 | 211 |
|
|
204 | 223 | data.LogEnabled = false; |
205 | 224 | data.language = {}; |
206 | 225 | data.languagesList = []; |
207 | | - |
| 226 | + data.aboutDialogDesignerVersionText = ''; |
| 227 | + data.aboutDialogBackendVersionText = ''; |
| 228 | + data.showAboutDialog = false; |
208 | 229 | me.VueConfig.methods.changeLogEnabled = isProcess |
209 | 230 | ? designer.changelogenabled : me.graph.setLogEnabled; |
210 | 231 |
|
|
442 | 463 | console.info('Instance info', data) |
443 | 464 |
|
444 | 465 | const {notify} = me.VueConfig.methods; |
445 | | - navigator.clipboard.writeText(data).then( |
446 | | - () => notify(me.VueConfig.data.labels.InformationCopiedToClipboardAndConsole), |
447 | | - () => notify(me.VueConfig.data.labels.InformationLoggedToConsole) |
448 | | - ); |
| 466 | + |
| 467 | + // Checking if the Clipboard API is available |
| 468 | + if (navigator.clipboard) { |
| 469 | + navigator.clipboard.writeText(data).then( |
| 470 | + () => notify(me.VueConfig.data.labels.InformationCopiedToClipboardAndConsole) |
| 471 | + ); |
| 472 | + } else { |
| 473 | + notify(me.VueConfig.data.labels.ClipboardAccessDenied, 'error'); |
| 474 | + } |
449 | 475 | }) |
450 | 476 | } |
| 477 | + |
| 478 | + me.VueConfig.methods.showAbout = function () { |
| 479 | + const versionInfo = me.graph.designer?.getAbout(); |
| 480 | + this.aboutDialogDesignerVersionText = me.VueConfig.data.labels.DesignerVersion + ": " + versionInfo.designerVersion; |
| 481 | + this.aboutDialogBackendVersionText = me.VueConfig.data.labels.BackendVersion + ": " + me.graph.designer.backendVersion; |
| 482 | + this.showAboutDialog = true; |
| 483 | + } |
451 | 484 | } |
452 | 485 | </script> |
0 commit comments