Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
oeyoews committed Jul 22, 2024
1 parent 4618bc1 commit 22118a6
Show file tree
Hide file tree
Showing 5 changed files with 621 additions and 867 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
".gitignore": ".gitconfig",
"wxt.config.ts": "auto-imports*.ts, components*.ts, tailwind.config.cjs, tsconfig.json, types.d.ts, postcss.config.cjs"
},
"editor.formatOnSave": true,
"editor.formatOnSave": true
}
55 changes: 26 additions & 29 deletions entrypoints/background/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,40 +21,37 @@ export default defineBackground(() => {
'https://github.com/oeyoews/usewiki2/issues'
);
if (details.reason === 'install') {
chrome.sidePanel
.setPanelBehavior({ openPanelOnActionClick: true })
.catch((error) => console.error(error));
// @deprecated https://wxt.dev/guide/directory-structure/web-ext-config.html
if (isDev) {
return;
chrome.tabs.create({ url: pages.devPage });
// browser.notifications.create({
// type: 'basic',
// iconUrl: 'tw256.png',
// title: 'Usewiki2',
// message: '开发模式',
// buttons: [{ title: '关闭' }],
// });
}
// if (isDev) {
// chrome.tabs.create({ url: pages.devPage });
// // browser.notifications.create({
// // type: 'basic',
// // iconUrl: 'tw256.png',
// // title: 'Usewiki2',
// // message: '开发模式',
// // buttons: [{ title: '关闭' }],
// // });
// }
// chrome.sidePanel.setOptions({ path: pages.optionsPage });
// 首次安装调转到欢迎页面
// chrome.tabs.create({ url: pages.welcomePage, });
// 单击直接打开 panel
chrome.sidePanel
.setPanelBehavior({ openPanelOnActionClick: true })
.catch((error) => console.error(error));

if (!isDev) {
return;
browser.notifications.create({
type: 'image',
// eventTime: new Date().getTime(),
title: constant.default_name,
iconUrl: constant.tiddlywiki_icon,
imageUrl: 'https://github.com/oeyoews/usewiki2/raw/main/banner03.png',
// @ts-ignore
buttons: [{ title: '关闭' }],
silent: true,
message: '欢迎使用' + constant.default_name,
});
}
// if (!isDev) {
// browser.notifications.create({
// type: 'image',
// // eventTime: new Date().getTime(),
// title: constant.default_name,
// iconUrl: constant.tiddlywiki_icon,
// imageUrl: 'https://github.com/oeyoews/usewiki2/raw/main/banner03.png',
// // @ts-ignore
// buttons: [{ title: '关闭' }],
// silent: true,
// message: '欢迎使用' + constant.default_name,
// });
// }
}
});

