This repository was archived by the owner on Aug 27, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import type { Profiles } from 'unidata.js';
77
88export interface Settings {
99 syncing : boolean | string ;
10+ notesShowCSSCOnly : boolean ;
1011 address ?: string ;
1112 handle ?: string ;
1213}
@@ -17,6 +18,7 @@ export const getSettings = async (): Promise<Settings> =>
1718 Object . assign (
1819 {
1920 syncing : true ,
21+ notesShowCSSCOnly : true ,
2022 } ,
2123 await bucket . get ( ) ,
2224 ) ;
@@ -58,6 +60,7 @@ export const store = createStore<State>({
5860 state . characters = undefined ;
5961 state . settings = {
6062 syncing : true ,
63+ notesShowCSSCOnly : true ,
6164 } ;
6265 await bucket . clear ( ) ;
6366 } ,
Original file line number Diff line number Diff line change @@ -62,6 +62,11 @@ const load = async () => {
6262 identity: store .state .settings .handle ! ,
6363 platform: ' Crossbell' ,
6464 source: ' Crossbell Note' ,
65+ ... (store .state .settings .notesShowCSSCOnly && {
66+ filter: {
67+ applications: [' CrossSync' ],
68+ },
69+ }),
6570 cursor ,
6671 });
6772 notes .value = notes .value .concat (result ?.list || []);
Original file line number Diff line number Diff line change 2727 </div >
2828 </div >
2929 </el-card >
30+ <el-card shadow =" hover" class =" cursor-pointer" >
31+ <div class =" flex flex-row" style =" justify-content : space-between " >
32+ <div class =" flex" >Show CrossSync notes only</div >
33+ <div class =" flex" >
34+ <el-switch class =" switch h-6" v-model =" isNotesCSSCOnly" @change =" setNotesCSSCOnly" />
35+ </div >
36+ </div >
37+ </el-card >
3038 </el-col >
3139 </div >
3240 </div >
@@ -42,6 +50,7 @@ const router = useRouter();
4250const store = useStore ();
4351
4452const isSyncing = ref (store .state .settings .syncing && !! store .state .settings .handle );
53+ const isNotesCSSCOnly = ref (store .state .settings .notesShowCSSCOnly );
4554
4655if (store .state .settings .address ) {
4756 if (! store .state .characters ?.list .length ) {
@@ -68,8 +77,15 @@ const setSyncing = async () => {
6877 });
6978};
7079
80+ const setNotesCSSCOnly = async () => {
81+ await store .dispatch (' setSettings' , {
82+ notesShowCSSCOnly: isNotesCSSCOnly .value ,
83+ });
84+ };
85+
7186watchEffect (() => {
7287 isSyncing .value = store .state .settings .syncing && !! store .state .settings .handle ;
88+ isNotesCSSCOnly .value = store .state .settings .notesShowCSSCOnly ;
7389});
7490 </script >
7591
You can’t perform that action at this time.
0 commit comments