-
Notifications
You must be signed in to change notification settings - Fork 225
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
15 changed files
with
349 additions
and
201 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
.Changelog-Title-Wrapper { | ||
font-size: 20px; | ||
font-weight: 600; | ||
font-family: var(--font-display); | ||
color: var(--header-primary); | ||
line-height: 1.2; | ||
|
||
div { | ||
font-size: 12px; | ||
font-weight: 400; | ||
font-family: var(--font-primary); | ||
color: var(--primary-300); | ||
line-height: 1.3333333333333333; | ||
} | ||
} | ||
|
||
.Changelog-Banner { | ||
width: 405px; | ||
border-radius: 8px; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.Changelog-Item { | ||
color: #c4c9ce; | ||
|
||
.Changelog-Header { | ||
display: flex; | ||
text-transform: uppercase; | ||
font-weight: 700; | ||
align-items: center; | ||
margin-bottom: 10px; | ||
|
||
&.added { color: #45BA6A; } | ||
&.fixed { color: #EC4245; } | ||
&.improved { color: #5865F2; } | ||
|
||
&::after { | ||
content: ""; | ||
flex-grow: 1; | ||
height: 1px; | ||
margin-left: 7px; | ||
background: currentColor; | ||
} | ||
} | ||
|
||
span { | ||
display: list-item; | ||
list-style: inside; | ||
margin-left: 5px; | ||
|
||
&::marker { | ||
color: var(--background-accent); | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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,9 @@ | ||
[ | ||
{ | ||
"type": "switch", | ||
"name": "Automatically enable", | ||
"note": "Automatically enables the typing indicator for each channel that isn't manually disabled", | ||
"id": "autoEnable", | ||
"value": true | ||
} | ||
] |
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,41 @@ | ||
import React from "react"; | ||
import { Webpack } from "@api"; | ||
import Settings from "../modules/settings"; | ||
import { useStateFromStores } from "../modules/shared"; | ||
import SettingsItems from "./settings.json"; | ||
|
||
const { FormSwitch } = Webpack.getByKeys("FormSwitch"); | ||
|
||
function SwitchItem(props) { | ||
const value = useStateFromStores([Settings], () => Settings.get(props.id, props.value)); | ||
|
||
return ( | ||
<FormSwitch | ||
{...props} | ||
value={value} | ||
children={props.name} | ||
onChange={value => { | ||
Settings.set(props.id, value); | ||
}} | ||
/> | ||
); | ||
} | ||
|
||
function renderItems(items) { | ||
return items.map(item => { | ||
switch (item.type) { | ||
case "switch": | ||
return <SwitchItem {...item} />; | ||
default: | ||
return null; | ||
} | ||
}); | ||
} | ||
|
||
export default function SettingsPanel() { | ||
return ( | ||
<div> | ||
{renderItems(SettingsItems)} | ||
</div> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.