Skip to content

Commit

Permalink
🛠移除无用组件和 API 接口
Browse files Browse the repository at this point in the history
- 删除了 InstapaperShower、YuequeDraftShower 和 DatasourceSelector 组件
- 移除了相关的 API 接口和数据模型
- 清理了 Header 组件中的相关引用和导入
- 删除了 DatasourceConst.ts 中的冗余数据源配置
  • Loading branch information
0xcaffebabe committed Oct 25, 2024
1 parent f389c2a commit 8087185
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 403 deletions.
22 changes: 1 addition & 21 deletions src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ import Cache from '@/decorator/Cache'
import Cacheable from '@/decorator/Cacheable'
import { StatisticInfo } from '@/dto/StatisticInfo'
import DocUtils from '@/util/DocUtils'
import {KnowledgeLinkNode, KnowledgeNode} from '@/dto/KnowledgeNode'
import {KnowledgeNode} from '@/dto/KnowledgeNode'
import DatasourceService from '@/service/DatasourceService'
import UrlUtils from '@/util/UrlUtils'
import UrlConst from '@/const/UrlConst'
import CommitInfo from '@/dto/CommitInfo'
import YuequeDraft from '@/dto/YuqueDraft'
import Category from '@/dto/Category'
import ClusterNode from '@/dto/ClusterNode'
import DocQuality from '@/dto/doc/DocQuality'
Expand Down Expand Up @@ -165,25 +164,6 @@ class Api implements Cacheable{
return (await axios.get(UrlUtils.concatUrl(baseUrl(), UrlConst.docQualityJson))).data
}

/**
*
* 获取instapaper原始html数据
* @return {*} {Promise<string>}
* @memberof Api
*/
public async getInstapaperRawData(): Promise<string> {
return (await axios.get("https://proxy.ismy.wang/api/instapaper/list")).data
}

public async getYuqueDraft(): Promise<YuequeDraft> {
const data = (await axios.get("https://proxy.ismy.wang/api/yuque/draft")).data
return {
content: data.data.content,
title: data.data.title,
updateAt: data.data.content_updated_at
}
}

private async requestDataUseJsDelivr(url: string): Promise<any> {
const datasources = DatasourceService.getDatasourcesByMatch(v => v.id.indexOf("jsdelivr") != -1)
for(let datasource of datasources) {
Expand Down
11 changes: 0 additions & 11 deletions src/components/header/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
</div>
<div class="content">
<div>
<instapaper-shower />
<el-divider direction="vertical" />
<datasource-selector />
<el-divider direction="vertical" />
<!-- 正常/暗色模式切换按钮 -->
<theme-switcher />
<!-- 全屏/缓存清空 -->
Expand All @@ -34,7 +30,6 @@
<el-button size="small" @click="enterZenMode" title="进入专注模式">
<el-icon><aim /></el-icon>
</el-button>
<yueque-draft-shower />
</el-button-group>
<el-divider direction="vertical" />
<!-- 搜索 -->
Expand Down Expand Up @@ -66,22 +61,16 @@
<script setup lang="ts">
import {Sunny, Moon, Monitor, Brush, Aim, Refresh } from '@element-plus/icons-vue';
import EventBus from "@/components/EventBus";
import InstapaperShower from "./InstapaperShower.vue";
import YuequeDraftShower from "./YuequeDraftShower.vue";
import ThemeSwitcher from "./ThemeSwitcher.vue";
</script>

<script lang="ts">
import { defineComponent } from "vue";
import config from "@/config";
import DatasourceSelector from './datasource/DatasourceSelector.vue';
import CacheService from "@/service/CacheService";
import { ElMessage } from 'element-plus';
export default defineComponent({
components: {
DatasourceSelector
},
data() {
return {
name: "my-book" as string,
Expand Down
131 changes: 0 additions & 131 deletions src/components/header/InstapaperShower.vue

This file was deleted.

51 changes: 0 additions & 51 deletions src/components/header/YuequeDraftShower.vue

This file was deleted.

Loading

0 comments on commit 8087185

Please sign in to comment.