fix: help style error

This commit is contained in:
秦圆圆 2022-02-24 19:02:38 +08:00
parent 8e44962d7b
commit 7db9060f49
7 changed files with 140 additions and 17 deletions

118
CODE_OF_CONDUCT.md Normal file
View File

@ -0,0 +1,118 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at <qinyuanyuan@eolink.com>.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

View File

@ -5,7 +5,7 @@
</p>
<h1 align="center">EOAPI</h1>
<div align="center">
Easy-to-use API Manage desktop tool
Hope to be the best api tool for you.
</div>
![](https://raw.githubusercontent.com/eolinker/eoapi/main/wiki/preview_1.png)
@ -18,10 +18,12 @@ Easy-to-use API Manage desktop tool
- API management : Management API with zero learning cost.
- Test environment management
- Available offline
- Extension Marketplace
# Getting started
<!-- - Try the [live demo](http://eoapi.dev.eolink.com/) -->
- Try the [live demo](https://demo.eoapi.io/)
- You can download it for Windows, macOS on [Releases](https://github.com/eolinker/eoapi/releases)
# Build and run from source

View File

@ -6,7 +6,7 @@
<h1 align="center">EOAPI</h1>
<div align="center">
简单易用的开源 API 管理工具
希望成为最适合你的 API 工具
</div>
![](https://raw.githubusercontent.com/eolinker/eoapi/main/wiki/preview_1.png?token=GHSAT0AAAAAABRGKRUBJ634JVP7XL7KWAECYP3J36Q)
@ -19,10 +19,13 @@
- API 管理:可通过界面编辑 API 文档,零学习成本。
- 测试环境管理
- 可离线使用
- 插件集市
# 快速开始
- 你可以访问 [Releases](https://github.com/eolinker/eoapi/releases) 下载 WindowsmacOS 版本的安装包。
- 访问 [在线示例](https://demo.eoapi.io/) 快速体验产品
- 访问 [Releases](https://github.com/eolinker/eoapi/releases) 下载 WindowsmacOS 版本的安装包。
# 源码运行/构建

View File

@ -1,4 +1,4 @@
import { app, BrowserWindow, screen, ipcMain } from 'electron';
import { app, BrowserWindow, screen, ipcMain, shell } from 'electron';
import { EoUpdater } from './updater';
import * as path from 'path';
import * as fs from 'fs';
@ -26,7 +26,13 @@ function createWindow(): BrowserWindow {
contextIsolation: false, // false if you want to run e2e test with Spectron
},
});
//open link through default browser not electron
win.webContents.setWindowOpenHandler(({ url }) => {
setImmediate(() => {
shell.openExternal(url);
});
return { action: 'deny' };
});
if (serve) {
win.webContents.openDevTools();
require('electron-reload')(__dirname, {

View File

@ -5,7 +5,6 @@ import { Injectable } from '@angular/core';
import { ipcRenderer, webFrame } from 'electron';
import * as childProcess from 'child_process';
import * as fs from 'fs';
@Injectable({
providedIn: 'root',
})
@ -13,7 +12,6 @@ export class ElectronService {
ipcRenderer: typeof ipcRenderer;
webFrame: typeof webFrame;
childProcess: typeof childProcess;
// shell: typeof shell;
fs: typeof fs;
constructor() {
@ -21,7 +19,6 @@ export class ElectronService {
if (this.isElectron) {
this.ipcRenderer = window.require('electron').ipcRenderer;
this.webFrame = window.require('electron').webFrame;
// this.shell = window.require('electron').shell;
this.childProcess = window.require('child_process');
this.fs = window.require('fs');
// Notes :
@ -35,7 +32,7 @@ export class ElectronService {
// If you want to use a NodeJS 3rd party deps in Renderer process,
// ipcRenderer.invoke can serve many common use cases.
// https://www.electronjs.org/docs/latest/api/ipc-renderer#ipcrendererinvokechannel-args
}
}
}
get isElectron(): boolean {

View File

@ -1,14 +1,14 @@
<div class="eo_navbar f_row f_js_ac">
<img class="logo" src="assets/images/logo.svg" />
<div class="can_be_click f_row_ac right_btn_container">
<span class="help mr10 " nz-dropdown [nzDropdownMenu]="menu">
<span class="help mr10" nz-dropdown [nzDropdownMenu]="menu">
<i nz-icon nzType="question-circle" nzTheme="outline"></i>
</span>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<a href="https://eoapi.vercel.app/" nz-menu-item>产品文档</a>
<a href="https://eoapi.vercel.app/" target="_blank" nz-menu-item>产品文档</a>
<li nz-menu-divider></li>
<!-- <a (click)="openLink('https://github.com/eolinker/eoapi/issues/new')" target="_blank" nz-menu-item>问题反馈</a> -->
<a href="https://github.com/eolinker/eoapi/issues/new" target="_blank" nz-menu-item>问题反馈</a>
</ul>
</nz-dropdown-menu>
<div *ngIf="!OS_TYPE.includes('mac') && isElectron">

View File

@ -1,6 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { ElectronService } from '../../../core/services';
import { shell } from 'electron';
@Component({
selector: 'eo-navbar',
templateUrl: './navbar.component.html',
@ -13,9 +13,6 @@ export class NavbarComponent implements OnInit {
constructor(private electron: ElectronService) {
this.isElectron = this.electron.isElectron;
}
openLink(link) {
shell.openExternal(link);
}
minimize() {
this.electron.ipcRenderer.send('message', {
action: 'minimize',