Skip to content

Commit 087f445

Browse files
Replace custom tooltips with native tooltips
Signed-off-by: julia.kirschenheuter <[email protected]>
1 parent 9bddc38 commit 087f445

24 files changed

+44
-66
lines changed

apps/federatedfilesharing/src/components/PersonalSettings.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2424
{{ t('federatedfilesharing', 'Your Federated Cloud ID:') }}
2525
<strong id="cloudid">{{ cloudId }}</strong>
2626
<NcButton ref="clipboard"
27-
v-tooltip="copyLinkTooltip"
27+
:title="copyLinkTooltip"
28+
:aria-label="copyLinkTooltip"
2829
class="clipboard"
2930
type="tertiary-no-background"
3031
@click.prevent="copyCloudId">
@@ -94,7 +95,6 @@ import Twitter from 'vue-material-design-icons/Twitter'
9495
import Facebook from 'vue-material-design-icons/Facebook'
9596
import Web from 'vue-material-design-icons/Web'
9697
import Clipboard from 'vue-material-design-icons/Clipboard'
97-
import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip'
9898
9999
export default {
100100
name: 'PersonalSettings',
@@ -106,9 +106,6 @@ export default {
106106
Web,
107107
Clipboard,
108108
},
109-
directives: {
110-
Tooltip,
111-
},
112109
data() {
113110
return {
114111
color: loadState('federatedfilesharing', 'color'),

apps/settings/src/components/AppDetails.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,16 @@
7272
:disabled="installing || isLoading"
7373
@click="disable(app.id)">
7474
<input v-if="!app.active && (app.canInstall || app.isCompatible)"
75-
v-tooltip.auto="enableButtonTooltip"
75+
:title="enableButtonTooltip"
76+
:aria-label="enableButtonTooltip"
7677
class="enable primary"
7778
type="button"
7879
:value="enableButtonText"
7980
:disabled="!app.canInstall || installing || isLoading"
8081
@click="enable(app.id)">
8182
<input v-else-if="!app.active && !app.canInstall"
82-
v-tooltip.auto="forceEnableButtonTooltip"
83+
:title="forceEnableButtonTooltip"
84+
:aria-label="forceEnableButtonTooltip"
8385
class="enable force"
8486
type="button"
8587
:value="forceEnableButtonText"

apps/settings/src/components/AuthToken.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,12 @@
3737
<span v-if="wiping" class="wiping-warning">({{ t('settings', 'Marked for remote wipe') }})</span>
3838
</td>
3939
<td>
40-
<span v-tooltip="lastActivity" class="last-activity">{{ lastActivityRelative }}</span>
40+
<span :title="lastActivity" class="last-activity">{{ lastActivityRelative }}</span>
4141
</td>
4242
<td class="more">
4343
<NcActions v-if="!token.current"
44-
v-tooltip.auto="{
45-
content: t('settings', 'Device settings'),
46-
container: 'body'
47-
}"
44+
:title="t('settings', 'Device settings')"
45+
:aria-label="t('settings', 'Device settings')"
4846
:open.sync="actionOpen">
4947
<NcActionCheckbox v-if="token.type === 1"
5048
:checked="token.scope.filesystem"

apps/settings/src/components/AuthTokenSetupDialogue.vue

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@
5555
class="monospaced"
5656
readonly="readonly"
5757
@focus="selectInput">
58+
5859
<a ref="clipboardButton"
59-
v-tooltip="copyTooltipOptions"
60+
:title="copyTooltipOptions"
61+
:aria-label="copyTooltipOptions"
6062
v-clipboard:copy="appPassword"
6163
v-clipboard:success="onCopyPassword"
6264
v-clipboard:error="onCopyPasswordFailed"
@@ -113,24 +115,10 @@ export default {
113115
},
114116
computed: {
115117
copyTooltipOptions() {
116-
const base = {
117-
hideOnTargetClick: false,
118-
trigger: 'manual',
119-
}
120-
121118
if (this.passwordCopied) {
122-
return {
123-
...base,
124-
content: t('settings', 'Copied!'),
125-
show: true,
126-
}
127-
} else {
128-
return {
129-
...base,
130-
content: t('settings', 'Copy'),
131-
show: this.hoveringCopyButton,
132-
}
119+
return t('settings', 'Copied!')
133120
}
121+
return t('settings', 'Copy')
134122
},
135123
},
136124
methods: {

apps/settings/src/components/PersonalInfo/shared/FederationControl.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
:is-supported-scope="supportedScopes.includes(federationScope.name)"
3535
:name="federationScope.name"
3636
:tooltip-disabled="federationScope.tooltipDisabled"
37-
:tooltip="federationScope.tooltip" />
37+
:tooltip="federationScope.tooltip"
38+
:aria-label="federationScope.tooltip" />
3839
</NcActions>
3940
</template>
4041

apps/settings/src/components/PersonalInfo/shared/FederationControlAction.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@
2727
:close-after-click="true"
2828
:disabled="!isSupportedScope"
2929
:icon="iconClass"
30-
:title="displayName"
30+
:title="isSupportedScope ? tooltip : tooltipDisabled"
3131
@click.stop.prevent="updateScope">
32-
{{ isSupportedScope ? tooltip : tooltipDisabled }}
3332
</NcActionButton>
3433
</template>
3534

apps/theming/src/components/BackgroundSettings.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@
6363
<!-- Background set selection -->
6464
<button v-for="shippedBackground in shippedBackgrounds"
6565
:key="shippedBackground.name"
66-
v-tooltip="shippedBackground.details.attribution"
66+
:title="shippedBackground.details.attribution"
67+
:aria-label="shippedBackground.details.attribution"
6768
:class="{ 'icon-loading': loading === shippedBackground.name, 'background--active': backgroundImage === shippedBackground.name }"
6869
:data-color-bright="shippedBackground.details.theming === 'dark'"
6970
:data-user-theming-background-shipped="shippedBackground.name"
@@ -93,7 +94,6 @@ import Check from 'vue-material-design-icons/Check.vue'
9394
import Close from 'vue-material-design-icons/Close.vue'
9495
import debounce from 'debounce'
9596
import NcColorPicker from '@nextcloud/vue/dist/Components/NcColorPicker'
96-
import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip'
9797
import Vibrant from 'node-vibrant'
9898
import { Palette } from 'node-vibrant/lib/color'
9999
import { getFilePickerBuilder } from '@nextcloud/dialogs'
@@ -114,9 +114,6 @@ const picker = getFilePickerBuilder(t('theming', 'Select a background from your
114114
115115
export default {
116116
name: 'BackgroundSettings',
117-
directives: {
118-
Tooltip,
119-
},
120117
121118
components: {
122119
Check,

apps/updatenotification/src/components/UpdateNotification.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
</template>
7272
<template v-else>
7373
{{ t('updatenotification', 'Your version is up to date.') }}
74-
<span v-tooltip.auto="lastCheckedOnString" class="icon-info svg" />
74+
<span :title="lastCheckedOnString" :aria-label="lastCheckedOnString" class="icon-info svg" />
7575
</template>
7676

7777
<template v-if="!isDefaultUpdateServerURL">
@@ -129,7 +129,6 @@ import NcPopoverMenu from '@nextcloud/vue/dist/Components/NcPopoverMenu.js'
129129
import NcMultiselect from '@nextcloud/vue/dist/Components/NcMultiselect.js'
130130
import NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection.js'
131131
import NcNoteCard from '@nextcloud/vue/dist/Components/NcNoteCard.js'
132-
import { VTooltip } from 'v-tooltip'
133132
import ClickOutside from 'vue-click-outside'
134133
import axios from '@nextcloud/axios'
135134
import { loadState } from '@nextcloud/initial-state'
@@ -142,8 +141,6 @@ const logger = getLoggerBuilder()
142141
.detectUser()
143142
.build()
144143
145-
VTooltip.options.defaultHtml = false
146-
147144
export default {
148145
name: 'UpdateNotification',
149146
components: {
@@ -154,7 +151,6 @@ export default {
154151
},
155152
directives: {
156153
ClickOutside,
157-
tooltip: VTooltip,
158154
},
159155
data() {
160156
return {

dist/core-common.js

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

dist/core-common.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)