diff --git a/ROADMAP.md b/ROADMAP.md index 804196ac..e11577d5 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -1,7 +1,7 @@ # Current -- [ ] Enable global view via env var -- [ ] Ask for name/image, first post on signup +- [ ] Fix cursor +- [ ] Add coupon code registration for relay - [ ] Image classification - https://github.com/bhky/opennsfw2 diff --git a/src/agent/social.ts b/src/agent/social.ts index 4a03c717..39ff9f16 100644 --- a/src/agent/social.ts +++ b/src/agent/social.ts @@ -7,8 +7,6 @@ export const defaultFollows = (import.meta.env.VITE_DEFAULT_FOLLOWS || "") .split(",") .filter(identity) -console.log(defaultFollows) - export const getFollows = pubkey => Tags.wrap(getPersonWithFallback(pubkey).petnames).type("p").values().all() diff --git a/src/app/views/Search.svelte b/src/app/views/Search.svelte index a7c777f6..7a74011e 100644 --- a/src/app/views/Search.svelte +++ b/src/app/views/Search.svelte @@ -8,7 +8,7 @@ import Content from "src/partials/Content.svelte" import BorderLeft from "src/partials/BorderLeft.svelte" import PersonInfo from "src/app/shared/PersonInfo.svelte" - import {sampleRelays} from "src/agent/relays" + import {sampleRelays, getUserReadRelays} from "src/agent/relays" import network from "src/agent/network" import {watch} from "src/agent/db" import user from "src/agent/user" @@ -20,11 +20,18 @@ } const loadPeople = debounce(500, search => { + // If we have a query, search using nostr.band. If not, ask for random profiles. + // This allows us to populate results even if search isn't supported by forced urls if (q.length > 2) { network.load({ relays: sampleRelays([{url: "wss://relay.nostr.band"}]), filter: [{kinds: [0], search, limit: 10}], }) + } else { + network.load({ + relays: getUserReadRelays(), + filter: [{kinds: [0], limit: 50}], + }) } }) diff --git a/src/partials/state.ts b/src/partials/state.ts index dc9f4cde..75c09cf3 100644 --- a/src/partials/state.ts +++ b/src/partials/state.ts @@ -101,11 +101,8 @@ export const theme = synced("ui/theme", prefersDark ? "dark" : "light") export const getThemeColors = $theme => { for (const x of range(1, 10)) { - // const lum = $theme === 'dark' ? (x - 5) * 30 : (4 - x) * 30 const lum = $theme === "dark" ? (5 - x) * 25 : (x - 5) * 25 - console.log(lum, shadeColor(THEME[`gray-${$theme}`], lum)) - THEME[`gray-${x}`] = shadeColor(THEME[`gray-${$theme}`], lum) } diff --git a/vite.config.js b/vite.config.js index d7f0a2cd..d7ce09f4 100644 --- a/vite.config.js +++ b/vite.config.js @@ -6,8 +6,6 @@ import sveltePreprocess from "svelte-preprocess" import {svelte} from "@sveltejs/vite-plugin-svelte" import {nodePolyfills} from "vite-plugin-node-polyfills" -console.log(process.env.VITE_APP_NAME) - export default defineConfig({ server: { https: false,