mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-08 06:03:03 -04:00
BetterFolders: Add className to Sidebar component
This commit is contained in:
parent
0a2d4a2ab2
commit
133e924425
3 changed files with 9 additions and 8 deletions
|
@ -43,15 +43,13 @@ export default ErrorBoundary.wrap(guildsBarProps => {
|
||||||
|
|
||||||
// We need to display none if we are in fullscreen. Yes this seems horrible doing with css, but it's literally how Discord does it.
|
// We need to display none if we are in fullscreen. Yes this seems horrible doing with css, but it's literally how Discord does it.
|
||||||
// Also display flex otherwise to fix scrolling.
|
// Also display flex otherwise to fix scrolling.
|
||||||
// gridArea is needed to align properly with the base app grid.
|
const sidebarStyle = {
|
||||||
const barStyle = {
|
display: isFullscreen ? "none" : "flex"
|
||||||
display: isFullscreen ? "none" : "flex",
|
|
||||||
gridArea: "betterFoldersSidebar"
|
|
||||||
} satisfies CSSProperties;
|
} satisfies CSSProperties;
|
||||||
|
|
||||||
if (!guilds || !settings.store.sidebarAnim) {
|
if (!guilds || !settings.store.sidebarAnim) {
|
||||||
return visible
|
return visible
|
||||||
? <div style={barStyle}>{Sidebar}</div>
|
? <div className="vc-betterFolders-sidebar" style={sidebarStyle}>{Sidebar}</div>
|
||||||
: null;
|
: null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +63,7 @@ export default ErrorBoundary.wrap(guildsBarProps => {
|
||||||
>
|
>
|
||||||
{(animationStyle: any, show: any) =>
|
{(animationStyle: any, show: any) =>
|
||||||
show && (
|
show && (
|
||||||
<Animations.animated.div style={{ ...animationStyle, ...barStyle }}>
|
<Animations.animated.div className="vc-betterFolders-sidebar" style={{ ...animationStyle, ...sidebarStyle }}>
|
||||||
{Sidebar}
|
{Sidebar}
|
||||||
</Animations.animated.div>
|
</Animations.animated.div>
|
||||||
)
|
)
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import "./sidebarFix.css";
|
import "./style.css";
|
||||||
|
|
||||||
import { definePluginSettings } from "@api/Settings";
|
import { definePluginSettings } from "@api/Settings";
|
||||||
import { Devs } from "@utils/constants";
|
import { Devs } from "@utils/constants";
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
/* These area names need to be hardcoded. Only betterFoldersSidebar is added by the plugin. */
|
.vc-betterFolders-sidebar {
|
||||||
|
grid-area: betterFoldersSidebar
|
||||||
|
}
|
||||||
|
|
||||||
|
/* These area names need to be hardcoded. Only betterFoldersSidebar is added by the plugin. */
|
||||||
.visual-refresh .vc-betterFolders-sidebar-grid {
|
.visual-refresh .vc-betterFolders-sidebar-grid {
|
||||||
/* stylelint-disable-next-line value-keyword-case */
|
/* stylelint-disable-next-line value-keyword-case */
|
||||||
grid-template-columns: [start] min-content [guildsEnd] min-content [sidebarEnd] min-content [channelsEnd] 1fr [end];
|
grid-template-columns: [start] min-content [guildsEnd] min-content [sidebarEnd] min-content [channelsEnd] 1fr [end];
|
Loading…
Add table
Add a link
Reference in a new issue