Expand Down
114 changes: 54 additions & 60 deletions entrypoints/sidepanel/components/SearchPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,71 +42,65 @@ const openweb = (url: string) => {
</script>

<template>
<div class="m-2">
<div class="my-2">
<el-form size="default">
<el-form-item label="">
<div
class="flex w-full"
id="search-input">
<!-- clearable -->
<el-input
v-model="targetLink"
placeholder="TiddlyWiki5"
class="mr-1"
@keyup.enter="openweb(targetLink)">
<template #prepend>
<el-select
v-model="searchEngine"
placeholder="搜索引擎"
style="width: 65px">
<template #prefix>
<component :is="getCurrentIcon(searchEngine)" />
</template>
<el-option
v-for="engine in engines"
:key="engine.name"
:label="engine.name"
:value="engine.value">
<div class="flex items-center gap-2">
<component :is="engine.icon" />
{{ engine.name }}
</div>
</el-option>
</el-select>
</template>
</el-input>
<el-button
@click="openweb(targetLink)"
class="aspect-square">
<material-symbols-search-rounded />
</el-button>
<el-button
@click="$emit('goHome')"
class="!ml-1 aspect-square">
<material-symbols-house-outline-rounded />
</el-button>
</div>
</el-form-item>
</el-form>
</div>
<div class="">
<!-- src="https://blog.oeyoews.top" -->
<!-- openweb("https://www.google.com/search?q=" + encodeURIComponent(query) + "&sidesearch=1", true); -->
<!-- https://stackoverflow.com/questions/15532791/getting-around-x-frame-options-deny-in-a-chrome-extension/69177790#69177790 -->
<!-- pagesidebar chrome extension -->
<iframe
class="h-[calc(100vh-60px)] w-full rounded-lg"
:src="link"
allow="camera; clipboard-write; fullscreen; microphone; geolocation"
allowfullscreen
frameborder="0"></iframe>
</div>
<div class="m-2 not-prose">
<el-form
size="default"
id="iframe-form">
<el-form-item label="">
<div class="flex w-full">
<el-button
@click="$emit('goHome')"
class="!mr-1 aspect-square">
<material-symbols-house-outline-rounded />
</el-button>
<el-input
v-model="targetLink"
placeholder="TiddlyWiki5"
class="mr-1"
:suffix-icon="MaterialSymbolsSearchRounded"
@keyup.enter="openweb(targetLink)">
<template #prepend>
<el-select
v-model="searchEngine"
placeholder="搜索引擎"
style="width: 60px">
<template #prefix>
<component :is="getCurrentIcon(searchEngine)" />
</template>
<el-option
v-for="engine in engines"
:key="engine.name"
:label="engine.name"
:value="engine.value">
<div class="flex items-center gap-2">
<component :is="engine.icon" />
{{ engine.name }}
</div>
</el-option>
</el-select>
</template>
</el-input>
</div>
</el-form-item>
</el-form>
<!-- src="https://blog.oeyoews.top" -->
<!-- openweb("https://www.google.com/search?q=" + encodeURIComponent(query) + "&sidesearch=1", true); -->
<!-- https://stackoverflow.com/questions/15532791/getting-around-x-frame-options-deny-in-a-chrome-extension/69177790#69177790 -->
<!-- pagesidebar chrome extension -->
<iframe
class="h-[calc(100vh-60px)] w-full rounded-lg"
:src="link"
allow="camera; clipboard-write; fullscreen; microphone; geolocation"
allowfullscreen
frameborder="0"></iframe>
</div>
</template>

<style scoped lang="css">
/* #search-input ::v-deep(.el-input__wrapper) { */
/* border-radius: 59px !important; */
/* } */
#iframe-form ::v-deep(.el-form-item) {
margin-bottom: 8px;
}
</style>
38 changes: 18 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "usewiki2",
"description": "Convert HTML to Markdown, and save to your computer, support nodejs tiddlywiki",
"private": true,
"version": "4.8.1",
"version": "4.8.2",
"type": "module",
"scripts": {
"dev": "wxt --mode development",
Expand All @@ -15,17 +15,11 @@
"postinstall": "wxt prepare"
},
"dependencies": {
"@iconify-json/fa6-regular": "^1.1.20",
"@mozilla/readability": "^0.5.0",
"@tailwindcss/typography": "^0.5.13",
"@types/chrome": "^0.0.263",
"autoprefixer": "^10.4.19",
"dayjs": "^1.11.11",
"dayjs": "^1.11.12",
"element-plus": "2.6.2",
"groq-sdk": "^0.3.3",
"ofetch": "^1.3.4",
"openai": "^4.52.3",
"postcss": "^8.4.39",
"rehype-document": "^7.0.3",
"rehype-format": "^5.0.0",
"rehype-parse": "^9.0.0",
Expand All @@ -37,42 +31,46 @@
"remark-parse": "^11.0.0",
"remark-rehype": "^11.1.0",
"remark-stringify": "^11.0.0",
"tailwindcss": "^3.4.4",
"tailwindcss": "^3.4.6",
"unified": "^11.0.5",
"unplugin-auto-import": "^0.17.6",
"unplugin-auto-import": "^0.17.8",
"unplugin-icons": "^0.18.5",
"unplugin-vue-components": "^0.26.0",
"vite-plugin-vue-devtools": "^7.3.5",
"vue": "^3.4.31"
"vite-plugin-vue-devtools": "^7.3.6",
"vue": "^3.4.33"
},
"devDependencies": {
"autoprefixer": "^10.4.19",
"postcss": "^8.4.39",
"@types/chrome": "^0.0.263",
"@iconify-json/fa6-regular": "^1.1.21",
"@iconify-json/bi": "^1.1.23",
"@iconify-json/charm": "^1.1.12",
"@iconify-json/entypo": "^1.1.8",
"@iconify-json/eos-icons": "^1.1.10",
"@iconify-json/fa": "^1.1.8",
"@iconify-json/fa-regular": "^1.1.8",
"@iconify-json/fluent": "^1.1.58",
"@iconify-json/fluent": "^1.1.59",
"@iconify-json/game-icons": "^1.1.9",
"@iconify-json/iconoir": "^1.1.44",
"@iconify-json/iconoir": "^1.1.45",
"@iconify-json/lets-icons": "^1.1.2",
"@iconify-json/logos": "^1.1.43",
"@iconify-json/material-symbols": "^1.1.83",
"@iconify-json/material-symbols": "^1.1.85",
"@iconify-json/mdi": "^1.1.67",
"@iconify-json/mingcute": "^1.1.18",
"@iconify-json/mynaui": "^1.1.7",
"@iconify-json/octicon": "^1.1.55",
"@iconify-json/octicon": "^1.1.56",
"@iconify-json/ph": "^1.1.13",
"@iconify-json/ri": "^1.1.21",
"@iconify-json/simple-icons": "^1.1.108",
"@iconify-json/simple-icons": "^1.1.109",
"@iconify-json/streamline": "^1.1.8",
"@iconify-json/svg-spinners": "^1.1.2",
"@iconify-json/tdesign": "^1.1.6",
"@iconify-json/tdesign": "^1.1.7",
"@iconify-json/zondicons": "^1.1.8",
"@vitejs/plugin-vue": "^5.0.5",
"@wxt-dev/module-vue": "^1.0.0",
"typescript": "5.5.3",
"vue-tsc": "^2.0.26",
"wxt": "0.18.15",
"@wxt-dev/module-vue": "^1.0.0"
"wxt": "0.18.15"
}
}
Loading

0 comments on commit 22118a6

Please sign in to comment.