This repository was archived by the owner on Aug 18, 2024. It is now read-only.
generated from uwu/shelter-template
-
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
1 parent
7ddfd89
commit 3788f8b
Showing
7 changed files
with
94 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { LegacyPage } from "./pages/LegacyPage"; | ||
import { SettingsPage } from "./pages/SettingsPage"; | ||
import { ThemesPage } from "./pages/ThemesPage"; | ||
import { UpdaterPage } from "./pages/UpdaterPage"; | ||
const { | ||
settings: {registerSection}, | ||
util: { log }, | ||
} = shelter; | ||
|
||
let settingsPages = [ | ||
registerSection('divider'), | ||
registerSection('header', "ArmCord"), | ||
registerSection('section', "armcord-legacy", "Legacy", LegacyPage), | ||
registerSection('section', "armcord-settings", "Settings", SettingsPage), | ||
registerSection('section', "armcord-themes", "Themes", ThemesPage), | ||
registerSection('section', "armcord-updater", "Updater", UpdaterPage), | ||
] | ||
|
||
export function onLoad() { | ||
log("ArmCord Settings") | ||
settingsPages | ||
} | ||
export function onUnload() { | ||
settingsPages.forEach((e) => e()) | ||
} |
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,14 @@ | ||
const { | ||
ui: { Header, HeaderTags, Button, Divider }, | ||
} = shelter; | ||
|
||
export function LegacyPage() { | ||
return( | ||
<> | ||
<Header tag={HeaderTags.H1}>Legacy ArmCord components</Header> | ||
<Button onClick={window.armcord.openSettingsWindow}>Settings</Button> | ||
<Divider mt mb="30px"/> | ||
<Button onClick={window.armcord.openThemesWindow}>Themes</Button> | ||
</> | ||
) | ||
} |
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,21 @@ | ||
|
||
|
||
const { | ||
plugin: { store }, | ||
ui: { SwitchItem, Header, Divider, HeaderTags }, | ||
} = shelter; | ||
|
||
|
||
export async function SettingsPage() { | ||
const settings = armcord.settings.config | ||
console.error(settings) | ||
return( | ||
<> | ||
<Header tag={HeaderTags.H1}>Settings</Header> | ||
<Divider mt mb="30px"/> | ||
<Header tag={HeaderTags.H5}>Mods</Header> | ||
<SwitchItem note="placeholder" value={settings.armcordCSP}>ArmCord CSP</SwitchItem> | ||
<SwitchItem note="placeholder" value={settings.autoScroll}>Vencord</SwitchItem> | ||
</> | ||
) | ||
} |
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,12 @@ | ||
const { | ||
plugin: { store }, | ||
ui: { TextBox, Header, HeaderTags }, | ||
} = shelter; | ||
|
||
export function ThemesPage() { | ||
return( | ||
<> | ||
<Header tag={HeaderTags.H1}>Themes</Header> | ||
</> | ||
) | ||
} |
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,12 @@ | ||
const { | ||
plugin: { store }, | ||
ui: { TextBox, Header, HeaderTags }, | ||
} = shelter; | ||
|
||
export function UpdaterPage() { | ||
return( | ||
<> | ||
<Header tag={HeaderTags.H1}>Updater</Header> | ||
</> | ||
) | ||
} |
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,5 @@ | ||
{ | ||
"name": "ArmCord Settings", | ||
"author": "smartfrigde", | ||
"description": "A bridge between ArmCord and Discord UI" | ||
} |