Skip to content

Commit

Permalink
Dev (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
goldbuick authored Dec 14, 2024
2 parents a3a23d8 + 893aeb2 commit c05f80e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "zed-software-system",
"private": true,
"version": "0.16.4",
"version": "0.16.6",
"type": "module",
"scripts": {
"sloc": "npx sloc zss",
Expand Down
6 changes: 5 additions & 1 deletion zss/device/register.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { shortenUrl } from 'shaveurl'
import { createdevice } from 'zss/device'
import { useGadgetClient } from 'zss/gadget/data/state'
import { pick } from 'zss/mapping/array'
import { doasync } from 'zss/mapping/func'
import { waitfor } from 'zss/mapping/tick'
import { isarray, ispresent, isstring } from 'zss/mapping/types'
Expand Down Expand Up @@ -109,7 +110,10 @@ const register = createdevice(
break
case 'share':
doasync('register:share', async function () {
const shorturl = await shortenUrl(window.location.href)
const shorturl = await shortenUrl(
window.location.href,
pick('1pt', 'cleanuri', 'isgd', 'shrtcode'),
)
writecopyit('share', shorturl, shorturl)
})
break
Expand Down
5 changes: 3 additions & 2 deletions zss/device/vm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ async function savestate() {
const books = memoryreadbooklist()
const mainbook = memoryreadbookbysoftware(MEMORY_LABEL.MAIN)
if (books.length && ispresent(mainbook)) {
const content = await compressbooks(books)
register_flush(
vm.name(),
`${new Date().toISOString()} ${mainbook.name}`,
await compressbooks(books),
`${new Date().toISOString()} ${mainbook.name} ${content.length} chars`,
content,
)
}
}
Expand Down

0 comments on commit c05f80e

Please sign in to comment.