From c1fddadf6cd4e47d14c89ec0f36b32740600e130 Mon Sep 17 00:00:00 2001 From: Quorafind Date: Sat, 26 Nov 2022 10:51:11 +0800 Subject: [PATCH 1/2] chore: rename another web browser to surfing --- .github/workflows/release.yml | 2 +- README-ZH.md | 127 +++++++++--------- README.md | 55 +++++--- esbuild.config.mjs | 2 +- manifest.json | 10 +- package.json | 2 +- src/component/headerBar.ts | 6 +- src/component/inPageSearchBar.ts | 6 +- src/component/searchBox.ts | 6 +- ...rowser_file_view.ts => surfingFileView.ts} | 8 +- ...therWebBrowserIndex.ts => surfingIndex.ts} | 44 +++--- ...WebBrowserSetting.ts => surfingSetting.ts} | 24 +++- src/{web_browser_view.ts => surfingView.ts} | 22 +-- src/translations/locale/en.ts | 6 +- src/translations/locale/fr.ts | 2 +- src/translations/locale/pt-br.ts | 2 +- src/translations/locale/pt.ts | 2 +- src/translations/locale/zh-cn.ts | 6 +- 18 files changed, 181 insertions(+), 151 deletions(-) rename src/{web_browser_file_view.ts => surfingFileView.ts} (71%) rename src/{anotherWebBrowserIndex.ts => surfingIndex.ts} (89%) rename src/{anotherWebBrowserSetting.ts => surfingSetting.ts} (96%) rename src/{web_browser_view.ts => surfingView.ts} (95%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3914362..701235c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,7 @@ on: types: [ created ] env: - PLUGIN_NAME: another-web-browser + PLUGIN_NAME: obsidian-surfing jobs: build: diff --git a/README-ZH.md b/README-ZH.md index 316103a..25e5aec 100644 --- a/README-ZH.md +++ b/README-ZH.md @@ -1,61 +1,66 @@ -## Another Web Browser - -> 这个分支由 Boninall 维护,仅作个人使用。如果你想用该插件,使用 `quorafind/obsidian-web-browser` 分支而不是以前的; -> 原始分支来自[这里](https://github.com/Trikzon/obsidian-web-browser) - -[English Doc](README.md) - -## 简介 - -这是一款 Obsidian 插件,允许你在 Obsidian v1.0 的标签页中浏览任意网址。 - -这个插件的核心功能——渲染一个 webview ,离不开 [Ellpeck's Obsidian Custom Frames](https://github.com/Ellpeck/ObsidianCustomFrames) 插件。 - -![](assets/obsidian-web-browser.png) - -## 功能介绍 - -- 核心功能 - - 浏览任意网页:该插件会劫持Obsidian的 file、http、https 协议,使得链接能直接在Obsidian里打开,而不是外部浏览器。对,本地HTML等资源也支持。 - - 编辑器网页搜索你可以在编辑器选中关键字后,右键在 web-browser 中打开,使用默认的搜索引擎搜索。 - - 网页内网页搜索:同样的,你可以在网页内右键使用默认的搜索引擎搜索。 - - 复制指向高亮的链接:同浏览器一样,你可以选中文字,复制指向该处的链接。 - - 在浏览器中使用书签直接在 Obsidian 中打开网址。 - - 复制视频时间戳(实验性功能:目前仅支持bilibili):右键文字弹出复制时间戳的菜单,目前有些bug,已知有时弹不出菜单。 -- 辅助功能 - - 用外部浏览器打开当前URL:右键菜单 - - 默认搜索引擎:设置项 - - 默认复制高亮的模板:设置项(目前仅支持非常简单的模板),请避免使用一些特殊字符 - - 支持浏览历史记录:前后跳转网页 - - 清除浏览历史记录:命令面板 - - 所有链接都在右侧同一个面板中打开:设置项 - - 切换是否在右侧同一面板中打开:命令面板 - - 简单的夜间模式:主要是为了bilibili的夜间观感,有些瑕疵,问题不大 - -## 使用方法 - -### 利用浏览器书签在obsidain中打开网站 - -插件注册了一个 Obsidain uri 协议,该协议允许你使用`obsidian://web-open?url=`的网址在 Obsidian 中打开 Web-broswer 。其中``指网页地址链接。配合 [bookmarklets](https://www.ruanyifeng.com/blog/2011/06/a_guide_for_writing_bookmarklet.html) 便能实现点击浏览器的一个书签,在ob内打开当前浏览器网址。 - -1. 在插件设置里打开`Open URL In Obsidian Web`选项 -2. 该选项下有一个链接,拖拽这个链接到你外部浏览器的书签栏处,会生成一个书签; 你也可以点击这个链接复制 bookmarklets 代码,自己新建一个书签 -3. 现在可以点击书签,将浏览器当前页面在 Obsidian 打开了 - -## 安装 - -- 目前尚未准备好上架市场 -- 可以通过 [Brat](https://github.com/TfTHacker/obsidian42-brat) 插件安装 -- 手动安装 - -1. 在该github页面找到release页面并点击 -2. 下载最新的一次release压缩包 -3. 解压,复制解压后的文件夹到obsidian插件文件夹下,确保该文件夹里有main.js和manifest.json文件 -4. 重启obsidian(不重启也行,得刷新),在设置界面启用该插件 -5. 欧了 - -## Support - -You can support original author `Trikzon` : - -[](https://ko-fi.com/trikzon) \ No newline at end of file +## Surfing + +> 这个分支由 Boninall 维护,仅作个人使用。如果你想用该插件,使用 `quorafind/obsidian-web-browser` 分支而不是以前的; +> 原始分支来自[这里](https://github.com/Trikzon/obsidian-web-browser) + +[English Doc](README.md) + +## 简介 + +这是一款 Obsidian 插件,允许你在 Obsidian v1.0 的标签页中浏览任意网址。 + +这个插件的核心功能——渲染一个 webview +,离不开 [Ellpeck's Obsidian Custom Frames](https://github.com/Ellpeck/ObsidianCustomFrames) 插件。 + +![](assets/obsidian-web-browser.png) + +## 功能介绍 + +- 核心功能 + - 浏览任意网页:该插件会劫持Obsidian的 file、http、https 协议,使得链接能直接在Obsidian里打开,而不是外部浏览器。对,本地HTML等资源也支持。 + - 编辑器网页搜索你可以在编辑器选中关键字后,右键在 web-browser 中打开,使用默认的搜索引擎搜索。 + - 网页内网页搜索:同样的,你可以在网页内右键使用默认的搜索引擎搜索。 + - 复制指向高亮的链接:同浏览器一样,你可以选中文字,复制指向该处的链接。 + - 在浏览器中使用书签直接在 Obsidian 中打开网址。 + - 复制视频时间戳(实验性功能:目前仅支持bilibili):右键文字弹出复制时间戳的菜单,目前有些bug,已知有时弹不出菜单。 +- 辅助功能 + - 用外部浏览器打开当前URL:右键菜单 + - 默认搜索引擎:设置项 + - 默认复制高亮的模板:设置项(目前仅支持非常简单的模板),请避免使用一些特殊字符 + - 支持浏览历史记录:前后跳转网页 + - 清除浏览历史记录:命令面板 + - 所有链接都在右侧同一个面板中打开:设置项 + - 切换是否在右侧同一面板中打开:命令面板 + - 简单的夜间模式:主要是为了bilibili的夜间观感,有些瑕疵,问题不大 + +## 使用方法 + +### 利用浏览器书签在obsidain中打开网站 + +插件注册了一个 Obsidain uri 协议,该协议允许你使用`obsidian://web-open?url=`的网址在 Obsidian 中打开 Web-broswer +。其中`` +指网页地址链接。配合 [bookmarklets](https://www.ruanyifeng.com/blog/2011/06/a_guide_for_writing_bookmarklet.html) +便能实现点击浏览器的一个书签,在ob内打开当前浏览器网址。 + +1. 在插件设置里打开`Open URL In Obsidian Web`选项 +2. 该选项下有一个链接,拖拽这个链接到你外部浏览器的书签栏处,会生成一个书签; 你也可以点击这个链接复制 bookmarklets + 代码,自己新建一个书签 +3. 现在可以点击书签,将浏览器当前页面在 Obsidian 打开了 + +## 安装 + +- 目前尚未准备好上架市场 +- 可以通过 [Brat](https://github.com/TfTHacker/obsidian42-brat) 插件安装 +- 手动安装 + +1. 在该github页面找到release页面并点击 +2. 下载最新的一次release压缩包 +3. 解压,复制解压后的文件夹到obsidian插件文件夹下,确保该文件夹里有main.js和manifest.json文件 +4. 重启obsidian(不重启也行,得刷新),在设置界面启用该插件 +5. 欧了 + +## Support + +You can support original author `Trikzon` : + +[](https://ko-fi.com/trikzon) diff --git a/README.md b/README.md index 498afcf..8d49f3f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -## Another Web Browser +## Surfing > This fork is maintained by Boninall, it is for personal use only. If you want to use it, -> add `quorafind/obsidian-web-browser` rather than original one. +> add `quorafind/obsidian-web-browser` rather than original one. > Original fork is [here](https://github.com/Trikzon/obsidian-web-browser). [中文文档](README-ZH.md) | [English Doc](README.md) @@ -19,30 +19,39 @@ have be possible without it. ## Feature - Core Feature - - Browse arbitrary web pages: The plugin hijacks Obsidian's file, http, https protocols, enabling links to be opened directly in Obsidian, rather than in external browsers. Yes, local HTML and other resources are also supported. - - Editor web search: You can select keywords in the editor and then right-click to open them in web-browser and search using the default search engine. - - In-page web search: Again, you can right-click within a web page to use the default search engine search. - - Copy links pointing to highlights: As with the browser, you can select text and copy the links pointing to it. - - Use BookmarkLets in your browser to open the URL directly in Obsidian. - - Copy video timestamp (experimental feature: currently only bilibili is supported): right click on the text to pop up the menu to copy the timestamp, currently there are some bugs, it is known that sometimes the menu does not pop up. + - Browse arbitrary web pages: The plugin hijacks Obsidian's file, http, https protocols, enabling links to be opened + directly in Obsidian, rather than in external browsers. Yes, local HTML and other resources are also supported. + - Editor web search: You can select keywords in the editor and then right-click to open them in web-browser and + search using the default search engine. + - In-page web search: Again, you can right-click within a web page to use the default search engine search. + - Copy links pointing to highlights: As with the browser, you can select text and copy the links pointing to it. + - Use BookmarkLets in your browser to open the URL directly in Obsidian. + - Copy video timestamp (experimental feature: currently only bilibili is supported): right click on the text to pop + up the menu to copy the timestamp, currently there are some bugs, it is known that sometimes the menu does not pop + up. - Auxiliary Feature - - Open current URL with external browser: right-click menu - - Default search engine: setting item - - Default copy highlighted template: setting item (currently only supports very simple templates), please avoid using some special characters - - Support browsing history: Jump back and forth to the page - - Clear browsing history: command panel - - All links are opened in the same panel on the right: Settings - - Toggle whether to open in the same panel on the right: command panel - - Simple dark mode: just simple + - Open current URL with external browser: right-click menu + - Default search engine: setting item + - Default copy highlighted template: setting item (currently only supports very simple templates), please avoid + using some special characters + - Support browsing history: Jump back and forth to the page + - Clear browsing history: command panel + - All links are opened in the same panel on the right: Settings + - Toggle whether to open in the same panel on the right: command panel + - Simple dark mode: just simple ## Usage - + ### Use BookmarkLets Open URL -The plugin registers an Obsidain uri protocol that allows you to open eb-broswer in Obsidian using the URL `obsidian://web-open?url=`. Where `` refers to the web address link. Match [bookmarklets](https://en.wikipedia.org/wiki/Bookmarklet) will be able to click a bookmark in the browser to open the current browser URL within Obsidain. +The plugin registers an Obsidain uri protocol that allows you to open eb-broswer in Obsidian using the +URL `obsidian://web-open?url=`. Where `` refers to the web address link. +Match [bookmarklets](https://en.wikipedia.org/wiki/Bookmarklet) will be able to click a bookmark in the browser to open +the current browser URL within Obsidain. -1. Open the `Open URL In Obsidian Web` option in the plugin settings. -2. Under this option there is a link of bookmarklets, drag this link into your browser's bookmark bar. You can also click this link(will copy bookmarklets code), then create bookmarklets by yourself. +1. Open the `Open URL In Obsidian Web` option in the plugin settings. +2. Under this option there is a link of bookmarklets, drag this link into your browser's bookmark bar. You can also + click this link(will copy bookmarklets code), then create bookmarklets by yourself. 3. Now you can click on the bookmark to open the current page of your browser in Obsidian. ## Installation @@ -53,8 +62,10 @@ The plugin registers an Obsidain uri protocol that allows you to open eb-broswe 1. Find the release page on this github page and click 2. Download the latest release zip file -3. Unzip it, copy the unzipped folder to the obsidian plugin folder, make sure there are main.js and manifest.json files in the folder -4. Restart obsidian (do not restart also, you have to refresh plugin list), in the settings interface to enable the plugin +3. Unzip it, copy the unzipped folder to the obsidian plugin folder, make sure there are main.js and manifest.json files + in the folder +4. Restart obsidian (do not restart also, you have to refresh plugin list), in the settings interface to enable the + plugin 5. Done! ## Support diff --git a/esbuild.config.mjs b/esbuild.config.mjs index c0d10c2..4338c3a 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -15,7 +15,7 @@ esbuild.build({ banner: { js: banner, }, - entryPoints: ['src/anotherWebBrowserIndex.ts'], + entryPoints: ['src/surfingIndex.ts'], bundle: true, external: [ 'obsidian', diff --git a/manifest.json b/manifest.json index ca4b71f..037338e 100644 --- a/manifest.json +++ b/manifest.json @@ -1,10 +1,10 @@ { - "id": "another-web-browser", - "name": "Another Web Browser", + "id": "surfing", + "name": "Surfing", "version": "0.2.4", "minAppVersion": "1.0.0", "description": "Lets you browse the web within Obsidian with some neat features.", - "author": "Dion Tryban (Trikzon) && Boninall", - "authorUrl": "https://github.com/Trikzon", + "author": "Boninall", + "authorUrl": "https://github.com/Quorafind", "isDesktopOnly": true -} \ No newline at end of file +} diff --git a/package.json b/package.json index d7432ec..86fe435 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "another-web-browser", + "name": "surfing", "version": "0.2.4", "description": "Lets you browse the web within Obsidian with some neat features.", "main": "main.js", diff --git a/src/component/headerBar.ts b/src/component/headerBar.ts index 634cf49..89368c2 100644 --- a/src/component/headerBar.ts +++ b/src/component/headerBar.ts @@ -1,13 +1,13 @@ -import AnotherWebBrowserPlugin from "../anotherWebBrowserIndex"; +import SurfingPlugin from "../surfingIndex"; import { t } from "../translations/helper"; export class HeaderBar { - plugin: AnotherWebBrowserPlugin; + plugin: SurfingPlugin; private searchBar: HTMLInputElement; private onSearchBarEnterListener = new Array<(url: string) => void>; removeChild = true; - constructor(parent: Element, plugin: AnotherWebBrowserPlugin, removeChild?: boolean) { + constructor(parent: Element, plugin: SurfingPlugin, removeChild?: boolean) { this.plugin = plugin; if (removeChild !== undefined) this.removeChild = removeChild; // CSS class removes the gradient at the right of the header bar. diff --git a/src/component/inPageSearchBar.ts b/src/component/inPageSearchBar.ts index bb3b731..b73ccef 100644 --- a/src/component/inPageSearchBar.ts +++ b/src/component/inPageSearchBar.ts @@ -1,13 +1,13 @@ -import AnotherWebBrowserPlugin from "../anotherWebBrowserIndex"; +import SurfingPlugin from "../surfingIndex"; import { t } from "../translations/helper"; export class InPageSearchBar { - plugin: AnotherWebBrowserPlugin; + plugin: SurfingPlugin; private inPageSearchBarEl: HTMLInputElement; private inPageSearchBarContainerEl: HTMLDivElement; private onSearchBarEnterListener = new Array<(url: string) => void>; - constructor(parent: Element, plugin: AnotherWebBrowserPlugin) { + constructor(parent: Element, plugin: SurfingPlugin) { this.plugin = plugin; // CSS class removes the gradient at the right of the header bar. parent.addClass("wb-page-search-bar"); diff --git a/src/component/searchBox.ts b/src/component/searchBox.ts index 01d92cc..0af75c7 100644 --- a/src/component/searchBox.ts +++ b/src/component/searchBox.ts @@ -1,8 +1,8 @@ import { setIcon, WorkspaceLeaf } from "obsidian"; -import AnotherWebBrowserPlugin from "../anotherWebBrowserIndex"; +import SurfingPlugin from "../surfingIndex"; export default class searchBox { - plugin: AnotherWebBrowserPlugin; + plugin: SurfingPlugin; leaf: WorkspaceLeaf; webContents: any; @@ -13,7 +13,7 @@ export default class searchBox { searchBoxEl: HTMLElement; clicked: boolean; - constructor(leaf: WorkspaceLeaf, webContents: any, plugin: AnotherWebBrowserPlugin, removeChild?: boolean) { + constructor(leaf: WorkspaceLeaf, webContents: any, plugin: SurfingPlugin, removeChild?: boolean) { this.leaf = leaf; this.webContents = webContents; this.plugin = plugin; diff --git a/src/web_browser_file_view.ts b/src/surfingFileView.ts similarity index 71% rename from src/web_browser_file_view.ts rename to src/surfingFileView.ts index 17a77df..1cc6d1a 100644 --- a/src/web_browser_file_view.ts +++ b/src/surfingFileView.ts @@ -1,10 +1,10 @@ import { FileSystemAdapter, FileView, TFile, WorkspaceLeaf } from "obsidian"; -import { AnotherWebBrowserView } from "./web_browser_view"; +import { SurfingView } from "./surfingView"; export const HTML_FILE_EXTENSIONS = ["html", "htm"]; -export const WEB_BROWSER_FILE_VIEW_ID = "another-web-browser-file-view"; +export const WEB_BROWSER_FILE_VIEW_ID = "surfing-file-view"; -export class AnotherWebBrowserFileView extends FileView { +export class SurfingFileView extends FileView { allowNoFile: false; constructor(leaf: WorkspaceLeaf) { @@ -14,7 +14,7 @@ export class AnotherWebBrowserFileView extends FileView { async onLoadFile(file: TFile): Promise { const adapter = this.app.vault.adapter as FileSystemAdapter; const urlString = "file:///" + (adapter.getBasePath() + "/" + file.path).toString().replace(/\s/g, "%20"); - AnotherWebBrowserView.spawnWebBrowserView(true, { url: urlString }); + SurfingView.spawnWebBrowserView(true, { url: urlString }); if (this.leaf) this.leaf.detach(); } diff --git a/src/anotherWebBrowserIndex.ts b/src/surfingIndex.ts similarity index 89% rename from src/anotherWebBrowserIndex.ts rename to src/surfingIndex.ts index 6e839d4..a0a200b 100644 --- a/src/anotherWebBrowserIndex.ts +++ b/src/surfingIndex.ts @@ -1,19 +1,19 @@ import { Editor, EventRef, ItemView, MarkdownView, Menu, Notice, Plugin, } from "obsidian"; import { HeaderBar } from "./component/headerBar"; -import { AnotherWebBrowserView, WEB_BROWSER_VIEW_ID } from "./web_browser_view"; -import { AnotherWebBrowserFileView, HTML_FILE_EXTENSIONS, WEB_BROWSER_FILE_VIEW_ID } from "./web_browser_file_view"; +import { SurfingView, WEB_BROWSER_VIEW_ID } from "./surfingView"; +import { SurfingFileView, HTML_FILE_EXTENSIONS, WEB_BROWSER_FILE_VIEW_ID } from "./surfingFileView"; import { t } from "./translations/helper"; import { around } from "monkey-around"; import { - AnotherWebBrowserPluginSettings, + SurfingSettings, DEFAULT_SETTINGS, SEARCH_ENGINES, WebBrowserSettingTab -} from "./anotherWebBrowserSetting"; +} from "./surfingSetting"; import { InPageSearchBar } from "./component/inPageSearchBar"; -export default class AnotherWebBrowserPlugin extends Plugin { - settings: AnotherWebBrowserPluginSettings; +export default class SurfingPlugin extends Plugin { + settings: SurfingSettings; private onLayoutChangeEventRef: EventRef; async onload() { @@ -22,8 +22,8 @@ export default class AnotherWebBrowserPlugin extends Plugin { this.addSettingTab(new WebBrowserSettingTab(this.app, this)); - this.registerView(WEB_BROWSER_VIEW_ID, (leaf) => new AnotherWebBrowserView(leaf, this)); - this.registerView(WEB_BROWSER_FILE_VIEW_ID, (leaf) => new AnotherWebBrowserFileView(leaf)); + this.registerView(WEB_BROWSER_VIEW_ID, (leaf) => new SurfingView(leaf, this)); + this.registerView(WEB_BROWSER_FILE_VIEW_ID, (leaf) => new SurfingFileView(leaf)); try { this.registerExtensions(HTML_FILE_EXTENSIONS, WEB_BROWSER_FILE_VIEW_ID); @@ -65,7 +65,7 @@ export default class AnotherWebBrowserPlugin extends Plugin { // Focus on current inputEl if (!this.settings.showSearchBarInPage) headerBar.focus(); headerBar.addOnSearchBarEnterListener((url: string) => { - AnotherWebBrowserView.spawnWebBrowserView(false, { url }); + SurfingView.spawnWebBrowserView(false, { url }); }); } if (!currentView.contentEl.children[0].hasClass("wb-page-search-bar") && this.settings.showSearchBarInPage) { @@ -75,7 +75,7 @@ export default class AnotherWebBrowserPlugin extends Plugin { } inPageSearchBar.focus(); inPageSearchBar.addOnSearchBarEnterListener((url: string) => { - AnotherWebBrowserView.spawnWebBrowserView(false, { url }); + SurfingView.spawnWebBrowserView(false, { url }); }); } } @@ -115,7 +115,7 @@ export default class AnotherWebBrowserPlugin extends Plugin { if (!url) return; if (decodeURI(url) !== url) url = decodeURI(url).toString().replace(/\s/g, "%20"); - AnotherWebBrowserView.spawnWebBrowserView(true, { url: url }); + SurfingView.spawnWebBrowserView(true, { url: url }); }); } @@ -139,7 +139,7 @@ export default class AnotherWebBrowserPlugin extends Plugin { .setTitle(engine.name) .onClick(() => { // @ts-ignore - AnotherWebBrowserView.spawnWebBrowserView(true, { url: engine.url + selection }); + SurfingView.spawnWebBrowserView(true, { url: engine.url + selection }); }) }) }) @@ -149,7 +149,7 @@ export default class AnotherWebBrowserPlugin extends Plugin { item.setIcon('search') .setTitle("custom") .onClick(() => { - AnotherWebBrowserView.spawnWebBrowserView(true, { url: this.settings.customSearchEngine + selection }); + SurfingView.spawnWebBrowserView(true, { url: this.settings.customSearchEngine + selection }); }) }) } @@ -166,7 +166,7 @@ export default class AnotherWebBrowserPlugin extends Plugin { name: t('Open Current URL In External Browser'), checkCallback: (checking: boolean) => { // Conditions to check - const webbrowserView = this.app.workspace.getActiveViewOfType(AnotherWebBrowserView); + const webbrowserView = this.app.workspace.getActiveViewOfType(SurfingView); if (webbrowserView) { // If checking is true, we're simply "checking" if the command can be run. // If checking is false, then we want to actually perform the operation. @@ -187,7 +187,7 @@ export default class AnotherWebBrowserPlugin extends Plugin { name: t('Clear Current Page History'), checkCallback: (checking: boolean) => { // Conditions to check - const webbrowserView = this.app.workspace.getActiveViewOfType(AnotherWebBrowserView); + const webbrowserView = this.app.workspace.getActiveViewOfType(SurfingView); if (webbrowserView) { // If checking is true, we're simply "checking" if the command can be run. // If checking is false, then we want to actually perform the operation. @@ -208,7 +208,7 @@ export default class AnotherWebBrowserPlugin extends Plugin { name: t('Refresh Current Page'), checkCallback: (checking: boolean) => { // Conditions to check - const webbrowserView = this.app.workspace.getActiveViewOfType(AnotherWebBrowserView); + const webbrowserView = this.app.workspace.getActiveViewOfType(SurfingView); if (webbrowserView) { // If checking is true, we're simply "checking" if the command can be run. // If checking is false, then we want to actually perform the operation. @@ -236,12 +236,12 @@ export default class AnotherWebBrowserPlugin extends Plugin { id: 'get-current-timestamp', name: t('Get Current Timestamp from Web Browser'), editorCallback: (editor: Editor, view: MarkdownView) => { - const lastActiveLeaves = this.app.workspace.getLeavesOfType("another-web-browser-view"); + const lastActiveLeaves = this.app.workspace.getLeavesOfType("surfing-view"); if (lastActiveLeaves.length === 0) return; const lastActiveLeaf = lastActiveLeaves.sort((a, b) => b.activeTime - a.activeTime)[0]; - const webbrowserView = lastActiveLeaf.view as AnotherWebBrowserView; + const webbrowserView = lastActiveLeaf.view as SurfingView; const url = webbrowserView.getState()?.url; if (!url?.contains("bilibili")) return; @@ -258,7 +258,7 @@ export default class AnotherWebBrowserPlugin extends Plugin { if (currentView.headerEl.childNodes.length > 4) return; const searchBarEl = new HeaderBar(currentView.headerEl, this, false); searchBarEl.addOnSearchBarEnterListener((url: string) => { - AnotherWebBrowserView.spawnWebBrowserView(false, { url }); + SurfingView.spawnWebBrowserView(false, { url }); }); searchBarEl.focus(); } @@ -267,9 +267,9 @@ export default class AnotherWebBrowserPlugin extends Plugin { private checkWebBrowser() { const webBrowser = app.plugins.getPlugin("obsidian-web-browser") - if (webBrowser) new Notice(t("You enabled obsidian-web-browser plugin, please disable it/disable another-web-browser to avoid conflict."), 4000); + if (webBrowser) new Notice(t("You enabled obsidian-web-browser plugin, please disable it/disable surfing to avoid conflict."), 4000); const tabHeader = app.vault.getConfig("showViewHeader") - if (!tabHeader) new Notice(t("You didn't enable show tab title bar in apperance settings, please enable it to use another web browser happily."), 4000); + if (!tabHeader) new Notice(t("You didn't enable show tab title bar in apperance settings, please enable it to use surfing happily."), 4000); } // TODO: Licat said that this method will be changed in the future. @@ -362,7 +362,7 @@ export default class AnotherWebBrowserPlugin extends Plugin { } // TODO: Open external link in current leaf when meta key isn't being held down. - AnotherWebBrowserView.spawnWebBrowserView(true, { url: urlString }); + SurfingView.spawnWebBrowserView(true, { url: urlString }); return null; } }) diff --git a/src/anotherWebBrowserSetting.ts b/src/surfingSetting.ts similarity index 96% rename from src/anotherWebBrowserSetting.ts rename to src/surfingSetting.ts index 0246680..c00d642 100644 --- a/src/anotherWebBrowserSetting.ts +++ b/src/surfingSetting.ts @@ -10,13 +10,13 @@ import { } from "obsidian"; import { t } from "./translations/helper"; import { clipboard } from "electron"; -import AnotherWebBrowserPlugin from "./anotherWebBrowserIndex"; +import SurfingPlugin from "./surfingIndex"; type settingSearchInfo = { containerEl: HTMLElement, name: string, description: string, options: SearchOptionInfo[], alias?: string } type TabContentInfo = { content: HTMLElement, heading: HTMLElement, navButton: HTMLElement } export type SearchOptionInfo = { name: string, description: string, options?: DropdownRecord[] } -export interface AnotherWebBrowserPluginSettings { +export interface SurfingSettings { defaultSearchEngine: string; customSearchEngine: SearchEngine[]; alwaysShowCustomSearch: boolean; @@ -32,7 +32,7 @@ interface SearchEngine { url: string; } -export const DEFAULT_SETTINGS: AnotherWebBrowserPluginSettings = { +export const DEFAULT_SETTINGS: SurfingSettings = { defaultSearchEngine: 'duckduckgo', customSearchEngine: [{ name: 'duckduckgo', @@ -93,7 +93,7 @@ export class DropdownRecord { } export class WebBrowserSettingTab extends PluginSettingTab { - plugin: AnotherWebBrowserPlugin; + plugin: SurfingPlugin; private applyDebounceTimer = 0; private tabContent: Map = new Map(); private selectedTab = 'General'; @@ -102,7 +102,7 @@ export class WebBrowserSettingTab extends PluginSettingTab { private searchZeroState: HTMLDivElement; private navEl: HTMLElement; - constructor(app: App, plugin: AnotherWebBrowserPlugin) { + constructor(app: App, plugin: SurfingPlugin) { super(app, plugin); this.plugin = plugin; } @@ -564,4 +564,18 @@ export class WebBrowserSettingTab extends PluginSettingTab { this.addSettingToMasterSettingsList(tabName, bookmarkLetsContainerEl, settingName); } + + private addAboutInfo(tabName: string, wbContainerEl: HTMLElement) { + + const bookmarkLetsContainerEl = wbContainerEl.createDiv({ cls: 'wb-about-card' }); + + setIcon(bookmarkLetsContainerEl.createDiv({ cls: 'wb-about-icon' }), 'mountain-snow'); + + const text = this.plugin.manifest.version; + const url = "" + + bookmarkLetsContainerEl.createDiv({ cls: 'wb-about-title', text: text }); + + this.addSettingToMasterSettingsList(tabName, bookmarkLetsContainerEl, text); + } } diff --git a/src/web_browser_view.ts b/src/surfingView.ts similarity index 95% rename from src/web_browser_view.ts rename to src/surfingView.ts index 4653696..2a252cd 100644 --- a/src/web_browser_view.ts +++ b/src/surfingView.ts @@ -2,16 +2,16 @@ import { ItemView, ViewStateResult, WorkspaceLeaf, MarkdownView, Editor, debounc import { HeaderBar } from "./component/headerBar"; // @ts-ignore import { clipboard, remote } from "electron"; -import AnotherWebBrowserPlugin from "./anotherWebBrowserIndex"; +import SurfingPlugin from "./surfingIndex"; import { moment } from "obsidian"; import { t } from "./translations/helper"; import searchBox from "./component/searchBox"; -import { SEARCH_ENGINES } from "./anotherWebBrowserSetting"; +import { SEARCH_ENGINES } from "./surfingSetting"; -export const WEB_BROWSER_VIEW_ID = "another-web-browser-view"; +export const WEB_BROWSER_VIEW_ID = "surfing-view"; -export class AnotherWebBrowserView extends ItemView { - plugin: AnotherWebBrowserPlugin; +export class SurfingView extends ItemView { + plugin: SurfingPlugin; searchBox: searchBox; private currentUrl: string; private currentTitle = "New tab"; @@ -20,13 +20,13 @@ export class AnotherWebBrowserView extends ItemView { private favicon: HTMLImageElement; private frame: HTMLIFrameElement; - constructor(leaf: WorkspaceLeaf, plugin: AnotherWebBrowserPlugin) { + constructor(leaf: WorkspaceLeaf, plugin: SurfingPlugin) { super(leaf); this.plugin = plugin; } static spawnWebBrowserView(newLeaf: boolean, state: WebBrowserViewState) { - const isOpenInSameTab = app.plugins.getPlugin("another-web-browser").settings.openInSameTab; + const isOpenInSameTab = app.plugins.getPlugin("surfing").settings.openInSameTab; if (!isOpenInSameTab) { if (state.url.contains("bilibili")) { for (let i = 0; i < app.workspace.getLeavesOfType(WEB_BROWSER_VIEW_ID).length; i++) { @@ -68,7 +68,7 @@ export class AnotherWebBrowserView extends ItemView { const newLeafID = app.workspace.getLeavesOfType(WEB_BROWSER_VIEW_ID)[0]?.id; if (newLeafID) { localStorage.setItem("web-browser-leaf-id", newLeafID); - (app.workspace.getLeafById(newLeafID)?.view as AnotherWebBrowserView).navigate(state.url, true); + (app.workspace.getLeafById(newLeafID)?.view as SurfingView).navigate(state.url, true); app.workspace.getLeafById(newLeafID)?.rebuildView(); return; } @@ -76,7 +76,7 @@ export class AnotherWebBrowserView extends ItemView { if (app.workspace.getLeafById(leafId)?.view.getViewType() === WEB_BROWSER_VIEW_ID) { // @ts-ignore - (app.workspace.getLeafById(leafId)?.view as AnotherWebBrowserView).navigate(state.url, true); + (app.workspace.getLeafById(leafId)?.view as SurfingView).navigate(state.url, true); app.workspace.getLeafById(leafId).rebuildView(); return; } @@ -126,7 +126,7 @@ export class AnotherWebBrowserView extends ItemView { // Open new browser tab if the web view requests it. webContents.setWindowOpenHandler((event: any) => { - AnotherWebBrowserView.spawnWebBrowserView(true, { url: event.url }); + SurfingView.spawnWebBrowserView(true, { url: event.url }); return { action: "allow", } @@ -199,7 +199,7 @@ export class AnotherWebBrowserView extends ItemView { menu.append(new MenuItem({ label: t('Search Text'), click: function () { try { - AnotherWebBrowserView.spawnWebBrowserView(true, { url: params.selectionText }); + SurfingView.spawnWebBrowserView(true, { url: params.selectionText }); console.log('Page URL copied to clipboard'); } catch (err) { console.error('Failed to copy: ', err); diff --git a/src/translations/locale/en.ts b/src/translations/locale/en.ts index e641887..873d3c2 100644 --- a/src/translations/locale/en.ts +++ b/src/translations/locale/en.ts @@ -1,7 +1,7 @@ // English export default { - // anotherWebBrowserSetting.ts + // surfingSetting.ts "Search with": "Search with", "or enter address": "or enter address", 'Default Search Engine': 'Default Search Engine', @@ -28,8 +28,8 @@ export default { "Copy BookmarkLets Success": "Copy BookmarkLets Success", 'Refresh Current Page': 'Refresh Current Page', 'Show Search Bar In Empty Page': 'Show Search Bar In Empty Page', - "You enabled obsidian-web-browser plugin, please disable it/disable another-web-browser to avoid conflict.": "You enabled obsidian-web-browser plugin, please disable it/disable another-web-browser to avoid conflict.", - "You didn't enable show tab title bar in apperance settings, please enable it to use another web browser happily.": "You didn't enable show tab header in apperance settings, please enable it to use another web browser happily.", + "You enabled obsidian-web-browser plugin, please disable it/disable surfing to avoid conflict.": "You enabled obsidian-web-browser plugin, please disable it/disable Surfing to avoid conflict.", + "You didn't enable show tab title bar in apperance settings, please enable it to use surfing happily.": "You didn't enable show tab header in apperance settings, please enable it to use Surfing happily.", 'Get Current Timestamp from Web Browser': 'Get Current Timestamp from Web Browser', 'Search In Current Page Title Bar': 'Search In Current Page Title Bar', " <- Drag or click on me": " <- Drag or click on me", diff --git a/src/translations/locale/fr.ts b/src/translations/locale/fr.ts index e408d94..6656506 100644 --- a/src/translations/locale/fr.ts +++ b/src/translations/locale/fr.ts @@ -1,5 +1,5 @@ // français export default { - // anotherWebBrowserSetting.ts + // surfingSetting.ts }; diff --git a/src/translations/locale/pt-br.ts b/src/translations/locale/pt-br.ts index 9a52657..2e59c4d 100644 --- a/src/translations/locale/pt-br.ts +++ b/src/translations/locale/pt-br.ts @@ -2,5 +2,5 @@ // Brazilian Portuguese export default { - // anotherWebBrowserSetting.ts + // surfingSetting.ts }; diff --git a/src/translations/locale/pt.ts b/src/translations/locale/pt.ts index 860f585..a517c09 100644 --- a/src/translations/locale/pt.ts +++ b/src/translations/locale/pt.ts @@ -1,5 +1,5 @@ // Português export default { - // anotherWebBrowserSetting.ts + // surfingSetting.ts }; diff --git a/src/translations/locale/zh-cn.ts b/src/translations/locale/zh-cn.ts index 856b351..8564e2a 100644 --- a/src/translations/locale/zh-cn.ts +++ b/src/translations/locale/zh-cn.ts @@ -1,5 +1,5 @@ export default { - // anotherWebBrowserSetting.ts + // surfingSetting.ts "Search with": "使用", "or enter address": "搜索,或输入地址", 'Default Search Engine': '默认搜索引擎', @@ -26,8 +26,8 @@ export default { "Copy BookmarkLets Success": '复制 BookmarkLets 成功', 'Refresh Current Page': '刷新当前页面', 'Show Search Bar In Empty Page': '在空白页面中显示搜索栏', - "You enabled obsidian-web-browser plugin, please disable it/disable another-web-browser to avoid conflict.": "你启用了 obsidian-web-browser 插件,请禁用它或禁用 another web browser 插件以避免冲突。", - "You didn't enable show tab title bar in apperance settings, please enable it to use another web browser happily.": "你没有在外观设置中启用显示标签页标题,请启用它以便使用 another web browser。", + "You enabled obsidian-web-browser plugin, please disable it/disable surfing to avoid conflict.": "你启用了 obsidian-web-browser 插件,请禁用它或禁用 surfing 插件以避免冲突。", + "You didn't enable show tab title bar in apperance settings, please enable it to use surfing happily.": "你没有在外观设置中启用显示标签页标题,请启用它以便使用 surfing。", 'Get Current Timestamp from Web Browser': '从浏览器获取当前时间戳', 'Search In Current Page Title Bar': '在当前页面标题栏中搜索', " <- Drag or click on me": " <- 拖动或点击", From 1b325b77387b5573470f45eccc3012b16042c633 Mon Sep 17 00:00:00 2001 From: Quorafind Date: Sat, 26 Nov 2022 11:36:16 +0800 Subject: [PATCH 2/2] fix: don't use navel --- package.json | 2 +- src/component/inPageSearchBar.ts | 2 +- src/surfingIndex.ts | 13 ++++-- ...fingSetting.ts => surfingPluginSetting.ts} | 27 +++++++------ src/surfingView.ts | 2 +- src/translations/locale/en.ts | 2 +- src/translations/locale/fr.ts | 2 +- src/translations/locale/pt-br.ts | 2 +- src/translations/locale/pt.ts | 2 +- src/translations/locale/zh-cn.ts | 2 +- styles.css | 40 +++++++++++++++++-- 11 files changed, 68 insertions(+), 28 deletions(-) rename src/{surfingSetting.ts => surfingPluginSetting.ts} (95%) diff --git a/package.json b/package.json index 86fe435..afbedf0 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "prepare": "husky install" }, "keywords": [], - "author": "Dion Tryban (Trikzon) && Boninall", + "author": "Boninall", "license": "MIT", "devDependencies": { "@codemirror/language": "^6.2.1", diff --git a/src/component/inPageSearchBar.ts b/src/component/inPageSearchBar.ts index b73ccef..4d56c61 100644 --- a/src/component/inPageSearchBar.ts +++ b/src/component/inPageSearchBar.ts @@ -19,7 +19,7 @@ export class InPageSearchBar { }); this.inPageSearchBarContainerEl.createEl("div", { - text: "Surf It", + text: "Surfing", cls: "wb-page-search-bar-text" }) diff --git a/src/surfingIndex.ts b/src/surfingIndex.ts index a0a200b..de3a9d1 100644 --- a/src/surfingIndex.ts +++ b/src/surfingIndex.ts @@ -1,4 +1,4 @@ -import { Editor, EventRef, ItemView, MarkdownView, Menu, Notice, Plugin, } from "obsidian"; +import { addIcon, Editor, EventRef, ItemView, MarkdownView, Menu, Notice, Plugin, } from "obsidian"; import { HeaderBar } from "./component/headerBar"; import { SurfingView, WEB_BROWSER_VIEW_ID } from "./surfingView"; import { SurfingFileView, HTML_FILE_EXTENSIONS, WEB_BROWSER_FILE_VIEW_ID } from "./surfingFileView"; @@ -8,8 +8,8 @@ import { SurfingSettings, DEFAULT_SETTINGS, SEARCH_ENGINES, - WebBrowserSettingTab -} from "./surfingSetting"; + SurfingSettingTab +} from "./surfingPluginSetting"; import { InPageSearchBar } from "./component/inPageSearchBar"; export default class SurfingPlugin extends Plugin { @@ -20,7 +20,7 @@ export default class SurfingPlugin extends Plugin { await this.loadSettings(); this.checkWebBrowser(); - this.addSettingTab(new WebBrowserSettingTab(this.app, this)); + this.addSettingTab(new SurfingSettingTab(this.app, this)); this.registerView(WEB_BROWSER_VIEW_ID, (leaf) => new SurfingView(leaf, this)); this.registerView(WEB_BROWSER_FILE_VIEW_ID, (leaf) => new SurfingFileView(leaf)); @@ -43,6 +43,7 @@ export default class SurfingPlugin extends Plugin { }); this.registerCommands(); + this.registerCustomIcon(); } onunload() { @@ -265,6 +266,10 @@ export default class SurfingPlugin extends Plugin { }); } + private registerCustomIcon() { + addIcon('surfing', ``) + } + private checkWebBrowser() { const webBrowser = app.plugins.getPlugin("obsidian-web-browser") if (webBrowser) new Notice(t("You enabled obsidian-web-browser plugin, please disable it/disable surfing to avoid conflict."), 4000); diff --git a/src/surfingSetting.ts b/src/surfingPluginSetting.ts similarity index 95% rename from src/surfingSetting.ts rename to src/surfingPluginSetting.ts index c00d642..c7c35da 100644 --- a/src/surfingSetting.ts +++ b/src/surfingPluginSetting.ts @@ -92,7 +92,7 @@ export class DropdownRecord { } } -export class WebBrowserSettingTab extends PluginSettingTab { +export class SurfingSettingTab extends PluginSettingTab { plugin: SurfingPlugin; private applyDebounceTimer = 0; private tabContent: Map = new Map(); @@ -100,7 +100,7 @@ export class WebBrowserSettingTab extends PluginSettingTab { private search: SearchComponent; private searchSettingInfo: Map = new Map(); private searchZeroState: HTMLDivElement; - private navEl: HTMLElement; + private navigateEl: HTMLElement; constructor(app: App, plugin: SurfingPlugin) { super(app, plugin); @@ -117,10 +117,8 @@ export class WebBrowserSettingTab extends PluginSettingTab { display(): void { const { containerEl } = this; - containerEl.empty(); - this.generateSettingsTitle(); this.addTabHeader(); } @@ -133,11 +131,11 @@ export class WebBrowserSettingTab extends PluginSettingTab { private addTabHeader() { const navContainer = this.containerEl.createEl('nav', { cls: 'wb-setting-header' }); - this.navEl = navContainer.createDiv('wb-setting-tab-group'); + this.navigateEl = navContainer.createDiv('wb-setting-tab-group'); const settingsEl = this.containerEl.createDiv('wb-setting-content'); - this.createTabAndContent('General', this.navEl, settingsEl, (el: HTMLElement, tabName: string) => this.generateGeneralSettings(tabName, el)); - this.createTabAndContent('Search', this.navEl, settingsEl, (el: HTMLElement, tabName: string) => this.generateSearchSettings(tabName, el)); + this.createTabAndContent('General', this.navigateEl, settingsEl, (el: HTMLElement, tabName: string) => this.generateGeneralSettings(tabName, el)); + this.createTabAndContent('Search', this.navigateEl, settingsEl, (el: HTMLElement, tabName: string) => this.generateSearchSettings(tabName, el)); this.createSearchZeroState(settingsEl); } @@ -166,11 +164,11 @@ export class WebBrowserSettingTab extends PluginSettingTab { this.selectedTab = ''; } - this.navEl.addClass('wb-setting-searching'); + this.navigateEl.addClass('wb-setting-searching'); }; this.search.inputEl.onblur = () => { - this.navEl.removeClass('wb-setting-searching'); + this.navigateEl.removeClass('wb-setting-searching'); } this.search.onChange((value: string) => { @@ -305,6 +303,7 @@ export class WebBrowserSettingTab extends PluginSettingTab { this.addOpenInSameTab(tabName, wbContainerEl); this.addHighlightFormat(tabName, wbContainerEl); this.addOpenInObsidianWeb(tabName, wbContainerEl); + this.addAboutInfo(tabName, wbContainerEl); } private generateSearchSettings(tabName: string, wbContainerEl: HTMLElement): void { @@ -569,13 +568,15 @@ export class WebBrowserSettingTab extends PluginSettingTab { const bookmarkLetsContainerEl = wbContainerEl.createDiv({ cls: 'wb-about-card' }); - setIcon(bookmarkLetsContainerEl.createDiv({ cls: 'wb-about-icon' }), 'mountain-snow'); + setIcon(bookmarkLetsContainerEl.createDiv({ cls: 'wb-about-icon' }), 'surfing'); + + bookmarkLetsContainerEl.createEl('div', { cls: "wb-about-text", text: 'Surfing' }); const text = this.plugin.manifest.version; - const url = "" + const url = "https://github.com/Quorafind/Obsidian-Surfing/releases/tag/" + text; - bookmarkLetsContainerEl.createDiv({ cls: 'wb-about-title', text: text }); + bookmarkLetsContainerEl.createEl("a", { cls: 'wb-about-version', href: url, text: text }); - this.addSettingToMasterSettingsList(tabName, bookmarkLetsContainerEl, text); + this.addSettingToMasterSettingsList(tabName, bookmarkLetsContainerEl, "surfing"); } } diff --git a/src/surfingView.ts b/src/surfingView.ts index 2a252cd..82264f4 100644 --- a/src/surfingView.ts +++ b/src/surfingView.ts @@ -6,7 +6,7 @@ import SurfingPlugin from "./surfingIndex"; import { moment } from "obsidian"; import { t } from "./translations/helper"; import searchBox from "./component/searchBox"; -import { SEARCH_ENGINES } from "./surfingSetting"; +import { SEARCH_ENGINES } from "./surfingPluginSetting"; export const WEB_BROWSER_VIEW_ID = "surfing-view"; diff --git a/src/translations/locale/en.ts b/src/translations/locale/en.ts index 873d3c2..6def7f6 100644 --- a/src/translations/locale/en.ts +++ b/src/translations/locale/en.ts @@ -1,7 +1,7 @@ // English export default { - // surfingSetting.ts + // surfingPluginSetting.ts "Search with": "Search with", "or enter address": "or enter address", 'Default Search Engine': 'Default Search Engine', diff --git a/src/translations/locale/fr.ts b/src/translations/locale/fr.ts index 6656506..dd638f9 100644 --- a/src/translations/locale/fr.ts +++ b/src/translations/locale/fr.ts @@ -1,5 +1,5 @@ // français export default { - // surfingSetting.ts + // surfingPluginSetting.ts }; diff --git a/src/translations/locale/pt-br.ts b/src/translations/locale/pt-br.ts index 2e59c4d..efea2e6 100644 --- a/src/translations/locale/pt-br.ts +++ b/src/translations/locale/pt-br.ts @@ -2,5 +2,5 @@ // Brazilian Portuguese export default { - // surfingSetting.ts + // surfingPluginSetting.ts }; diff --git a/src/translations/locale/pt.ts b/src/translations/locale/pt.ts index a517c09..c7e6d38 100644 --- a/src/translations/locale/pt.ts +++ b/src/translations/locale/pt.ts @@ -1,5 +1,5 @@ // Português export default { - // surfingSetting.ts + // surfingPluginSetting.ts }; diff --git a/src/translations/locale/zh-cn.ts b/src/translations/locale/zh-cn.ts index 8564e2a..a2b8070 100644 --- a/src/translations/locale/zh-cn.ts +++ b/src/translations/locale/zh-cn.ts @@ -1,5 +1,5 @@ export default { - // surfingSetting.ts + // surfingPluginSetting.ts "Search with": "使用", "or enter address": "搜索,或输入地址", 'Default Search Engine': '默认搜索引擎', diff --git a/styles.css b/styles.css index d6b7371..49ac974 100644 --- a/styles.css +++ b/styles.css @@ -73,16 +73,17 @@ .wb-page-search-bar-text { text-align: center; margin-bottom: 20px; - font-size: 33px; + font-size: 72px; + font-weight: bolder; color: var(--color-purple); } .wb-btn-tip { - opacity: 0.5; + color: var(--color-base-60); } .wb-btn:hover { - background: bisque !important; + background: var(--color-purple) !important; } @@ -90,6 +91,10 @@ filter: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07)) drop-shadow(0 2px 2px rgb(0 0 0 / 0.06)); } +.theme-dark .wb-btn a { + color: var(--color-base-80) !important; +} + .setting-item.search-engine-setting { flex-wrap: wrap; } @@ -180,3 +185,32 @@ color: var(--color-purple); } +.wb-about-icon { + height: 72px; + text-align: center; +} + +.wb-about-icon .surfing { + height: 72px !important; + width: 72px !important; +} + +.wb-about-text { + font-size: 16px; + color: var(--color-purple); +} + +.wb-about-card { + display: flex; + align-items: center; + flex-direction: column; + margin-top: 30px; +} + +.wb-about-version { + font-size: 14px; + text-decoration: unset !important; + opacity: 0.8; + color: var(--link-color); +} +