diff --git a/src/components/CardWidget.vue b/src/components/CardWidget.vue
index b622128..710ef71 100644
--- a/src/components/CardWidget.vue
+++ b/src/components/CardWidget.vue
@@ -4,6 +4,7 @@
footer-tag="footer"
no-body
class="mb-4 card-custom"
+ :class="highlighted ? 'highlight' : ''"
>
Citadel Version
@@ -582,6 +602,7 @@ import useSystemStore from '../store/system';
import useUserStore from '../store/user';
import {defineComponent, DefineComponent} from 'vue';
import useToast from '../utils/toast';
+import ChannelSelector from '../components/ChannelSelector.vue';
export default defineComponent({
components: {
@@ -599,6 +620,7 @@ export default defineComponent({
BIconCheckCircleFill,
BellIcon: BellIcon as DefineComponent,
RefreshIcon: RefreshIcon as DefineComponent,
+ ChannelSelector,
},
setup() {
const sdkStore = useSdkStore();
@@ -622,6 +644,7 @@ export default defineComponent({
loadingDebug: false,
debugFailed: false,
showDmesg: false,
+ showChannelSelectorModal: false,
authenticatorToken: '',
} as {
currentPassword: string;
@@ -639,6 +662,9 @@ export default defineComponent({
showDmesg: boolean;
authenticatorToken: string;
pollUpdateStatus?: number;
+ isCorrectOtp: boolean;
+ isIncorrectOtp: boolean;
+ showChannelSelectorModal: boolean;
};
},
computed: {
@@ -654,9 +680,11 @@ export default defineComponent({
if (typeof this.systemStore.debugStatus === 'string') {
return 'Error loading data!';
}
- return this.showDmesg
- ? this.systemStore.debugStatus.dmesg
- : this.systemStore.debugStatus.debug;
+ return (
+ this.showDmesg
+ ? this.systemStore.debugStatus.dmesg
+ : this.systemStore.debugStatus.debug
+ ) as string;
},
debugFilename(): string {
const type: string = this.showDmesg ? 'dmesg' : 'debug';
@@ -698,7 +726,7 @@ export default defineComponent({
}
},
methods: {
- setTotpToken(totpToken) {
+ setTotpToken(totpToken: string) {
this.totpToken = totpToken;
},
async enableTwoFactorAuth() {
@@ -768,7 +796,7 @@ export default defineComponent({
async changePassword() {
this.isChangingPassword = true;
this.isIncorrectPassword = false;
- this.isIncorrectTotp = false;
+ this.isIncorrectOtp = false;
try {
await this.sdkStore.citadel.manager.auth.changePassword(
@@ -788,7 +816,7 @@ export default defineComponent({
const isIncorrectTotp = errorString.includes('Incorrect 2FA code');
this.isIncorrectPassword = isIncorrectPassword;
- this.isIncorrectTotp = isIncorrectTotp;
+ this.isIncorrectOtp = isIncorrectTotp;
this.isChangingPassword = false;
return;
@@ -838,6 +866,12 @@ export default defineComponent({
this.loadingDebug = false;
(this.$refs['debug-modal'] as {hide: () => void}).hide();
},
+ async openChannelModal() {
+ this.showChannelSelectorModal = true;
+ },
+ closeChannelModal() {
+ this.showChannelSelectorModal = false;
+ },
downloadTextFile(contents: string, fileName: string) {
const blob = new Blob([contents], {
type: 'text/plain;charset=utf-8;',