mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-01-12 09:18:13 +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
|
* @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,
|
faEllipsisH,
|
||||||
faBars,
|
faBars,
|
||||||
faSpinner,
|
faSpinner,
|
||||||
faCaretUp,
|
|
||||||
faCaretDown,
|
faCaretDown,
|
||||||
faLayerGroup,
|
faLayerGroup,
|
||||||
faMinusCircle,
|
faMinusCircle,
|
||||||
|
faExclamationCircle,
|
||||||
} from '@fortawesome/free-solid-svg-icons'
|
} from '@fortawesome/free-solid-svg-icons'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@ -42,10 +42,10 @@ library.add(
|
|||||||
faBars,
|
faBars,
|
||||||
faSpinner,
|
faSpinner,
|
||||||
faGithubAlt,
|
faGithubAlt,
|
||||||
faCaretUp,
|
|
||||||
faCaretDown,
|
faCaretDown,
|
||||||
faLayerGroup,
|
faLayerGroup,
|
||||||
faMinusCircle,
|
faMinusCircle,
|
||||||
|
faExclamationCircle,
|
||||||
);
|
);
|
||||||
|
|
||||||
Vue.component('font-awesome-icon', FontAwesomeIcon)
|
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-content is-size-3 is-size-4-mobile" @click.stop="showAccount(account)">
|
||||||
<div class="tfa-text has-ellipsis">
|
<div class="tfa-text has-ellipsis">
|
||||||
<img :src="'/storage/icons/' + account.icon" v-if="account.icon && $root.appSettings.showAccountsIcons">
|
<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>
|
<span class="is-family-primary is-size-6 is-size-7-mobile has-text-grey ">{{ account.account }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -299,7 +299,8 @@
|
|||||||
id : data.id,
|
id : data.id,
|
||||||
service : data.service,
|
service : data.service,
|
||||||
account : data.account ? data.account : '-',
|
account : data.account ? data.account : '-',
|
||||||
icon : data.icon
|
icon : data.icon,
|
||||||
|
isConsistent : data.isConsistent
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user