mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-19 09:51:35 +02:00
Add explicit button type
This commit is contained in:
@@ -76,7 +76,7 @@
|
||||
{{ $t('twofaccounts.forms.upload_qrcode') }}
|
||||
</label>
|
||||
<!-- scan button that launch camera stream -->
|
||||
<button v-else class="button is-link is-medium is-rounded is-main" @click="capture()">
|
||||
<button v-else type="button" class="button is-link is-medium is-rounded is-main" @click="capture()">
|
||||
{{ $t('twofaccounts.forms.scan_qrcode') }}
|
||||
</button>
|
||||
</div>
|
||||
|
@@ -131,9 +131,9 @@
|
||||
</div>
|
||||
<div class="level-item has-text-centered is-justify-content-start">
|
||||
<div class="buttons">
|
||||
<button class="button is-small is-ghost p-0" @click="addFilter('admin:1')">admin</button>
|
||||
<button class="button is-small is-ghost p-0" @click="addFilter('oauth:github')">github</button>
|
||||
<button class="button is-small is-ghost p-0" @click="addFilter('oauth:openid')">openId</button>
|
||||
<button type="button" class="button is-small is-ghost p-0" @click="addFilter('admin:1')">admin</button>
|
||||
<button type="button" class="button is-small is-ghost p-0" @click="addFilter('oauth:github')">github</button>
|
||||
<button type="button" class="button is-small is-ghost p-0" @click="addFilter('oauth:openid')">openId</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -230,11 +230,11 @@
|
||||
<div class="tags ml-3 is-right">
|
||||
<UseColorMode v-slot="{ mode }">
|
||||
<!-- resend email button -->
|
||||
<button v-if="managedUser.password_reset" class="button tag is-pulled-right" :class="mode == 'dark' ? 'is-dark has-background-link' : 'is-white'" @click="resendPasswordEmail" :title="$t('admin.resend_email_title')">
|
||||
<button type="button" v-if="managedUser.password_reset" class="button tag is-pulled-right" :class="mode == 'dark' ? 'is-dark has-background-link' : 'is-white'" @click="resendPasswordEmail" :title="$t('admin.resend_email_title')">
|
||||
{{ $t('admin.resend_email') }}
|
||||
</button>
|
||||
<!-- reset password button -->
|
||||
<button class="button tag is-pulled-right " :class="mode == 'dark' ? 'is-dark has-background-link' : 'is-white'" @click="resetPassword" :title="$t('admin.reset_password_title')">
|
||||
<button type="button" class="button tag is-pulled-right " :class="mode == 'dark' ? 'is-dark has-background-link' : 'is-white'" @click="resetPassword" :title="$t('admin.reset_password_title')">
|
||||
{{ $t('admin.reset_password') }}
|
||||
</button>
|
||||
</UseColorMode>
|
||||
@@ -260,7 +260,7 @@
|
||||
<div class="tags ml-3 is-right">
|
||||
<UseColorMode v-slot="{ mode }">
|
||||
<!-- manage link -->
|
||||
<button class="button tag is-pulled-right" :class="mode == 'dark' ? 'is-dark has-background-link' : 'is-white'" @click="revokePATs" :title="$t('admin.revoke_all_pat_for_user')">
|
||||
<button type="button" class="button tag is-pulled-right" :class="mode == 'dark' ? 'is-dark has-background-link' : 'is-white'" @click="revokePATs" :title="$t('admin.revoke_all_pat_for_user')">
|
||||
{{ $t('settings.revoke') }}
|
||||
</button>
|
||||
</UseColorMode>
|
||||
@@ -279,7 +279,7 @@
|
||||
<div class="tags ml-3 is-right">
|
||||
<UseColorMode v-slot="{ mode }">
|
||||
<!-- manage link -->
|
||||
<button class="button tag is-pulled-right" :class="mode == 'dark' ? 'is-dark has-background-link' : 'is-white'" :title="$t('admin.revoke_all_devices_for_user')">
|
||||
<button type="button" class="button tag is-pulled-right" :class="mode == 'dark' ? 'is-dark has-background-link' : 'is-white'" :title="$t('admin.revoke_all_devices_for_user')">
|
||||
{{ $t('settings.revoke') }}
|
||||
</button>
|
||||
</UseColorMode>
|
||||
@@ -316,7 +316,7 @@
|
||||
{{ $t('admin.this_is_not_soft_delete') }}
|
||||
</span>
|
||||
</div>
|
||||
<button class="button is-danger" @click="deleteUser" title="delete">
|
||||
<button type="button" class="button is-danger" @click="deleteUser" title="delete">
|
||||
{{ $t('admin.delete_this_user') }}
|
||||
</button>
|
||||
</div>
|
||||
|
@@ -49,7 +49,7 @@
|
||||
{{ group.name }}
|
||||
<!-- delete icon -->
|
||||
<UseColorMode v-slot="{ mode }">
|
||||
<button class="button tag is-pulled-right" :class="mode == 'dark' ? 'is-dark' : 'is-white'" @click="groups.delete(group.id)" :title="$t('commons.delete')">
|
||||
<button type="button" class="button tag is-pulled-right" :class="mode == 'dark' ? 'is-dark' : 'is-white'" @click="groups.delete(group.id)" :title="$t('commons.delete')">
|
||||
{{ $t('commons.delete') }}
|
||||
</button>
|
||||
</UseColorMode>
|
||||
|
@@ -165,10 +165,10 @@
|
||||
<!-- revoke link -->
|
||||
<div class="tags is-pulled-right">
|
||||
<UseColorMode v-slot="{ mode }">
|
||||
<button v-if="token.value" class="button tag" :class="{'is-link': mode != 'dark'}" @click.stop="copyToClipboard(token.value)">
|
||||
<button type="button" v-if="token.value" class="button tag" :class="{'is-link': mode != 'dark'}" @click.stop="copyToClipboard(token.value)">
|
||||
{{ $t('commons.copy') }}
|
||||
</button>
|
||||
<button class="button tag" :class="mode === 'dark' ? 'is-dark':'is-white'" @click="revokeToken(token.id)" :title="$t('settings.revoke')">
|
||||
<button type="button" class="button tag" :class="mode === 'dark' ? 'is-dark':'is-white'" @click="revokeToken(token.id)" :title="$t('settings.revoke')">
|
||||
{{ $t('settings.revoke') }}
|
||||
</button>
|
||||
</UseColorMode>
|
||||
|
@@ -143,7 +143,7 @@
|
||||
{{ displayName(credential) }}
|
||||
<!-- revoke link -->
|
||||
<UseColorMode v-slot="{ mode }">
|
||||
<button class="button tag is-pulled-right" :class="mode === 'dark' ? 'is-dark':'is-white'" @click="revokeCredential(credential.id)" :title="$t('settings.revoke')">
|
||||
<button type="button" class="button tag is-pulled-right" :class="mode === 'dark' ? 'is-dark':'is-white'" @click="revokeCredential(credential.id)" :title="$t('settings.revoke')">
|
||||
{{ $t('settings.revoke') }}
|
||||
</button>
|
||||
</UseColorMode>
|
||||
|
@@ -343,12 +343,12 @@
|
||||
<div class="columns">
|
||||
<UseColorMode v-slot="{ mode }">
|
||||
<div class="column" v-if="showGroupSwitch">
|
||||
<button id="btnHideGroupSwitch" :title="$t('groups.hide_group_selector')" tabindex="1" class="button is-text is-like-text" :class="{'has-text-grey' : mode != 'dark'}" @click.stop="showGroupSwitch = !showGroupSwitch">
|
||||
<button type="button" id="btnHideGroupSwitch" :title="$t('groups.hide_group_selector')" tabindex="1" class="button is-text is-like-text" :class="{'has-text-grey' : mode != 'dark'}" @click.stop="showGroupSwitch = !showGroupSwitch">
|
||||
{{ $t('groups.select_accounts_to_show') }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="column" v-else>
|
||||
<button id="btnShowGroupSwitch" :title="$t('groups.show_group_selector')" tabindex="1" class="button is-text is-like-text" :class="{'has-text-grey' : mode != 'dark'}" @click.stop="showGroupSwitch = !showGroupSwitch">
|
||||
<button type="button" id="btnShowGroupSwitch" :title="$t('groups.show_group_selector')" tabindex="1" class="button is-text is-like-text" :class="{'has-text-grey' : mode != 'dark'}" @click.stop="showGroupSwitch = !showGroupSwitch">
|
||||
{{ groups.current }} ({{ twofaccounts.filteredCount }})
|
||||
<FontAwesomeIcon :icon="['fas', 'caret-down']" />
|
||||
</button>
|
||||
@@ -432,7 +432,7 @@
|
||||
<span v-else>
|
||||
<!-- get hotp button -->
|
||||
<UseColorMode v-slot="{ mode }">
|
||||
<button class="button tag" :class="mode == 'dark' ? 'is-dark' : 'is-white'" @click="showOTP(account)" :title="$t('twofaccounts.import.import_this_account')">
|
||||
<button type="button" class="button tag" :class="mode == 'dark' ? 'is-dark' : 'is-white'" @click="showOTP(account)" :title="$t('twofaccounts.import.import_this_account')">
|
||||
{{ $t('commons.generate') }}
|
||||
</button>
|
||||
</UseColorMode>
|
||||
@@ -441,10 +441,10 @@
|
||||
</transition>
|
||||
<transition name="popLater" v-if="user.preferences.showOtpAsDot && user.preferences.revealDottedOTP">
|
||||
<div v-show="user.preferences.getOtpOnRequest == false && !bus.inManagementMode" class="has-text-right">
|
||||
<button v-if="revealPassword == account.id" class="pr-0 button is-ghost has-text-grey-dark" @click.stop="revealPassword = null">
|
||||
<button v-if="revealPassword == account.id" type="button" class="pr-0 button is-ghost has-text-grey-dark" @click.stop="revealPassword = null">
|
||||
<font-awesome-icon :icon="['fas', 'eye']" />
|
||||
</button>
|
||||
<button v-else class="pr-0 button is-ghost has-text-grey-dark" @click.stop="revealPassword = account.id">
|
||||
<button v-else type="button" class="pr-0 button is-ghost has-text-grey-dark" @click.stop="revealPassword = account.id">
|
||||
<font-awesome-icon :icon="['fas', 'eye-slash']" />
|
||||
</button>
|
||||
</div>
|
||||
|
@@ -428,7 +428,7 @@
|
||||
<input inert class="file-input" type="file" accept="image/*" v-on:change="uploadIcon" ref="iconInput">
|
||||
<FontAwesomeIcon :icon="['fas', 'image']" size="2x" />
|
||||
</label>
|
||||
<button class="delete delete-icon-button is-medium" v-if="tempIcon" @click.prevent="deleteTempIcon"></button>
|
||||
<button type="button" class="delete delete-icon-button is-medium" v-if="tempIcon" @click.prevent="deleteTempIcon"></button>
|
||||
<OtpDisplay
|
||||
ref="OtpDisplayForQuickForm"
|
||||
v-bind="form.data()"
|
||||
@@ -515,7 +515,7 @@
|
||||
</div>
|
||||
<span class="tag is-large" :class="mode =='dark' ? 'is-dark' : 'is-white'" v-if="tempIcon">
|
||||
<img class="icon-preview" :src="$2fauth.config.subdirectory + '/storage/icons/' + tempIcon" :alt="$t('twofaccounts.icon_to_illustrate_the_account')">
|
||||
<button class="clear-selection delete is-small" @click.prevent="deleteTempIcon" :aria-label="$t('twofaccounts.remove_icon')"></button>
|
||||
<button type="button" class="clear-selection delete is-small" @click.prevent="deleteTempIcon" :aria-label="$t('twofaccounts.remove_icon')"></button>
|
||||
</span>
|
||||
</UseColorMode>
|
||||
</div>
|
||||
|
@@ -409,12 +409,12 @@
|
||||
<div v-if="account.imported === -1" class="tags is-flex-wrap-nowrap">
|
||||
<!-- discard button -->
|
||||
<UseColorMode v-slot="{ mode }">
|
||||
<button class="button tag" :class="{'is-dark has-text-grey-light' : mode == 'dark'}" @click="discardAccount(index)" :title="$t('twofaccounts.import.discard_this_account')">
|
||||
<button type="button" class="button tag" :class="{'is-dark has-text-grey-light' : mode == 'dark'}" @click="discardAccount(index)" :title="$t('twofaccounts.import.discard_this_account')">
|
||||
<FontAwesomeIcon :icon="['fas', 'trash']" />
|
||||
</button>
|
||||
</UseColorMode>
|
||||
<!-- import button -->
|
||||
<button v-if="account.id > -2" class="button tag is-link" @click="createAccount(index)" :title="$t('twofaccounts.import.import_this_account')">
|
||||
<button v-if="account.id > -2" type="button" class="button tag is-link" @click="createAccount(index)" :title="$t('twofaccounts.import.import_this_account')">
|
||||
{{ $t('twofaccounts.import.to_import') }}
|
||||
</button>
|
||||
</div>
|
||||
@@ -447,18 +447,18 @@
|
||||
</div>
|
||||
<!-- discard links -->
|
||||
<div v-if="importableCount > 0" class="mt-2 is-size-7 is-pulled-right">
|
||||
<button v-if="duplicateCount" @click="discardDuplicates()" class="has-text-grey button is-small is-ghost">{{ $t('twofaccounts.import.discard_duplicates') }} ({{duplicateCount}})</button>
|
||||
<button @click="discardAccounts()" class="has-text-grey button is-small is-ghost">{{ $t('twofaccounts.import.discard_all') }}</button>
|
||||
<button v-if="duplicateCount" @click="discardDuplicates()" type="button" class="has-text-grey button is-small is-ghost">{{ $t('twofaccounts.import.discard_duplicates') }} ({{duplicateCount}})</button>
|
||||
<button @click="discardAccounts()" type="button" class="has-text-grey button is-small is-ghost">{{ $t('twofaccounts.import.discard_all') }}</button>
|
||||
</div>
|
||||
<div v-if="importedCount == exportedAccounts.length" class="mt-2 is-size-7 is-pulled-right">
|
||||
<button @click="exportedAccounts = []" class="has-text-grey button is-small is-ghost">{{ $t('commons.clear') }}</button>
|
||||
<button @click="exportedAccounts = []" type="button" class="has-text-grey button is-small is-ghost">{{ $t('commons.clear') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- footer -->
|
||||
<VueFooter :showButtons="true">
|
||||
<!-- Import all button -->
|
||||
<p class="control" v-if="importableCount > 0">
|
||||
<button class="button is-link is-rounded is-focus" @click="createAccounts">
|
||||
<button type="button" class="button is-link is-rounded is-focus" @click="createAccounts">
|
||||
<span>{{ $t('twofaccounts.import.import_all') }} ({{ importableCount }})</span>
|
||||
<!-- <span class="icon is-small">
|
||||
<FontAwesomeIcon :icon="['fas', 'qrcode']" />
|
||||
|
Reference in New Issue
Block a user