-
-
Notifications
You must be signed in to change notification settings - Fork 228
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
e5bfa3c
commit ef5c03e
Showing
86 changed files
with
2,785 additions
and
2,770 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
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
name: Issue Translate | ||
on: | ||
issue_comment: | ||
on: | ||
issue_comment: | ||
types: [created] | ||
issues: | ||
issues: | ||
types: [opened] | ||
|
||
jobs: | ||
|
@@ -11,4 +11,4 @@ jobs: | |
steps: | ||
- uses: usthe/[email protected] | ||
with: | ||
BOT_GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
BOT_GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |
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
Large diffs are not rendered by default.
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 |
---|---|---|
@@ -1,68 +1,68 @@ | ||
import {LayoutHeader, LayoutMain, LayoutSidebar} from '@lobehub/ui'; | ||
import { LayoutHeader, LayoutMain, LayoutSidebar } from '@lobehub/ui'; | ||
import isEqual from 'fast-deep-equal'; | ||
import {memo, useEffect} from 'react'; | ||
import { memo, useEffect } from 'react'; | ||
|
||
import '@/locales/config'; | ||
import {PromptHighlight} from '@/modules/PromptHighlight'; | ||
import { PromptHighlight } from '@/modules/PromptHighlight'; | ||
import replaceIcon from '@/scripts/replaceIcon'; | ||
import {selectors, useAppStore} from '@/store'; | ||
import { selectors, useAppStore } from '@/store'; | ||
import GlobalStyle from '@/styles'; | ||
|
||
import Content from '../features/Content'; | ||
import ExtraNetworkSidebar from '../features/ExtraNetworkSidebar'; | ||
import Footer from '../features/Footer'; | ||
import Header from '../features/Header'; | ||
import QuickSettingSidebar from '../features/QuickSettingSidebar'; | ||
import {useStyles} from './style'; | ||
import { useStyles } from './style'; | ||
|
||
const HEADER_HEIGHT = 64; | ||
|
||
const Index = memo(() => { | ||
const setting = useAppStore(selectors.currentSetting, isEqual); | ||
const {cx, styles} = useStyles({ | ||
headerHeight: HEADER_HEIGHT, | ||
isPrimaryColor: Boolean(setting.primaryColor), | ||
}); | ||
const setting = useAppStore(selectors.currentSetting, isEqual); | ||
const { cx, styles } = useStyles({ | ||
headerHeight: HEADER_HEIGHT, | ||
isPrimaryColor: Boolean(setting.primaryColor), | ||
}); | ||
|
||
useEffect(() => { | ||
if (setting.enableHighlight) { | ||
PromptHighlight('#txt2img_prompt', '#lobe_txt2img_prompt'); | ||
PromptHighlight('#img2img_prompt', '#lobe_img2img_prompt'); | ||
} | ||
if (setting.svgIcon) replaceIcon(); | ||
}, []); | ||
useEffect(() => { | ||
if (setting.enableHighlight) { | ||
PromptHighlight('#txt2img_prompt', '#lobe_txt2img_prompt'); | ||
PromptHighlight('#img2img_prompt', '#lobe_img2img_prompt'); | ||
} | ||
if (setting.svgIcon) replaceIcon(); | ||
}, []); | ||
|
||
return ( | ||
<> | ||
<GlobalStyle /> | ||
<LayoutHeader headerHeight={HEADER_HEIGHT}> | ||
<Header /> | ||
</LayoutHeader> | ||
<LayoutMain> | ||
{<div className={setting.liteAnimation ? styles.backgroundLite : styles.background} />} | ||
{setting.enableSidebar && ( | ||
<LayoutSidebar | ||
className={styles.sidebar} | ||
headerHeight={HEADER_HEIGHT} | ||
style={{flex: 0, zIndex: 50}} | ||
> | ||
<QuickSettingSidebar headerHeight={HEADER_HEIGHT} /> | ||
</LayoutSidebar> | ||
)} | ||
<Content className={cx(!setting.enableSidebar && styles.quicksettings)} /> | ||
{setting?.enableExtraNetworkSidebar && ( | ||
<LayoutSidebar | ||
className={styles.sidebar} | ||
headerHeight={HEADER_HEIGHT} | ||
style={{flex: 0, zIndex: 50}} | ||
> | ||
<ExtraNetworkSidebar headerHeight={HEADER_HEIGHT} /> | ||
</LayoutSidebar> | ||
)} | ||
</LayoutMain> | ||
<Footer /> | ||
</> | ||
); | ||
return ( | ||
<> | ||
<GlobalStyle /> | ||
<LayoutHeader headerHeight={HEADER_HEIGHT}> | ||
<Header /> | ||
</LayoutHeader> | ||
<LayoutMain> | ||
{<div className={setting.liteAnimation ? styles.backgroundLite : styles.background} />} | ||
{setting.enableSidebar && ( | ||
<LayoutSidebar | ||
className={styles.sidebar} | ||
headerHeight={HEADER_HEIGHT} | ||
style={{ flex: 0, zIndex: 50 }} | ||
> | ||
<QuickSettingSidebar headerHeight={HEADER_HEIGHT} /> | ||
</LayoutSidebar> | ||
)} | ||
<Content className={cx(!setting.enableSidebar && styles.quicksettings)} /> | ||
{setting?.enableExtraNetworkSidebar && ( | ||
<LayoutSidebar | ||
className={styles.sidebar} | ||
headerHeight={HEADER_HEIGHT} | ||
style={{ flex: 0, zIndex: 50 }} | ||
> | ||
<ExtraNetworkSidebar headerHeight={HEADER_HEIGHT} /> | ||
</LayoutSidebar> | ||
)} | ||
</LayoutMain> | ||
<Footer /> | ||
</> | ||
); | ||
}); | ||
|
||
export default Index; |
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 |
---|---|---|
@@ -1,69 +1,69 @@ | ||
import {consola} from 'consola'; | ||
import {PropsWithChildren, Suspense, memo, useEffect, useState} from 'react'; | ||
import {Helmet} from 'react-helmet'; | ||
import {shallow} from 'zustand/shallow'; | ||
import { consola } from 'consola'; | ||
import { PropsWithChildren, Suspense, memo, useEffect, useState } from 'react'; | ||
import { Helmet } from 'react-helmet'; | ||
import { shallow } from 'zustand/shallow'; | ||
|
||
import {Loading} from '@/components'; | ||
import { Loading } from '@/components'; | ||
import Layout from '@/layouts'; | ||
import {useAppStore} from '@/store'; | ||
import { useAppStore } from '@/store'; | ||
|
||
import manifest from './manifest'; | ||
|
||
export const Layouts = memo<PropsWithChildren>(({children}) => { | ||
const [loading, setLoading] = useState(true); | ||
const {setCurrentTab, onInit, storeLoading} = useAppStore( | ||
(st) => ({ | ||
onInit: st.onInit, | ||
setCurrentTab: st.setCurrentTab, | ||
storeLoading: st.loading, | ||
}), | ||
shallow, | ||
); | ||
export const Layouts = memo<PropsWithChildren>(({ children }) => { | ||
const [loading, setLoading] = useState(true); | ||
const { setCurrentTab, onInit, storeLoading } = useAppStore( | ||
(st) => ({ | ||
onInit: st.onInit, | ||
setCurrentTab: st.setCurrentTab, | ||
storeLoading: st.loading, | ||
}), | ||
shallow, | ||
); | ||
|
||
useEffect(() => { | ||
onInit(); | ||
onUiLoaded(() => { | ||
setLoading(false); | ||
consola.success('🤯 Lobe Theme loading'); | ||
}); | ||
onUiTabChange(() => { | ||
setCurrentTab(); | ||
}); | ||
}, []); | ||
useEffect(() => { | ||
onInit(); | ||
onUiLoaded(() => { | ||
setLoading(false); | ||
consola.success('🤯 Lobe Theme loading'); | ||
}); | ||
onUiTabChange(() => { | ||
setCurrentTab(); | ||
}); | ||
}, []); | ||
|
||
return ( | ||
<Suspense fallback="loading..."> | ||
<Helmet> | ||
<link | ||
href="https://registry.npmmirror.com/@lobehub/assets-favicons/1.1.0/files/assets/apple-touch-icon.png" | ||
rel="apple-touch-icon" | ||
sizes="180x180" | ||
/> | ||
<link | ||
href="https://registry.npmmirror.com/@lobehub/assets-favicons/1.1.0/files/assets/favicon-32x32.png" | ||
rel="icon" | ||
sizes="32x32" | ||
type="image/png" | ||
/> | ||
<link | ||
href="https://registry.npmmirror.com/@lobehub/assets-favicons/1.1.0/files/assets/favicon-16x16.png" | ||
rel="icon" | ||
sizes="16x16" | ||
type="image/png" | ||
/> | ||
<link | ||
href="https://registry.npmmirror.com/@lobehub/assets-favicons/1.1.0/files/assets/site.webmanifest" | ||
rel="manifest" | ||
/> | ||
<meta content="Stable Diffusion · LobeHub" name="apple-mobile-web-app-title" /> | ||
<meta content="Stable Diffusion · LobeHub" name="application-name" /> | ||
<meta content="#000000" name="msapplication-TileColor" /> | ||
<meta content="#000000" name="theme-color" /> | ||
<link href={manifest} rel="manifest" /> | ||
</Helmet> | ||
<Layout>{storeLoading === false && loading === false ? children : <Loading />}</Layout> | ||
</Suspense> | ||
); | ||
return ( | ||
<Suspense fallback="loading..."> | ||
<Helmet> | ||
<link | ||
href="https://registry.npmmirror.com/@lobehub/assets-favicons/1.1.0/files/assets/apple-touch-icon.png" | ||
rel="apple-touch-icon" | ||
sizes="180x180" | ||
/> | ||
<link | ||
href="https://registry.npmmirror.com/@lobehub/assets-favicons/1.1.0/files/assets/favicon-32x32.png" | ||
rel="icon" | ||
sizes="32x32" | ||
type="image/png" | ||
/> | ||
<link | ||
href="https://registry.npmmirror.com/@lobehub/assets-favicons/1.1.0/files/assets/favicon-16x16.png" | ||
rel="icon" | ||
sizes="16x16" | ||
type="image/png" | ||
/> | ||
<link | ||
href="https://registry.npmmirror.com/@lobehub/assets-favicons/1.1.0/files/assets/site.webmanifest" | ||
rel="manifest" | ||
/> | ||
<meta content="Stable Diffusion · LobeHub" name="apple-mobile-web-app-title" /> | ||
<meta content="Stable Diffusion · LobeHub" name="application-name" /> | ||
<meta content="#000000" name="msapplication-TileColor" /> | ||
<meta content="#000000" name="theme-color" /> | ||
<link href={manifest} rel="manifest" /> | ||
</Helmet> | ||
<Layout>{storeLoading === false && loading === false ? children : <Loading />}</Layout> | ||
</Suspense> | ||
); | ||
}); | ||
|
||
export default Layouts; |
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 |
---|---|---|
@@ -1,28 +1,28 @@ | ||
const manifest = { | ||
background_color: '#000000', | ||
description: | ||
background_color: '#000000', | ||
description: | ||
'The modern theme for stable diffusion webui, exquisite interface design, highly customizable UI, and efficiency boosting features.', | ||
display: 'standalone', | ||
icons: [ | ||
{ | ||
sizes: '192x192', | ||
src: 'https://registry.npmmirror.com/@lobehub/assets-favicons/1.1.0/files/assets/android-chrome-192x192.png', | ||
type: 'image/png', | ||
}, | ||
{ | ||
sizes: '512x512', | ||
src: 'https://registry.npmmirror.com/@lobehub/assets-favicons/1.1.0/files/assets/android-chrome-512x512.png', | ||
type: 'image/png', | ||
}, | ||
], | ||
id: '/', | ||
name: 'Stable Diffusion', | ||
orientation: 'portrait', | ||
scope: '/', | ||
short_name: 'Stable Diffusion', | ||
splash_pages: null, | ||
start_url: location.origin, | ||
theme_color: '#000000', | ||
display: 'standalone', | ||
icons: [ | ||
{ | ||
sizes: '192x192', | ||
src: 'https://registry.npmmirror.com/@lobehub/assets-favicons/1.1.0/files/assets/android-chrome-192x192.png', | ||
type: 'image/png', | ||
}, | ||
{ | ||
sizes: '512x512', | ||
src: 'https://registry.npmmirror.com/@lobehub/assets-favicons/1.1.0/files/assets/android-chrome-512x512.png', | ||
type: 'image/png', | ||
}, | ||
], | ||
id: '/', | ||
name: 'Stable Diffusion', | ||
orientation: 'portrait', | ||
scope: '/', | ||
short_name: 'Stable Diffusion', | ||
splash_pages: null, | ||
start_url: location.origin, | ||
theme_color: '#000000', | ||
}; | ||
|
||
export default `data:application/manifest+json;base64,${btoa(JSON.stringify(manifest))}`; |
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.