Skip to content

Commit

Permalink
Merge pull request #141 from TankNee/rebuild/fix
Browse files Browse the repository at this point in the history
2.1.7 Add mind tool bar and theme loader
  • Loading branch information
TankNee authored Aug 11, 2021
2 parents 57e0877 + d4b5391 commit d940b1b
Show file tree
Hide file tree
Showing 32 changed files with 461 additions and 328 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div align="center">
<img title="" src="https://img.tanknee.cn/blogpicbed/2021/07/08/20210708fc3b67e797e90.png" alt="AppIcon" align="center" width="185">
<h1>Memocast</h1>

![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/TankNee/Neeto-Vue/Neeto-Vue%20Release%20Action/master?label=REALSE%20ACTION&style=for-the-badge) ![GitHub Releases](https://img.shields.io/github/downloads/TankNee/Neeto-Vue/latest/total?style=for-the-badge) ![GitHub All Releases](https://img.shields.io/github/downloads/TankNee/Neeto-Vue/total?style=for-the-badge) ![GitHub Release Date](https://img.shields.io/github/release-date/TankNee/Neeto-Vue?style=for-the-badge) ![GitHub repo size](https://img.shields.io/github/repo-size/TankNee/Neeto-Vue?style=for-the-badge) ![GitHub](https://img.shields.io/github/license/TankNee/Neeto-Vue?style=for-the-badge)

</div>
Expand All @@ -13,13 +13,19 @@
<div>
<a href="https://www.producthunt.com/posts/memocast?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-memocast" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=305738&theme=light" alt="Memocast - an awesome wiznote client, online note. | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
</div>

## Download

你可以在 GitHub 的 Release 页面下载最新版本,与此同时,你也可以使用内置的更新按钮获取最新版本,注意 mac 并不支持直接使用内置更新,因为受限于 macOS 的安全策略,所有自动安装的应用应该被有效地签名。

GitHub Release:[Releases · TankNee/Memocast · GitHub](https://github.com/TankNee/Memocast/releases)

## Documentation

你可以在 Memocast 的文档中找到与软件相关的实用用法与介绍。

文档地址:https://www.tanknee.cn/Memocast/

## Feature

1. 较为完整的为知服务的支持。
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cn.memocast.app",
"version": "2.1.6",
"version": "2.1.7",
"description": "An Awesome WizNote Desktop Application",
"productName": "Memocast",
"author": "tanknee <[email protected]>",
Expand Down
3 changes: 3 additions & 0 deletions share/channels.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export default {
remoteRequest: 'remote-request',
getCacheImage: 'get-cache-image',
saveTempImage: 'save-temp-image',
loadTheme: 'load-theme',
openThemeFolder: 'open-theme-folder',
refreshThemeFolder: 'refresh-theme-folder',
getLocalFileData: 'get-local-file-data',
saveUploadedImage: 'save-uploaded-image'
}
2 changes: 1 addition & 1 deletion src-electron/main-process/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const sanitize = require('sanitize-filename')
* @param {Function} api 操作函数
* @returns {Promise<void>}
*/
async function handleApi (channel, api) {
export async function handleApi (channel, api) {
ipcMain.handle(channel, async (event, ...args) => {
try {
const ret = await api(event, ...args)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
// import oneDarkTheme from 'src/css/dark.theme.css'
// import oneDarkPrismTheme from 'src/css/prism/dark.theme.css'
// import lightTheme from 'src/css/lights.theme.css'

const oneDarkTheme = `:root {
:root {
--backgroundColor: #35373e;
--editorAreaWidth: 90%;
--activeItemBgColor: rgb(41, 42, 44);
Expand Down Expand Up @@ -108,9 +104,8 @@ p:not(.ag-active)[data-role="hr"]::before {
figure.ag-active.ag-container-block > div.ag-container-preview {
box-shadow: 0 3px 8px 0 var(--floatShadow) !important;
}
`

const oneDarkPrismTheme = `/**
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
Expand Down Expand Up @@ -138,10 +133,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

#mind code {
color: inherit;
background: transparent;
}
#mind code {
color: inherit;
background: transparent;
}

code[class*="language-"],
pre.ag-paragraph {
Expand Down Expand Up @@ -253,195 +248,3 @@ pre.ag-paragraph {
.token.entity {
cursor: help;
}
`

const lightTheme = `/* Common CSS use by both light and dark themes */
:root {
--titleBarHeight: 32px;
--editorAreaWidth: 90%;
--backgroundColor: #ffffff;
--activeItemBgColor: rgb(204, 207, 214);
/*editor*/
/*Theme color cluster*/
--themeColor: rgba(25, 118, 210, 1);
--themeColor90: rgba(25, 118, 210, .9);
--themeColor80: rgba(25, 118, 210, .8);
--themeColor70: rgba(25, 118, 210, .7);
--themeColor60: rgba(25, 118, 210, .6);
--themeColor50: rgba(25, 118, 210, .5);
--themeColor40: rgba(25, 118, 210, .4);
--themeColor30: rgba(25, 118, 210, .3);
--themeColor20: rgba(25, 118, 210, .2);
--themeColor10: rgba(25, 118, 210, .1);
--highlightColor: rgba(25, 118, 210, .4);
--selectionColor: #DAE3E9;
--editorColor: rgba(0, 0, 0, .7);
--editorColor80: rgba(0, 0, 0, .8);
--editorColor60: rgba(0, 0, 0, .6);
--editorColor50: rgba(0, 0, 0, .5);
--editorColor40: rgba(0, 0, 0, .4);
--editorColor30: rgba(0, 0, 0, .3);
--editorColor10: rgba(0, 0, 0, .1);
--editorColor04: rgba(0, 0, 0, .03);
--editorBgColor: rgba(255, 255, 255, 1);
--deleteColor: #ff6969;
--iconColor: #6B737B;
--codeBgColor: #d8d8d869;
--codeBlockBgColor: rgba(0, 0, 0, 0.03);
--inputBgColor: rgba(0, 0, 0, .06);
--buttonBgColor: #ffffff;
--buttonBorderColor: rgba(0, 0, 0, 0.2);
--buttonShadow: rgba(0, 0, 0, 0.12);
--buttonHover: #f2f2f2;
--buttonActive: #e5e5e5;
--treeNodeColor: rgb(62, 43, 42);
--highlightThemeColor: rgb(100, 203, 154);
/*marktext*/
--sideBarColor: rgba(0, 0, 0, .6);
--sideBarTitleColor: rgba(0, 0, 0, 1);
--sideBarTextColor: rgba(0, 0, 0, .4);
--sideBarBgColor: rgba(242, 242, 242, 0.9);
--sideBarItemHoverBgColor: rgba(0, 0, 0, .03);
--itemBgColor: rgba(255, 255, 255, 0.6);
--floatBgColor: #fff;
--floatHoverColor: rgba(0, 0, 0, .04);
--floatBorderColor: rgba(0, 0, 0, .1);
--floatShadow: rgba(15, 15, 15, 0.03) 0px 0px 0px 1px, rgba(15, 15, 15, 0.04) 0px 3px 6px, rgba(15, 15, 15, 0.05) 0px 9px 24px;
--maskColor: rgba(255, 255, 255, .7);
--tableBorderColor: rgb(158, 158, 158);
}
`

const lightPrismTheme = `/*
* ------------------------------------
* Prism.js light theme
*/
#mind code {
color: inherit;
background: transparent;
}
code[class*="language-"],
pre.ag-paragraph {
color: black;
/*font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;*/
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
text-shadow: none;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
font-family: JetBrains Mono;
}
/* Code Fence */
pre.ag-paragraph {
padding: 1em;
margin: 1em 0;
}
/* Inline Code */
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #999;
}
.namespace {
opacity: .7;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol {
color: #905;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin {
color: #690;
}
.token.inserted {
color: #22863a;
background: #f0fff4;
}
.token.deleted {
color: #b31d28;
background: #ffeef0;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #9a6e3a;
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}
.token.function,
.token.class-name {
color: #DD4A68;
}
.token.regex,
.token.important,
.token.variable {
color: #e90;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
`

export const oneDark = () => {
return oneDarkTheme + '\n' + oneDarkPrismTheme
}

export const light = () => {
return lightTheme + '\n' + lightPrismTheme
}
Loading

0 comments on commit d940b1b

Please sign in to comment.