Merge pull request !1 from 豆萁/zh
This commit is contained in:
豆萁 2022-06-01 09:57:56 +00:00 committed by Gitee
commit 45bee6bbf6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
37 changed files with 538 additions and 421 deletions

View File

@ -1,11 +1,11 @@
# StackEdit # StackEdit中文版
从 [StackEdit 官方](https://github.com/benweet/stackedit) fork出来然后加上了 **Gitee** 的支持并且已经重新打了镜像以下官方的部署方式除了Docker镜像地址不同其他均一致。 从 [StackEdit 官方](https://github.com/benweet/stackedit) fork出来然后加上了 **Gitee** 的支持并且已经重新打了镜像以下官方的部署方式除了Docker镜像地址不同其他均一致。
### Fork出来修改的原因 ### Fork出来修改的原因
StackEdit的作者可能因为什么原因已经很久不维护了Github授权登录很早之前就登录不了了并且还没法支持国内常用的Gitee所以想到Fork出来改大概花了周末一整天终于改好了。 StackEdit的作者可能因为什么原因已经很久不维护了Github授权登录很早之前就登录不了了并且还没法支持国内常用的Gitee所以想到Fork出来改大概花了周末一整天终于改好了。
新的Docker镜像在中央仓库为[mafgwo/stackedit](https://hub.docker.com/r/mafgwo/stackedit)当前最新版本为5.15.4(延续原有版本号) 新的Docker镜像在中央仓库为[mafgwo/stackedit](https://hub.docker.com/r/mafgwo/stackedit)
并增加了以下2个环境变量 并增加了以下2个环境变量
- `GITEE_CLIENT_ID` Gitee 的 Client ID - `GITEE_CLIENT_ID` Gitee 的 Client ID
@ -14,7 +14,8 @@ StackEdit的作者可能因为什么原因已经很久不维护了Github
### TODO: 关于后续的一些想法 ### TODO: 关于后续的一些想法
- 支持**Gitea**、**Gogs**两个轻量级且适于自建的Git仓库毕竟Gitlab对机器配置要求较高。想支持这两个主要也是考虑到其实很多公司已经禁用了Github或Gitee仓库在公司都没法连上自己的Git仓库。 - 支持**Gitea**、**Gogs**两个轻量级且适于自建的Git仓库毕竟Gitlab对机器配置要求较高。想支持这两个主要也是考虑到其实很多公司已经禁用了Github或Gitee仓库在公司都没法连上自己的Git仓库。
- 汉化,毕竟大家最熟悉的还是母语,并且该编辑器功能页面也不多,汉化工作量并不会很大。 - 汉化,毕竟大家最熟悉的还是母语,并且该编辑器功能页面也不多,汉化工作量并不会很大。
- 引入mdnice右边预览增加mdnice预览选项主要含选主题(含mdnice常用20多个主题)、支持自定义主题、复制到公众号、复制到知乎、复制到稀土掘金等基本功能,便于喜欢写公众号、博客的你可以更好更快的排版。 - 替换主工作区为Gitee原版本主工作区是Google Drive国内只有fan墙才可以用
- 引入mdnice右边预览增加mdnice预览选项主要含选主题(含mdnice常用20多个主题)、支持自定义主题、复制到公众号、复制到知乎、复制到稀土掘金等基本功能,便于喜欢写公众号、博客的同学可以更好更快的排版。
- ... 另外朋友们有好的想法也可以在Issue或者加我微信 qicoding 提给我。 - ... 另外朋友们有好的想法也可以在Issue或者加我微信 qicoding 提给我。
#### TODO 进度 #### TODO 进度
@ -24,6 +25,10 @@ StackEdit的作者可能因为什么原因已经很久不维护了Github
**Gogs目前无法支持因为API目前不支持直接把Markdown推上去如果后续Gogs的API支持了再添加** **Gogs目前无法支持因为API目前不支持直接把Markdown推上去如果后续Gogs的API支持了再添加**
**已汉化主要功能部分2022-06-01**
**接下来修改主工作区为Gitee**
### 目前已部署地址 ### 目前已部署地址
@ -34,6 +39,8 @@ https://edit.qicoder.com/
# 以下是官方原有README内容 # 以下是官方原有README内容
# StackEdit
[![Build Status](https://img.shields.io/travis/benweet/stackedit.svg?style=flat)](https://travis-ci.org/benweet/stackedit) [![NPM version](https://img.shields.io/npm/v/stackedit.svg?style=flat)](https://www.npmjs.org/package/stackedit) [![Build Status](https://img.shields.io/travis/benweet/stackedit.svg?style=flat)](https://travis-ci.org/benweet/stackedit) [![NPM version](https://img.shields.io/npm/v/stackedit.svg?style=flat)](https://www.npmjs.org/package/stackedit)
> Full-featured, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites. > Full-featured, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites.

View File

@ -1,6 +1,6 @@
{ {
"name": "StackEdit", "name": "StackEdit中文版",
"description": "In-browser Markdown editor", "description": "浏览器内 Markdown 编辑器",
"version": "1.0.13", "version": "1.0.13",
"manifest_version": 2, "manifest_version": 2,
"container" : "GOOGLE_DRIVE", "container" : "GOOGLE_DRIVE",

View File

@ -8,5 +8,5 @@ module.exports = merge(prodEnv, {
GITHUB_CLIENT_SECRET: '"80df676597abded1450926861965cc3f9bead6a0"', GITHUB_CLIENT_SECRET: '"80df676597abded1450926861965cc3f9bead6a0"',
GITEE_CLIENT_ID: '"925ba7c78b85dec984f7877e4aca5cab10ae333c6d68e761bdb0b9dfb8f55672"', GITEE_CLIENT_ID: '"925ba7c78b85dec984f7877e4aca5cab10ae333c6d68e761bdb0b9dfb8f55672"',
GITEE_CLIENT_SECRET: '"f05731066e42d307339dc8ebbb037a103881dafc7207a359a393b87749f1c562"', GITEE_CLIENT_SECRET: '"f05731066e42d307339dc8ebbb037a103881dafc7207a359a393b87749f1c562"',
GITEE_CALLBACK: '"http://test.local.com/oauth2/callback"' CLIENT_ID: '"thF3qCGLN39OtafjGnqHyj6n02WwE6xD"',
}) })

View File

@ -2,7 +2,7 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>StackEdit</title> <title>StackEdit中文版</title>
<link rel="canonical" href="https://edit.qicoder.com/app"> <link rel="canonical" href="https://edit.qicoder.com/app">
<meta name="description" content="Free, open-source, full-featured Markdown editor."> <meta name="description" content="Free, open-source, full-featured Markdown editor.">
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1"> <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1">

View File

@ -10,7 +10,6 @@ const githubClientId = process.env.GITHUB_CLIENT_ID;
const githubClientSecret = process.env.GITHUB_CLIENT_SECRET; const githubClientSecret = process.env.GITHUB_CLIENT_SECRET;
const giteeClientId = process.env.GITEE_CLIENT_ID; const giteeClientId = process.env.GITEE_CLIENT_ID;
const giteeClientSecret = process.env.GITEE_CLIENT_SECRET; const giteeClientSecret = process.env.GITEE_CLIENT_SECRET;
const giteeCallback = process.env.GITEE_CALLBACK;
const googleClientId = process.env.GOOGLE_CLIENT_ID; const googleClientId = process.env.GOOGLE_CLIENT_ID;
const googleApiKey = process.env.GOOGLE_API_KEY; const googleApiKey = process.env.GOOGLE_API_KEY;
const wordpressClientId = process.env.WORDPRESS_CLIENT_ID; const wordpressClientId = process.env.WORDPRESS_CLIENT_ID;
@ -27,7 +26,6 @@ exports.values = {
githubClientSecret, githubClientSecret,
giteeClientId, giteeClientId,
giteeClientSecret, giteeClientSecret,
giteeCallback,
googleClientId, googleClientId,
googleApiKey, googleApiKey,
wordpressClientId, wordpressClientId,

View File

@ -1,10 +1,10 @@
<template> <template>
<div class="button-bar"> <div class="button-bar">
<div class="button-bar__inner button-bar__inner--top"> <div class="button-bar__inner button-bar__inner--top">
<button class="button-bar__button button-bar__button--navigation-bar-toggler button" :class="{ 'button-bar__button--on': layoutSettings.showNavigationBar }" v-if="!light" @click="toggleNavigationBar()" v-title="'Toggle navigation bar'"> <button class="button-bar__button button-bar__button--navigation-bar-toggler button" :class="{ 'button-bar__button--on': layoutSettings.showNavigationBar }" v-if="!light" @click="toggleNavigationBar()" v-title="'切换导航栏'">
<icon-navigation-bar></icon-navigation-bar> <icon-navigation-bar></icon-navigation-bar>
</button> </button>
<button class="button-bar__button button-bar__button--side-preview-toggler button" :class="{ 'button-bar__button--on': layoutSettings.showSidePreview }" tour-step-anchor="editor" @click="toggleSidePreview()" v-title="'Toggle side preview'"> <button class="button-bar__button button-bar__button--side-preview-toggler button" :class="{ 'button-bar__button--on': layoutSettings.showSidePreview }" tour-step-anchor="editor" @click="toggleSidePreview()" v-title="'切换侧面预览'">
<icon-side-preview></icon-side-preview> <icon-side-preview></icon-side-preview>
</button> </button>
<button class="button-bar__button button-bar__button--editor-toggler button" @click="toggleEditor(false)" v-title="'Reader mode'"> <button class="button-bar__button button-bar__button--editor-toggler button" @click="toggleEditor(false)" v-title="'Reader mode'">
@ -12,13 +12,13 @@
</button> </button>
</div> </div>
<div class="button-bar__inner button-bar__inner--bottom"> <div class="button-bar__inner button-bar__inner--bottom">
<button class="button-bar__button button-bar__button--focus-mode-toggler button" :class="{ 'button-bar__button--on': layoutSettings.focusMode }" @click="toggleFocusMode()" v-title="'Toggle focus mode'"> <button class="button-bar__button button-bar__button--focus-mode-toggler button" :class="{ 'button-bar__button--on': layoutSettings.focusMode }" @click="toggleFocusMode()" v-title="'切换对焦模式'">
<icon-target></icon-target> <icon-target></icon-target>
</button> </button>
<button class="button-bar__button button-bar__button--scroll-sync-toggler button" :class="{ 'button-bar__button--on': layoutSettings.scrollSync }" @click="toggleScrollSync()" v-title="'Toggle scroll sync'"> <button class="button-bar__button button-bar__button--scroll-sync-toggler button" :class="{ 'button-bar__button--on': layoutSettings.scrollSync }" @click="toggleScrollSync()" v-title="'切换滚动同步'">
<icon-scroll-sync></icon-scroll-sync> <icon-scroll-sync></icon-scroll-sync>
</button> </button>
<button class="button-bar__button button-bar__button--status-bar-toggler button" :class="{ 'button-bar__button--on': layoutSettings.showStatusBar }" @click="toggleStatusBar()" v-title="'Toggle status bar'"> <button class="button-bar__button button-bar__button--status-bar-toggler button" :class="{ 'button-bar__button--on': layoutSettings.showStatusBar }" @click="toggleStatusBar()" v-title="'切换状态栏'">
<icon-status-bar></icon-status-bar> <icon-status-bar></icon-status-bar>
</button> </button>
</div> </div>

View File

@ -2,20 +2,20 @@
<div class="explorer flex flex--column"> <div class="explorer flex flex--column">
<div class="side-title flex flex--row flex--space-between"> <div class="side-title flex flex--row flex--space-between">
<div class="flex flex--row"> <div class="flex flex--row">
<button class="side-title__button side-title__button--new-file button" @click="newItem()" v-title="'New file'"> <button class="side-title__button side-title__button--new-file button" @click="newItem()" v-title="'创建文件'">
<icon-file-plus></icon-file-plus> <icon-file-plus></icon-file-plus>
</button> </button>
<button class="side-title__button side-title__button--new-folder button" @click="newItem(true)" v-title="'New folder'"> <button class="side-title__button side-title__button--new-folder button" @click="newItem(true)" v-title="'创建文件夹'">
<icon-folder-plus></icon-folder-plus> <icon-folder-plus></icon-folder-plus>
</button> </button>
<button class="side-title__button side-title__button--delete button" @click="deleteItem()" v-title="'Delete'"> <button class="side-title__button side-title__button--delete button" @click="deleteItem()" v-title="'删除'">
<icon-delete></icon-delete> <icon-delete></icon-delete>
</button> </button>
<button class="side-title__button side-title__button--rename button" @click="editItem()" v-title="'Rename'"> <button class="side-title__button side-title__button--rename button" @click="editItem()" v-title="'重命名'">
<icon-pen></icon-pen> <icon-pen></icon-pen>
</button> </button>
</div> </div>
<button class="side-title__button side-title__button--close button" @click="toggleExplorer(false)" v-title="'Close explorer'"> <button class="side-title__button side-title__button--close button" @click="toggleExplorer(false)" v-title="'关闭资源管理器'">
<icon-close></icon-close> <icon-close></icon-close>
</button> </button>
</div> </div>

View File

@ -3,12 +3,12 @@
<!-- Explorer --> <!-- Explorer -->
<div class="navigation-bar__inner navigation-bar__inner--left navigation-bar__inner--button"> <div class="navigation-bar__inner navigation-bar__inner--left navigation-bar__inner--button">
<button class="navigation-bar__button navigation-bar__button--close button" v-if="light" @click="close()" v-title="'Close StackEdit'"><icon-check-circle></icon-check-circle></button> <button class="navigation-bar__button navigation-bar__button--close button" v-if="light" @click="close()" v-title="'Close StackEdit'"><icon-check-circle></icon-check-circle></button>
<button class="navigation-bar__button navigation-bar__button--explorer-toggler button" v-else tour-step-anchor="explorer" @click="toggleExplorer()" v-title="'Toggle explorer'"><icon-folder></icon-folder></button> <button class="navigation-bar__button navigation-bar__button--explorer-toggler button" v-else tour-step-anchor="explorer" @click="toggleExplorer()" v-title="'切换资源管理器'"><icon-folder></icon-folder></button>
</div> </div>
<!-- Side bar --> <!-- Side bar -->
<div class="navigation-bar__inner navigation-bar__inner--right navigation-bar__inner--button"> <div class="navigation-bar__inner navigation-bar__inner--right navigation-bar__inner--button">
<a class="navigation-bar__button navigation-bar__button--stackedit button" v-if="light" href="app" target="_blank" v-title="'Open StackEdit'"><icon-provider provider-id="stackedit"></icon-provider></a> <a class="navigation-bar__button navigation-bar__button--stackedit button" v-if="light" href="app" target="_blank" v-title="'Open StackEdit'"><icon-provider provider-id="stackedit"></icon-provider></a>
<button class="navigation-bar__button navigation-bar__button--stackedit button" v-else tour-step-anchor="menu" @click="toggleSideBar()" v-title="'Toggle side bar'"><icon-provider provider-id="stackedit"></icon-provider></button> <button class="navigation-bar__button navigation-bar__button--stackedit button" v-else tour-step-anchor="menu" @click="toggleSideBar()" v-title="'切换侧边栏'"><icon-provider provider-id="stackedit"></icon-provider></button>
</div> </div>
<div class="navigation-bar__inner navigation-bar__inner--right navigation-bar__inner--title flex flex--row"> <div class="navigation-bar__inner navigation-bar__inner--right navigation-bar__inner--title flex flex--row">
<!-- Spinner --> <!-- Spinner -->
@ -23,9 +23,9 @@
<!-- Sync/Publish --> <!-- Sync/Publish -->
<div class="flex flex--row" :class="{'navigation-bar__hidden': styles.hideLocations}"> <div class="flex flex--row" :class="{'navigation-bar__hidden': styles.hideLocations}">
<a class="navigation-bar__button navigation-bar__button--location button" :class="{'navigation-bar__button--blink': location.id === currentLocation.id}" v-for="location in syncLocations" :key="location.id" :href="location.url" target="_blank" v-title="'Synchronized location'"><icon-provider :provider-id="location.providerId"></icon-provider></a> <a class="navigation-bar__button navigation-bar__button--location button" :class="{'navigation-bar__button--blink': location.id === currentLocation.id}" v-for="location in syncLocations" :key="location.id" :href="location.url" target="_blank" v-title="'Synchronized location'"><icon-provider :provider-id="location.providerId"></icon-provider></a>
<button class="navigation-bar__button navigation-bar__button--sync button" :disabled="!isSyncPossible || isSyncRequested || offline" @click="requestSync" v-title="'Synchronize now'"><icon-sync></icon-sync></button> <button class="navigation-bar__button navigation-bar__button--sync button" :disabled="!isSyncPossible || isSyncRequested || offline" @click="requestSync" v-title="'立即同步'"><icon-sync></icon-sync></button>
<a class="navigation-bar__button navigation-bar__button--location button" :class="{'navigation-bar__button--blink': location.id === currentLocation.id}" v-for="location in publishLocations" :key="location.id" :href="location.url" target="_blank" v-title="'Publish location'"><icon-provider :provider-id="location.providerId"></icon-provider></a> <a class="navigation-bar__button navigation-bar__button--location button" :class="{'navigation-bar__button--blink': location.id === currentLocation.id}" v-for="location in publishLocations" :key="location.id" :href="location.url" target="_blank" v-title="'Publish location'"><icon-provider :provider-id="location.providerId"></icon-provider></a>
<button class="navigation-bar__button navigation-bar__button--publish button" :disabled="!publishLocations.length || isPublishRequested || offline" @click="requestPublish" v-title="'Publish now'"><icon-upload></icon-upload></button> <button class="navigation-bar__button navigation-bar__button--publish button" :disabled="!publishLocations.length || isPublishRequested || offline" @click="requestPublish" v-title="'立即发布'"><icon-upload></icon-upload></button>
</div> </div>
<!-- Revision --> <!-- Revision -->
<div class="flex flex--row" v-if="revisionContent"> <div class="flex flex--row" v-if="revisionContent">
@ -34,8 +34,8 @@
</div> </div>
</div> </div>
<div class="navigation-bar__inner navigation-bar__inner--edit-pagedownButtons"> <div class="navigation-bar__inner navigation-bar__inner--edit-pagedownButtons">
<button class="navigation-bar__button button" @click="undo" v-title="'Undo'" :disabled="!canUndo"><icon-undo></icon-undo></button> <button class="navigation-bar__button button" @click="undo" v-title="'回退'" :disabled="!canUndo"><icon-undo></icon-undo></button>
<button class="navigation-bar__button button" @click="redo" v-title="'Redo'" :disabled="!canRedo"><icon-redo></icon-redo></button> <button class="navigation-bar__button button" @click="redo" v-title="'重做'" :disabled="!canRedo"><icon-redo></icon-redo></button>
<div v-for="button in pagedownButtons" :key="button.method"> <div v-for="button in pagedownButtons" :key="button.method">
<button class="navigation-bar__button button" v-if="button.method" @click="pagedownClick(button.method)" v-title="button.titleWithShortcut"> <button class="navigation-bar__button button" v-if="button.method" @click="pagedownClick(button.method)" v-title="button.titleWithShortcut">
<component :is="button.iconClass"></component> <component :is="button.iconClass"></component>

View File

@ -46,15 +46,15 @@ import markdownConversionSvc from '../services/markdownConversionSvc';
import store from '../store'; import store from '../store';
const panelNames = { const panelNames = {
menu: 'Menu', menu: '菜单',
workspaces: 'Workspaces', workspaces: '工作区',
help: 'Markdown cheat sheet', help: 'Markdown 帮助',
toc: 'Table of contents', toc: '目录',
sync: 'Synchronize', sync: '同步',
publish: 'Publish', publish: '发布',
history: 'File history', history: '文件历史',
importExport: 'Import/export', importExport: '导入/导出',
workspaceBackups: 'Workspace backups', workspaceBackups: '工作区备份',
}; };
export default { export default {

View File

@ -2,47 +2,46 @@
<div class="tour" @keydown.esc.stop="skip"> <div class="tour" @keydown.esc.stop="skip">
<div class="tour-step" :class="'tour-step--' + step" :style="stepStyle"> <div class="tour-step" :class="'tour-step--' + step" :style="stepStyle">
<div class="tour-step__inner" v-if="step === 'welcome'"> <div class="tour-step__inner" v-if="step === 'welcome'">
<h2>Welcome back!</h2> <h2>欢迎回来</h2>
<p>The new <b>StackEdit 5</b> is here!</p> <p>新的<b>StackEdit中文版</b>在这里</p>
<p>Please click <b>Next</b> to take a quick tour.</p> <p>请单击<b>下一步</b>快速浏览</p>
<div class="tour-step__button-bar"> <div class="tour-step__button-bar">
<button class="button" @click="finish">Skip</button> <button class="button" @click="finish">跳过</button>
<button class="button button--resolve" @click="next">Next</button> <button class="button button--resolve" @click="next">下一步</button>
</div> </div>
</div> </div>
<div class="tour-step__inner" v-else-if="step === 'editor'"> <div class="tour-step__inner" v-else-if="step === 'editor'">
<h2>Your Markdown editor</h2> <h2>您的Markdown编辑器</h2>
<p>StackEdit converts your Markdown to HTML in real-time.</p> <p>StackEdit实时将Markdown转换为HTML</p>
<p>Click <icon-side-preview></icon-side-preview> to toggle the side preview.</p> <p>点击 <icon-side-preview></icon-side-preview> </p>
<div class="tour-step__button-bar"> <div class="tour-step__button-bar">
<button class="button" @click="finish">Skip</button> <button class="button" @click="finish">跳过</button>
<button class="button button--resolve" @click="next">Next</button> <button class="button button--resolve" @click="next">下一步</button>
</div> </div>
</div> </div>
<div class="tour-step__inner" v-else-if="step === 'explorer'"> <div class="tour-step__inner" v-else-if="step === 'explorer'">
<h2>File explorer</h2> <h2>文件资源管理器</h2>
<p>StackEdit can manage multiple files and folders in a workspace.</p> <p>StackEdit可以管理工作区中的多个文件和文件夹</p>
<p>Click <icon-folder></icon-folder> to open the file explorer.</p> <p>点击 <icon-folder></icon-folder> </p>
<div class="tour-step__button-bar"> <div class="tour-step__button-bar">
<button class="button" @click="finish">Skip</button> <button class="button" @click="finish">跳过</button>
<button class="button button--resolve" @click="next">Next</button> <button class="button button--resolve" @click="next">下一步</button>
</div> </div>
</div> </div>
<div class="tour-step__inner" v-else-if="step === 'menu'"> <div class="tour-step__inner" v-else-if="step === 'menu'">
<h2>Do a lot more!</h2> <h2>更多</h2>
<p>StackEdit can also synchronize and publish your files, manage collaborative workspaces...</p> <p>StackEdit还可以同步和发布文件管理协作工作区...</p>
<p>Click <icon-provider provider-id="stackedit"></icon-provider> to explore the menu.</p> <p>点击 <icon-provider provider-id="stackedit"></icon-provider> </p>
<div class="tour-step__button-bar"> <div class="tour-step__button-bar">
<button class="button" @click="finish">Skip</button> <button class="button" @click="finish">跳过</button>
<button class="button button--resolve" @click="next">Next</button> <button class="button button--resolve" @click="next">下一步</button>
</div> </div>
</div> </div>
<div class="tour-step__inner" v-else-if="step === 'end'"> <div class="tour-step__inner" v-else-if="step === 'end'">
<h2>Enjoy!</h2> <h2>Enjoy!</h2>
<p>If you like StackEdit, please rate 5 stars on the <a target="_blank" href="https://chrome.google.com/webstore/detail/iiooodelglhkcpgbajoejffhijaclcdg/reviews">Chrome Web Store</a>.</p> <p>如果您喜欢StackEdit请在<a href="#">Chrome网络商店</a>上给5颗星打分</p>
<p>You can also star the project on <a target="_blank" href="https://github.com/benweet/stackedit">GitHub</a> and join the <a target="_blank" href="https://community.stackedit.io/">community</a>.</p>
<div class="tour-step__button-bar"> <div class="tour-step__button-bar">
<button class="button button--resolve" @click="finish">Ok</button> <button class="button button--resolve" @click="finish">确认</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -8,18 +8,18 @@
</option> </option>
</select> </select>
</p> </p>
<p v-if="!historyContext">Synchronize <b>{{currentFileName}}</b> to enable revision history or <a href="javascript:void(0)" @click="signin">sign in with Google</a> to synchronize your main workspace.</p> <p v-if="!historyContext">同步 <b>{{currentFileName}}</b> 以启用修订历史 或者 <a href="javascript:void(0)" @click="signin">登录 Google</a> 以同步您的主工作区</p>
<p v-else-if="loading">Loading history</p> <p v-else-if="loading">历史版本加载中</p>
<p v-else-if="!revisionsWithSpacer.length"><b>{{currentFileName}}</b> has no history.</p> <p v-else-if="!revisionsWithSpacer.length"><b>{{currentFileName}}</b> 没有历史版本.</p>
<div class="menu-entry menu-entry--info flex flex--row flex--align-center" v-else> <div class="menu-entry menu-entry--info flex flex--row flex--align-center" v-else>
<div class="menu-entry__icon menu-entry__icon--image"> <div class="menu-entry__icon menu-entry__icon--image">
<icon-provider :provider-id="syncLocation.providerId"></icon-provider> <icon-provider :provider-id="syncLocation.providerId"></icon-provider>
</div> </div>
<span v-if="syncLocation.url"> <span v-if="syncLocation.url">
The following revisions are stored in <a :href="syncLocation.url" target="_blank">{{ syncLocationProviderName }}</a>. 下面的历史版本存储在 <a :href="syncLocation.url" target="_blank">{{ syncLocationProviderName }}</a>.
</span> </span>
<span v-else> <span v-else>
The following revisions are stored in {{ syncLocationProviderName }}. 下面的历史版本存储在 {{ syncLocationProviderName }}.
</span> </span>
</div> </div>
</div> </div>
@ -39,7 +39,7 @@
</div> </div>
<div class="history__spacer history__spacer--last" v-if="revisions.length"></div> <div class="history__spacer history__spacer--last" v-if="revisions.length"></div>
<div class="flex flex--row flex--end" v-if="showMoreButton"> <div class="flex flex--row flex--end" v-if="showMoreButton">
<button class="history__button button" @click="showMore">More</button> <button class="history__button button" @click="showMore">更多</button>
</div> </div>
</div> </div>
</template> </template>

View File

@ -6,8 +6,8 @@
<icon-upload></icon-upload> <icon-upload></icon-upload>
</div> </div>
<div class="flex flex--column"> <div class="flex flex--column">
<div>Import Markdown</div> <div>导入 Markdown</div>
<span>Import a plain text file.</span> <span>导入纯文本文件</span>
</div> </div>
</label> </label>
<input class="hidden-file" id="import-html-file-input" type="file" @change="onImportHtml"> <input class="hidden-file" id="import-html-file-input" type="file" @change="onImportHtml">
@ -16,30 +16,30 @@
<icon-upload></icon-upload> <icon-upload></icon-upload>
</div> </div>
<div class="flex flex--column"> <div class="flex flex--column">
<div>Import HTML</div> <div>导入 HTML</div>
<span>Convert an HTML file to Markdown.</span> <span>将HTML文件转换为Markdown</span>
</div> </div>
</label> </label>
<hr> <hr>
<menu-entry @click.native="exportMarkdown"> <menu-entry @click.native="exportMarkdown">
<icon-download slot="icon"></icon-download> <icon-download slot="icon"></icon-download>
<div>Export as Markdown</div> <div>导出为 Markdown</div>
<span>Save plain text file.</span> <span>保存纯文本文件</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="exportHtml"> <menu-entry @click.native="exportHtml">
<icon-download slot="icon"></icon-download> <icon-download slot="icon"></icon-download>
<div>Export as HTML</div> <div>导出为 HTML</div>
<span>Generate an HTML page from a template.</span> <span>从模板生成HTML页面</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="exportPdf"> <menu-entry @click.native="exportPdf">
<icon-download slot="icon"></icon-download> <icon-download slot="icon"></icon-download>
<div><div class="menu-entry__label" :class="{'menu-entry__label--warning': !isSponsor}">sponsor</div> Export as PDF</div> <div><div class="menu-entry__label" :class="{'menu-entry__label--warning': !isSponsor}">赞助商</div> 导出为 HTML PDF</div>
<span>Produce a PDF from an HTML template.</span> <span>从HTML模板生成PDF</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="exportPandoc"> <menu-entry @click.native="exportPandoc">
<icon-download slot="icon"></icon-download> <icon-download slot="icon"></icon-download>
<div><div class="menu-entry__label" :class="{'menu-entry__label--warning': !isSponsor}">sponsor</div> Export with Pandoc</div> <div><div class="menu-entry__label" :class="{'menu-entry__label--warning': !isSponsor}">赞助商</div> 导出为 HTML Pandoc</div>
<span>Convert to PDF, Word, EPUB...</span> <span>转换为PDFWordEPUB...</span>
</menu-entry> </menu-entry>
</div> </div>
</template> </template>

View File

@ -12,116 +12,116 @@
<icon-provider :provider-id="currentWorkspace.providerId"></icon-provider> <icon-provider :provider-id="currentWorkspace.providerId"></icon-provider>
</div> </div>
<span v-if="currentWorkspace.providerId === 'googleDriveAppData'"> <span v-if="currentWorkspace.providerId === 'googleDriveAppData'">
<b>{{currentWorkspace.name}}</b> synced with your Google Drive app data folder. <b>{{currentWorkspace.name}}</b> 与您的 Google Drive 应用数据文件夹同步
</span> </span>
<span v-else-if="currentWorkspace.providerId === 'googleDriveWorkspace'"> <span v-else-if="currentWorkspace.providerId === 'googleDriveWorkspace'">
<b>{{currentWorkspace.name}}</b> synced with a <a :href="workspaceLocationUrl" target="_blank">Google Drive folder</a>. <b>{{currentWorkspace.name}}</b> <a :href="workspaceLocationUrl" target="_blank">Google Drive 文件夹</a>同步
</span> </span>
<span v-else-if="currentWorkspace.providerId === 'couchdbWorkspace'"> <span v-else-if="currentWorkspace.providerId === 'couchdbWorkspace'">
<b>{{currentWorkspace.name}}</b> synced with a <a :href="workspaceLocationUrl" target="_blank">CouchDB database</a>. <b>{{currentWorkspace.name}}</b> <a :href="workspaceLocationUrl" target="_blank">CouchDB 数据库</a>同步
</span> </span>
<span v-else-if="currentWorkspace.providerId === 'githubWorkspace'"> <span v-else-if="currentWorkspace.providerId === 'githubWorkspace'">
<b>{{currentWorkspace.name}}</b> synced with a <a :href="workspaceLocationUrl" target="_blank">GitHub repo</a>. <b>{{currentWorkspace.name}}</b> <a :href="workspaceLocationUrl" target="_blank">GitHub repo</a> 同步
</span> </span>
<span v-else-if="currentWorkspace.providerId === 'giteeWorkspace'"> <span v-else-if="currentWorkspace.providerId === 'giteeWorkspace'">
<b>{{currentWorkspace.name}}</b> synced with a <a :href="workspaceLocationUrl" target="_blank">Gitee repo</a>. <b>{{currentWorkspace.name}}</b> <a :href="workspaceLocationUrl" target="_blank">Gitee repo</a> 同步
</span> </span>
<span v-else-if="currentWorkspace.providerId === 'gitlabWorkspace'"> <span v-else-if="currentWorkspace.providerId === 'gitlabWorkspace'">
<b>{{currentWorkspace.name}}</b> synced with a <a :href="workspaceLocationUrl" target="_blank">GitLab project</a>. <b>{{currentWorkspace.name}}</b> <a :href="workspaceLocationUrl" target="_blank">GitLab 项目</a>同步
</span> </span>
<span v-else-if="currentWorkspace.providerId === 'giteaWorkspace'"> <span v-else-if="currentWorkspace.providerId === 'giteaWorkspace'">
<b>{{currentWorkspace.name}}</b> synced with a <a :href="workspaceLocationUrl" target="_blank">Gitea project</a>. <b>{{currentWorkspace.name}}</b> <a :href="workspaceLocationUrl" target="_blank">Gitea 项目</a>同步
</span> </span>
</div> </div>
<div class="menu-entry menu-entry--info flex flex--row flex--align-center" v-else> <div class="menu-entry menu-entry--info flex flex--row flex--align-center" v-else>
<div class="menu-entry__icon menu-entry__icon--disabled"> <div class="menu-entry__icon menu-entry__icon--disabled">
<icon-sync-off></icon-sync-off> <icon-sync-off></icon-sync-off>
</div> </div>
<span><b>{{currentWorkspace.name}}</b> not synced.</span> <span><b>{{currentWorkspace.name}}</b> 未同步</span>
</div> </div>
</div> </div>
<menu-entry v-if="!loginToken" @click.native="signin"> <menu-entry v-if="!loginToken" @click.native="signin">
<icon-login slot="icon"></icon-login> <icon-login slot="icon"></icon-login>
<div>Sign in with Google</div> <div>使用 Google 登录</div>
<span>Sync your main workspace and unlock functionalities.</span> <span>同步您的主工作区并解锁功能</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="setPanel('workspaces')"> <menu-entry @click.native="setPanel('workspaces')">
<icon-database slot="icon"></icon-database> <icon-database slot="icon"></icon-database>
<div><div class="menu-entry__label menu-entry__label--count" v-if="workspaceCount">{{workspaceCount}}</div> Workspaces</div> <div><div class="menu-entry__label menu-entry__label--count" v-if="workspaceCount">{{workspaceCount}}</div> 工作区</div>
<span>Switch to another workspace.</span> <span>切换到另一个工作区</span>
</menu-entry> </menu-entry>
<hr> <hr>
<menu-entry @click.native="setPanel('sync')"> <menu-entry @click.native="setPanel('sync')">
<icon-sync slot="icon"></icon-sync> <icon-sync slot="icon"></icon-sync>
<div><div class="menu-entry__label menu-entry__label--count" v-if="syncLocationCount">{{syncLocationCount}}</div> Synchronize</div> <div><div class="menu-entry__label menu-entry__label--count" v-if="syncLocationCount">{{syncLocationCount}}</div> 同步</div>
<span>Sync your files in the Cloud.</span> <span>在云端同步您的文件</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="setPanel('publish')"> <menu-entry @click.native="setPanel('publish')">
<icon-upload slot="icon"></icon-upload> <icon-upload slot="icon"></icon-upload>
<div><div class="menu-entry__label menu-entry__label--count" v-if="publishLocationCount">{{publishLocationCount}}</div>Publish</div> <div><div class="menu-entry__label menu-entry__label--count" v-if="publishLocationCount">{{publishLocationCount}}</div>发布</div>
<span>Export your files to the web.</span> <span>将您的文件导出到 Web</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="setPanel('history')"> <menu-entry @click.native="setPanel('history')">
<icon-history slot="icon"></icon-history> <icon-history slot="icon"></icon-history>
<div>History</div> <div>历史</div>
<span>Track and restore file revisions.</span> <span>跟踪和恢复文件修订</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="fileProperties"> <menu-entry @click.native="fileProperties">
<icon-view-list slot="icon"></icon-view-list> <icon-view-list slot="icon"></icon-view-list>
<div>File properties</div> <div>文件属性</div>
<span>Add metadata and configure extensions.</span> <span>添加元数据并配置扩展</span>
</menu-entry> </menu-entry>
<hr> <hr>
<menu-entry @click.native="setPanel('toc')"> <menu-entry @click.native="setPanel('toc')">
<icon-toc slot="icon"></icon-toc> <icon-toc slot="icon"></icon-toc>
Table of contents 目录
</menu-entry> </menu-entry>
<menu-entry @click.native="setPanel('help')"> <menu-entry @click.native="setPanel('help')">
<icon-help-circle slot="icon"></icon-help-circle> <icon-help-circle slot="icon"></icon-help-circle>
Markdown cheat sheet Markdown 帮助
</menu-entry> </menu-entry>
<hr> <hr>
<menu-entry @click.native="setPanel('importExport')"> <menu-entry @click.native="setPanel('importExport')">
<icon-content-save slot="icon"></icon-content-save> <icon-content-save slot="icon"></icon-content-save>
Import/export 导入/导出
</menu-entry> </menu-entry>
<menu-entry @click.native="print"> <menu-entry @click.native="print">
<icon-printer slot="icon"></icon-printer> <icon-printer slot="icon"></icon-printer>
Print 打印
</menu-entry> </menu-entry>
<hr> <hr>
<menu-entry @click.native="badges"> <menu-entry @click.native="badges">
<icon-seal slot="icon"></icon-seal> <icon-seal slot="icon"></icon-seal>
<div><div class="menu-entry__label menu-entry__label--count">{{badgeCount}}/{{featureCount}}</div> Badges</div> <div><div class="menu-entry__label menu-entry__label--count">{{badgeCount}}/{{featureCount}}</div> 徽章</div>
<span>List application features and earned badges.</span> <span>列出应用程序功能和获得的徽章</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="accounts"> <menu-entry @click.native="accounts">
<icon-key slot="icon"></icon-key> <icon-key slot="icon"></icon-key>
<div><div class="menu-entry__label menu-entry__label--count">{{accountCount}}</div> Accounts</div> <div><div class="menu-entry__label menu-entry__label--count">{{accountCount}}</div> 账户</div>
<span>Manage access to your external accounts.</span> <span>管理对您的外部帐户的访问</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="templates"> <menu-entry @click.native="templates">
<icon-code-braces slot="icon"></icon-code-braces> <icon-code-braces slot="icon"></icon-code-braces>
<div><div class="menu-entry__label menu-entry__label--count">{{templateCount}}</div> Templates</div> <div><div class="menu-entry__label menu-entry__label--count">{{templateCount}}</div> 模板</div>
<span>Configure Handlebars templates for your exports.</span> <span>为您的导出配置 Handlebars 模板</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="settings"> <menu-entry @click.native="settings">
<icon-settings slot="icon"></icon-settings> <icon-settings slot="icon"></icon-settings>
<div>Settings</div> <div>配置</div>
<span>Tweak application and keyboard shortcuts.</span> <span>调整应用程序和键盘快捷键</span>
</menu-entry> </menu-entry>
<hr> <hr>
<menu-entry @click.native="setPanel('workspaceBackups')"> <menu-entry @click.native="setPanel('workspaceBackups')">
<icon-content-save slot="icon"></icon-content-save> <icon-content-save slot="icon"></icon-content-save>
Workspace backups 工作区备份
</menu-entry> </menu-entry>
<menu-entry @click.native="reset"> <menu-entry @click.native="reset">
<icon-logout slot="icon"></icon-logout> <icon-logout slot="icon"></icon-logout>
Reset application 重置应用程序
</menu-entry> </menu-entry>
<menu-entry @click.native="about"> <menu-entry @click.native="about">
<icon-help-circle slot="icon"></icon-help-circle> <icon-help-circle slot="icon"></icon-help-circle>
About StackEdit 关于 StackEdit
</menu-entry> </menu-entry>
</div> </div>
</template> </template>

View File

@ -1,135 +1,135 @@
<template> <template>
<div class="side-bar__panel side-bar__panel--menu"> <div class="side-bar__panel side-bar__panel--menu">
<div class="side-bar__info" v-if="isCurrentTemp"> <div class="side-bar__info" v-if="isCurrentTemp">
<p>{{currentFileName}} can't be published as it's a temporary file.</p> <p>{{currentFileName}} 无法发布因为它是一个临时文件</p>
</div> </div>
<div v-else> <div v-else>
<div class="side-bar__info" v-if="publishLocations.length"> <div class="side-bar__info" v-if="publishLocations.length">
<p>{{currentFileName}} is already published.</p> <p>{{currentFileName}} 已经发布</p>
<menu-entry @click.native="requestPublish"> <menu-entry @click.native="requestPublish">
<icon-upload slot="icon"></icon-upload> <icon-upload slot="icon"></icon-upload>
<div>Publish now</div> <div>立即发布</div>
<span>Update publications for {{currentFileName}}.</span> <span>发布 {{currentFileName}} 的更新</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="managePublish"> <menu-entry @click.native="managePublish">
<icon-view-list slot="icon"></icon-view-list> <icon-view-list slot="icon"></icon-view-list>
<div><div class="menu-entry__label menu-entry__label--count">{{locationCount}}</div> File publication</div> <div><div class="menu-entry__label menu-entry__label--count">{{locationCount}}</div> 文件发布</div>
<span>Manage publication locations for {{currentFileName}}.</span> <span>管理 {{currentFileName}} 的发布位置</span>
</menu-entry> </menu-entry>
</div> </div>
<div class="side-bar__info" v-else-if="noToken"> <div class="side-bar__info" v-else-if="noToken">
<p>You have to link an account to start publishing files.</p> <p>您必须链接一个帐户才能开始发布文件</p>
</div> </div>
<hr> <hr>
<div v-for="token in bloggerTokens" :key="'blogger-' + token.sub"> <div v-for="token in bloggerTokens" :key="'blogger-' + token.sub">
<menu-entry @click.native="publishBlogger(token)"> <menu-entry @click.native="publishBlogger(token)">
<icon-provider slot="icon" provider-id="blogger"></icon-provider> <icon-provider slot="icon" provider-id="blogger"></icon-provider>
<div>Publish to Blogger</div> <div>发布到 Blogger</div>
<span>{{token.name}}</span> <span>{{token.name}}</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="publishBloggerPage(token)"> <menu-entry @click.native="publishBloggerPage(token)">
<icon-provider slot="icon" provider-id="bloggerPage"></icon-provider> <icon-provider slot="icon" provider-id="bloggerPage"></icon-provider>
<div>Publish to Blogger Page</div> <div>发布到 Blogger Page</div>
<span>{{token.name}}</span> <span>{{token.name}}</span>
</menu-entry> </menu-entry>
</div> </div>
<div v-for="token in dropboxTokens" :key="token.sub"> <div v-for="token in dropboxTokens" :key="token.sub">
<menu-entry @click.native="publishDropbox(token)"> <menu-entry @click.native="publishDropbox(token)">
<icon-provider slot="icon" provider-id="dropbox"></icon-provider> <icon-provider slot="icon" provider-id="dropbox"></icon-provider>
<div>Publish to Dropbox</div> <div>发布到 Dropbox</div>
<span>{{token.name}}</span> <span>{{token.name}}</span>
</menu-entry> </menu-entry>
</div> </div>
<div v-for="token in githubTokens" :key="token.sub"> <div v-for="token in githubTokens" :key="token.sub">
<menu-entry @click.native="publishGist(token)"> <menu-entry @click.native="publishGist(token)">
<icon-provider slot="icon" provider-id="gist"></icon-provider> <icon-provider slot="icon" provider-id="gist"></icon-provider>
<div>Publish to Gist</div> <div>发布到 Gist</div>
<span>{{token.name}}</span> <span>{{token.name}}</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="publishGithub(token)"> <menu-entry @click.native="publishGithub(token)">
<icon-provider slot="icon" provider-id="github"></icon-provider> <icon-provider slot="icon" provider-id="github"></icon-provider>
<div>Publish to GitHub</div> <div>发布到 GitHub</div>
<span>{{token.name}}</span> <span>{{token.name}}</span>
</menu-entry> </menu-entry>
</div> </div>
<div v-for="token in giteeTokens" :key="token.sub"> <div v-for="token in giteeTokens" :key="token.sub">
<menu-entry @click.native="publishGitee(token)"> <menu-entry @click.native="publishGitee(token)">
<icon-provider slot="icon" provider-id="gitee"></icon-provider> <icon-provider slot="icon" provider-id="gitee"></icon-provider>
<div>Publish to Gitee</div> <div>发布到 Gitee</div>
<span>{{token.name}}</span> <span>{{token.name}}</span>
</menu-entry> </menu-entry>
</div> </div>
<div v-for="token in gitlabTokens" :key="token.sub"> <div v-for="token in gitlabTokens" :key="token.sub">
<menu-entry @click.native="publishGitlab(token)"> <menu-entry @click.native="publishGitlab(token)">
<icon-provider slot="icon" provider-id="gitlab"></icon-provider> <icon-provider slot="icon" provider-id="gitlab"></icon-provider>
<div>Publish to GitLab</div> <div>发布到 GitLab</div>
<span>{{token.name}}</span> <span>{{token.name}}</span>
</menu-entry> </menu-entry>
</div> </div>
<div v-for="token in giteaTokens" :key="token.sub"> <div v-for="token in giteaTokens" :key="token.sub">
<menu-entry @click.native="publishGitea(token)"> <menu-entry @click.native="publishGitea(token)">
<icon-provider slot="icon" provider-id="gitea"></icon-provider> <icon-provider slot="icon" provider-id="gitea"></icon-provider>
<div>Publish to Gitea</div> <div>发布到 Gitea</div>
<span>{{token.name}}</span> <span>{{token.name}}</span>
</menu-entry> </menu-entry>
</div> </div>
<div v-for="token in googleDriveTokens" :key="token.sub"> <div v-for="token in googleDriveTokens" :key="token.sub">
<menu-entry @click.native="publishGoogleDrive(token)"> <menu-entry @click.native="publishGoogleDrive(token)">
<icon-provider slot="icon" provider-id="googleDrive"></icon-provider> <icon-provider slot="icon" provider-id="googleDrive"></icon-provider>
<div>Publish to Google Drive</div> <div>发布到 Google Drive</div>
<span>{{token.name}}</span> <span>{{token.name}}</span>
</menu-entry> </menu-entry>
</div> </div>
<div v-for="token in wordpressTokens" :key="token.sub"> <div v-for="token in wordpressTokens" :key="token.sub">
<menu-entry @click.native="publishWordpress(token)"> <menu-entry @click.native="publishWordpress(token)">
<icon-provider slot="icon" provider-id="wordpress"></icon-provider> <icon-provider slot="icon" provider-id="wordpress"></icon-provider>
<div>Publish to WordPress</div> <div>发布到 WordPress</div>
<span>{{token.name}}</span> <span>{{token.name}}</span>
</menu-entry> </menu-entry>
</div> </div>
<div v-for="token in zendeskTokens" :key="token.sub"> <div v-for="token in zendeskTokens" :key="token.sub">
<menu-entry @click.native="publishZendesk(token)"> <menu-entry @click.native="publishZendesk(token)">
<icon-provider slot="icon" provider-id="zendesk"></icon-provider> <icon-provider slot="icon" provider-id="zendesk"></icon-provider>
<div>Publish to Zendesk Help Center</div> <div>发布到 Zendesk Help Center</div>
<span>{{token.name}} {{token.subdomain}}</span> <span>{{token.name}} {{token.subdomain}}</span>
</menu-entry> </menu-entry>
</div> </div>
<hr> <hr>
<menu-entry @click.native="addBloggerAccount"> <menu-entry @click.native="addBloggerAccount">
<icon-provider slot="icon" provider-id="blogger"></icon-provider> <icon-provider slot="icon" provider-id="blogger"></icon-provider>
<span>Add Blogger account</span> <span>添加 Blogger 账号</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="addDropboxAccount"> <menu-entry @click.native="addDropboxAccount">
<icon-provider slot="icon" provider-id="dropbox"></icon-provider> <icon-provider slot="icon" provider-id="dropbox"></icon-provider>
<span>Add Dropbox account</span> <span>添加 Dropbox 账号</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="addGithubAccount"> <menu-entry @click.native="addGithubAccount">
<icon-provider slot="icon" provider-id="github"></icon-provider> <icon-provider slot="icon" provider-id="github"></icon-provider>
<span>Add GitHub account</span> <span>添加 GitHub 账号</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="addGiteeAccount"> <menu-entry @click.native="addGiteeAccount">
<icon-provider slot="icon" provider-id="gitee"></icon-provider> <icon-provider slot="icon" provider-id="gitee"></icon-provider>
<span>Add Gitee account</span> <span>添加 Gitee 账号</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="addGitlabAccount"> <menu-entry @click.native="addGitlabAccount">
<icon-provider slot="icon" provider-id="gitlab"></icon-provider> <icon-provider slot="icon" provider-id="gitlab"></icon-provider>
<span>Add GitLab account</span> <span>添加 GitLab 账号</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="addGiteaAccount"> <menu-entry @click.native="addGiteaAccount">
<icon-provider slot="icon" provider-id="gitea"></icon-provider> <icon-provider slot="icon" provider-id="gitea"></icon-provider>
<span>Add Gitea account</span> <span>添加 Gitea 账号</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="addGoogleDriveAccount"> <menu-entry @click.native="addGoogleDriveAccount">
<icon-provider slot="icon" provider-id="googleDrive"></icon-provider> <icon-provider slot="icon" provider-id="googleDrive"></icon-provider>
<span>Add Google Drive account</span> <span>添加 Google Drive 账号</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="addWordpressAccount"> <menu-entry @click.native="addWordpressAccount">
<icon-provider slot="icon" provider-id="wordpress"></icon-provider> <icon-provider slot="icon" provider-id="wordpress"></icon-provider>
<span>Add WordPress account</span> <span>添加 WordPress 账号</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="addZendeskAccount"> <menu-entry @click.native="addZendeskAccount">
<icon-provider slot="icon" provider-id="zendesk"></icon-provider> <icon-provider slot="icon" provider-id="zendesk"></icon-provider>
<span>Add Zendesk account</span> <span>添加 Zendesk 账号</span>
</menu-entry> </menu-entry>
</div> </div>
</div> </div>

View File

@ -1,127 +1,127 @@
<template> <template>
<div class="side-bar__panel side-bar__panel--menu"> <div class="side-bar__panel side-bar__panel--menu">
<div class="side-bar__info" v-if="isCurrentTemp"> <div class="side-bar__info" v-if="isCurrentTemp">
<p>{{currentFileName}} can't be synced as it's a temporary file.</p> <p>{{currentFileName}} 无法同步因为它是临时文件</p>
</div> </div>
<div v-else> <div v-else>
<div class="side-bar__info" v-if="syncLocations.length"> <div class="side-bar__info" v-if="syncLocations.length">
<p>{{currentFileName}} is already synchronized.</p> <p>{{currentFileName}} 已同步</p>
<menu-entry @click.native="requestSync"> <menu-entry @click.native="requestSync">
<icon-sync slot="icon"></icon-sync> <icon-sync slot="icon"></icon-sync>
<div>Synchronize now</div> <div>立即同步</div>
<span>Download / upload file changes.</span> <span>下载/上载文件更改</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="manageSync"> <menu-entry @click.native="manageSync">
<icon-view-list slot="icon"></icon-view-list> <icon-view-list slot="icon"></icon-view-list>
<div><div class="menu-entry__label menu-entry__label--count">{{locationCount}}</div> File synchronization</div> <div><div class="menu-entry__label menu-entry__label--count">{{locationCount}}</div> 文件同步</div>
<span>Manage synchronized locations for {{currentFileName}}.</span> <span>管理 {{currentFileName}} 的同步位置</span>
</menu-entry> </menu-entry>
</div> </div>
<div class="side-bar__info" v-else-if="noToken"> <div class="side-bar__info" v-else-if="noToken">
<p>You have to link an account to start syncing files.</p> <p>您必须链接一个帐户才能开始同步文件</p>
</div> </div>
<hr> <hr>
<div v-for="token in dropboxTokens" :key="token.sub"> <div v-for="token in dropboxTokens" :key="token.sub">
<menu-entry @click.native="openDropbox(token)"> <menu-entry @click.native="openDropbox(token)">
<icon-provider slot="icon" provider-id="dropbox"></icon-provider> <icon-provider slot="icon" provider-id="dropbox"></icon-provider>
<div>Open from Dropbox</div> <div>Dropbox 打开</div>
<span>{{token.name}}</span> <span>{{token.name}}</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="saveDropbox(token)"> <menu-entry @click.native="saveDropbox(token)">
<icon-provider slot="icon" provider-id="dropbox"></icon-provider> <icon-provider slot="icon" provider-id="dropbox"></icon-provider>
<div>Save on Dropbox</div> <div>在Dropbox上保存</div>
<span>{{token.name}}</span> <span>{{token.name}}</span>
</menu-entry> </menu-entry>
</div> </div>
<div v-for="token in githubTokens" :key="token.sub"> <div v-for="token in githubTokens" :key="token.sub">
<menu-entry @click.native="openGithub(token)"> <menu-entry @click.native="openGithub(token)">
<icon-provider slot="icon" provider-id="github"></icon-provider> <icon-provider slot="icon" provider-id="github"></icon-provider>
<div>Open from GitHub</div> <div>GitHub 打开</div>
<span>{{token.name}}</span> <span>{{token.name}}</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="saveGithub(token)"> <menu-entry @click.native="saveGithub(token)">
<icon-provider slot="icon" provider-id="github"></icon-provider> <icon-provider slot="icon" provider-id="github"></icon-provider>
<div>Save on GitHub</div> <div>在GitHub上保存</div>
<span>{{token.name}}</span> <span>{{token.name}}</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="saveGist(token)"> <menu-entry @click.native="saveGist(token)">
<icon-provider slot="icon" provider-id="gist"></icon-provider> <icon-provider slot="icon" provider-id="gist"></icon-provider>
<div>Save on Gist</div> <div>在Gist上保存</div>
<span>{{token.name}}</span> <span>{{token.name}}</span>
</menu-entry> </menu-entry>
</div> </div>
<div v-for="token in giteeTokens" :key="token.sub"> <div v-for="token in giteeTokens" :key="token.sub">
<menu-entry @click.native="openGitee(token)"> <menu-entry @click.native="openGitee(token)">
<icon-provider slot="icon" provider-id="gitee"></icon-provider> <icon-provider slot="icon" provider-id="gitee"></icon-provider>
<div>Open from Gitee</div> <div>Gitee 打开</div>
<span>{{token.name}}</span> <span>{{token.name}}</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="saveGitee(token)"> <menu-entry @click.native="saveGitee(token)">
<icon-provider slot="icon" provider-id="gitee"></icon-provider> <icon-provider slot="icon" provider-id="gitee"></icon-provider>
<div>Save on Gitee</div> <div>在Gitee上保存</div>
<span>{{token.name}}</span> <span>{{token.name}}</span>
</menu-entry> </menu-entry>
</div> </div>
<div v-for="token in gitlabTokens" :key="token.sub"> <div v-for="token in gitlabTokens" :key="token.sub">
<menu-entry @click.native="openGitlab(token)"> <menu-entry @click.native="openGitlab(token)">
<icon-provider slot="icon" provider-id="gitlab"></icon-provider> <icon-provider slot="icon" provider-id="gitlab"></icon-provider>
<div>Open from GitLab</div> <div>GitLab 打开</div>
<span>{{token.name}}</span> <span>{{token.name}}</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="saveGitlab(token)"> <menu-entry @click.native="saveGitlab(token)">
<icon-provider slot="icon" provider-id="gitlab"></icon-provider> <icon-provider slot="icon" provider-id="gitlab"></icon-provider>
<div>Save on GitLab</div> <div>在GitLab上保存</div>
<span>{{token.name}}</span> <span>{{token.name}}</span>
</menu-entry> </menu-entry>
</div> </div>
<div v-for="token in giteaTokens" :key="token.sub"> <div v-for="token in giteaTokens" :key="token.sub">
<menu-entry @click.native="openGitea(token)"> <menu-entry @click.native="openGitea(token)">
<icon-provider slot="icon" provider-id="gitea"></icon-provider> <icon-provider slot="icon" provider-id="gitea"></icon-provider>
<div>Open from Gitea</div> <div>Gitea 打开</div>
<span>{{token.name}}</span> <span>{{token.name}}</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="saveGitea(token)"> <menu-entry @click.native="saveGitea(token)">
<icon-provider slot="icon" provider-id="gitea"></icon-provider> <icon-provider slot="icon" provider-id="gitea"></icon-provider>
<div>Save on Gitea</div> <div>在Gitea上保存</div>
<span>{{token.name}}</span> <span>{{token.name}}</span>
</menu-entry> </menu-entry>
</div> </div>
<div v-for="token in googleDriveTokens" :key="token.sub"> <div v-for="token in googleDriveTokens" :key="token.sub">
<menu-entry @click.native="openGoogleDrive(token)"> <menu-entry @click.native="openGoogleDrive(token)">
<icon-provider slot="icon" provider-id="googleDrive"></icon-provider> <icon-provider slot="icon" provider-id="googleDrive"></icon-provider>
<div>Open from Google Drive</div> <div>Google Drive 打开</div>
<span>{{token.name}}</span> <span>{{token.name}}</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="saveGoogleDrive(token)"> <menu-entry @click.native="saveGoogleDrive(token)">
<icon-provider slot="icon" provider-id="googleDrive"></icon-provider> <icon-provider slot="icon" provider-id="googleDrive"></icon-provider>
<div>Save on Google Drive</div> <div>在Google Drive上保存</div>
<span>{{token.name}}</span> <span>{{token.name}}</span>
</menu-entry> </menu-entry>
</div> </div>
<hr> <hr>
<menu-entry @click.native="addDropboxAccount"> <menu-entry @click.native="addDropboxAccount">
<icon-provider slot="icon" provider-id="dropbox"></icon-provider> <icon-provider slot="icon" provider-id="dropbox"></icon-provider>
<span>Add Dropbox account</span> <span>添加 Dropbox 账号</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="addGithubAccount"> <menu-entry @click.native="addGithubAccount">
<icon-provider slot="icon" provider-id="github"></icon-provider> <icon-provider slot="icon" provider-id="github"></icon-provider>
<span>Add GitHub account</span> <span>添加 GitHub 账号</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="addGiteeAccount"> <menu-entry @click.native="addGiteeAccount">
<icon-provider slot="icon" provider-id="gitee"></icon-provider> <icon-provider slot="icon" provider-id="gitee"></icon-provider>
<span>Add Gitee account</span> <span>添加 Gitee 账号</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="addGitlabAccount"> <menu-entry @click.native="addGitlabAccount">
<icon-provider slot="icon" provider-id="gitlab"></icon-provider> <icon-provider slot="icon" provider-id="gitlab"></icon-provider>
<span>Add GitLab account</span> <span>添加 GitLab 账号</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="addGiteaAccount"> <menu-entry @click.native="addGiteaAccount">
<icon-provider slot="icon" provider-id="gitea"></icon-provider> <icon-provider slot="icon" provider-id="gitea"></icon-provider>
<span>Add Gitea account</span> <span>添加 Gitea 账号</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="addGoogleDriveAccount"> <menu-entry @click.native="addGoogleDriveAccount">
<icon-provider slot="icon" provider-id="googleDrive"></icon-provider> <icon-provider slot="icon" provider-id="googleDrive"></icon-provider>
<span>Add Google Drive account</span> <span>添加 Google Drive 账号</span>
</menu-entry> </menu-entry>
</div> </div>
</div> </div>

View File

@ -6,12 +6,12 @@
<icon-content-save></icon-content-save> <icon-content-save></icon-content-save>
</div> </div>
<div class="flex flex--column"> <div class="flex flex--column">
Import workspace backup 导入工作区备份
</div> </div>
</label> </label>
<menu-entry @click.native="exportWorkspace"> <menu-entry @click.native="exportWorkspace">
<icon-content-save slot="icon"></icon-content-save> <icon-content-save slot="icon"></icon-content-save>
Export workspace backup 导出工作区备份
</menu-entry> </menu-entry>
</div> </div>
</template> </template>

View File

@ -2,40 +2,40 @@
<div class="side-bar__panel side-bar__panel--menu"> <div class="side-bar__panel side-bar__panel--menu">
<menu-entry @click.native="manageWorkspaces"> <menu-entry @click.native="manageWorkspaces">
<icon-database slot="icon"></icon-database> <icon-database slot="icon"></icon-database>
<div><div class="menu-entry__label menu-entry__label--count">{{workspaceCount}}</div> Manage workspaces</div> <div><div class="menu-entry__label menu-entry__label--count">{{workspaceCount}}</div> 管理工作区</div>
<span>List, rename, remove workspaces</span> <span>列出重命名删除工作区</span>
</menu-entry> </menu-entry>
<hr> <hr>
<div class="workspace" v-for="(workspace, id) in workspacesById" :key="id"> <div class="workspace" v-for="(workspace, id) in workspacesById" :key="id">
<menu-entry :href="workspace.url" target="_blank"> <menu-entry :href="workspace.url" target="_blank">
<icon-provider slot="icon" :provider-id="workspace.providerId"></icon-provider> <icon-provider slot="icon" :provider-id="workspace.providerId"></icon-provider>
<div class="workspace__name"><div class="menu-entry__label" v-if="currentWorkspace === workspace">current</div>{{workspace.name}}</div> <div class="workspace__name"><div class="menu-entry__label" v-if="currentWorkspace === workspace">当前</div>{{workspace.name}}</div>
</menu-entry> </menu-entry>
</div> </div>
<hr> <hr>
<menu-entry @click.native="addCouchdbWorkspace">
<icon-provider slot="icon" provider-id="couchdbWorkspace"></icon-provider>
<span>Add a <b>CouchDB</b> workspace</span>
</menu-entry>
<menu-entry @click.native="addGithubWorkspace"> <menu-entry @click.native="addGithubWorkspace">
<icon-provider slot="icon" provider-id="githubWorkspace"></icon-provider> <icon-provider slot="icon" provider-id="githubWorkspace"></icon-provider>
<span>Add a <b>GitHub</b> workspace</span> <span>新增 <b>GitHub</b> 工作区</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="addGiteeWorkspace"> <menu-entry @click.native="addGiteeWorkspace">
<icon-provider slot="icon" provider-id="giteeWorkspace"></icon-provider> <icon-provider slot="icon" provider-id="giteeWorkspace"></icon-provider>
<span>Add a <b>Gitee</b> workspace</span> <span>新增 <b>Gitee</b> 工作区</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="addGitlabWorkspace"> <menu-entry @click.native="addGitlabWorkspace">
<icon-provider slot="icon" provider-id="gitlabWorkspace"></icon-provider> <icon-provider slot="icon" provider-id="gitlabWorkspace"></icon-provider>
<span>Add a <b>GitLab</b> workspace</span> <span>新增 <b>GitLab</b> 工作区</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="addGiteaWorkspace"> <menu-entry @click.native="addGiteaWorkspace">
<icon-provider slot="icon" provider-id="giteaWorkspace"></icon-provider> <icon-provider slot="icon" provider-id="giteaWorkspace"></icon-provider>
<span>Add a <b>Gitea</b> workspace</span> <span>新增 <b>Gitea</b> 工作区</span>
</menu-entry> </menu-entry>
<menu-entry @click.native="addGoogleDriveWorkspace"> <menu-entry @click.native="addGoogleDriveWorkspace">
<icon-provider slot="icon" provider-id="googleDriveWorkspace"></icon-provider> <icon-provider slot="icon" provider-id="googleDriveWorkspace"></icon-provider>
<span>Add a <b>Google Drive</b> workspace</span> <span>新增 <b>Google Drive</b> 工作区</span>
</menu-entry>
<menu-entry @click.native="addCouchdbWorkspace">
<icon-provider slot="icon" provider-id="couchdbWorkspace"></icon-provider>
<span>新增 <b>CouchDB</b> 工作区</span>
</menu-entry> </menu-entry>
</div> </div>
</template> </template>

View File

@ -2,28 +2,25 @@
<modal-inner class="modal__inner-1--about-modal" aria-label="About"> <modal-inner class="modal__inner-1--about-modal" aria-label="About">
<div class="modal__content"> <div class="modal__content">
<div class="logo-background"></div> <div class="logo-background"></div>
StackEdit on <a target="_blank" href="https://github.com/mafgwo/stackedit/">GitHub</a> StackEdit <a target="_blank" href="https://gitee.com/mafgwo/stackedit/">Gitee</a>
<br> <br>
<a target="_blank" href="https://github.com/mafgwo/stackedit/issues">Issue tracker</a> <a target="_blank" href="https://github.com/mafgwo/stackedit/releases">Changelog</a> <a target="_blank" href="https://gitee.com/mafgwo/stackedit/issues">问题跟踪</a> <a target="_blank" href="https://gitee.com/mafgwo/stackedit/releases">更新日志</a>
<br> <br>
<a target="_blank" href="https://chrome.google.com/webstore/detail/iiooodelglhkcpgbajoejffhijaclcdg">Chrome app</a> <a target="_blank" href="https://chrome.google.com/webstore/detail/ajehldoplanpchfokmeempkekhnhmoha">Chrome extension</a> <a target="_blank" href="#">Chrome 应用</a> <a target="_blank" href="#">Chrome 扩展</a>
<br> <br>
<a target="_blank" href="https://community.stackedit.io/">Community</a> <a target="_blank" href="https://community.stackedit.io/c/how-to">Tutos and How To</a>
<br>
StackEdit on <a target="_blank" href="https://twitter.com/stackedit/">Twitter</a>
<hr> <hr>
<small>© 2013-2022 Dock5 Software Ltd.<br>v{{version}}</small> <small>© 2013-2022 StackEdit中文版<br>v{{version}}</small>
<h3>FAQ</h3> <h3>常见问题解答</h3>
<div class="faq" v-html="faq"></div> <div class="faq" v-html="faq"></div>
<div class="modal__info"> <div class="modal__info">
For commercial support or custom development, please <a href="mailto:stackedit.project@gmail.com">contact us</a>. 如需商业支持或定制开发 <a href="mailto:mafgwo@163.com">联系我们</a>.
</div> </div>
Licensed under an Licensed under an
<a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0">Apache License</a><br> <a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0">Apache License</a><br>
<a target="_blank" href="privacy_policy.html">Privacy Policy</a> <a target="_blank" href="privacy_policy.html">隐私策略</a>
</div> </div>
<div class="modal__button-bar"> <div class="modal__button-bar">
<button class="button button--resolve" @click="config.resolve()">Close</button> <button class="button button--resolve" @click="config.resolve()">关闭</button>
</div> </div>
</modal-inner> </modal-inner>
</template> </template>

View File

@ -4,7 +4,7 @@
<div class="modal__image"> <div class="modal__image">
<icon-database></icon-database> <icon-database></icon-database>
</div> </div>
<p>The following workspaces are accessible:</p> <p><br>可以访问以下工作区</p>
<div class="workspace-entry flex flex--column" v-for="(workspace, id) in workspacesById" :key="id"> <div class="workspace-entry flex flex--column" v-for="(workspace, id) in workspacesById" :key="id">
<div class="flex flex--column"> <div class="flex flex--column">
<div class="workspace-entry__header flex flex--row flex--align-center"> <div class="workspace-entry__header flex flex--row flex--align-center">
@ -14,10 +14,10 @@
<input class="text-input" type="text" v-if="editedId === id" v-focus @blur="submitEdit()" @keydown.enter="submitEdit()" @keydown.esc.stop="submitEdit(true)" v-model="editingName"> <input class="text-input" type="text" v-if="editedId === id" v-focus @blur="submitEdit()" @keydown.enter="submitEdit()" @keydown.esc.stop="submitEdit(true)" v-model="editingName">
<div class="workspace-entry__name" v-else>{{workspace.name}}</div> <div class="workspace-entry__name" v-else>{{workspace.name}}</div>
<div class="workspace-entry__buttons flex flex--row"> <div class="workspace-entry__buttons flex flex--row">
<button class="workspace-entry__button button" @click="edit(id)" v-title="'Edit name'"> <button class="workspace-entry__button button" @click="edit(id)" v-title="'编辑名称'">
<icon-pen></icon-pen> <icon-pen></icon-pen>
</button> </button>
<button class="workspace-entry__button button" @click="remove(id)" v-title="'Remove'"> <button class="workspace-entry__button button" @click="remove(id)" v-title="'删除'">
<icon-delete></icon-delete> <icon-delete></icon-delete>
</button> </button>
</div> </div>
@ -27,10 +27,10 @@
{{workspace.url}} {{workspace.url}}
</div> </div>
<div class="workspace-entry__buttons flex flex--row"> <div class="workspace-entry__buttons flex flex--row">
<button class="workspace-entry__button button" v-clipboard="workspace.url" @click="info('Workspace URL copied to clipboard!')" v-title="'Copy URL'"> <button class="workspace-entry__button button" v-clipboard="workspace.url" @click="info('工作区URL已复制到剪贴板!')" v-title="'复制URL'">
<icon-content-copy></icon-content-copy> <icon-content-copy></icon-content-copy>
</button> </button>
<a class="workspace-entry__button button" :href="workspace.url" target="_blank" v-title="'Open workspace'"> <a class="workspace-entry__button button" :href="workspace.url" target="_blank" v-title="'打开工作区'">
<icon-open-in-new></icon-open-in-new> <icon-open-in-new></icon-open-in-new>
</a> </a>
</div> </div>
@ -40,24 +40,24 @@
{{workspace.locationUrl}} {{workspace.locationUrl}}
</div> </div>
<div class="workspace-entry__buttons flex flex--row"> <div class="workspace-entry__buttons flex flex--row">
<button class="workspace-entry__button button" v-clipboard="workspace.locationUrl" @click="info('Workspace URL copied to clipboard!')" v-title="'Copy URL'"> <button class="workspace-entry__button button" v-clipboard="workspace.locationUrl" @click="info('工作区URL已复制到剪贴板!')" v-title="'复制URL'">
<icon-content-copy></icon-content-copy> <icon-content-copy></icon-content-copy>
</button> </button>
<a class="workspace-entry__button button" :href="workspace.locationUrl" target="_blank" v-title="'Open workspace location'"> <a class="workspace-entry__button button" :href="workspace.locationUrl" target="_blank" v-title="'打开工作区位置'">
<icon-open-in-new></icon-open-in-new> <icon-open-in-new></icon-open-in-new>
</a> </a>
</div> </div>
</div> </div>
<div> <div>
<span class="workspace-entry__offline" v-if="availableOffline[id]"> <span class="workspace-entry__offline" v-if="availableOffline[id]">
available offline 离线可用
</span> </span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="modal__button-bar"> <div class="modal__button-bar">
<button class="button button--resolve" @click="config.resolve()">Close</button> <button class="button button--resolve" @click="config.resolve()">关闭</button>
</div> </div>
</modal-inner> </modal-inner>
</template> </template>
@ -117,9 +117,9 @@ export default {
}, },
async remove(id) { async remove(id) {
if (id === this.mainWorkspace.id) { if (id === this.mainWorkspace.id) {
this.info('Your main workspace can not be removed.'); this.info('您的主工作区无法删除。');
} else if (id === this.currentWorkspace.id) { } else if (id === this.currentWorkspace.id) {
this.info('Please close the workspace before removing it.'); this.info('请先关闭工作区,然后再将其删除。');
} else { } else {
try { try {
await store.dispatch('modal/open', 'removeWorkspace'); await store.dispatch('modal/open', 'removeWorkspace');

View File

@ -11,7 +11,8 @@
<b>Example:</b> https://instance.smileupps.com/stackedit-workspace <b>Example:</b> https://instance.smileupps.com/stackedit-workspace
</div> </div>
<div class="form-entry__actions"> <div class="form-entry__actions">
<a href="https://community.stackedit.io/t/couchdb-workspace-setup/" target="_blank">How to setup?</a> <!-- https://community.stackedit.io/t/couchdb-workspace-setup/ -->
<a href="#" target="_blank">How to setup?</a>
</div> </div>
</form-entry> </form-entry>
</div> </div>

View File

@ -1,7 +1,7 @@
export default () => ({ export default () => ({
main: { main: {
id: 'main', id: 'main',
name: 'Main workspace', name: '主工作区',
// The rest will be filled by the workspace/workspacesById getter // The rest will be filled by the workspace/workspacesById getter
}, },
}); });

View File

@ -26,35 +26,35 @@ class Feature {
export default [ export default [
new Feature( new Feature(
'navigationBar', 'navigationBar',
'Nav bar expert', '丰富的导航栏',
'Master the navigation bar by formatting some Markdown and renaming the current file.', '通过格式化一些Markdown和重命名当前文件掌握导航栏',
[ [
new Feature( new Feature(
'formatButtons', 'formatButtons',
'Formatter', '格式化',
'Use the format buttons to change formatting in your Markdown file.', '使用格式化按钮更改 Markdown 文件中的格式。',
), ),
new Feature( new Feature(
'editCurrentFileName', 'editCurrentFileName',
'Renamer', '重命名',
'Use the name field in the navigation bar to rename the current file.', '使用导航栏中的名称字段重命名当前文件。',
), ),
new Feature( new Feature(
'toggleExplorer', 'toggleExplorer',
'Explorer toggler', '资源管理器切换',
'Use the navigation bar to toggle the explorer.', '使用导航栏切换资源管理器。',
), ),
new Feature( new Feature(
'toggleSideBar', 'toggleSideBar',
'Side bar toggler', '切换侧边栏',
'Use the navigation bar to toggle the side bar.', '使用导航栏来切换侧边栏。',
), ),
], ],
), ),
new Feature( new Feature(
'explorer', 'explorer',
'Explorer', '资源管理器',
'Use the file explorer to manage files and folders in your workspace.', '使用文件资源管理器管理工作区中的文件和文件夹。',
[ [
new Feature( new Feature(
'createFile', 'createFile',
@ -142,25 +142,25 @@ export default [
), ),
new Feature( new Feature(
'signIn', 'signIn',
'Signed in', '登录',
'Sign in with Google, sync your main workspace and unlock functionalities.', '使用 Google 登录,同步您的主工作区并解锁功能。',
[ [
new Feature( new Feature(
'syncMainWorkspace', 'syncMainWorkspace',
'Main workspace synced', '主工作区已同步',
'Sign in with Google to sync your main workspace with your Google Drive app data folder.', '使用 Google 登录以将您的主工作区与您的 Google Drive 应用数据文件夹同步。',
), ),
new Feature( new Feature(
'sponsor', 'sponsor',
'Sponsor', '赞助',
'Sign in with Google and sponsor StackEdit to unlock PDF and Pandoc exports.', '使用 Google 登录并赞助 StackEdit 以解锁 PDF 和 Pandoc 导出。',
), ),
], ],
), ),
new Feature( new Feature(
'workspaces', 'workspaces',
'Workspace expert', 'Workspace expert',
'Use the workspace menu to create all kinds of workspaces and to manage them.', '使用工作区菜单创建各种工作区并对其进行管理。',
[ [
new Feature( new Feature(
'addCouchdbWorkspace', 'addCouchdbWorkspace',

View File

@ -1,52 +1,52 @@
export default [{ export default [{
}, { }, {
method: 'bold', method: 'bold',
title: 'Bold', title: '加粗',
icon: 'format-bold', icon: 'format-bold',
}, { }, {
method: 'italic', method: 'italic',
title: 'Italic', title: '斜体',
icon: 'format-italic', icon: 'format-italic',
}, { }, {
method: 'heading', method: 'heading',
title: 'Heading', title: '标题',
icon: 'format-size', icon: 'format-size',
}, { }, {
method: 'strikethrough', method: 'strikethrough',
title: 'Strikethrough', title: '删除线',
icon: 'format-strikethrough', icon: 'format-strikethrough',
}, { }, {
}, { }, {
method: 'ulist', method: 'ulist',
title: 'Unordered list', title: '无序列表',
icon: 'format-list-bulleted', icon: 'format-list-bulleted',
}, { }, {
method: 'olist', method: 'olist',
title: 'Ordered list', title: '有序列表',
icon: 'format-list-numbers', icon: 'format-list-numbers',
}, { }, {
method: 'clist', method: 'clist',
title: 'Check list', title: '可选列表',
icon: 'format-list-checks', icon: 'format-list-checks',
}, { }, {
}, { }, {
method: 'quote', method: 'quote',
title: 'Blockquote', title: '块引用',
icon: 'format-quote-close', icon: 'format-quote-close',
}, { }, {
method: 'code', method: 'code',
title: 'Code', title: '代码',
icon: 'code-tags', icon: 'code-tags',
}, { }, {
method: 'table', method: 'table',
title: 'Table', title: '表格',
icon: 'table', icon: 'table',
}, { }, {
method: 'link', method: 'link',
title: 'Link', title: '链接',
icon: 'link-variant', icon: 'link-variant',
}, { }, {
method: 'image', method: 'image',
title: 'Image', title: '图片',
icon: 'file-image', icon: 'file-image',
}]; }];

View File

@ -46,21 +46,21 @@ export default {
'Yes, remove', 'Yes, remove',
), ),
reset: simpleModal( reset: simpleModal(
'<p>This will clean all your workspaces locally. Are you sure?</p>', '<p>这将在本地清理所有工作区,你确定吗?</p>',
'No', '取消',
'Yes, clean', '确认清理',
), ),
signInForComment: simpleModal( signInForComment: simpleModal(
`<p>You have to sign in with Google to start commenting.</p> `<p>您必须使用 Google 登录才能开始评论。</p>
<div class="modal__info"><b>Note:</b> This will sync your main workspace.</div>`, <div class="modal__info"><b>注意:</b> </div>`,
'Cancel', '取消',
'Ok, sign in', '确认登录',
), ),
signInForSponsorship: simpleModal( signInForSponsorship: simpleModal(
`<p>You have to sign in with Google to sponsor.</p> `<p>您必须使用 Google 登录才能赞助。</p>
<div class="modal__info"><b>Note:</b> This will sync your main workspace.</div>`, <div class="modal__info"><b>注意:</b> </div>`,
'Cancel', '取消',
'Ok, sign in', '确认登录',
), ),
sponsorOnly: simpleModal( sponsorOnly: simpleModal(
'<p>This feature is restricted to sponsors as it relies on server resources.</p>', '<p>This feature is restricted to sponsors as it relies on server resources.</p>',

View File

@ -1,143 +1,167 @@
# Welcome to StackEdit! # 欢迎来到 StackEdit
Hi! I'm your first Markdown file in **StackEdit**. If you want to learn about StackEdit, you can read me. If you want to play with Markdown, you can edit me. Once you have finished with me, you can create new files by opening the **file explorer** on the left corner of the navigation bar. 你好!我是你在 **StackEdit** 中的第一个 Markdown 文件。如果你想了解 StackEdit可以阅读我的文章。如果你想玩 Markdown你可以编辑我。完成后您可以通过打开导航栏左角的**文件资源管理器**来创建新文件。
# Files # 文件
StackEdit stores your files in your browser, which means all your files are automatically saved locally and are accessible **offline!** StackEdit 将您的文件存储在您的浏览器中,这意味着您的所有文件都会自动保存在本地并且可以**离线访问!**
## Create files and folders ## 创建文件和文件夹
The file explorer is accessible using the button in left corner of the navigation bar. You can create a new file by clicking the **New file** button in the file explorer. You can also create folders by clicking the **New folder** button. 使用导航栏左角的按钮可以访问文件资源管理器。您可以通过单击文件资源管理器中的 **创建文件** 按钮来创建新文件。您还可以通过单击 **创建文件夹** 按钮来创建文件夹。
## Switch to another file ## 切换到另一个文件
All your files and folders are presented as a tree in the file explorer. You can switch from one to another by clicking a file in the tree. 您的所有文件和文件夹在文件资源管理器中都显示为树。您可以通过单击树中的文件从一个文件切换到另一个文件。
## Rename a file ## 重命名文件
You can rename the current file by clicking the file name in the navigation bar or by clicking the **Rename** button in the file explorer. 您可以通过单击导航栏中的文件名或单击文件资源管理器中的**重命名**按钮来重命名当前文件。
## Delete a file ## 删除一个文件
You can delete the current file by clicking the **Remove** button in the file explorer. The file will be moved into the **Trash** folder and automatically deleted after 7 days of inactivity. 您可以通过单击文件资源管理器中的 **删除** 按钮来删除当前文件。该文件将被移至 **Trash** 文件夹并在 7 天不活动后自动删除。
## Export a file ## 导出文件
You can export the current file by clicking **Export to disk** in the menu. You can choose to export the file as plain Markdown, as HTML using a Handlebars template or as a PDF. 您可以通过单击菜单中的 **导出到磁盘** 来导出当前文件。您可以选择将文件导出为纯 Markdown、使用 Handlebars 模板的 HTML 或 PDF。
# Synchronization # 同步
Synchronization is one of the biggest features of StackEdit. It enables you to synchronize any file in your workspace with other files stored in your **Google Drive**, your **Dropbox** and your **GitHub** accounts. This allows you to keep writing on other devices, collaborate with people you share the file with, integrate easily into your workflow... The synchronization mechanism takes place every minute in the background, downloading, merging, and uploading file modifications. 同步是 StackEdit 的最大特点之一。它使您可以将工作区中的任何文件与存储在 **Google Drive**、**Dropbox** 和 **GitHub** 帐户中的其他文件同步。这使您可以继续在其他设备上写作,与您共享文件的人协作,轻松集成到您的工作流程中......同步机制在后台每分钟发生一次,下载、合并和上传文件修改。
There are two types of synchronization and they can complement each other: 有两种类型的同步,它们可以相互补充:
- The workspace synchronization will sync all your files, folders and settings automatically. This will allow you to fetch your workspace on any other device. - 工作区同步将自动同步您的所有文件、文件夹和设置。这将允许您在任何其他设备上获取您的工作区。
> To start syncing your workspace, just sign in with Google in the menu. > 要开始同步您的工作区,只需在菜单中使用 Google 登录。
- The file synchronization will keep one file of the workspace synced with one or multiple files in **Google Drive**, **Dropbox** or **GitHub**. - 文件同步将保持工作区的一个文件与**Google Drive**、**Dropbox**或**GitHub**中的一个或多个文件同步。
> Before starting to sync files, you must link an account in the **Synchronize** sub-menu. > 在开始同步文件之前,您必须在**同步**子菜单中链接一个帐户。
## Open a file ## 打开一个文件
You can open a file from **Google Drive**, **Dropbox** or **GitHub** by opening the **Synchronize** sub-menu and clicking **Open from**. Once opened in the workspace, any modification in the file will be automatically synced. 您可以通过打开 **同步** 子菜单并单击 **Open from****Google Drive**、**Dropbox** 或 **GitHub** 打开文件。在工作区中打开后,文件中的任何修改都将自动同步。
## Save a file ## 保存文件
You can save any file of the workspace to **Google Drive**, **Dropbox** or **GitHub** by opening the **Synchronize** sub-menu and clicking **Save on**. Even if a file in the workspace is already synced, you can save it to another location. StackEdit can sync one file with multiple locations and accounts. 您可以通过打开 **同步** 子菜单并单击 **Save on** 将工作区的任何文件保存到 **Google Drive**、**Dropbox** 或 **GitHub**。即使工作区中的文件已经同步,您也可以将其保存到另一个位置。 StackEdit 可以将一个文件与多个位置和帐户同步。
## Synchronize a file ##同步文件
Once your file is linked to a synchronized location, StackEdit will periodically synchronize it by downloading/uploading any modification. A merge will be performed if necessary and conflicts will be resolved. 一旦您的文件链接到同步位置StackEdit 将通过下载/上传任何修改来定期同步它。如有必要,将执行合并并解决冲突。
If you just have modified your file and you want to force syncing, click the **Synchronize now** button in the navigation bar. 如果您刚刚修改了文件并且想要强制同步,请单击导航栏中的 **Synchronize now** 按钮。
> **Note:** The **Synchronize now** button is disabled if you have no file to synchronize. > **注意:** 如果您没有要同步的文件,**立即同步**按钮将被禁用。
## Manage file synchronization ## 管理文件同步
Since one file can be synced with multiple locations, you can list and manage synchronized locations by clicking **File synchronization** in the **Synchronize** sub-menu. This allows you to list and remove synchronized locations that are linked to your file. 由于一个文件可以与多个位置同步,您可以通过单击**同步**子菜单中的**文件同步**列出和管理同步位置。这允许您列出和删除链接到您的文件的同步位置。
# Publication # 出版物
Publishing in StackEdit makes it simple for you to publish online your files. Once you're happy with a file, you can publish it to different hosting platforms like **Blogger**, **Dropbox**, **Gist**, **GitHub**, **Google Drive**, **WordPress** and **Zendesk**. With [Handlebars templates](http://handlebarsjs.com/), you have full control over what you export. 在 StackEdit 中发布使您可以轻松地在线发布文件。对文件感到满意后,您可以将其发布到不同的托管平台,例如 **Blogger**、**Dropbox**、**Gist**、**GitHub**、**Google Drive**、* *WordPress** 和 **Zendesk**。使用 [Handlebars 模板](http://handlebarsjs.com/),您可以完全控制导出的内容。
> Before starting to publish, you must link an account in the **Publish** sub-menu. > 在开始发布之前,您必须在**发布**子菜单中链接一个帐户。
## Publish a File ## 发布文件
You can publish your file by opening the **Publish** sub-menu and by clicking **Publish to**. For some locations, you can choose between the following formats: 您可以通过打开 **发布** 子菜单并单击 **发布到** 来发布您的文件。对于某些位置,您可以选择以下格式:
- Markdown: publish the Markdown text on a website that can interpret it (**GitHub** for instance), - Markdown:在可以解释的网站上发布 Markdown 文本(例如**GitHub**
- HTML: publish the file converted to HTML via a Handlebars template (on a blog for example). - HTML:通过 Handlebars 模板发布转换为 HTML 的文件(例如在博客上)。
## Update a publication ## 更新出版物
After publishing, StackEdit keeps your file linked to that publication which makes it easy for you to re-publish it. Once you have modified your file and you want to update your publication, click on the **Publish now** button in the navigation bar. 发布后StackEdit 会将您的文件链接到该出版物,这使您可以轻松地重新发布它。一旦您修改了文件并想要更新您的出版物,请单击导航栏中的**立即发布**按钮。
> **Note:** The **Publish now** button is disabled if your file has not been published yet. > **注意:** 如果您没有要同步的文件,**立即同步**按钮将被禁用。
## Manage file publication ## 管理文件同步
Since one file can be published to multiple locations, you can list and manage publish locations by clicking **File publication** in the **Publish** sub-menu. This allows you to list and remove publication locations that are linked to your file. 由于一个文件可以与多个位置同步,您可以通过单击**同步**子菜单中的**文件同步**列出和管理同步位置。这允许您列出和删除链接到您的文件的同步位置。
# Markdown extensions # 出版物
StackEdit extends the standard Markdown syntax by adding extra **Markdown extensions**, providing you with some nice features. 在 StackEdit 中发布使您可以轻松地在线发布文件。对文件感到满意后,您可以将其发布到不同的托管平台,例如 **Blogger**、**Dropbox**、**Gist**、**GitHub**、**Google Drive**、* *WordPress** 和 **Zendesk**。使用 [Handlebars 模板](http://handlebarsjs.com/),您可以完全控制导出的内容。
> **ProTip:** You can disable any **Markdown extension** in the **File properties** dialog. > 在开始发布之前,您必须在**发布**子菜单中链接一个帐户。
## 发布文件
您可以通过打开 **发布** 子菜单并单击 **发布到** 来发布您的文件。对于某些位置,您可以选择以下格式:
- Markdown在可以解释的网站上发布 Markdown 文本(例如**GitHub**
- HTML通过 Handlebars 模板发布转换为 HTML 的文件(例如在博客上)。
## 更新出版物
发布后StackEdit 会将您的文件链接到该出版物,这使您可以轻松地重新发布它。一旦您修改了文件并想要更新您的出版物,请单击导航栏中的**立即发布**按钮。
> **注意:** 如果您的文件尚未发布,则 **立即发布** 按钮将被禁用。
## 管理文件发布
由于一个文件可以发布到多个位置,您可以通过单击**发布**子菜单中的**文件发布**来列出和管理发布位置。这允许您列出和删除链接到您的文件的发布位置。
# Markdown扩展
StackEdit 通过添加额外的 **Markdown扩展** 扩展了标准 Markdown 语法,为您提供了一些不错的功能。
> **专业提示:** 您可以在 **文件属性** 对话框中禁用任何 **Markdown 扩展名**
## SmartyPants ## SmartyPants
SmartyPants converts ASCII punctuation characters into "smart" typographic punctuation HTML entities. For example: SmartyPants 将 ASCII 标点字符转换为“智能”印刷标点 HTML 实体。例如:
| |ASCII |HTML | | |ASCII |HTML |
|----------------|-------------------------------|-----------------------------| |----------------|--------------------------------| ------------------------------|
|Single backticks|`'Isn't this fun?'` |'Isn't this fun?' | |单反引号|`'这不好玩吗?'` |'这不好玩吗? |
|Quotes |`"Isn't this fun?"` |"Isn't this fun?" | |引用|`“这不好玩吗?”` |“这不好玩吗?” |
|Dashes |`-- is en-dash, --- is em-dash`|-- is en-dash, --- is em-dash| |破折号 |`-- 是破折号,--- 是破折号`|-- 是破折号,--- 是破折号|
## KaTeX ## KaTeX
You can render LaTeX mathematical expressions using [KaTeX](https://khan.github.io/KaTeX/): 您可以使用 [KaTeX](https://khan.github.io/KaTeX/) 渲染 LaTeX 数学表达式:
The *Gamma function* satisfying $\Gamma(n) = (n-1)!\quad\forall n\in\mathbb N$ is via the Euler integral 满足 $\Gamma(n) = (n-1)!\quad\forall n\in\mathbb N$ 的 *Gamma 函数* 是通过欧拉积分
$$ $$
\Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,. \Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,.
$$ $$
> You can find more information about **LaTeX** mathematical expressions [here](http://meta.math.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference). > 您可以在 [这里](http://meta.math.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference) 找到有关 **LaTeX** 数学表达式的更多信息。
## UML diagrams ## UML
You can render UML diagrams using [Mermaid](https://mermaidjs.github.io/). For example, this will produce a sequence diagram: 您可以使用 [Mermaid](https://mermaidjs.github.io/) 渲染 UML 图。例如,这将产生一个序列图:
```mermaid ```mermaid
sequenceDiagram sequenceDiagram
Alice ->> Bob: Hello Bob, how are you? 爱丽丝 ->> 鲍勃: 你好鲍勃,你好吗?
Bob-->>John: How about you John? 鲍勃-->>约翰: 约翰,你呢?
Bob--x Alice: I am good thanks! 鲍勃--x 爱丽丝: 我很好,谢谢!
Bob-x John: I am good thanks! 鲍勃-x 约翰: 我很好,谢谢!
Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row. Note right of 约翰: 鲍勃想了很长<br/>很长的时间,太长了<br/>文本确实<br/>不能放在一行中。
Bob-->Alice: Checking with John... 鲍勃-->爱丽丝: 正在和 John 核对...
Alice->John: Yes... John, how are you? 爱丽丝->约翰: 是的……约翰,你好吗?
``` ```
And this will produce a flow chart: 这将产生一个流程图:
```mermaid ```mermaid
graph LR graph LR
A[Square Rect] -- Link text --> B((Circle)) A[Square Rect] -- 链接文本 --> B((Circle))
A --> C(Round Rect) A --> C(圆角矩形)
B --> D{Rhombus} B --> D{菱形}
C --> D C --> D
``` ```

View File

@ -8,8 +8,8 @@ const showInfo = () => {
.filter(badge => badge.isEarned && !lastEarnedFeatureIds.has(badge.featureId)); .filter(badge => badge.isEarned && !lastEarnedFeatureIds.has(badge.featureId));
if (earnedBadges.length) { if (earnedBadges.length) {
store.dispatch('notification/badge', earnedBadges.length > 1 store.dispatch('notification/badge', earnedBadges.length > 1
? `You've earned ${earnedBadges.length} badges: ${earnedBadges.map(badge => `"${badge.name}"`).join(', ')}.` ? `您已获得 ${earnedBadges.length} 个徽章: ${earnedBadges.map(badge => `"${badge.name}"`).join(', ')}.`
: `You've earned 1 badge: "${earnedBadges[0].name}".`); : `您已获得 1 个徽章: "${earnedBadges[0].name}".`);
} }
lastEarnedFeatureIds = null; lastEarnedFeatureIds = null;
}; };

View File

@ -135,17 +135,24 @@ export default new Provider({
token, token,
}); });
return entries.map((entry) => { return entries.map(({
const email = entry.author_email || entry.committer_email; author,
const sub = `${giteaHelper.subPrefix}:${token.serverUrl}/${email}`; committer,
userSvc.addUserInfo({ commit,
id: sub, sha,
name: entry.author_name || entry.committer_name, }) => {
imageUrl: '', let user;
}); if (author && author.login) {
const date = entry.authored_date || entry.committed_date || 1; user = author;
} else if (committer && committer.login) {
user = committer;
}
const sub = `${giteaHelper.subPrefix}:${user.login}`;
userSvc.addUserInfo({ id: sub, name: user.login, imageUrl: user.avatar_url });
const date = (commit.author && commit.author.date)
|| (commit.committer && commit.committer.date);
return { return {
id: entry.id, id: sha,
sub, sub,
created: date ? new Date(date).getTime() : 1, created: date ? new Date(date).getTime() : 1,
}; };

View File

@ -251,19 +251,27 @@ export default new Provider({
path: getAbsolutePath({ id: fileSyncDataId }), path: getAbsolutePath({ id: fileSyncDataId }),
}); });
return entries.map((entry) => { return entries.map(({
const email = entry.author_email || entry.committer_email; author,
const sub = `${giteaHelper.subPrefix}:${token.serverUrl}/${email}`; committer,
userSvc.addUserInfo({ commit,
id: sub, sha,
name: entry.author_name || entry.committer_name, }) => {
imageUrl: '', // No way to get user's avatar url... let user;
}); if (author && author.login) {
const date = entry.authored_date || entry.committed_date || 1; user = author;
} else if (committer && committer.login) {
user = committer;
}
const sub = `${giteaHelper.subPrefix}:${user.login}`;
userSvc.addUserInfo({ id: sub, name: user.login, imageUrl: user.avatar_url });
const date = (commit.author && commit.author.date)
|| (commit.committer && commit.committer.date)
|| 1;
return { return {
id: entry.id, id: sha,
sub, sub,
created: date ? new Date(date).getTime() : 1, created: new Date(date).getTime(),
}; };
}); });
}, },

View File

@ -135,6 +135,9 @@ export default new Provider({
user = committer; user = committer;
} }
const sub = `${giteeHelper.subPrefix}:${user.login}`; const sub = `${giteeHelper.subPrefix}:${user.login}`;
if (user.avatar_url && user.avatar_url.endsWith('.png')) {
user.avatar_url = `${user.avatar_url}!avatar60`;
}
userSvc.addUserInfo({ id: sub, name: user.login, imageUrl: user.avatar_url }); userSvc.addUserInfo({ id: sub, name: user.login, imageUrl: user.avatar_url });
const date = (commit.author && commit.author.date) const date = (commit.author && commit.author.date)
|| (commit.committer && commit.committer.date); || (commit.committer && commit.committer.date);

View File

@ -249,6 +249,9 @@ export default new Provider({
user = committer; user = committer;
} }
const sub = `${giteeHelper.subPrefix}:${user.login}`; const sub = `${giteeHelper.subPrefix}:${user.login}`;
if (user.avatar_url && user.avatar_url.endsWith('.png')) {
user.avatar_url = `${user.avatar_url}!avatar60`;
}
userSvc.addUserInfo({ id: sub, name: user.login, imageUrl: user.avatar_url }); userSvc.addUserInfo({ id: sub, name: user.login, imageUrl: user.avatar_url });
const date = (commit.author && commit.author.date) const date = (commit.author && commit.author.date)
|| (commit.committer && commit.committer.date) || (commit.committer && commit.committer.date)

View File

@ -5,6 +5,8 @@ import userSvc from '../../userSvc';
import badgeSvc from '../../badgeSvc'; import badgeSvc from '../../badgeSvc';
import constants from '../../../data/constants'; import constants from '../../../data/constants';
const tokenExpirationMargin = 5 * 60 * 1000;
const request = ({ accessToken, serverUrl }, options) => networkSvc.request({ const request = ({ accessToken, serverUrl }, options) => networkSvc.request({
...options, ...options,
url: `${serverUrl}/api/v1/${options.url}`, url: `${serverUrl}/api/v1/${options.url}`,
@ -51,7 +53,12 @@ export default {
/** /**
* https://docs.gitea.io/en-us/oauth2-provider/ * https://docs.gitea.io/en-us/oauth2-provider/
*/ */
async startOauth2(serverUrl, applicationId, applicationSecret, sub = null, silent = false) { async startOauth2(
serverUrl, applicationId, applicationSecret,
sub = null, silent = false, refreshToken,
) {
let tokenBody;
if (!silent) {
// Get an OAuth2 code // Get an OAuth2 code
const { code } = await networkSvc.startOauth2( const { code } = await networkSvc.startOauth2(
`${serverUrl}/login/oauth/authorize`, `${serverUrl}/login/oauth/authorize`,
@ -62,9 +69,8 @@ export default {
}, },
silent, silent,
); );
// Exchange code with token // Exchange code with token
const accessToken = (await networkSvc.request({ tokenBody = (await networkSvc.request({
method: 'POST', method: 'POST',
url: `${serverUrl}/login/oauth/access_token`, url: `${serverUrl}/login/oauth/access_token`,
body: { body: {
@ -74,7 +80,23 @@ export default {
grant_type: 'authorization_code', grant_type: 'authorization_code',
redirect_uri: constants.oauth2RedirectUri, redirect_uri: constants.oauth2RedirectUri,
}, },
})).body.access_token; })).body;
} else {
// Exchange refreshToken with token
tokenBody = (await networkSvc.request({
method: 'POST',
url: `${serverUrl}/login/oauth/access_token`,
body: {
client_id: applicationId,
client_secret: applicationSecret,
refresh_token: refreshToken,
grant_type: 'refresh_token',
redirect_uri: constants.oauth2RedirectUri,
},
})).body;
}
const accessToken = tokenBody.access_token;
// Call the user info endpoint // Call the user info endpoint
const user = await request({ accessToken, serverUrl }, { const user = await request({ accessToken, serverUrl }, {
@ -96,6 +118,8 @@ export default {
const token = { const token = {
accessToken, accessToken,
name: user.username, name: user.username,
refreshToken: tokenBody.refresh_token,
expiresOn: Date.now() + (tokenBody.expires_in * 1000),
serverUrl, serverUrl,
sub: uniqueSub, sub: uniqueSub,
}; };
@ -104,6 +128,47 @@ export default {
store.dispatch('data/addGiteaToken', token); store.dispatch('data/addGiteaToken', token);
return token; return token;
}, },
// 刷新token
async refreshToken(token) {
const {
serverUrl,
applicationId,
applicationSecret,
sub,
} = token;
const lastToken = store.getters['data/giteaTokensBySub'][sub];
// 兼容旧的没有过期时间
if (!lastToken.expiresOn) {
await store.dispatch('modal/open', {
type: 'providerRedirection',
name: 'Gitea',
});
return this.startOauth2(serverUrl, applicationId, applicationSecret, sub);
}
// lastToken is not expired
if (lastToken.expiresOn > Date.now() + tokenExpirationMargin) {
return lastToken;
}
// existing token is about to expire.
// Try to get a new token in background
try {
return await this.startOauth2(
serverUrl, applicationId, applicationSecret,
sub, true, lastToken.refreshToken,
);
} catch (err) {
// If it fails try to popup a window
if (store.state.offline) {
throw err;
}
await store.dispatch('modal/open', {
type: 'providerRedirection',
name: 'Gitea',
});
return this.startOauth2(serverUrl, applicationId, applicationSecret, sub);
}
},
async addAccount(serverUrl, applicationId, applicationSecret, sub = null) { async addAccount(serverUrl, applicationId, applicationSecret, sub = null) {
const token = await this.startOauth2(serverUrl, applicationId, applicationSecret, sub); const token = await this.startOauth2(serverUrl, applicationId, applicationSecret, sub);
badgeSvc.addBadge('addGiteaAccount'); badgeSvc.addBadge('addGiteaAccount');
@ -129,7 +194,8 @@ export default {
projectId, projectId,
branch, branch,
}) { }) {
return request(token, { const refreshedToken = await this.refreshToken(token);
return request(refreshedToken, {
url: `repos/${projectId}/git/trees/${branch}`, url: `repos/${projectId}/git/trees/${branch}`,
params: { params: {
recursive: true, recursive: true,
@ -147,7 +213,8 @@ export default {
branch, branch,
path, path,
}) { }) {
return request(token, { const refreshedToken = await this.refreshToken(token);
return request(refreshedToken, {
url: `repos/${projectId}/commits`, url: `repos/${projectId}/commits`,
params: { params: {
sha: branch, sha: branch,
@ -168,7 +235,8 @@ export default {
content, content,
sha, sha,
}) { }) {
return request(token, { const refreshedToken = await this.refreshToken(token);
return request(refreshedToken, {
method: sha ? 'PUT' : 'POST', method: sha ? 'PUT' : 'POST',
url: `repos/${projectId}/contents/${encodeURIComponent(path)}`, url: `repos/${projectId}/contents/${encodeURIComponent(path)}`,
body: { body: {
@ -190,7 +258,8 @@ export default {
path, path,
sha, sha,
}) { }) {
return request(token, { const refreshedToken = await this.refreshToken(token);
return request(refreshedToken, {
method: 'DELETE', method: 'DELETE',
url: `repos/${projectId}/contents/${encodeURIComponent(path)}`, url: `repos/${projectId}/contents/${encodeURIComponent(path)}`,
body: { body: {
@ -210,7 +279,8 @@ export default {
branch, branch,
path, path,
}) { }) {
const { sha, content } = await request(token, { const refreshedToken = await this.refreshToken(token);
const { sha, content } = await request(refreshedToken, {
url: `repos/${projectId}/contents/${encodeURIComponent(path)}`, url: `repos/${projectId}/contents/${encodeURIComponent(path)}`,
params: { ref: branch }, params: { ref: branch },
}); });

View File

@ -139,7 +139,7 @@ export default {
return this.startOauth2(); return this.startOauth2();
} }
// lastToken is not expired // lastToken is not expired
if (lastToken.expiresOn > Date.now() - tokenExpirationMargin) { if (lastToken.expiresOn > Date.now() + tokenExpirationMargin) {
return lastToken; return lastToken;
} }

View File

@ -138,21 +138,21 @@ class RelativeTime {
const hr = Math.round(min / 60); const hr = Math.round(min / 60);
const day = Math.round(hr / 24); const day = Math.round(hr / 24);
if (ms < 0) { if (ms < 0) {
return 'just now'; return '刚刚';
} else if (sec < 45) { } else if (sec < 45) {
return 'just now'; return '刚刚';
} else if (sec < 90) { } else if (sec < 90) {
return 'a minute ago'; return '1分钟前';
} else if (min < 45) { } else if (min < 45) {
return `${min} minutes ago`; return `${min}分钟前`;
} else if (min < 90) { } else if (min < 90) {
return 'an hour ago'; return '1小时前';
} else if (hr < 24) { } else if (hr < 24) {
return `${hr} hours ago`; return `${hr}小时前`;
} else if (hr < 36) { } else if (hr < 36) {
return 'a day ago'; return '1天前';
} else if (day < 30) { } else if (day < 30) {
return `${day} days ago`; return `${day}天前`;
} }
return null; return null;
} }

View File

@ -89,7 +89,7 @@ export default {
// Create Trash node // Create Trash node
const trashFolderNode = new Node(emptyFolder(), [], true); const trashFolderNode = new Node(emptyFolder(), [], true);
trashFolderNode.item.id = 'trash'; trashFolderNode.item.id = 'trash';
trashFolderNode.item.name = 'Trash'; trashFolderNode.item.name = '回收站';
trashFolderNode.noDrag = true; trashFolderNode.noDrag = true;
trashFolderNode.isTrash = true; trashFolderNode.isTrash = true;
trashFolderNode.parentNode = rootNode; trashFolderNode.parentNode = rootNode;
@ -97,7 +97,7 @@ export default {
// Create Temp node // Create Temp node
const tempFolderNode = new Node(emptyFolder(), [], true); const tempFolderNode = new Node(emptyFolder(), [], true);
tempFolderNode.item.id = 'temp'; tempFolderNode.item.id = 'temp';
tempFolderNode.item.name = 'Temp'; tempFolderNode.item.name = '临时目录';
tempFolderNode.noDrag = true; tempFolderNode.noDrag = true;
tempFolderNode.noDrop = true; tempFolderNode.noDrop = true;
tempFolderNode.isTemp = true; tempFolderNode.isTemp = true;

View File

@ -2,7 +2,7 @@
<html manifest="cache.manifest"> <html manifest="cache.manifest">
<head> <head>
<title>StackEdit In-browser Markdown editor</title> <title>StackEdit中文版 浏览器内 Markdown 编辑器</title>
<link rel="canonical" href="https://edit.qicoder.com/"> <link rel="canonical" href="https://edit.qicoder.com/">
<link rel="icon" href="static/landing/favicon.ico" type="image/x-icon"> <link rel="icon" href="static/landing/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="static/landing/favicon.ico" type="image/x-icon"> <link rel="shortcut icon" href="static/landing/favicon.ico" type="image/x-icon">
@ -271,20 +271,20 @@
<div class="navigation-bar"> <div class="navigation-bar">
<a class="navigation-bar__button button" href="app" title="The app"> <a class="navigation-bar__button button" href="app" title="The app">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="icon"><path d="M 16.8363,2.73375C 16.45,2.73375 16.0688,2.88125 15.7712,3.17375L 13.6525,5.2925L 18.955,10.5962L 21.0737,8.47625C 21.665,7.89 21.665,6.94375 21.0737,6.3575L 17.895,3.17375C 17.6025,2.88125 17.2163,2.73375 16.8363,2.73375 Z M 12.9437,6.00125L 4.84375,14.1062L 7.4025,14.39L 7.57875,16.675L 9.85875,16.85L 10.1462,19.4088L 18.2475,11.3038M 4.2475,15.0437L 2.515,21.7337L 9.19875,19.9412L 8.955,17.7838L 6.645,17.6075L 6.465,15.2925"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="icon"><path d="M 16.8363,2.73375C 16.45,2.73375 16.0688,2.88125 15.7712,3.17375L 13.6525,5.2925L 18.955,10.5962L 21.0737,8.47625C 21.665,7.89 21.665,6.94375 21.0737,6.3575L 17.895,3.17375C 17.6025,2.88125 17.2163,2.73375 16.8363,2.73375 Z M 12.9437,6.00125L 4.84375,14.1062L 7.4025,14.39L 7.57875,16.675L 9.85875,16.85L 10.1462,19.4088L 18.2475,11.3038M 4.2475,15.0437L 2.515,21.7337L 9.19875,19.9412L 8.955,17.7838L 6.645,17.6075L 6.465,15.2925"></path></svg>
Start writing 开始写作
</a> </a>
</div> </div>
<div class="splash-screen"> <div class="splash-screen">
<div class="splash-screen__logo"> <div class="splash-screen__logo">
<div class="splash-screen__subtitle"> <div class="splash-screen__subtitle">
In-browser Markdown editor 浏览器内 Markdown 编辑器
<div class="social"> <div class="social">
<a href="https://twitter.com/stackedit" target="_blank"> <a href="https://gitee.com/mafgwo/stackedit" target="_blank">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="icon"><path d="M 22.4592,6.01238C 21.6896,6.35373 20.8624,6.58442 19.9944,6.68815C 20.8803,6.15701 21.5609,5.31598 21.8813,4.31378C 21.052,4.80564 20.1336,5.16278 19.156,5.3552C 18.3732,4.52112 17.2579,4 16.0235,4C 13.6534,4 11.7317,5.92147 11.7317,8.29155C 11.7317,8.6279 11.7697,8.95546 11.8429,9.2696C 8.2761,9.0906 5.11376,7.38203 2.9971,4.78551C 2.62766,5.41935 2.41602,6.15656 2.41602,6.94309C 2.41602,8.43204 3.17365,9.74563 4.32524,10.5153C 3.6218,10.4929 2.95997,10.2999 2.3814,9.97846C 2.38099,9.99639 2.38099,10.0143 2.38099,10.0324C 2.38099,12.1118 3.86034,13.8463 5.8236,14.2406C 5.4635,14.3387 5.08435,14.3912 4.69295,14.3912C 4.41641,14.3912 4.14756,14.3642 3.88547,14.3142C 4.43162,16.0191 6.01654,17.26 7.89455,17.2945C 6.42577,18.4457 4.57528,19.1318 2.56454,19.1318C 2.21813,19.1318 1.87652,19.1114 1.54078,19.0717C 3.44004,20.2894 5.69592,21 8.11951,21C 16.0134,21 20.3302,14.4605 20.3302,8.78918C 20.3302,8.60314 20.326,8.41805 20.3177,8.23395C 21.1563,7.62886 21.8839,6.87302 22.4592,6.01238 Z "/></svg> <svg t="1652950823759" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2991" width="32" height="32" xmlns:xlink="http://www.w3.org/1999/xlink">
</a> <defs><style type="text/css"></style></defs>
<a href="https://github.com/benweet/stackedit" target="_blank"> <path d="M512 1024C229.222 1024 0 794.778 0 512S229.222 0 512 0s512 229.222 512 512-229.222 512-512 512z m259.149-568.883h-290.74a25.293 25.293 0 0 0-25.292 25.293l-0.026 63.206c0 13.952 11.315 25.293 25.267 25.293h177.024c13.978 0 25.293 11.315 25.293 25.267v12.646a75.853 75.853 0 0 1-75.853 75.853h-240.23a25.293 25.293 0 0 1-25.267-25.293V417.203a75.853 75.853 0 0 1 75.827-75.853h353.946a25.293 25.293 0 0 0 25.267-25.292l0.077-63.207a25.293 25.293 0 0 0-25.268-25.293H417.152a189.62 189.62 0 0 0-189.62 189.645V771.15c0 13.977 11.316 25.293 25.294 25.293h372.94a170.65 170.65 0 0 0 170.65-170.65V480.384a25.293 25.293 0 0 0-25.293-25.267z" fill="#C71D23" p-id="2992"></path>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="icon"><path d="M 11.9991,2C 6.47774,2 2.00001,6.47712 2.00001,12.0006C 2.00001,16.4184 4.86504,20.1665 8.83877,21.489C 9.33909,21.5807 9.52142,21.272 9.52142,21.007C 9.52142,20.7696 9.51282,20.1407 9.50791,19.3062C 6.72636,19.9105 6.13948,17.9657 6.13948,17.9657C 5.68459,16.8105 5.02895,16.5029 5.02895,16.5029C 4.121,15.8824 5.09771,15.895 5.09771,15.895C 6.10143,15.9657 6.62936,16.9256 6.62936,16.9256C 7.52135,18.4537 8.97014,18.0125 9.53984,17.7565C 9.63069,17.1102 9.88914,16.6696 10.1746,16.4196C 7.95415,16.1672 5.61952,15.3093 5.61952,11.4773C 5.61952,10.3856 6.00934,9.49292 6.64902,8.79388C 6.54588,8.54089 6.20271,7.52417 6.74723,6.14739C 6.74723,6.14739 7.58643,5.87851 9.49686,7.17252C 10.2943,6.95073 11.1501,6.8398 12.0003,6.83594C 12.8499,6.8398 13.7051,6.95073 14.5038,7.17252C 16.413,5.87851 17.2509,6.14739 17.2509,6.14739C 17.7967,7.52417 17.4535,8.54089 17.351,8.79388C 17.9919,9.49292 18.3787,10.3856 18.3787,11.4773C 18.3787,15.3189 16.0403,16.1642 13.8131,16.4118C 14.1717,16.7205 14.4915,17.3308 14.4915,18.2637C 14.4915,19.6005 14.4792,20.6791 14.4792,21.007C 14.4792,21.2744 14.6597,21.5855 15.1668,21.4878C 19.1374,20.1629 22,16.4172 22,12.0006C 22,6.47712 17.5223,2 11.9991,2 Z "/></svg> </svg>
</a> </a>
</div> </div>
</div> </div>
@ -292,18 +292,18 @@
<div class="splash-screen__footer"> <div class="splash-screen__footer">
<a class="button" href="javascript:scrollTo($('.anchor'))"> <a class="button" href="javascript:scrollTo($('.anchor'))">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="icon"><path d="M 11,4L 13,4L 13,16.0104L 18.5052,10.5052L 19.9194,11.9194L 12,19.8388L 4.08058,11.9194L 5.49479,10.5052L 11,16.0104L 11,4 Z "/></path></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="icon"><path d="M 11,4L 13,4L 13,16.0104L 18.5052,10.5052L 19.9194,11.9194L 12,19.8388L 4.08058,11.9194L 5.49479,10.5052L 11,16.0104L 11,4 Z "/></path></svg>
Read more 阅读更多
</a> </a>
</div> </div>
</div> </div>
<div class="anchor"></div> <div class="anchor"></div>
<div class="landing__content"> <div class="landing__content">
<h1>Unrivalled writing experience</h1> <h1>无与伦比的写作体验</h1>
<div class="row"> <div class="row">
<div class="column"> <div class="column">
<div class="feature"> <div class="feature">
<h3>Rich Markdown editor</h3> <h3>丰富的 Markdown 编辑器</h3>
<p>StackEdits Markdown syntax highlighting is unique. The refined text formatting of the editor helps you visualize the final rendering of your files.</p> <p>StackEdit 的 Markdown 语法高亮是独一无二的。 编辑器的精致文本格式可帮助您可视化文件的最终呈现。</p>
</div> </div>
</div> </div>
<div class="column"> <div class="column">
@ -315,15 +315,15 @@
<div class="row"> <div class="row">
<img class="image" width="410" src="static/landing/navigation-bar.png"> <img class="image" width="410" src="static/landing/navigation-bar.png">
<div class="feature"> <div class="feature">
<h3>WYSIWYG controls</h3> <h3>所见即所得控件</h3>
<p>StackEdit provides very handy formatting buttons and shortcuts, thanks to PageDown, the WYSIWYG-style Markdown editor used by Stack Overflow.</p> <p>StackEdit 提供了非常方便的格式化按钮和快捷方式,这要归功于 Stack Overflow 使用的所见即所得式 Markdown 编辑器 PageDown。</p>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="column"> <div class="column">
<div class="feature"> <div class="feature">
<h3>Smart layout</h3> <h3>智能布局</h3>
<p>Whether you write, you review, you comment… StackEdit's layout provides you with the flexibility you need, without sacrifice.</p> <p>无论你是写作、阅读还是评论……StackEdit的布局都为你提供了所需的灵活性。</p>
</div> </div>
</div> </div>
<div class="column"> <div class="column">
@ -332,17 +332,17 @@
</div> </div>
<div class="row"> <div class="row">
<div class="feature"> <div class="feature">
<h3>Live preview with Scroll Sync</h3> <h3>滚动同步实时预览</h3>
<p>StackEdits Scroll Sync feature accurately binds the scrollbars of the editor panel and the preview panel to ensure that you always keep an eye on the output while writing.</p> <p>StackEdit的滚动同步功能精确地绑定了编辑器面板和预览面板的滚动条,以确保您在编写时始终关注输出。</p>
</div> </div>
<img class="image" width="485" src="static/landing/scroll-sync.gif"> <img class="image" width="485" src="static/landing/scroll-sync.gif">
</div> </div>
<h1>Designed for web writers</h1> <h1>专为网络写手设计</h1>
<div class="row"> <div class="row">
<div class="column"> <div class="column">
<div class="feature"> <div class="feature">
<h3>Stay connected</h3> <h3>保持同步</h3>
<p>StackEdit can sync your files with Google Drive, Dropbox and GitHub. It can also publish them as blog posts to Blogger, WordPress and Zendesk. You can choose whether to upload in Markdown format, HTML, or to format the output using the Handlebars template engine.</p> <p>StackEdit 可以将您的文件与 Google Drive、Dropbox 和 GitHub 同步。 它还可以将它们作为博客文章发布到 Blogger、WordPress 和 Zendesk。 您可以选择是以 Markdown 格式、HTML 上传,还是使用 Handlebars 模板引擎格式化输出。</p>
</div> </div>
</div> </div>
<div class="column"> <div class="column">
@ -352,26 +352,26 @@
<div class="row"> <div class="row">
<div class="column"> <div class="column">
<div class="feature"> <div class="feature">
<h3>Collaborate</h3> <h3>协作</h3>
<p>With StackEdit, you can share collaborative workspaces, thanks to the synchronization mechanism. If two collaborators are working on the same file at the same time, StackEdit takes care of merging the changes.</p> <p>借助 StackEdit您可以共享协作工作空间这要归功于同步机制。 如果两个协作者同时处理同一个文件StackEdit 会负责合并更改。</p>
</div> </div>
<img class="image" width="300" src="static/landing/workspace.png"> <img class="image" width="300" src="static/landing/workspace.png">
</div> </div>
<div class="column"> <div class="column">
<div class="feature"> <div class="feature">
<h3>Comment</h3> <h3>评论</h3>
<p>StackEdit allows you to insert inline comments and embed collaborator discussions in your files, just as well as Microsoft Word and Google Docs.</p> <p>StackEdit 允许您在文件中插入内联评论和嵌入协作者讨论,就像 Microsoft Word 和 Google Docs 一样。</p>
</div> </div>
<img class="image" width="395" src="static/landing/discussion.png"> <img class="image" width="395" src="static/landing/discussion.png">
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="feature"> <div class="feature">
<h3>Write offline!</h3> <h3>离线写作!</h3>
<p>Even when you travel, StackEdit is still accessible and lets you write offline just like any desktop application. You have no excuse!</p> <p>即使在旅行时StackEdit 仍然可以访问,让您可以像任何桌面应用程序一样离线编写。 你没有借口再偷懒!</p>
</div> </div>
</div> </div>
<h1>Extended Markdown support</h1> <h1>扩展的 Markdown 支持</h1>
<div class="row"> <div class="row">
<div class="column"> <div class="column">
<br> <br>
@ -381,8 +381,8 @@
</div> </div>
<div class="column"> <div class="column">
<div class="feature"> <div class="feature">
<h3>GitHub Flavored Markdown</h3> <h3>GitHub 风格的 Markdown</h3>
<p>StackEdit supports different Markdown flavors such as Markdown Extra, GFM and CommonMark. Each Markdown feature can be enabled or disabled at your convenience.</p> <p>StackEdit 支持不同的 Markdown 风格,例如 Markdown Extra、GFM 和 CommonMark。 每个 Markdown 功能都可以在您方便的时候启用或禁用。</p>
</div> </div>
</div> </div>
</div> </div>
@ -395,8 +395,8 @@
</div> </div>
<div class="column"> <div class="column">
<div class="feature"> <div class="feature">
<h3>LaTeX mathematical expressions</h3> <h3>LaTeX 数学表达式</h3>
<p>StackEdit renders mathematics from LaTeX expressions inside your markdown file, as you would do on Stack Exchange.</p> <p>StackEdit 从您的 Markdown 文件中的 LaTeX 表达式呈现数学公式。</p>
</div> </div>
</div> </div>
</div> </div>
@ -408,8 +408,8 @@
</div> </div>
<div class="column"> <div class="column">
<div class="feature"> <div class="feature">
<h3>UML diagrams</h3> <h3>UML </h3>
<p>StackEdit enables you to write sequence diagrams and flow charts using a simple syntax.</p> <p>StackEdit 使您能够使用简单的语法编写序列图和流程图。</p>
</div> </div>
</div> </div>
</div> </div>
@ -421,8 +421,8 @@
</div> </div>
<div class="column"> <div class="column">
<div class="feature"> <div class="feature">
<h3>Scores</h3> <h3>乐谱</h3>
<p>StackEdit can render musical scores using the ABC notation.</p> <p>StackEdit 可以使用 ABC 表示法渲染乐谱。</p>
</div> </div>
</div> </div>
</div> </div>
@ -434,26 +434,26 @@
</div> </div>
<div class="column"> <div class="column">
<div class="feature"> <div class="feature">
<h3>Emojis</h3> <h3>Emojis表情</h3>
<p>StackEdit supports inserting emojis in your file using the Markdown emoji markup.</p> <p>StackEdit 支持使用 Markdown 表情符号标记在文件中插入表情符号。</p>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="landing__footer"> <div class="landing__footer">
<div class="social"> <div class="social">
<a href="https://twitter.com/stackedit" target="_blank"> <a href="https://gitee.com/mafgwo/stackedit" target="_blank">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="icon"><path d="M 22.4592,6.01238C 21.6896,6.35373 20.8624,6.58442 19.9944,6.68815C 20.8803,6.15701 21.5609,5.31598 21.8813,4.31378C 21.052,4.80564 20.1336,5.16278 19.156,5.3552C 18.3732,4.52112 17.2579,4 16.0235,4C 13.6534,4 11.7317,5.92147 11.7317,8.29155C 11.7317,8.6279 11.7697,8.95546 11.8429,9.2696C 8.2761,9.0906 5.11376,7.38203 2.9971,4.78551C 2.62766,5.41935 2.41602,6.15656 2.41602,6.94309C 2.41602,8.43204 3.17365,9.74563 4.32524,10.5153C 3.6218,10.4929 2.95997,10.2999 2.3814,9.97846C 2.38099,9.99639 2.38099,10.0143 2.38099,10.0324C 2.38099,12.1118 3.86034,13.8463 5.8236,14.2406C 5.4635,14.3387 5.08435,14.3912 4.69295,14.3912C 4.41641,14.3912 4.14756,14.3642 3.88547,14.3142C 4.43162,16.0191 6.01654,17.26 7.89455,17.2945C 6.42577,18.4457 4.57528,19.1318 2.56454,19.1318C 2.21813,19.1318 1.87652,19.1114 1.54078,19.0717C 3.44004,20.2894 5.69592,21 8.11951,21C 16.0134,21 20.3302,14.4605 20.3302,8.78918C 20.3302,8.60314 20.326,8.41805 20.3177,8.23395C 21.1563,7.62886 21.8839,6.87302 22.4592,6.01238 Z "/></svg> <svg t="1652950823759" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2991" width="32" height="32" xmlns:xlink="http://www.w3.org/1999/xlink">
</a> <defs><style type="text/css"></style></defs>
<a href="https://github.com/benweet/stackedit" target="_blank"> <path d="M512 1024C229.222 1024 0 794.778 0 512S229.222 0 512 0s512 229.222 512 512-229.222 512-512 512z m259.149-568.883h-290.74a25.293 25.293 0 0 0-25.292 25.293l-0.026 63.206c0 13.952 11.315 25.293 25.267 25.293h177.024c13.978 0 25.293 11.315 25.293 25.267v12.646a75.853 75.853 0 0 1-75.853 75.853h-240.23a25.293 25.293 0 0 1-25.267-25.293V417.203a75.853 75.853 0 0 1 75.827-75.853h353.946a25.293 25.293 0 0 0 25.267-25.292l0.077-63.207a25.293 25.293 0 0 0-25.268-25.293H417.152a189.62 189.62 0 0 0-189.62 189.645V771.15c0 13.977 11.316 25.293 25.294 25.293h372.94a170.65 170.65 0 0 0 170.65-170.65V480.384a25.293 25.293 0 0 0-25.293-25.267z" fill="#C71D23" p-id="2992"></path>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="icon"><path d="M 11.9991,2C 6.47774,2 2.00001,6.47712 2.00001,12.0006C 2.00001,16.4184 4.86504,20.1665 8.83877,21.489C 9.33909,21.5807 9.52142,21.272 9.52142,21.007C 9.52142,20.7696 9.51282,20.1407 9.50791,19.3062C 6.72636,19.9105 6.13948,17.9657 6.13948,17.9657C 5.68459,16.8105 5.02895,16.5029 5.02895,16.5029C 4.121,15.8824 5.09771,15.895 5.09771,15.895C 6.10143,15.9657 6.62936,16.9256 6.62936,16.9256C 7.52135,18.4537 8.97014,18.0125 9.53984,17.7565C 9.63069,17.1102 9.88914,16.6696 10.1746,16.4196C 7.95415,16.1672 5.61952,15.3093 5.61952,11.4773C 5.61952,10.3856 6.00934,9.49292 6.64902,8.79388C 6.54588,8.54089 6.20271,7.52417 6.74723,6.14739C 6.74723,6.14739 7.58643,5.87851 9.49686,7.17252C 10.2943,6.95073 11.1501,6.8398 12.0003,6.83594C 12.8499,6.8398 13.7051,6.95073 14.5038,7.17252C 16.413,5.87851 17.2509,6.14739 17.2509,6.14739C 17.7967,7.52417 17.4535,8.54089 17.351,8.79388C 17.9919,9.49292 18.3787,10.3856 18.3787,11.4773C 18.3787,15.3189 16.0403,16.1642 13.8131,16.4118C 14.1717,16.7205 14.4915,17.3308 14.4915,18.2637C 14.4915,19.6005 14.4792,20.6791 14.4792,21.007C 14.4792,21.2744 14.6597,21.5855 15.1668,21.4878C 19.1374,20.1629 22,16.4172 22,12.0006C 22,6.47712 17.5223,2 11.9991,2 Z "/></svg> </svg>
</a> </a>
</div> </div>
<a href="app" title="The app">The app</a> <a href="https://community.stackedit.io" target="_blank" title="The app">Community</a><br> <a href="app" title="The app">The app</a> <a href="https://gitee.com/mafgwo/stackedit/issues" target="_blank" title="The app">Community</a><br>
Copyright 2013-2019 <a href="https://twitter.com/benweet" target="_blank">Benoit Schweblin</a><br> Copyright 2013-2022 <a href="https://gitee.com/mafgwo" target="_blank">豆萁</a><br>
Licensed under an Licensed under an
<a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0">Apache License</a> <a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0">Apache License</a>
<a href="privacy_policy.html" target="_blank">Privacy Policy</a> <a href="privacy_policy.html" target="_blank">隐私策略</a>
</div> </div>
</div> </div>
<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script> <script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View File

@ -11,7 +11,7 @@
<priority>1.0</priority> <priority>1.0</priority>
</url> </url>
<url> <url>
<loc>https://community.stackedit.io/</loc> <loc>https://gitee.com/mafgwo/stackedit/issues</loc>
<changefreq>weekly</changefreq> <changefreq>weekly</changefreq>
<priority>0.8</priority> <priority>0.8</priority>
</url> </url>