1
This commit is contained in:
@@ -13,12 +13,6 @@ const crawlState = ref<CrawlTaskState | null>(null);
|
||||
const elapsedSeconds = ref(0);
|
||||
let timer: number | undefined;
|
||||
|
||||
const manifest = getRuntimeManifest();
|
||||
const extensionName = manifest?.name ?? '店闪';
|
||||
const extensionVersion = manifest?.version ?? '0.0.0';
|
||||
const extensionDescription =
|
||||
manifest?.description || '自动打开商家后台,按平台配置顺序采集页面数据。';
|
||||
|
||||
const selectedPlatform = computed(() =>
|
||||
PLATFORM_CONFIGS.find((platform) => platform.id === selectedPlatformId.value) ?? null,
|
||||
);
|
||||
@@ -146,22 +140,14 @@ function sendBackgroundMessage<T>(message: unknown): Promise<{ ok: boolean; data
|
||||
|
||||
return chrome.runtime.sendMessage(message);
|
||||
}
|
||||
|
||||
function getRuntimeManifest(): chrome.runtime.Manifest | null {
|
||||
if (typeof chrome === 'undefined' || !chrome.runtime?.getManifest) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return chrome.runtime.getManifest();
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="w-80 bg-slate-50 text-slate-900">
|
||||
<section class="flex min-h-64 flex-col gap-5 p-5">
|
||||
<header class="space-y-2">
|
||||
<p class="text-lg font-semibold leading-6">{{ extensionName }}</p>
|
||||
<p class="text-sm leading-5 text-slate-600">{{ extensionDescription }}</p>
|
||||
<p class="text-lg font-semibold leading-6">店闪</p>
|
||||
<p class="text-sm leading-5 text-slate-600">自动打开商家后台,按平台配置顺序采集页面数据</p>
|
||||
</header>
|
||||
|
||||
<div v-if="isLoading" class="rounded-md border border-slate-200 bg-white px-3 py-4 text-sm text-slate-500">
|
||||
@@ -236,7 +222,7 @@ function getRuntimeManifest(): chrome.runtime.Manifest | null {
|
||||
退出
|
||||
</button>
|
||||
<span v-else></span>
|
||||
<span>v{{ extensionVersion }}</span>
|
||||
<span>v1.0.0</span>
|
||||
</footer>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user