-
Notifications
You must be signed in to change notification settings - Fork 0
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
4 changed files
with
85 additions
and
5 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
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
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 |
---|---|---|
|
@@ -2,13 +2,13 @@ | |
* @Author: cumany [email protected] | ||
* @Date: 2023-07-24 16:35:56 | ||
* @LastEditors: cumany [email protected] | ||
* @LastEditTime: 2023-09-08 09:12:20 | ||
* @LastEditTime: 2023-12-06 11:12:00 | ||
* @Description: | ||
*/ | ||
import PkmerLoginModal from "./components/login/PkmerLoginModal"; | ||
import PkmerPlugin from "./main"; | ||
import { App, PluginSettingTab, Setting, Platform } from "obsidian"; | ||
|
||
import { DEFAULT_VIEW_TYPE } from "./views/PluginMarket"; | ||
export class PkmerSettingTab extends PluginSettingTab { | ||
plugin: PkmerPlugin; | ||
|
||
|
@@ -60,6 +60,25 @@ export class PkmerSettingTab extends PluginSettingTab { | |
|
||
|
||
} | ||
|
||
new Setting(containerEl) | ||
.setName("🥚打开PKMer Market") | ||
|
||
.setDesc("点击开始挑选心爱的插件和主题吧") | ||
.addButton((button) => { | ||
button | ||
.setIcon("download") | ||
.setButtonText("进入") | ||
.setClass("px-5") | ||
.setCta() | ||
.onClick(() => { | ||
app.setting.close(); | ||
setTimeout(() => { | ||
this.app.workspace.getLeaf().setViewState({ active: true, type: DEFAULT_VIEW_TYPE }); | ||
}, 100); | ||
}); | ||
}); | ||
|
||
containerEl.createEl("hr", { cls: "mt-2" }); | ||
const div = containerEl.createEl("div", { | ||
cls: "mt-4", | ||
|
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,61 @@ | ||
import "obsidian"; | ||
|
||
|
||
|
||
|
||
|
||
|
||
declare module "obsidian" { | ||
export interface App { | ||
foldManager: FoldManager | ||
plugins: Plugins | ||
commands: Commands | ||
setting: SettingsManager | ||
} | ||
|
||
interface SettingsManager { | ||
activeTab: SettingTab | null; | ||
openTabById(id: string): SettingTab | null; | ||
openTab(tab: SettingTab): void; | ||
open(): void; | ||
close(): void; | ||
onOpen(): void; | ||
onClose(): void; | ||
settingTabs: SettingTab[]; | ||
pluginTabs: SettingTab[]; | ||
addSettingTab(): void; | ||
removeSettingTab(): void; | ||
containerEl: HTMLDivElement; | ||
} | ||
|
||
interface Plugins { | ||
manifests: Record<string, PluginManifest>; | ||
plugins: Record<string, Plugin_2>; | ||
enabledPlugins: any; | ||
enablePlugin(pluginId: string): Promise<boolean>; | ||
disblePlugin(pluginId: string): Promise<void>; | ||
} | ||
|
||
interface Commands { | ||
commands: Record<string, Command>; | ||
addCommand(cmd: Command): void; | ||
removeCommand(cmd: Command): void; | ||
} | ||
|
||
|
||
|
||
|
||
interface Editor { | ||
cm: CodeMirror.Editor; | ||
} | ||
|
||
interface EditorSuggestManager { | ||
suggests: EditorSuggest<any>[]; | ||
} | ||
|
||
|
||
|
||
|
||
|
||
} | ||
|