OpenWopiLink, option title is maintened (replace button by options)

This commit is contained in:
2022-02-09 18:04:12 +01:00
parent 3ffeaf419a
commit e7a6742964
4 changed files with 15 additions and 35 deletions

View File

@@ -2,10 +2,10 @@
<a v-if="isOpenDocument"
class="btn" :class="[
isChangeIcon ? 'change-icon' : '',
isChangeClass ? button.changeClass : 'btn-wopilink' ]"
isChangeClass ? options.changeClass : 'btn-wopilink' ]"
@click="openModal">
<i v-if="isChangeIcon" class="fa me-2" :class="button.changeIcon"></i>
<i v-if="isChangeIcon" class="fa me-2" :class="options.changeIcon"></i>
<span v-if="!noText">
{{ $t('online_edit_document') }}
@@ -22,7 +22,7 @@
<template v-slot:header>
<img class="logo" :src="logo" height="45"/>
<span class="ms-auto me-3">
<span v-if="title">{{ title }}</span>
<span v-if="options.title">{{ options.title }}</span>
</span>
<!--
<a class="btn btn-outline-light">
@@ -75,15 +75,11 @@ export default {
type: String,
required: true
},
title: {
type: String,
required: false
},
type: {
type: String,
required: true
},
button: {
options: {
type: Object,
required: false
}
@@ -179,20 +175,20 @@ export default {
return false;
},
noText() {
if (typeof this.button.noText !== 'undefined') {
return this.button.noText === true;
if (typeof this.options.noText !== 'undefined') {
return this.options.noText === true;
}
return false;
},
isChangeIcon() {
if (typeof this.button.changeIcon !== 'undefined') {
return (!(this.button.changeIcon === null || this.button.changeIcon === ''))
if (typeof this.options.changeIcon !== 'undefined') {
return (!(this.options.changeIcon === null || this.options.changeIcon === ''))
}
return false;
},
isChangeClass() {
if (typeof this.button.changeClass !== 'undefined') {
return (!(this.button.changeClass === null || this.button.changeClass === ''))
if (typeof this.options.changeClass !== 'undefined') {
return (!(this.options.changeClass === null || this.options.changeClass === ''))
}
return false;
}