This repository has been archived by the owner on Jun 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: export Image as Phone Width, add options for request
- 导出图片时可设置图片宽度,计划有两个选项,一个是“如所见”,as seeing,另一个是“手机宽”, phone width,取iPhone 13的宽度,为375px; - 为之前添加的“在Chrome上使用New Bing”以及“避免跳转到cn.bing.com”添加选项
- Loading branch information
Showing
19 changed files
with
524 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<script> | ||
import { popupPageI18nValue } from "~utils/constants"; | ||
export let promises; | ||
</script> | ||
|
||
{#await Promise.all(promises)} | ||
<p>{popupPageI18nValue.WAITING}</p> | ||
{:then _} | ||
<slot></slot> | ||
{:catch err} | ||
<p>{err}</p> | ||
{/await} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<script> | ||
export let bind_value; | ||
export let keys; | ||
export let values; | ||
</script> | ||
|
||
<select | ||
class="select" | ||
bind:value="{bind_value}"> | ||
{#each Object.keys(keys) as key} | ||
<option value={keys[key]}> | ||
{values[key]} | ||
</option> | ||
{/each} | ||
</select> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<script> | ||
import Collapse from "~components/Collapse.svelte"; | ||
import LinkButton from "~components/LinkButton.svelte"; | ||
import { LinkType, Messages, popupPageI18nValue } from "~utils/constants"; | ||
</script> | ||
|
||
<Collapse | ||
title="debug Tools" | ||
default_open={true} | ||
> | ||
<button class="btn" on:click={async () => { | ||
let prev_size; | ||
const size = await chrome.runtime.sendMessage({ | ||
type: Messages.GET_WINDOW_SIZE | ||
}); | ||
console.log(size) | ||
|
||
prev_size = {...size}; | ||
size.width = 375; | ||
size.state = 'normal'; | ||
const response = await chrome.runtime.sendMessage({ | ||
type: Messages.RESIZE_WINDOW, | ||
body: size | ||
}); | ||
console.log(response) | ||
console.log(prev_size) | ||
chrome.runtime.sendMessage({ | ||
type: Messages.RESIZE_WINDOW_2, | ||
body: prev_size | ||
}).catch((error) => { | ||
console.error(error); | ||
}) | ||
}}> | ||
RESIZE | ||
</button> | ||
<LinkButton | ||
url="https://www.bing.com/search?q=I%20need%20to%20throw%20a%20dinner%20party%20for%206%20people%20who%20are%20vegetarian.%20Can%20you%20suggest%20a%203-course%20menu%20with%20a%20chocolate%20dessert?&iscopilotedu=1&form=MA13G7" | ||
text={popupPageI18nValue.BING_DEMO_LINK} | ||
type={LinkType.BING} | ||
/> | ||
</Collapse> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<script> | ||
import Collapse from "~components/Collapse.svelte"; | ||
import { exportSettingsI18nValue, exportTypes, exportWidthTemplateKeys, popupPageI18nValue } from "~utils/constants"; | ||
import { exportSettings } from "~utils/store/stores"; | ||
import PromiseWaiting from "~components/PromiseWaiting.svelte"; | ||
let promises = [ | ||
exportSettings.init(), | ||
]; | ||
</script> | ||
|
||
<PromiseWaiting {promises}> | ||
<Collapse | ||
title={popupPageI18nValue.EXPORT_SETTINGS_TITLE} | ||
default_open={true} | ||
> | ||
{#each $exportSettings as message, i} | ||
<div class="form-control"> | ||
<div class="input-group"> | ||
<label class="label cursor-pointer"> | ||
<input type="checkbox" bind:checked={message.on} class="checkbox checkbox-primary" /> | ||
</label> | ||
<select | ||
class="select" | ||
bind:value="{message.type}"> | ||
{#each Object.keys(exportTypes) as key} | ||
<option value={exportTypes[key]}> | ||
{exportTypes[key]} | ||
</option> | ||
{/each} | ||
</select> | ||
<select | ||
class="select" | ||
bind:value="{message.size_template}"> | ||
{#each Object.keys(exportWidthTemplateKeys) as key} | ||
<option value={exportWidthTemplateKeys[key]}> | ||
{exportSettingsI18nValue[key]} | ||
</option> | ||
{/each} | ||
</select> | ||
|
||
<!-- <SimpleSelect--> | ||
<!-- bind:bind_value="{message.size_template}"--> | ||
<!-- keys={exportWidthTemplateKeys}--> | ||
<!-- values={exportSettingsI18nValue}--> | ||
<!-- />--> | ||
</div> | ||
</div> | ||
{/each} | ||
</Collapse> | ||
</PromiseWaiting> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<script> | ||
import Collapse from "~components/Collapse.svelte"; | ||
import SimpleCheckbox from "~components/SimpleCheckbox.svelte"; | ||
import { popupPageI18nValue } from "~utils/constants"; | ||
import { requestIpSetting, requestUserAgentSetting } from "~utils/store/stores"; | ||
import PromiseWaiting from "~components/PromiseWaiting.svelte"; | ||
let promises = [ | ||
requestIpSetting.init(), | ||
requestUserAgentSetting.init(), | ||
]; | ||
</script> | ||
|
||
<PromiseWaiting {promises}> | ||
<Collapse | ||
title={popupPageI18nValue.REQUEST_SETTING} | ||
default_open={true} | ||
> | ||
<div class="form-control"> | ||
<SimpleCheckbox | ||
isChecked={requestUserAgentSetting} | ||
text={popupPageI18nValue.REQUEST_BROWSER} | ||
/> | ||
<!--TODO: ADD self config ip--> | ||
<SimpleCheckbox | ||
isChecked={requestIpSetting} | ||
text={popupPageI18nValue.REQUEST_IP} | ||
/> | ||
</div> | ||
</Collapse> | ||
</PromiseWaiting> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<script> | ||
import Collapse from "~components/Collapse.svelte"; | ||
import LinkButton from "~components/LinkButton.svelte"; | ||
import { LinkType, popupPageI18nValue } from "~utils/constants"; | ||
</script> | ||
|
||
<Collapse | ||
title={popupPageI18nValue.LINK_TITLE} | ||
default_open={true} | ||
> | ||
<LinkButton | ||
url="/tabs/chats.html" | ||
text={popupPageI18nValue.CHAT_RECORD_LINK} | ||
type={LinkType.INNER} | ||
/> | ||
|
||
<LinkButton | ||
url="https://www.bing.com/search?q=Bing+AI&showconv=1&FORM=hpcodx" | ||
text={popupPageI18nValue.BING_CHAT_LINK} | ||
type={LinkType.BING} | ||
/> | ||
<LinkButton | ||
url="https://www.bing.com/new" | ||
text={popupPageI18nValue.BING_NEW_LINK} | ||
type={LinkType.BING} | ||
/> | ||
|
||
</Collapse> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<script> | ||
import Collapse from "~components/Collapse.svelte"; | ||
import { popupPageI18nValue } from "~utils/constants"; | ||
import SimpleCheckbox from "~components/SimpleCheckbox.svelte"; | ||
import { feedbackHiddenSetting, welcomeHiddenSetting } from "~utils/store/stores"; | ||
import PromiseWaiting from "~components/PromiseWaiting.svelte"; | ||
let promises = [ | ||
welcomeHiddenSetting.init(), | ||
feedbackHiddenSetting.init(), | ||
]; | ||
</script> | ||
|
||
<PromiseWaiting {promises}> | ||
<Collapse | ||
title={popupPageI18nValue.UI_SETTINGS_TITLE} | ||
default_open={true} | ||
> | ||
<div class="form-control"> | ||
<SimpleCheckbox | ||
isChecked={welcomeHiddenSetting} | ||
text={popupPageI18nValue.HIDDEN_WELCOME} | ||
/> | ||
<SimpleCheckbox | ||
isChecked={feedbackHiddenSetting} | ||
text={popupPageI18nValue.HIDDEN_FEEDBACK} | ||
/> | ||
</div> | ||
</Collapse> | ||
</PromiseWaiting> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -211,4 +211,4 @@ X-Forwarded-For: 1.36.5.8 | |
|
||
https://github.com/mixmark-io/turndown/ | ||
|
||
|
||
TODO: pdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.