diff --git a/src/components/values/BlobValue.vue b/src/components/values/BlobValue.vue
index 1d9365816..6f3053191 100644
--- a/src/components/values/BlobValue.vue
+++ b/src/components/values/BlobValue.vue
@@ -31,14 +31,19 @@
:style="{'max-width': windowWidth-limitingFactor + 'px'}">{{ decodedValue }}
+
{{ decodedValue }}
-
+
+
+
+
{{ decodedValue }}
@@ -83,10 +88,10 @@ export default defineComponent({
base64Toggler: Function
},
- methods: {
- base64TogglerFn() {
+ watch: {
+ base64OptionSelected(option: string) {
if (this.base64Toggler) {
- this.base64Toggler()
+ this.base64Toggler(option)
}
}
},
@@ -94,7 +99,12 @@ export default defineComponent({
setup(props) {
const windowWidth = inject('windowWidth', 1280)
const isMediumScreen = inject('isMediumScreen', true)
+
const base64regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
+
+ type base64OptionsTypes = 'RAW' | 'BASE64_DECODED'
+ const base64OptionSelected = ref
('RAW')
+ const base64Options = ['RAW', "BASE64_DECODED"] as base64OptionsTypes[]
const isURL = computed(() => {
let result: boolean
@@ -153,6 +163,10 @@ export default defineComponent({
const initialLoading = inject(initialLoadingKey, ref(false))
+ const makeBase64OptionLabels = (value: base64OptionsTypes) => {
+ return value === "RAW" ? "Original data" : "Decoded data"
+ }
+
return {
isMediumScreen,
windowWidth,
@@ -161,6 +175,9 @@ export default defineComponent({
decodedValue,
initialLoading,
isBlobValueBase64candidate,
+ base64Options,
+ base64OptionSelected,
+ makeBase64OptionLabels
}
}
})
diff --git a/src/pages/AccountDetails.vue b/src/pages/AccountDetails.vue
index cdbb72a1a..cc0e39dfa 100644
--- a/src/pages/AccountDetails.vue
+++ b/src/pages/AccountDetails.vue
@@ -485,8 +485,12 @@ export default defineComponent({
// base64 decoding controler
//
const base64Option = ref(false)
- const base64Toggler = () => {
- base64Option.value = !base64Option.value
+ const base64Toggler = (base64SelectedOption: string) => {
+ if (base64SelectedOption === "RAW") {
+ base64Option.value = false
+ } else {
+ base64Option.value = true
+ }
}
return {