修复添加信号源时点击选择文件超链接导致页面刷新的BUG

完善时钟配置对话框
This commit is contained in:
fangxiang 2022-05-19 11:35:58 +08:00
parent 575774df8b
commit ee0dd21bc1
6 changed files with 69 additions and 10 deletions

View File

@ -118,6 +118,7 @@
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-input <q-input
:disable="clock_entity.type == 2"
v-model="clock_entity.background_color" v-model="clock_entity.background_color"
:rules="['anyColor']" :rules="['anyColor']"
> >
@ -133,6 +134,9 @@
</q-icon> </q-icon>
</template> </template>
</q-input> </q-input>
<q-tooltip v-if="clock_entity.type == 2">
{{ $t("only normal clock support") }}</q-tooltip
>
</q-item-section> </q-item-section>
</q-item> </q-item>
</q-item-section> </q-item-section>
@ -145,12 +149,16 @@
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-select <q-select
:disable="clock_entity.type == 2"
v-model="clock_entity.date_format" v-model="clock_entity.date_format"
:options="date_format_options" :options="date_format_options"
emit-value emit-value
map-options map-options
> >
</q-select> </q-select>
<q-tooltip v-if="clock_entity.type == 2">
{{ $t("only normal clock support") }}</q-tooltip
>
</q-item-section> </q-item-section>
</q-item> </q-item>
</q-item-section> </q-item-section>
@ -162,12 +170,16 @@
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-select <q-select
:disable="clock_entity.type == 2"
v-model="clock_entity.time_format" v-model="clock_entity.time_format"
:options="time_format_options" :options="time_format_options"
emit-value emit-value
map-options map-options
> >
</q-select> </q-select>
<q-tooltip v-if="clock_entity.type == 2">
{{ $t("only normal clock support") }}</q-tooltip
>
</q-item-section> </q-item-section>
</q-item> </q-item>
</q-item-section> </q-item-section>
@ -180,13 +192,17 @@
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-input <q-input
:disable="clock_entity.multiple_lines" :disable="
clock_entity.type == 0 && clock_entity.multiple_lines
"
v-model="clock_entity.text" v-model="clock_entity.text"
/> />
</q-item-section> </q-item-section>
</q-item> </q-item>
</q-item-section> </q-item-section>
<q-tooltip v-if="clock_entity.multiple_lines"> <q-tooltip
v-if="clock_entity.type == 0 && clock_entity.multiple_lines"
>
{{ {{
$t( $t(
"the current property is only valid for single-line displays" "the current property is only valid for single-line displays"
@ -204,10 +220,15 @@
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-checkbox <q-checkbox
:disable="clock_entity.type == 2"
left-label left-label
v-model="clock_entity.show_time" v-model="clock_entity.show_time"
:label="$t('time')" :label="$t('time')"
/> >
<q-tooltip v-if="clock_entity.type == 2">
{{ $t("only normal clock support time hiding") }}</q-tooltip
>
</q-checkbox>
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-checkbox <q-checkbox
@ -218,17 +239,29 @@
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-checkbox <q-checkbox
:disable="clock_entity.type == 2"
v-model="clock_entity.background_transparent" v-model="clock_entity.background_transparent"
left-label left-label
:label="$t('background transparent')" :label="$t('background transparent')"
/> >
<q-tooltip v-if="clock_entity.type == 2">
{{ $t("only normal clock support") }}</q-tooltip
>
</q-checkbox>
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-checkbox <q-checkbox
:disable="clock_entity.type == 2"
left-label left-label
v-model="clock_entity.multiple_lines" v-model="clock_entity.multiple_lines"
:label="$t('multiple lines')" :label="$t('multiple lines')"
/> >
<q-tooltip v-if="clock_entity.type == 2">
{{
$t("only normal clock support multiple lines")
}}</q-tooltip
>
</q-checkbox>
</q-item-section> </q-item-section>
<q-item-section> <q-item-section>
<q-checkbox <q-checkbox

View File

@ -255,7 +255,10 @@
</div> </div>
</div> </div>
<div v-else-if="!props.row.is_directory"> <div v-else-if="!props.row.is_directory">
<a href="#" @click="(evt) => selectFile(props.row)"> <a
href="javascript:void(0)"
@click="(evt) => selectFile(props.row)"
>
{{ $t("select file") }} {{ $t("select file") }}
<q-tooltip> <q-tooltip>
{{ $t("click") }}{{ $t("select file") }} {{ $t("click") }}{{ $t("select file") }}
@ -757,6 +760,15 @@ export default defineComponent({
} }
}; };
watch(
() => filters.value,
() => {
if ($store.state.advanced_debug && filters.value.length != 0) {
filters.value = [];
}
}
);
return { return {
show_dialog, show_dialog,
loading, loading,

View File

@ -148,7 +148,6 @@ export default defineComponent({
GlobalData.getInstance().applicationConfig?.application_data_dir ?? "" GlobalData.getInstance().applicationConfig?.application_data_dir ?? ""
).replace(/\\/g, "/"); ).replace(/\\/g, "/");
console.log(playlist);
const temp_play_list = []; const temp_play_list = [];
try { try {
const temp_parse = JSON.parse(playlist); const temp_parse = JSON.parse(playlist);

View File

@ -160,11 +160,16 @@
: showPlaylistDialog('.mp4;.avi;.ts;') : showPlaylistDialog('.mp4;.avi;.ts;')
" "
v-model="item_data.media_url" v-model="item_data.media_url"
:readonly="media_url_label.startsWith($t('file path'))" :readonly="
media_url_label.startsWith($t('file path')) ||
media_url_label.startsWith($t('clock'))
"
:label="media_url_label" :label="media_url_label"
:hint=" :hint="
media_url_label.startsWith($t('file path')) media_url_label.startsWith($t('file path'))
? $t('dbclick select file') ? $t('dbclick select file')
: media_url_label.startsWith($t('clock'))
? $t('dbclick config clock')
: $t('please input') + : $t('please input') +
media_url_label.substr(0, media_url_label.length - 1) media_url_label.substr(0, media_url_label.length - 1)
" "
@ -391,6 +396,9 @@ export default defineComponent({
case "EwindowType::Rtsp": case "EwindowType::Rtsp":
media_url_label.value = $t.t("RTSP url") + ":"; media_url_label.value = $t.t("RTSP url") + ":";
break; break;
case "EwindowType::Clock":
media_url_label.value = $t.t("clock setting") + ":";
break;
default: default:
media_url_label.value = $t.t("file path") + ":"; media_url_label.value = $t.t("file path") + ":";
break; break;
@ -500,7 +508,9 @@ export default defineComponent({
const result = await clock_dialog.value.showDialogAsync( const result = await clock_dialog.value.showDialogAsync(
item_data.media_url item_data.media_url
); );
item_data.media_url = decodeURI(result); if (result) {
item_data.media_url = decodeURI(result);
}
}, },
async showPlaylistDialog(filter: string) { async showPlaylistDialog(filter: string) {
if (item_data.window_type != "EwindowType::Multimedia") { if (item_data.window_type != "EwindowType::Multimedia") {

View File

@ -7,7 +7,7 @@ export default class ClockWindowParamEntity {
font_color = "#000000"; font_color = "#000000";
background_color = "#000000"; background_color = "#000000";
background_transparent = true; background_transparent = true;
type = 0;
date_format = "yyyy/MM/dd"; date_format = "yyyy/MM/dd";
time_format = "hh:mm:ss"; time_format = "hh:mm:ss";
show_date = true; show_date = true;

View File

@ -530,4 +530,9 @@ export default {
"second mark color": "秒标", "second mark color": "秒标",
"the current property is only valid for single-line displays": "the current property is only valid for single-line displays":
"当前属性只对单行显示有效", "当前属性只对单行显示有效",
"dbclick config clock": "双击配置时钟",
"clock setting": "时钟设置",
"only normal clock support time hiding": "只有普通时钟支持时间隐藏",
"only normal clock support multiple lines": "只有普通时钟支持换行",
"only normal clock support": "只有普通时钟支持",
}; };