@simitgroup/simpleapp-generator 2.0.0-k-alpha → 2.0.0-l-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ReleaseNote.md
CHANGED
package/package.json
CHANGED
|
@@ -20,10 +20,14 @@
|
|
|
20
20
|
* last change 2024-03-17
|
|
21
21
|
* Author: Ks Tan
|
|
22
22
|
*/
|
|
23
|
-
|
|
24
|
-
watch(()=>useRoute().
|
|
25
|
-
|
|
23
|
+
let currentXorg = getCurrentXorg()
|
|
24
|
+
watch(()=>useRoute().fullPath,async (newval,oldvalue)=>{
|
|
25
|
+
if(getCurrentXorg()!=currentXorg){
|
|
26
|
+
currentXorg = getCurrentXorg()
|
|
27
|
+
await reloadUserStore()
|
|
28
|
+
}
|
|
26
29
|
if(getPathPara('xorg','')!=''){
|
|
30
|
+
|
|
27
31
|
if(!getUserProfile()?.currentGroup) goTo('pickgroup')
|
|
28
32
|
setGraphqlServer()
|
|
29
33
|
}
|
|
@@ -21,9 +21,9 @@ export default defineNuxtPlugin(async () => {
|
|
|
21
21
|
*/
|
|
22
22
|
const MINI_APP_PAGE_PATH_PREFIX = "miniapp";
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
|
|
28
28
|
const MINI_APP_BUILT_IN_SETTING_NAME = "mini-app-setting";
|
|
29
29
|
|
|
@@ -59,7 +59,11 @@ export default defineNuxtPlugin(async () => {
|
|
|
59
59
|
});
|
|
60
60
|
});
|
|
61
61
|
},
|
|
62
|
-
|
|
62
|
+
getMiniAppManager : ()=>{
|
|
63
|
+
const config = getAxiosConfig();
|
|
64
|
+
const miniAppManager = new MINIAPPMANAGERApi(config);
|
|
65
|
+
return miniAppManager
|
|
66
|
+
},
|
|
63
67
|
showMiniAppMoreMenuButton: (state) => {
|
|
64
68
|
if (!state.permissions.hasMiniAppFeature) {
|
|
65
69
|
return false;
|
|
@@ -322,10 +326,11 @@ export default defineNuxtPlugin(async () => {
|
|
|
322
326
|
|
|
323
327
|
// ============================ Load Function ============================
|
|
324
328
|
async loadInstalledMiniApps() {
|
|
325
|
-
this.isFetchingInstalledMiniApps = true;
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
+
this.isFetchingInstalledMiniApps = true;
|
|
330
|
+
const resp = await this.getMiniAppManager
|
|
331
|
+
.runGetInstalledMiniApps({
|
|
332
|
+
|
|
333
|
+
})
|
|
329
334
|
.then((res) => {
|
|
330
335
|
return res.data;
|
|
331
336
|
})
|
|
@@ -340,7 +345,7 @@ export default defineNuxtPlugin(async () => {
|
|
|
340
345
|
},
|
|
341
346
|
|
|
342
347
|
async loadMiniAppDetail(miniAppCode: string) {
|
|
343
|
-
return await
|
|
348
|
+
return await this.getMiniAppManager
|
|
344
349
|
.runGetMiniAppDetail(miniAppCode)
|
|
345
350
|
.then((res) => {
|
|
346
351
|
return res.data;
|
|
@@ -351,7 +356,7 @@ export default defineNuxtPlugin(async () => {
|
|
|
351
356
|
},
|
|
352
357
|
|
|
353
358
|
async loadCategorizedMiniApps() {
|
|
354
|
-
return await
|
|
359
|
+
return await this.getMiniAppManager
|
|
355
360
|
.runGetCategorizedMiniApps()
|
|
356
361
|
.then((res) => {
|
|
357
362
|
return res.data;
|
|
@@ -411,7 +416,7 @@ export default defineNuxtPlugin(async () => {
|
|
|
411
416
|
// ============================ miniApp Action ============================
|
|
412
417
|
|
|
413
418
|
async installMiniApp(miniAppCode: string) {
|
|
414
|
-
const miniAppInstallation = await
|
|
419
|
+
const miniAppInstallation = await this.getMiniAppManager
|
|
415
420
|
.runInstallMiniApp(miniAppCode)
|
|
416
421
|
.then((res) => {
|
|
417
422
|
return res.data;
|
|
@@ -426,7 +431,7 @@ export default defineNuxtPlugin(async () => {
|
|
|
426
431
|
},
|
|
427
432
|
|
|
428
433
|
async uninstallMiniApp(miniAppCode: string) {
|
|
429
|
-
const miniAppInstallation = await
|
|
434
|
+
const miniAppInstallation = await this.getMiniAppManager
|
|
430
435
|
.runUninstallMiniApp(miniAppCode)
|
|
431
436
|
.then((res) => {
|
|
432
437
|
return res.data;
|
|
@@ -444,7 +449,7 @@ export default defineNuxtPlugin(async () => {
|
|
|
444
449
|
miniAppCode: string,
|
|
445
450
|
data: { [key: string]: any },
|
|
446
451
|
) {
|
|
447
|
-
const miniAppInstallation = await
|
|
452
|
+
const miniAppInstallation = await this.getMiniAppManager
|
|
448
453
|
.runUpdateMiniAppSetting(miniAppCode, data)
|
|
449
454
|
.then((res) => {
|
|
450
455
|
return res.data;
|