mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-20 14:01:24 +00:00
chore: update styles
This commit is contained in:
parent
3488cd04c0
commit
b97fb13929
@ -26,7 +26,7 @@ const Navigator = () => {
|
|||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
className={classNames(
|
className={classNames(
|
||||||
"flex flex-row justify-center items-center px-2 leading-7 text-sm dark:text-gray-400 rounded-md hover:bg-gray-200",
|
"flex flex-row justify-center items-center px-2 leading-7 text-sm dark:text-gray-400 rounded-md",
|
||||||
currentTab === "tab:mine"
|
currentTab === "tab:mine"
|
||||||
? "bg-gray-600 dark:bg-zinc-700 text-white dark:text-gray-400 shadow"
|
? "bg-gray-600 dark:bg-zinc-700 text-white dark:text-gray-400 shadow"
|
||||||
: "hover:bg-gray-200 dark:hover:bg-zinc-700"
|
: "hover:bg-gray-200 dark:hover:bg-zinc-700"
|
||||||
@ -40,7 +40,7 @@ const Navigator = () => {
|
|||||||
<button
|
<button
|
||||||
key={tag}
|
key={tag}
|
||||||
className={classNames(
|
className={classNames(
|
||||||
"flex flex-row justify-center items-center px-2 leading-7 text-sm dark:text-gray-400 rounded-md hover:bg-gray-200",
|
"flex flex-row justify-center items-center px-2 leading-7 text-sm dark:text-gray-400 rounded-md",
|
||||||
currentTab === `tag:${tag}`
|
currentTab === `tag:${tag}`
|
||||||
? "bg-gray-600 dark:bg-zinc-700 text-white dark:text-gray-400 shadow"
|
? "bg-gray-600 dark:bg-zinc-700 text-white dark:text-gray-400 shadow"
|
||||||
: "hover:bg-gray-200 dark:hover:bg-zinc-700"
|
: "hover:bg-gray-200 dark:hover:bg-zinc-700"
|
||||||
|
@ -3,6 +3,7 @@ import { isEqual } from "lodash-es";
|
|||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
import toast from "react-hot-toast";
|
import toast from "react-hot-toast";
|
||||||
import { workspaceServiceClient } from "@/grpcweb";
|
import { workspaceServiceClient } from "@/grpcweb";
|
||||||
|
import { releaseGuard } from "@/helpers/utils";
|
||||||
import { WorkspaceSetting } from "@/types/proto/api/v2/workspace_service";
|
import { WorkspaceSetting } from "@/types/proto/api/v2/workspace_service";
|
||||||
|
|
||||||
const WorkspaceSection: React.FC = () => {
|
const WorkspaceSection: React.FC = () => {
|
||||||
@ -63,16 +64,18 @@ const WorkspaceSection: React.FC = () => {
|
|||||||
return (
|
return (
|
||||||
<div className="w-full flex flex-col justify-start items-start space-y-4">
|
<div className="w-full flex flex-col justify-start items-start space-y-4">
|
||||||
<p className="text-base font-semibold leading-6 text-gray-900 dark:text-gray-500">Workspace settings</p>
|
<p className="text-base font-semibold leading-6 text-gray-900 dark:text-gray-500">Workspace settings</p>
|
||||||
<div className="w-full flex flex-col justify-start items-start">
|
{releaseGuard() && (
|
||||||
<p className="mt-2 dark:text-gray-400">Custom style</p>
|
<div className="w-full flex flex-col justify-start items-start">
|
||||||
<Textarea
|
<p className="mt-2 dark:text-gray-400">Custom style</p>
|
||||||
className="w-full mt-2"
|
<Textarea
|
||||||
minRows={2}
|
className="w-full mt-2"
|
||||||
maxRows={5}
|
minRows={2}
|
||||||
value={workspaceSetting.customStyle}
|
maxRows={5}
|
||||||
onChange={(event) => handleCustomStyleChange(event.target.value)}
|
value={workspaceSetting.customStyle}
|
||||||
/>
|
onChange={(event) => handleCustomStyleChange(event.target.value)}
|
||||||
</div>
|
/>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<div className="w-full flex flex-col justify-start items-start">
|
<div className="w-full flex flex-col justify-start items-start">
|
||||||
<Checkbox
|
<Checkbox
|
||||||
label="Enable user signup"
|
label="Enable user signup"
|
||||||
|
@ -4,8 +4,12 @@ export const isNullorUndefined = (value: any) => {
|
|||||||
return isNull(value) || isUndefined(value);
|
return isNull(value) || isUndefined(value);
|
||||||
};
|
};
|
||||||
|
|
||||||
export function absolutifyLink(rel: string): string {
|
export const absolutifyLink = (rel: string): string => {
|
||||||
const anchor = document.createElement("a");
|
const anchor = document.createElement("a");
|
||||||
anchor.setAttribute("href", rel);
|
anchor.setAttribute("href", rel);
|
||||||
return anchor.href;
|
return anchor.href;
|
||||||
}
|
};
|
||||||
|
|
||||||
|
export const releaseGuard = () => {
|
||||||
|
return import.meta.env.MODE === "development";
|
||||||
|
};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Divider } from "@mui/joy";
|
import { Alert, Divider } from "@mui/joy";
|
||||||
import PreferenceSection from "@/components/setting/PreferenceSection";
|
import PreferenceSection from "@/components/setting/PreferenceSection";
|
||||||
import AccessTokenSection from "../components/setting/AccessTokenSection";
|
import AccessTokenSection from "../components/setting/AccessTokenSection";
|
||||||
import AccountSection from "../components/setting/AccountSection";
|
import AccountSection from "../components/setting/AccountSection";
|
||||||
@ -18,6 +18,9 @@ const Setting: React.FC = () => {
|
|||||||
{isAdmin && (
|
{isAdmin && (
|
||||||
<>
|
<>
|
||||||
<Divider />
|
<Divider />
|
||||||
|
<Alert variant="soft" color="warning">
|
||||||
|
You can see the settings items below because you are an Admin.
|
||||||
|
</Alert>
|
||||||
<MemberSection />
|
<MemberSection />
|
||||||
<WorkspaceSection />
|
<WorkspaceSection />
|
||||||
</>
|
</>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user