Skip to content

Commit

Permalink
webapp: apply formatter on downstream sources
Browse files Browse the repository at this point in the history
  • Loading branch information
schlimmchen committed Aug 1, 2024
1 parent 77af085 commit 4334e60
Show file tree
Hide file tree
Showing 28 changed files with 1,791 additions and 1,256 deletions.
426 changes: 225 additions & 201 deletions webapp/src/components/BatteryView.vue

Large diffs are not rendered by default.

98 changes: 52 additions & 46 deletions webapp/src/components/HttpRequestSettings.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<template>
<div>
<InputElement
:label="$t('httprequestsettings.url')"
v-model="cfg.url"
type="text"
maxlength="1024"
placeholder="http://admin:[email protected]/status"
prefix="GET "
:tooltip="$t('httprequestsettings.urlDescription')"
wide />
:label="$t('httprequestsettings.url')"
v-model="cfg.url"
type="text"
maxlength="1024"
placeholder="http://admin:[email protected]/status"
prefix="GET "
:tooltip="$t('httprequestsettings.urlDescription')"
wide
/>

<div class="row mb-3">
<label for="auth_type" class="col-sm-4 col-form-label">{{ $t('httprequestsettings.authorization') }}</label>
Expand All @@ -22,42 +23,47 @@
</div>

<InputElement
v-if="cfg.auth_type != 0"
:label="$t('httprequestsettings.username')"
v-model="cfg.username"
type="text"
maxlength="64"
wide />
v-if="cfg.auth_type != 0"
:label="$t('httprequestsettings.username')"
v-model="cfg.username"
type="text"
maxlength="64"
wide
/>

<InputElement
v-if="cfg.auth_type != 0"
:label="$t('httprequestsettings.password')"
v-model="cfg.password"
type="password"
maxlength="64"
wide />
v-if="cfg.auth_type != 0"
:label="$t('httprequestsettings.password')"
v-model="cfg.password"
type="password"
maxlength="64"
wide
/>

<InputElement
:label="$t('httprequestsettings.headerKey')"
v-model="cfg.header_key"
type="text"
maxlength="64"
:tooltip="$t('httprequestsettings.headerKeyDescription')"
wide />
:label="$t('httprequestsettings.headerKey')"
v-model="cfg.header_key"
type="text"
maxlength="64"
:tooltip="$t('httprequestsettings.headerKeyDescription')"
wide
/>

<InputElement
:label="$t('httprequestsettings.headerValue')"
v-model="cfg.header_value"
type="text"
maxlength="256"
wide />
:label="$t('httprequestsettings.headerValue')"
v-model="cfg.header_value"
type="text"
maxlength="256"
wide
/>

<InputElement
:label="$t('httprequestsettings.timeout')"
v-model="cfg.timeout"
type="number"
:postfix="$t('httprequestsettings.milliSeconds')"
wide />
:label="$t('httprequestsettings.timeout')"
v-model="cfg.timeout"
type="number"
:postfix="$t('httprequestsettings.milliSeconds')"
wide
/>
</div>
</template>

Expand All @@ -67,28 +73,28 @@ import type { HttpRequestConfig } from '@/types/HttpRequestConfig';
import InputElement from '@/components/InputElement.vue';
export default defineComponent({
props: { 'modelValue': Object as () => HttpRequestConfig },
props: { modelValue: Object as () => HttpRequestConfig },
computed: {
cfg: {
get(): HttpRequestConfig {
return this.modelValue || {} as HttpRequestConfig;
return this.modelValue || ({} as HttpRequestConfig);
},
set(newValue: HttpRequestConfig): void {
this.$emit('update:modelValue', newValue);
}
}
},
},
},
components: {
InputElement
InputElement,
},
data() {
return {
authTypeList: [
{ key: 0, value: "None" },
{ key: 1, value: "Basic" },
{ key: 2, value: "Digest" },
]
{ key: 0, value: 'None' },
{ key: 1, value: 'Basic' },
{ key: 2, value: 'Digest' },
],
};
}
},
});
</script>
Loading

0 comments on commit 4334e60

Please sign in to comment.