Skip to content

Commit

Permalink
rename store
Browse files Browse the repository at this point in the history
  • Loading branch information
zippy committed Nov 30, 2023
1 parent 6b388b4 commit 1e5f8b8
Show file tree
Hide file tree
Showing 19 changed files with 179 additions and 113 deletions.
196 changes: 131 additions & 65 deletions Cargo.lock

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ui/src/AboutDialog.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import '@shoelace-style/shoelace/dist/components/dialog/dialog.js';
import { faFileImport } from '@fortawesome/free-solid-svg-icons';
import Fa from 'svelte-fa';
import type { KanDoStore } from "./kanDoStore";
import type { KanDoStore } from "./store";
import { v1 as uuidv1 } from "uuid";
const { getStore } :any = getContext('kdStore');
const { getStore } :any = getContext('store');
const store:KanDoStore = getStore();
Expand Down
4 changes: 2 additions & 2 deletions ui/src/Avatar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import { encodeHashToBase64, type AgentPubKey } from "@holochain/client";
import "@holochain-open-dev/profiles/dist/elements/agent-avatar.js";
import { getContext } from "svelte";
import type { KanDoStore } from "./kanDoStore";
import type { KanDoStore } from "./store";
import { faUser } from "@fortawesome/free-solid-svg-icons";
import Fa from "svelte-fa";
const { getStore } :any = getContext("kdStore");
const { getStore } :any = getContext("store");
let store: KanDoStore = getStore();
export let agentPubKey: AgentPubKey
Expand Down
4 changes: 2 additions & 2 deletions ui/src/BoardEditor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
import Fa from 'svelte-fa'
import { faPlus, faGripVertical, faTrash, faFileExport} from '@fortawesome/free-solid-svg-icons';
import { cloneDeep } from "lodash";
import type { KanDoStore } from './kanDoStore';
import type { KanDoStore } from './store';
import { encodeHashToBase64, type EntryHash } from '@holochain/client';
const { getStore } :any = getContext('kdStore');
const { getStore } :any = getContext('store');
const store:KanDoStore = getStore();
$: uiProps = store.uiProps
Expand Down
4 changes: 2 additions & 2 deletions ui/src/BoardMenu.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { getContext } from "svelte";
import type { KanDoStore } from "./kanDoStore";
import type { KanDoStore } from "./store";
import type { EntryHash } from '@holochain/client';
import NewBoardDialog from './NewBoardDialog.svelte';
import { faSquarePlus } from '@fortawesome/free-solid-svg-icons';
Expand All @@ -14,7 +14,7 @@
let newBoardDialog
const { getStore } :any = getContext('kdStore');
const { getStore } :any = getContext('store');
const store:KanDoStore = getStore();
Expand Down
4 changes: 2 additions & 2 deletions ui/src/BoardMenuItem.svelte
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script lang="ts">
import { createEventDispatcher, getContext } from "svelte";
import type { KanDoStore } from "./kanDoStore";
import type { KanDoStore } from "./store";
import type { EntryHash } from "@holochain/client";
import "@shoelace-style/shoelace/dist/components/skeleton/skeleton.js";
import Participants from "./Participants.svelte";
import { BoardType } from "./boardList";
const dispatch = createEventDispatcher()
const { getStore } :any = getContext("kdStore");
const { getStore } :any = getContext("store");
let store: KanDoStore = getStore();
export let boardHash: EntryHash
Expand Down
4 changes: 2 additions & 2 deletions ui/src/CardDetails.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { cloneDeep, isEqual } from "lodash";
import { v1 as uuidv1 } from "uuid";
import { getContext } from 'svelte';
import type { KanDoStore } from './kanDoStore';
import type { KanDoStore } from './store';
import Avatar from './Avatar.svelte';
import { decodeHashFromBase64, encodeHashToBase64 } from '@holochain/client';
import { faEdit, faTrash, faPlus, faArchive, faClose, faPaperPlane, faCancel } from '@fortawesome/free-solid-svg-icons';
Expand All @@ -31,7 +31,7 @@
smartypants: false
});
const { getStore } :any = getContext("kdStore");
const { getStore } :any = getContext("store");
let store: KanDoStore = getStore();
$: activeBoard = store.boardList.activeBoard;
$: state = $activeBoard.readableState()
Expand Down
4 changes: 2 additions & 2 deletions ui/src/CardEditor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
import { cloneDeep } from "lodash";
import type { v1 as uuidv1 } from "uuid";
import { getContext } from "svelte";
import type { KanDoStore } from "./kanDoStore";
import type { KanDoStore } from "./store";
import { encodeHashToBase64 } from "@holochain/client";
const { getStore } :any = getContext("kdStore");
const { getStore } :any = getContext("store");
let store: KanDoStore = getStore();
$: allProfiles = store.profilesStore.allProfiles
Expand Down
4 changes: 2 additions & 2 deletions ui/src/Controller.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import Toolbar from './Toolbar.svelte'
import KanDoPane from './KanDoPane.svelte'
import { KanDoStore } from './kanDoStore'
import { KanDoStore } from './store'
import { setContext } from 'svelte';
import type { AppAgentClient } from '@holochain/client';
import type { SynStore } from '@holochain-syn/store';
Expand All @@ -26,7 +26,7 @@
getStore: () => synStore,
});
setContext('kdStore', {
setContext('store', {
getStore: () => store,
});
const DEFAULT_KD_BG_IMG = "none"
Expand Down
4 changes: 2 additions & 2 deletions ui/src/EditBoardDialog.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import BoardEditor from './BoardEditor.svelte';
import type { KanDoStore } from './kanDoStore';
import type { KanDoStore } from './store';
import { getContext, onMount } from 'svelte';
import { isEqual } from 'lodash'
import { encodeHashToBase64, type EntryHash, type EntryHashB64 } from '@holochain/client';
Expand All @@ -23,7 +23,7 @@
dialog.show()
}
const { getStore } :any = getContext('kdStore');
const { getStore } :any = getContext('store');
const store:KanDoStore = getStore();
Expand Down
4 changes: 2 additions & 2 deletions ui/src/Folk.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import ParticipantsDialog from './ParticipantsDialog.svelte';
import AvatarDialog from './AvatarDialog.svelte';
import { getContext, onMount } from "svelte";
import type { KanDoStore } from "./kanDoStore";
import type { KanDoStore } from "./store";
import Avatar from './Avatar.svelte';
import { get } from 'svelte/store';
import Fa from 'svelte-fa'
import { faUserGroup } from '@fortawesome/free-solid-svg-icons';
import { isWeContext } from '@lightningrodlabs/we-applet';
const { getStore } :any = getContext('kdStore');
const { getStore } :any = getContext('store');
const store:KanDoStore = getStore();
//@ts-ignore
$: myProfile = get(store.profilesStore.myProfile).value
Expand Down
4 changes: 2 additions & 2 deletions ui/src/KanDoPane.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import CardDetails from "./CardDetails.svelte";
import EmojiIcon from "./icons/EmojiIcon.svelte";
//import { sortBy } from "lodash/fp";
import type { KanDoStore } from "./kanDoStore";
import type { KanDoStore } from "./store";
import LabelSelector from "./LabelSelector.svelte";
import { Marked, Renderer } from "@ts-stack/markdown";
import { v1 as uuidv1 } from "uuid";
Expand Down Expand Up @@ -44,7 +44,7 @@
filterOption = newOption;
}
const { getStore } :any = getContext("kdStore");
const { getStore } :any = getContext("store");
let store: KanDoStore = getStore();
export let activeBoard: Board
Expand Down
4 changes: 2 additions & 2 deletions ui/src/LabelSelector.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import EmojiIcon from './icons/EmojiIcon.svelte'
import { getContext } from "svelte";
import type { KanDoStore } from "./kanDoStore";
import type { KanDoStore } from "./store";
export let setOption
export let option
Expand All @@ -13,7 +13,7 @@
setOption(o)
}
}
const { getStore } :any = getContext("kdStore");
const { getStore } :any = getContext("store");
let store: KanDoStore = getStore();
$: activeBoard = store.boardList.activeBoard;
Expand Down
4 changes: 2 additions & 2 deletions ui/src/NewBoardDialog.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import BoardEditor from './BoardEditor.svelte';
import type { KanDoStore } from './kanDoStore';
import type { KanDoStore } from './store';
import { getContext } from 'svelte';
import type { BoardProps, CategoryDef, Group, LabelDef } from './board';
import '@shoelace-style/shoelace/dist/components/dialog/dialog.js';
Expand All @@ -11,7 +11,7 @@
let editCategoryDefs = []
let dialog: SlDialog
const { getStore } :any = getContext('kdStore');
const { getStore } :any = getContext('store');
const store:KanDoStore = getStore();
Expand Down
4 changes: 2 additions & 2 deletions ui/src/ParticipantsDialog.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import "@shoelace-style/shoelace/dist/components/skeleton/skeleton.js";
import '@shoelace-style/shoelace/dist/components/dialog/dialog.js';
import { getContext } from "svelte";
import type { KanDoStore } from "./kanDoStore";
import type { KanDoStore } from "./store";
import Avatar from './Avatar.svelte';
import "@holochain-open-dev/stores/dist/debug-store.js"
const { getStore } :any = getContext('kdStore');
const { getStore } :any = getContext('store');
const store:KanDoStore = getStore();
$: agents = store.profilesStore.agentsWithProfile
Expand Down
4 changes: 2 additions & 2 deletions ui/src/Search.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import type { v1 as uuidv1 } from "uuid";
import { toPromise } from "@holochain-open-dev/stores";
import type { BoardState, BoardStateData } from "./board";
import type { KanDoStore } from "./kanDoStore";
import type { KanDoStore } from "./store";
type FoundCard = {
Expand All @@ -27,7 +27,7 @@
$: foundCards
$: foundBoards
const { getStore } :any = getContext('kdStore');
const { getStore } :any = getContext('store');
const store:KanDoStore = getStore();
$: activeHashB64 = store.boardList.activeBoardHashB64;
Expand Down
4 changes: 2 additions & 2 deletions ui/src/Toolbar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import Fa from "svelte-fa";
import Search from './Search.svelte';
import { getContext } from "svelte";
import type { KanDoStore } from "./kanDoStore";
import type { KanDoStore } from "./store";
const { getStore } :any = getContext("kdStore");
const { getStore } :any = getContext("store");
let store: KanDoStore = getStore();
$: uiProps = store.uiProps
Expand Down
File renamed without changes.

0 comments on commit 1e5f8b8

Please sign in to comment.