3131 /* End of Raw API */
3232 /* Data API */
3333 simplyDataApi = {
34- // component/AppLauncher
35- "appLocation" : async function ( webID ) {
36- let preferenceOLDM = await simplyDataApi . getPreferences ( webID )
37- if (
38- preferenceOLDM . subjects [ webID ] &&
39- preferenceOLDM . subjects [ webID ] . solid$launcher
40- ) {
41- return preferenceOLDM . subjects [ webID ] . solid$launcher . id
42- } else {
43- return "https://solid-launcher.dev.muze.nl/"
44- }
45- } ,
46- // component/AppLauncher
34+ // component/solid-preferences
4735 "getPreferences" : async function ( webID ) {
4836
4937 let issuer = ""
9078 client_info : {
9179 client_name : 'Solid Bootloader' ,
9280 redirect_uris : [
93- window . location . origin + window . location . pathname
81+ window . location . origin + window . location . pathname
9482 ]
9583 } ,
9684 issuer : issuer
113101
114102 return preferenceOLDM
115103
104+ } ,
105+ // component/bootloader
106+ "appLocation" : async function ( webID ) {
107+ let preferenceOLDM = await simplyDataApi . getPreferences ( webID )
108+ if (
109+ preferenceOLDM . subjects [ webID ] &&
110+ preferenceOLDM . subjects [ webID ] . solid$launcher
111+ ) {
112+ return preferenceOLDM . subjects [ webID ] . solid$launcher . id
113+ } else {
114+ return "https://solid-launcher.dev.muze.nl/"
115+ }
116116 }
117117 } ;
118118 /* End of Data API */
119119 simplyApp = simply . app ( {
120120 /* Actions */
121121 actions : {
122- // component/AppLauncher
122+ // component/bootloader
123123 "getLauncherLocation" : async function ( webID ) {
124124 let appLauncherPath = await simplyDataApi . appLocation ( webID )
125125 return appLauncherPath
139139 /* Routes */
140140 routes : {
141141 // page/home
142- "#webID /:webID" : async function ( params ) {
142+ "#autologin /:webID" : async function ( params ) {
143143 let webID = params . webID
144144 webID = decodeURIComponent ( webID )
145145 localStorage [ 'bootloader:webID' ] = webID
146146 let appLauncherPath = await simplyApp . actions . getLauncherLocation ( webID )
147- document . location . href = appLauncherPath
147+ document . location . href = appLauncherPath + "#autologin/" + encodeURIComponent ( webID )
148148 } ,
149149 // page/home
150150 "/" : async function ( ) {
211211
212212 <!-- /Foot HTML -->
213213 </ body >
214- </ html >
214+ </ html >
0 commit comments