Skip to content

Commit

Permalink
Merge pull request #86 from webpilot-ai/dev
Browse files Browse the repository at this point in the history
Dev to Main
  • Loading branch information
CocoSgt committed Nov 2, 2023
2 parents b72f57f + 876ce85 commit 6e68e50
Show file tree
Hide file tree
Showing 19 changed files with 247 additions and 169 deletions.
6 changes: 6 additions & 0 deletions assets/locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"Active_Webpilot": {
"message": "Active Webpilot"
},
"Add_a_new_prompt": {
"message": "Add a new prompt"
},
"and_pin_Webpilot_to_your_nav_bar": {
"message": "and pin Webpilot to your nav bar"
},
Expand Down Expand Up @@ -119,6 +122,9 @@
"SEO": {
"message": "SEO"
},
"Set_a_prompt_here": {
"message": "Set a prompt here"
},
"Set_up_API": {
"message": "Set up API"
},
Expand Down
6 changes: 6 additions & 0 deletions assets/locales/zh_CN/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"Active_Webpilot": {
"message": "启用 Webpilot"
},
"Add_a_new_prompt": {
"message": "新建一个提示"
},
"and_pin_Webpilot_to_your_nav_bar": {
"message": "然后将 Webpilot 固定在导航栏"
},
Expand Down Expand Up @@ -119,6 +122,9 @@
"SEO": {
"message": "SEO"
},
"Set_a_prompt_here": {
"message": "提词写这里"
},
"Set_up_API": {
"message": "设置 API"
},
Expand Down
37 changes: 12 additions & 25 deletions assets/styles/csui-reset.scss
Original file line number Diff line number Diff line change
@@ -1,53 +1,40 @@
/* stylelint-disable */
#webpilot-container {
#webpilot-template {
@import './reset.scss';
@import './solarized_light.scss';
}

#webpilot-content {

// p,
// span {
// font-size: 14px;
// font-weight: normal;
// }

p {
margin: 0;
// color: #292929 !important;
line-height: 1.6;
}

// span {
// color: #dcdcdc !important;
// }

pre {
// margin: 0.5rem 0;
padding: 0;
// background: #363636 !important;
}

code {
font-size: 14px;
padding: 1 5px;
background: #fdf6e3;
color: #657b83;
border-radius: 6px;
box-shadow: none !important;
box-shadow: none;
}

@import './solarized_light.scss';
}

@media (prefers-color-scheme: dark) {
#webpilot-template {
@import './solarized_dark.scss';
}
#webpilot-content {
p {
color: #dcdcdc;
}
}
li {
color: #dcdcdc;
}
code {
background: #002b36;
color: #839496;}

@import './solarized_dark.scss';
color: #839496;
}
}
}
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webpilot",
"version": "0.9.1025",
"version": "0.9.1102",
"author": "webpilot.ai",
"displayName": "Webpilot - Copilot for All, Free & Open",
"description": "__MSG_extensionDescription__",
Expand Down Expand Up @@ -73,7 +73,10 @@
"matches": [
"<all_urls>"
],
"resources": []
"resources": [
"manifest.json",
"*.css"
]
}
]
}
Expand Down
45 changes: 28 additions & 17 deletions scripts/i18n/gettextOutput/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ msgstr ""
msgid "Active Webpilot"
msgstr ""

#: src/components/PromptMenu.vue:12
#: src/components/PromptMenu.vue:13
#: src/components/PromptMenu.vue:18
#: src/components/PromptMenu.vue:22
msgid "Add a new prompt"
msgstr ""

#: src/tabs/components/StepFour.vue:4
#: src/tabs/components/StepFour.vue:5
#: src/tabs/components/StepFour.vue:6
Expand All @@ -34,11 +41,11 @@ msgstr ""
msgid "Ask a question about this webpage"
msgstr ""

#: src/components/FloatControlButtons.vue:20
#: src/components/FloatControlButtons.vue:21
#: src/components/PromptMenu.vue:14
#: src/components/PromptMenu.vue:15
#: src/components/FloatControlButtons.vue:14
#: src/components/FloatControlButtons.vue:15
#: src/components/PromptMenu.vue:19
#: src/components/PromptMenu.vue:20
#: src/components/PromptMenu.vue:29
msgid "Back"
msgstr ""

Expand All @@ -52,9 +59,9 @@ msgstr ""
msgid "Change Shortcut"
msgstr ""

#: src/components/PromptMenu.vue:17
#: src/components/PromptMenu.vue:18
#: src/components/PromptMenu.vue:22
#: src/components/PromptMenu.vue:23
#: src/components/PromptMenu.vue:32
msgid "Choose"
msgstr ""

Expand All @@ -68,22 +75,22 @@ msgstr ""
msgid "Click"
msgstr ""

#: src/components/FloatControlButtons.vue:10
#: src/components/FloatControlButtons.vue:9
#: src/components/PromptMenu.vue:14
#: src/components/PromptMenu.vue:15
#: src/components/FloatControlButtons.vue:6
#: src/components/FloatControlButtons.vue:7
#: src/components/PromptMenu.vue:19
#: src/components/PromptMenu.vue:20
#: src/components/PromptMenu.vue:29
msgid "Close"
msgstr ""

