mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-12-24 16:09:14 +01:00
Add IsConsistent property to identify undecipherable accounts
This commit is contained in:
parent
289a208847
commit
428c83ad82
@ -39,7 +39,7 @@ class TwoFAccount extends Model implements Sortable
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $appends = ['otpType', 'counter'];
|
||||
protected $appends = ['otpType', 'counter', 'isConsistent'];
|
||||
|
||||
|
||||
/**
|
||||
@ -244,4 +244,17 @@ public function getAccountAttribute($value)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Null empty icon resource has gone
|
||||
*
|
||||
* @param string $value
|
||||
* @return string
|
||||
*
|
||||
*/
|
||||
public function getIsConsistentAttribute($value)
|
||||
{
|
||||
return $this->uri === '*encrypted*' || $this->account === '*encrypted*' ? false : true;
|
||||
}
|
||||
|
||||
}
|
||||
|
4
resources/js/packages/fontawesome.js
vendored
4
resources/js/packages/fontawesome.js
vendored
@ -17,10 +17,10 @@ import {
|
||||
faEllipsisH,
|
||||
faBars,
|
||||
faSpinner,
|
||||
faCaretUp,
|
||||
faCaretDown,
|
||||
faLayerGroup,
|
||||
faMinusCircle,
|
||||
faExclamationCircle,
|
||||
} from '@fortawesome/free-solid-svg-icons'
|
||||
|
||||
import {
|
||||
@ -42,10 +42,10 @@ library.add(
|
||||
faBars,
|
||||
faSpinner,
|
||||
faGithubAlt,
|
||||
faCaretUp,
|
||||
faCaretDown,
|
||||
faLayerGroup,
|
||||
faMinusCircle,
|
||||
faExclamationCircle,
|
||||
);
|
||||
|
||||
Vue.component('font-awesome-icon', FontAwesomeIcon)
|
@ -60,7 +60,7 @@
|
||||
<div class="tfa-content is-size-3 is-size-4-mobile" @click.stop="showAccount(account)">
|
||||
<div class="tfa-text has-ellipsis">
|
||||
<img :src="'/storage/icons/' + account.icon" v-if="account.icon && $root.appSettings.showAccountsIcons">
|
||||
{{ account.service }}
|
||||
{{ account.service }}<font-awesome-icon class="has-text-danger is-size-5 ml-2" v-if="$root.appSettings.useEncryption && account.isConsistent === false" :icon="['fas', 'exclamation-circle']" />
|
||||
<span class="is-family-primary is-size-6 is-size-7-mobile has-text-grey ">{{ account.account }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -299,7 +299,8 @@
|
||||
id : data.id,
|
||||
service : data.service,
|
||||
account : data.account ? data.account : '-',
|
||||
icon : data.icon
|
||||
icon : data.icon,
|
||||
isConsistent : data.isConsistent
|
||||
})
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user