mirror of
https://github.com/tomfong/simple-qr.git
synced 2025-06-28 12:09:58 +00:00
feat: support Brave Search
This commit is contained in:
parent
f8bfdcf52e
commit
26d28e811f
15 changed files with 40 additions and 2 deletions
|
@ -194,6 +194,8 @@
|
|||
</ion-icon>
|
||||
<ion-icon *ngIf="env.searchEngine === 'ecosia'" slot="icon-only" src="assets/icon/ecosia.svg">
|
||||
</ion-icon>
|
||||
<ion-icon *ngIf="env.searchEngine === 'brave'" slot="icon-only" src="assets/icon/brave-search.svg">
|
||||
</ion-icon>
|
||||
</ion-button>
|
||||
<ion-button *ngIf="env.showCopyButton === 'on'" (click)="tapHaptic(); copyText()"
|
||||
[color]="env.colorTheme === 'light'? 'dark' : 'light'" fill="clear"
|
||||
|
@ -292,6 +294,8 @@
|
|||
</ion-icon>
|
||||
<ion-icon class="pe-2" *ngIf="env.searchEngine === 'ecosia'" slot="icon-only" src="assets/icon/ecosia.svg">
|
||||
</ion-icon>
|
||||
<ion-icon class="pe-2" *ngIf="env.searchEngine === 'brave'" slot="icon-only" src="assets/icon/brave-search.svg">
|
||||
</ion-icon>
|
||||
<ion-label>{{ 'SEARCH' | translate}}</ion-label>
|
||||
</ion-button>
|
||||
<ion-button class="pe-1" *ngIf="env.showCopyButton === 'on'" (click)="tapHaptic(); copyText()"
|
||||
|
|
|
@ -441,6 +441,9 @@ export class ResultPage {
|
|||
case 'ecosia':
|
||||
searchUrl = this.env.ECOSIA_SEARCH_URL;
|
||||
break;
|
||||
case 'brave':
|
||||
searchUrl = this.env.BRAVE_SEARCH_URL;
|
||||
break;
|
||||
default:
|
||||
searchUrl = this.env.GOOGLE_SEARCH_URL;
|
||||
break;
|
||||
|
|
|
@ -75,6 +75,9 @@
|
|||
<ion-icon class="ion-margin-start ion-padding-horizontal" [color]="'primary'" *ngIf="env.searchEngine === 'ecosia'"
|
||||
src="assets/icon/ecosia.svg">
|
||||
</ion-icon>
|
||||
<ion-icon class="ion-margin-start ion-padding-horizontal" [color]="'primary'" *ngIf="env.searchEngine === 'brave'"
|
||||
src="assets/icon/brave-search.svg">
|
||||
</ion-icon>
|
||||
<ion-label>
|
||||
<p class="ion-padding pre-line">
|
||||
<ion-text [color]="env.colorTheme === 'light'? 'dark' : 'light'" style="font-size: large;">
|
||||
|
|
|
@ -76,6 +76,9 @@
|
|||
<ion-icon class="ion-margin-start ion-padding-horizontal" [color]="'primary'" *ngIf="env.searchEngine === 'ecosia'"
|
||||
src="assets/icon/ecosia.svg">
|
||||
</ion-icon>
|
||||
<ion-icon class="ion-margin-start ion-padding-horizontal" [color]="'primary'" *ngIf="env.searchEngine === 'brave'"
|
||||
src="assets/icon/brave-search.svg">
|
||||
</ion-icon>
|
||||
<ion-label>
|
||||
<p class="ion-padding pre-line">
|
||||
<ion-text [color]="env.colorTheme === 'light'? 'dark' : 'light'" style="font-size: large;">
|
||||
|
|
|
@ -99,6 +99,19 @@
|
|||
<ion-radio class="ion-margin-end" slot="end" [value]="'ecosia'" [color]="'primary'">
|
||||
</ion-radio>
|
||||
</ion-item>
|
||||
<ion-item class="ion-no-padding ripple-parent" detail="false" lines="none">
|
||||
<ion-icon class="ion-margin-start ion-padding-horizontal" [color]="'primary'" src="assets/icon/brave-search.svg">
|
||||
</ion-icon>
|
||||
<ion-label>
|
||||
<p class="ion-padding pre-line">
|
||||
<ion-text [color]="env.colorTheme === 'light'? 'dark' : 'light'" style="font-size: large;">
|
||||
{{ 'BRAVE_SEARCH' | translate }}
|
||||
</ion-text>
|
||||
</p>
|
||||
</ion-label>
|
||||
<ion-radio class="ion-margin-end" slot="end" [value]="'brave'" [color]="'primary'">
|
||||
</ion-radio>
|
||||
</ion-item>
|
||||
</ion-radio-group>
|
||||
|
||||
</ion-content>
|
|
@ -23,7 +23,7 @@ export declare type ColorThemeType = 'light' | 'dark' | 'black';
|
|||
export declare type ErrorCorrectionLevelType = 'L' | 'M' | 'Q' | 'H';
|
||||
export declare type VibrationType = "on" | "off" | 'on-haptic' | 'on-scanned';
|
||||
export declare type OrientationType = 'portrait' | 'landscape';
|
||||
export declare type SearchEngineType = 'google' | 'bing' | 'yahoo' | 'duckduckgo' | 'yandex' | 'ecosia';
|
||||
export declare type SearchEngineType = 'google' | 'bing' | 'yahoo' | 'duckduckgo' | 'yandex' | 'ecosia' | 'brave';
|
||||
export declare type ResultPageButtonsType = 'detailed' | 'icon-only';
|
||||
|
||||
@Injectable({
|
||||
|
@ -136,6 +136,7 @@ export class EnvService {
|
|||
public readonly DUCK_DUCK_GO_SEARCH_URL: string = "https://duckduckgo.com/?q=";
|
||||
public readonly YANDEX_SEARCH_URL: string = "https://yandex.com/search/?text=";
|
||||
public readonly ECOSIA_SEARCH_URL: string = "https://www.ecosia.org/search?method=index&q=";
|
||||
public readonly BRAVE_SEARCH_URL: string = "https://search.brave.com/search?q=";
|
||||
|
||||
public readonly GITHUB_REPO_URL: string = "https://github.com/tomfong/simple-qr";
|
||||
public readonly GOOGLE_PLAY_URL: string = "https://play.google.com/store/apps/details?id=com.tomfong.simpleqr";
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
"BOOKMARKED": "Lesezeichen",
|
||||
"BOOKMARKED_TEXTS": "Texte mit Lesezeichen",
|
||||
"BOOKMARKS": "Lesezeichen",
|
||||
"BRAVE_SEARCH": "Brave Search",
|
||||
"BROWSE": "Durchsuchen",
|
||||
"BROWSER": "Browser",
|
||||
"BROWSE_WEBSITE": "Website durchsuchen",
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
"BOOKMARKED": "Bookmarked",
|
||||
"BOOKMARKED_TEXTS": "Bookmarked texts",
|
||||
"BOOKMARKS": "Bookmarks",
|
||||
"BRAVE_SEARCH": "Brave Search",
|
||||
"BROWSE": "Browse",
|
||||
"BROWSER": "Browser",
|
||||
"BROWSE_WEBSITE": "Browse Website",
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
"BOOKMARKED": "Mis en signet",
|
||||
"BOOKMARKED_TEXTS": "Textes marqués d'un signet",
|
||||
"BOOKMARKS": "Signets",
|
||||
"BRAVE_SEARCH": "Brave Search",
|
||||
"BROWSE": "Parcourir",
|
||||
"BROWSER": "Navigateur",
|
||||
"BROWSE_WEBSITE": "Parcourir le site Web",
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
"BOOKMARKED": "Aggiunto ai preferiti",
|
||||
"BOOKMARKED_TEXTS": "Testi preferiti",
|
||||
"BOOKMARKS": "Segnalibri",
|
||||
"BRAVE_SEARCH": "Brave Search",
|
||||
"BROWSE": "Naviga",
|
||||
"BROWSER": "Browser",
|
||||
"BROWSE_WEBSITE": "Sfoglia il sito web",
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
"BOOKMARKED": "Добавлено в закладки",
|
||||
"BOOKMARKED_TEXTS": "Сохраненные тексты",
|
||||
"BOOKMARKS": "Закладки",
|
||||
"BRAVE_SEARCH": "Brave Search",
|
||||
"BROWSE": "Просмотреть",
|
||||
"BROWSER": "Браузер",
|
||||
"BROWSE_WEBSITE": "Посетить веб-сайт",
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
"BOOKMARKED": "已书签",
|
||||
"BOOKMARKED_TEXTS": "已收藏的书签",
|
||||
"BOOKMARKS": "书签",
|
||||
"BRAVE_SEARCH": "Brave Search",
|
||||
"BROWSE": "浏览",
|
||||
"BROWSER": "浏览器",
|
||||
"BROWSE_WEBSITE": "浏览网站",
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
"BOOKMARKED": "已書籤",
|
||||
"BOOKMARKED_TEXTS": "已收藏的書籤會在這裡顯示",
|
||||
"BOOKMARKS": "書籤",
|
||||
"BRAVE_SEARCH": "Brave Search",
|
||||
"BROWSE": "瀏覽",
|
||||
"BROWSER": "瀏覽器",
|
||||
"BROWSE_WEBSITE": "瀏覽網站",
|
||||
|
|
5
src/assets/icon/brave-search.svg
Normal file
5
src/assets/icon/brave-search.svg
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50" width="50px" height="50px">
|
||||
<path
|
||||
d="M46,11l-2.96-3.96c-1.22-1.22-3.08-1.52-4.62-0.75L37,7l-5-5H18l-5,5l-1.42-0.71c-1.54-0.77-3.4-0.47-4.62,0.75L4,11l2,3 l-2,4l5.77,17.47c0.79,2.28,2.38,4.19,4.47,5.38L25,47l10.76-6.15c2.09-1.19,3.68-3.1,4.47-5.38L46,18l-2-4L46,11z M25,40l-6-6 c0,0,5-3,6-3s6,3,6,3L25,40z M38.68,18.76L34,25l0.57,0.85c0.41,0.61,0.61,1.32,0.61,2.02c0,0.78-0.24,1.55-0.73,2.19 c-0.52,0.7-1.29,1.26-2.04,1.59C31.9,31.88,31.4,32,31,32c-0.9,0-2.617-1.621-5-3.331v-1.102l4.515-2.709 c0.369-0.221,0.555-0.654,0.462-1.074l-1.459-6.566c0.174-0.406,0.444-0.744,0.845-0.964L36,14l-3-1h-2l-0.014,0.014 c-0.1,0.002-0.202,0.004-0.303,0.038l-3,1c-0.486,0.162-0.771,0.666-0.66,1.166l1.844,8.296L25,25.834l-3.868-2.321l1.844-8.296 c0.111-0.5-0.174-1.003-0.66-1.166l-3-1c-0.101-0.034-0.202-0.036-0.303-0.038L19,13h-2l-3,1l5.638,2.253 c0.401,0.22,0.671,0.558,0.845,0.964l-1.459,6.566c-0.093,0.42,0.092,0.853,0.461,1.074L24,27.566v1.126 C21.553,30.436,19.884,32,19,32c-0.4,0-0.9-0.12-1.41-0.35c-0.75-0.33-1.52-0.89-2.04-1.59c-0.93-1.23-0.98-2.92-0.12-4.21L16,25 l-4.68-6.24c-0.79-1.05-0.8-2.48-0.04-3.55L15,9l2.73,0.55c0.38,0.08,0.77,0.11,1.16,0.11c1.08,0,2.16-0.29,3.1-0.85 c0.93-0.56,1.97-0.84,3.01-0.84s2.08,0.28,3.01,0.84c1.28,0.76,2.8,1.03,4.26,0.74L35,9l3.72,6.21 C39.48,16.28,39.47,17.71,38.68,18.76z" />
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
|
@ -1,5 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "Duckduckgo Icon by Icons8 on Iconscout" "https://iconscout.com/icons/duckduckgo">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50">
|
||||
<path d="M25 2C12.309 2 2 12.309 2 25s10.309 23 23 23 23-10.309 23-23S37.691 2 25 2zm-9.313 7.313c1.399 0 2.918.382 4.72 1.28 1.8.9 3.105 1.805 3.905 2.907 1.301.3 2.387.8 3.188 1.5 1 .898 1.793 2.293 2.594 4.094.699 1.8 1.093 3.508 1.093 4.906 0 .398-.085.805-.187 1.406.3-.101 1-.293 2-.593 1-.301 1.887-.614 2.688-.813.8-.2 1.406-.313 1.906-.313s1 .118 1.5.22c.5.1.812.382.812.78 0 .602-1.414 1.399-4.312 2.5-2.899 1.102-4.696 1.625-5.594 1.625-.2 0-.594-.023-1.094-.125-.5-.101-.918-.093-1.218-.093h-1.094c-.102 0-.188.093-.188.093 0 .102-.093.211-.093.313 0 .7.476 1.29 1.375 1.688.898.398 1.824.625 2.625.625.8 0 1.882-.114 3.28-.313 1.4-.2 2.614-.313 3.313-.313.5 0 .782.227.782.625 0 .602-.883 1.188-2.782 1.688-1.8.5-3.195.813-4.093.813-1.7 0-3.825-.7-6.625-2-.102.398-.094.882-.094 1.28 0 1.602.418 3.4 1.218 5.5h.188c.398-.1.688.102.688.5 2.101-1.6 3.613-2.406 4.312-2.406.5 0 .813 1.426.813 4.126 0 1.5-.22 2.187-.72 2.187-.698 0-1.882-.387-3.78-1.188.3.602.8 1.399 1.5 2.5.343.493.64.891.875 1.25A21.148 21.148 0 0125 46c-2.59 0-5.055-.488-7.344-1.344-.273-1.277-.613-2.988-1.156-5.468-1.602-7-2.688-12.274-3.188-15.876-.101-.699-.218-1.417-.218-2.218 0-2.301.613-4.106 1.812-5.407 1.2-1.3 2.98-2.074 5.281-2.374-.699-.2-1.488-.313-2.687-.313-.8 0-2.086.113-3.688.313 0-.2.083-.399.282-.5l.594-.313c.199 0 .511-.094.812-.094.3 0 .492-.094.594-.094.601-.101 1.32-.414 2.218-.812-1.3-.398-2.5-.594-3.5-.594-.199 0-.5-.008-1 .094-.398.102-.699.094-1 .094H12.5l1-1.406c.102 0 .5-.086 1-.188.5-.102.988-.188 1.188-.188zm12.126 8.093c-.899 0-1.426.395-1.625 1.094.199-.398.824-.594 1.625-.594.398 0 .898.106 1.5.407-.2-.5-.801-.907-1.5-.907zm-10.5.5c-.372.043-.7.18-1 .407-.5.3-.72.687-.72 1.187 0 .2-.007.398.095.5 0-.5.21-.887.812-1.188.602-.398 1.094-.5 1.594-.5.199 0 .508.086.906.188-.3-.398-.71-.594-1.313-.594-.125 0-.25-.015-.375 0zm11.28 2.782c-.3 0-.605.105-.905.406-.301.3-.375.605-.375.906 0 .3.074.605.375.906.3.301.605.407.906.407.398 0 .707-.106.906-.407.3-.3.406-.605.406-.906 0-.398-.105-.707-.406-.906-.3-.301-.605-.407-.906-.407zm.5.625c.2 0 .407.082.407.28 0 .2-.105.407-.406.407-.2 0-.282-.105-.282-.406 0-.2.083-.282.282-.282zm-10.593.093c-.398 0-.7.2-1 .5-.3.301-.5.7-.5 1 0 .399.2.7.5 1 .3.301.602.5 1 .5s.7-.199 1-.5c.3-.3.5-.699.5-1 0-.398-.2-.699-.5-1-.3-.3-.7-.5-1-.5zm.688.594c.3 0 .406.105.406.406 0 .2-.106.407-.407.407-.3 0-.375-.106-.375-.407 0-.3.075-.406.375-.406z"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.5 KiB |
Loading…
Add table
Add a link
Reference in a new issue