Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
558 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
/* | ||
* Copyright (c) 2023, Terwer . All rights reserved. | ||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
* | ||
* This code is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License version 2 only, as | ||
* published by the Free Software Foundation. Terwer designates this | ||
* particular file as subject to the "Classpath" exception as provided | ||
* by Terwer in the LICENSE file that accompanied this code. | ||
* | ||
* This code is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
* version 2 for more details (a copy is included in the LICENSE file that | ||
* accompanied this code). | ||
* | ||
* You should have received a copy of the GNU General Public License version | ||
* 2 along with this work; if not, write to the Free Software Foundation, | ||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
* | ||
* Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com | ||
* or visit www.terwer.space if you need additional information or have any | ||
* questions. | ||
*/ | ||
|
||
import { BlogConfig, PageType, PageTypeEnum } from "zhi-blog-api" | ||
import { MetaweblogPlaceholder } from "~/src/adaptors/base/metaweblog/config/MetaweblogPlaceholder.ts" | ||
|
||
/** | ||
* Metaweblog配置类 | ||
*/ | ||
export class MetaweblogConfig extends BlogConfig { | ||
/** | ||
* 首页 | ||
*/ | ||
public override home = "" | ||
|
||
/** | ||
* API地址 | ||
*/ | ||
public override apiUrl = "" | ||
/** | ||
* 用户名 | ||
*/ | ||
public override username = "" | ||
/** | ||
* 密码 | ||
*/ | ||
public override password = "" | ||
|
||
/** | ||
* 是否发布 | ||
*/ | ||
public override apiStatus = false | ||
|
||
/** | ||
* 博客名(API获取) | ||
*/ | ||
public override blogName = "" | ||
|
||
/** | ||
* 文章别名key | ||
*/ | ||
public override posidKey = "" | ||
|
||
/** | ||
* 文章预览链接 | ||
*/ | ||
public override previewUrl = "" | ||
|
||
/** | ||
* 文章类型 | ||
*/ | ||
public override pageType = PageTypeEnum.Markdown | ||
|
||
/** | ||
* 操作提示 | ||
*/ | ||
public override placeholder = {} as MetaweblogPlaceholder | ||
|
||
constructor(home: string, apiUrl: string, username: string, password: string) { | ||
super() | ||
this.home = home | ||
this.apiUrl = apiUrl | ||
this.username = username | ||
this.password = password | ||
this.apiStatus = false | ||
this.blogName = "" | ||
this.posidKey = "" | ||
this.previewUrl = "" | ||
this.pageType = PageTypeEnum.Markdown | ||
this.placeholder = new MetaweblogPlaceholder() | ||
} | ||
} |
78 changes: 78 additions & 0 deletions
78
src/adaptors/base/metaweblog/config/MetaweblogPlaceholder.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
/* | ||
* Copyright (c) 2023, Terwer . All rights reserved. | ||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
* | ||
* This code is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License version 2 only, as | ||
* published by the Free Software Foundation. Terwer designates this | ||
* particular file as subject to the "Classpath" exception as provided | ||
* by Terwer in the LICENSE file that accompanied this code. | ||
* | ||
* This code is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
* version 2 for more details (a copy is included in the LICENSE file that | ||
* accompanied this code). | ||
* | ||
* You should have received a copy of the GNU General Public License version | ||
* 2 along with this work; if not, write to the Free Software Foundation, | ||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
* | ||
* Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com | ||
* or visit www.terwer.space if you need additional information or have any | ||
* questions. | ||
*/ | ||
|
||
import { BlogPlaceholder } from "zhi-blog-api" | ||
|
||
/** | ||
* Metaweblog 操作提示 | ||
*/ | ||
export class MetaweblogPlaceholder extends BlogPlaceholder { | ||
/** | ||
* 首页操作提示 | ||
*/ | ||
public override homePlaceholder = "" | ||
|
||
/** | ||
* API 地址操作提示 | ||
*/ | ||
public override apiUrlPlaceholder = "" | ||
|
||
/** | ||
* 用户名操作提示 | ||
*/ | ||
public override usernamePlaceholder = "" | ||
|
||
/** | ||
* 密码操作提示 | ||
*/ | ||
public override passwordPlaceholder = "" | ||
|
||
/** | ||
* API状态是否正常操作提示 | ||
*/ | ||
public override apiStatusPlaceholder = false | ||
|
||
/** | ||
* 博客名(API获取)操作提示 | ||
*/ | ||
public override blogNamePlaceholder = "" | ||
|
||
/** | ||
* 文章别名key操作提示 | ||
*/ | ||
public override posidKeyPlaceholder = "" | ||
/** | ||
* 文章预览链接操作提示 | ||
*/ | ||
public override previewUrlPlaceholder = "" | ||
/** | ||
* 文章类型操作提示 | ||
*/ | ||
public override pageTypePlaceholder = "" | ||
|
||
constructor() { | ||
super() | ||
} | ||
} |
Oops, something went wrong.