Fixed some minor admin bugs (#6335)

This commit is contained in:
SamTV12345 2024-04-16 19:48:34 +02:00 committed by GitHub
parent a541375f7f
commit 9d8f1f60cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 14 additions and 6 deletions

View file

@ -250,10 +250,18 @@ td, th {
color: #666; color: #666;
} }
.settings-page {
display: flex;
flex-direction: column;
gap: 20px;
height: 100%;
}
.settings { .settings {
flex-grow: max(1, 1);
outline: none; outline: none;
width: 100%; width: 100%;
min-height: 80vh;
resize: none; resize: none;
} }

View file

@ -21,7 +21,7 @@ export const HelpPage = () => {
return <div key={hookName+i}> return <div key={hookName+i}>
<h3>{hookName}</h3> <h3>{hookName}</h3>
<ul> <ul>
{Object.keys(hooks[hookName]).map((hook, i) => <li>{hook} {Object.keys(hooks[hookName]).map((hook, i) => <li key={hook+i}>{hook}
<ul key={hookName+hook+i}> <ul key={hookName+hook+i}>
{Object.keys(hooks[hookName][hook]).map((subHook, i) => <li key={i}>{subHook}</li>)} {Object.keys(hooks[hookName][hook]).map((subHook, i) => <li key={i}>{subHook}</li>)}
</ul> </ul>
@ -46,12 +46,12 @@ export const HelpPage = () => {
</div> </div>
<h2><Trans i18nKey="admin_plugins.installed"/></h2> <h2><Trans i18nKey="admin_plugins.installed"/></h2>
<ul> <ul>
{helpData.installedPlugins.map((plugin, i) => <li key={i}>{plugin}</li>)} {helpData.installedPlugins.map((plugin, i) => <li key={plugin+i}>{plugin}</li>)}
</ul> </ul>
<h2><Trans i18nKey="admin_plugins_info.parts"/></h2> <h2><Trans i18nKey="admin_plugins_info.parts"/></h2>
<ul> <ul>
{helpData.installedParts.map((part, i) => <li key={i}>{part}</li>)} {helpData.installedParts.map((part, i) => <li key={part+i}>{part}</li>)}
</ul> </ul>
<h2><Trans i18nKey="admin_plugins_info.hooks"/></h2> <h2><Trans i18nKey="admin_plugins_info.hooks"/></h2>

View file

@ -150,7 +150,7 @@ export const HomePage = () => {
<tbody style={{overflow: 'auto'}}> <tbody style={{overflow: 'auto'}}>
{sortedInstalledPlugins.map((plugin, index) => { {sortedInstalledPlugins.map((plugin, index) => {
return <tr key={index}> return <tr key={index}>
<td>{plugin.name}</td> <td><a rel="noopener noreferrer" href={`https://npmjs.com/${plugin.name}`} target="_blank">{plugin.name}</a></td>
<td>{plugin.version}</td> <td>{plugin.version}</td>
<td> <td>
{ {

View file

@ -8,7 +8,7 @@ export const SettingsPage = ()=>{
const settingsSocket = useStore(state=>state.settingsSocket) const settingsSocket = useStore(state=>state.settingsSocket)
const settings = useStore(state=>state.settings) const settings = useStore(state=>state.settings)
return <div> return <div className="settings-page">
<h1><Trans i18nKey="admin_settings.current"/></h1> <h1><Trans i18nKey="admin_settings.current"/></h1>
<textarea value={settings} className="settings" onChange={v => { <textarea value={settings} className="settings" onChange={v => {
useStore.getState().setSettings(v.target.value) useStore.getState().setSettings(v.target.value)