Skip to content

Commit

Permalink
[change] downscale Look-Anywhere Function
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiram committed Sep 7, 2024
1 parent c3428b9 commit 30ee9f4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
25 changes: 14 additions & 11 deletions src/renderer/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const storeSetting = useSettingStore();
const { changeLocale } = useLocale();
const isVisible = reactive({
dialogDisclaimer: false
})
dialogDisclaimer: false,
});
const theme = computed(() => {
return storeSetting.getStateMode;
Expand All @@ -40,24 +40,28 @@ watch(
(val) => {
if (intervalId.value) clearInterval(intervalId.value);
if (val.sync) {
intervalId.value = setInterval(() => {
autoSync(val.data.url, val.data.username, val.data.password);
}, 1000 * 5 * 60);
intervalId.value = setInterval(
() => {
autoSync(val.data.url, val.data.username, val.data.password);
},
1000 * 5 * 60,
);
}
}, { deep: true }
},
{ deep: true },
);
watch(
() => storeSetting.displayMode,
(val) => {
const isDarkMode = val === 'dark';
document.documentElement.setAttribute('theme-mode', isDarkMode ? 'dark' : '');
}
},
);
watch(
() => useLocalStorage(localeConfigKey, 'zh_CN').value,
(val) => {
changeLocale(val);
}
},
);
onMounted(() => {
Expand All @@ -81,7 +85,6 @@ const initConfig = async () => {
if (debug) {
const status = await loadExternalResource('https://test.jikejishu.com/page-spy/index.min.js', 'js');
console.log(status)
if (status) {
window.$pageSpy = new PageSpy({
api: 'test.jikejishu.com',
Expand All @@ -92,13 +95,13 @@ const initConfig = async () => {
});
}
}
}
};
window.electron.ipcRenderer.on('system-theme-updated', (_, activeTheme) => {
if (theme.value === 'auto') {
const themeMode = activeTheme === 'dark' ? 'dark' : '';
document.documentElement.setAttribute('theme-mode', themeMode);
console.log(`system-theme-updated: ${activeTheme}`);
}
})
});
</script>
4 changes: 2 additions & 2 deletions src/renderer/src/layouts/components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="right no-drag">
<div class="system-functions">
<sponsor class="system-function" />
<just-look class="system-function" />
<!-- <just-look class="system-function" /> -->
<language class="system-function" />
<system-skin class="system-function" />
<system-config class="system-function" />
Expand All @@ -20,7 +20,7 @@

<script setup lang="ts">
import HistoryControl from './HistoryControl.vue';
import JustLook from './JustLook.vue';
// import JustLook from './JustLook.vue';
import Language from './Language.vue';
import PlayerShow from './PlayShow.vue';
import SearchBar from './SearchBar.vue';
Expand Down
6 changes: 3 additions & 3 deletions src/renderer/src/pages/setting/base/BaseSetting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@
</t-space>
</div>
</t-form-item>
<t-form-item :label="$t('pages.setting.base.viewCasual')" name="viewCasual">
<!-- <t-form-item :label="$t('pages.setting.base.viewCasual')" name="viewCasual">
<t-space align="center">
<t-input v-model="formData.defaultViewCasual" class="viewCasual-content"
:placeholder="t('pages.setting.placeholder.general')" :style="{ width: '255px' }">
</t-input>
<!-- <span class="title" @click="reset('viewCasual')">{{ $t('pages.setting.base.reset') }}</span> -->
<span class="title" @click="reset('viewCasual')">{{ $t('pages.setting.base.reset') }}</span>
</t-space>
</t-form-item>
</t-form-item> -->
<t-form-item :label="$t('pages.setting.base.iptv')" name="iptv">
<div class="iptv">
<t-space direction="vertical">
Expand Down

0 comments on commit 30ee9f4

Please sign in to comment.