#: src/components/PromptMenu.vue:19
#: src/components/PromptMenu.vue:20
#: src/components/PromptMenu.vue:24
#: src/components/PromptMenu.vue:25
#: src/components/PromptMenu.vue:34
msgid "Confirm"
msgstr ""

#: src/components/FloatControlButtons.vue:42
#: src/components/FloatControlButtons.vue:43
#: src/components/FloatControlButtons.vue:30
#: src/components/FloatControlButtons.vue:31
msgid "Copy"
msgstr ""

Expand Down Expand Up @@ -213,13 +220,17 @@ msgstr ""
msgid "SEO"
msgstr ""

#: src/components/PromptEditor.vue:15
msgid "Set a prompt here"
msgstr ""

#: src/tabs/components/StepTwo.vue:2
#: src/tabs/components/StepTwo.vue:3
msgid "Set up API"
msgstr ""

#: src/components/FloatControlButtons.vue:31
#: src/components/FloatControlButtons.vue:32
#: src/components/FloatControlButtons.vue:22
#: src/components/FloatControlButtons.vue:23
msgid "Settings"
msgstr ""

Expand Down Expand Up @@ -265,7 +276,7 @@ msgstr ""
msgid "Webpilot Credit"
msgstr ""

#: src/tabs/components/StepThree.vue:32
#: src/tabs/components/StepThree.vue:33
msgid "Webpilot will answer based on the current page if no text is selected"
msgstr ""

Expand Down
2 changes: 2 additions & 0 deletions scripts/i18n/gettextOutput/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"en": {
" to use": " to use",
"Active Webpilot": "Active Webpilot",
"Add a new prompt": "Add a new prompt",
"and pin Webpilot to your nav bar": "and pin Webpilot to your nav bar",
"API Settings": "API Settings",
"Ask a question about": "Ask a question about",
Expand Down Expand Up @@ -39,6 +40,7 @@
"Save Changes": "Save Changes",
"Select text, and press ": "Select text, and press ",
"SEO": "SEO",
"Set a prompt here": "Set a prompt here",
"Set up API": "Set up API",
"Settings": "Settings",
"Setup your own API key, to enjoy more": "Setup your own API key, to enjoy more",
Expand Down
29 changes: 4 additions & 25 deletions src/components/FloatControlButtons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
<li v-show="!showBack" :class="$style.box">
<Popper hover offset-distance="14" offset-skid="-4" placement="right">
<InteractiveIcon :class="$style.btn" type="close" @click="popupClose" />
<!-- <div :class="$style.btn">
<InteractiveIcon :class="$style.ico" type="close" @click="popupClose" />
</div> -->
<template #content>
<span :class="$style.popover">{{ $gettext('Close') }}</span>
</template>
Expand All @@ -14,9 +11,6 @@
<li v-show="showBack" :class="$style.box">
<Popper hover offset-distance="14" offset-skid="-4" placement="right">
<InteractiveIcon :class="$style.btn" type="previous" @click="popupBack" />
<!-- <div :class="$style.btn">
<InteractiveIcon :class="$style.ico" type="previous" @click="popupBack" />
</div> -->
<template #content>
<span :class="$style.popover">{{ $gettext('Back') }}</span>
</template>
Expand All @@ -25,9 +19,6 @@
<li v-show="showSetting" :class="$style.box">
<Popper hover offset-distance="14" offset-skid="-4" placement="right">
<InteractiveIcon :class="$style.btn" type="setting" @click="openSettingPage" />
<!-- <div :class="$style.btn">
<InteractiveIcon :class="$style.ico" type="setting" @click="openSettingPage" />
</div> -->
<template #content>
<span :class="$style.popover">{{ $gettext('Settings') }}</span>
</template>
Expand All @@ -36,9 +27,6 @@
<li v-show="showCopy" :class="$style.box">
<Popper hover offset-distance="14" offset-skid="-4" placement="right">
<InteractiveIcon :class="$style.btn" type="copy" @click="handleCopy" />
<!-- <div :class="$style.btn">
<InteractiveIcon :class="$style.ico" type="setting" @click="openSettingPage" />
</div> -->
<template #content>
<span :class="$style.popover">{{ $gettext('Copy') }}</span>
</template>
Expand Down Expand Up @@ -97,7 +85,7 @@ const handleCopy = () => {
position: absolute;
top: 8px;
right: -44px;
margin: 0 !important;
margin: 0;
padding: 0;
}
Expand All @@ -106,13 +94,9 @@ const handleCopy = () => {
list-style: none;
.btn {
box-sizing: content-box !important;
// display: flex;
// width: 36px;
// height: 36px;
width: 24px;
height: 24px;
// box-sizing: content-box;
width: 36;
height: 36;
padding: 6px;
background-color: var(--webpilot-theme-main-background-color, #fff);
background-origin: content-box;
Expand All @@ -121,11 +105,6 @@ const handleCopy = () => {
}
}
// .ico {
// flex: 1;
// filter: brightness(var(--webpilot-theme-brightness-number));
// }
.popover {
padding: 4px 8px;
color: #fff;
Expand Down

0 comments on commit 6e68e50

Please sign in to comment.