This commit is contained in:
polwex 2024-10-07 01:45:10 +07:00
parent d5cc07c259
commit 33fa2b5b38
5 changed files with 36 additions and 13 deletions

View File

@ -7,5 +7,7 @@ Supports EAuth and Metamask login with Urbit ID.
### Installation ### Installation
Two options: Two options:
1.- On dojo run `|install ~dister-dozzod-sortug %ucm` 1.- On dojo run `|install ~dister-dozzod-sortug %ucm`.
2.- Symlink the `desk` folder to a folder inside your pier, then commit and `|install our <name>`. 2.- Build the site frontend, `cd site && bun run build`.
3.- Rename and replace the built files because Urbit can't read capital letters! Just lovely. Inside the `site` folder do `bun rename-files.js`
4.- Symlink the `desk` folder to a folder inside your pier, then commit and `|install our <name>`.

View File

@ -30,7 +30,7 @@
++ on-init ++ on-init
^- (quip card _this) ^- (quip card _this)
:_ this :_ this
:_ ~ (add-eyre-binding [dap.bowl ~]) :_ ~ (add-eyre-binding:hd [dap.bowl ~])
:: ::
++ on-save ++ on-save
!>(state) !>(state)
@ -278,6 +278,7 @@
:: cards :: cards
++ add-eyre-binding ++ add-eyre-binding
|= =path ^- card |= =path ^- card
~& > adding-binding=[path dap.bowl]
[%pass /eyre/connect %arvo %e %connect [~ path] dap.bowl] [%pass /eyre/connect %arvo %e %connect [~ path] dap.bowl]
++ wipe-eyre-bindings ++ wipe-eyre-bindings

View File

@ -7,5 +7,5 @@
license+'MIT' license+'MIT'
image+'https://s3.sortug.com/img/icons/ucm-logo.png' image+'https://s3.sortug.com/img/icons/ucm-logo.png'
base+'ucm' base+'ucm'
glob-http+['https://s3.sortug.com/globs/glob-0v1.fiva2.d83ct.k90tn.n7tjl.58mjq.glob' 0v1.fiva2.d83ct.k90tn.n7tjl.58mjq] glob-http+['https://s3.sortug.com/globs/glob-0v2.4bhli.vifom.mfvn7.4l08q.f8mnp.glob' 0v2.4bhli.vifom.mfvn7.4l08q.f8mnp]
== ==

View File

@ -126,6 +126,7 @@ export function SiteDash({ site, group }: { site: Site; group: Group }) {
} }
async function save() { async function save() {
setSaving(true);
const ns: Site = { const ns: Site = {
description: siteDesc, description: siteDesc,
icon: siteIcon, icon: siteIcon,
@ -139,8 +140,17 @@ export function SiteDash({ site, group }: { site: Site; group: Group }) {
hidden, hidden,
}; };
const res = await dashIO().createSite(ns); const res = await dashIO().createSite(ns);
if (res) {
sync(); sync();
setSaved(true);
setTimeout(() => {
setSaved(false);
}, 2000);
} }
setSaving(false);
}
const [saving, setSaving] = useState(false);
const [saved, setSaved] = useState(false);
// drag // drag
function reorder(result: DropResult<string>) { function reorder(result: DropResult<string>) {
@ -296,12 +306,23 @@ export function SiteDash({ site, group }: { site: Site; group: Group }) {
/> />
</AccordionDetails> </AccordionDetails>
</Accordion>*/} </Accordion>*/}
{saved && (
<Typography align="center" color="green">
Changes saved
</Typography>
)}
{saving ? (
<Centered>
{" "}
<CircularProgress />
</Centered>
) : (
<Centered> <Centered>
<Button sx={{ my: 4 }} variant="contained" onClick={save}> <Button sx={{ my: 4 }} variant="contained" onClick={save}>
Save Changes Save Changes
</Button> </Button>
</Centered> </Centered>
)}
</Container> </Container>
</Box> </Box>
); );

View File

@ -1,9 +1,8 @@
import { defineConfig } from "vite"; import { defineConfig } from "vite";
import react from "@vitejs/plugin-react"; import react from "@vitejs/plugin-react";
// import { createHash } from "crypto";
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
base: "/ublog", base: "/ucm",
plugins: [react()], plugins: [react()],
}); });