Skip to content

Commit

Permalink
Merge pull request #20 from beclab/feat/dependences
Browse files Browse the repository at this point in the history
feat: dependencies app install notification and fix app details dependencies install btn status update
  • Loading branch information
icebergtsn authored Jun 21, 2024
2 parents 2a3d166 + 23b4da1 commit aff3a21
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 302 deletions.
21 changes: 0 additions & 21 deletions frontend/quasar.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,27 +165,6 @@ module.exports = configure(function (/* ctx */) {
// electronPreload: 'src-electron/electron-preload'
// },

// https://v2.quasar.dev/quasar-cli-vite/developing-ssr/configuring-ssr
ssr: {
// ssrPwaHtmlFilename: 'offline.html', // do NOT use index.html as name!
// will mess up SSR

// extendSSRWebserverConf (esbuildConf) {},
// extendPackageJson (json) {},

pwa: false,

// manualStoreHydration: true,
// manualPostHydrationTrigger: true,

prodPort: 3000, // The default port that the production server should use
// (gets superseded if process.env.PORT is specified at runtime)

middlewares: [
'render' // keep this as last one
]
},

// https://v2.quasar.dev/quasar-cli-vite/developing-pwa/configuring-pwa
pwa: {
workboxMode: 'generateSW', // or 'injectManifest'
Expand Down
22 changes: 21 additions & 1 deletion frontend/src/components/appcard/InstallButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
</template>

<script lang="ts" setup>
import { computed, PropType, ref, watch } from 'vue';
import { computed, onBeforeMount, onMounted, PropType, ref, watch } from 'vue';
import { APP_STATUS, AppStoreInfo } from 'src/constants/constants';
import { useAppStore } from 'src/stores/app';
import { openApplication } from 'src/api/private/operations';
Expand All @@ -130,6 +130,7 @@ import {
canUnload,
canLoad
} from 'src/constants/config';
import { bus, BUS_EVENT } from 'src/utils/bus';
const props = defineProps({
item: {
Expand Down Expand Up @@ -293,6 +294,21 @@ async function onUnload() {
}
}
const callBack = (name) => {
if (props.item && name && name === props.item.name) {
hasCheck = false;
updateUI();
}
};
onMounted(() => {
bus.on(BUS_EVENT.UPDATE_APP_DEPENDENCIES, callBack);
});
onBeforeMount(() => {
bus.off(BUS_EVENT.UPDATE_APP_DEPENDENCIES, callBack);
});
async function onUninstall() {
if (!props.item) {
return;
Expand Down Expand Up @@ -365,6 +381,10 @@ function updateUI() {
textColor.value = ink3.value;
backgroundColor.value = grey.value;
border.value = '1px solid transparent';
if (!hasCheck && userStore.initialized) {
userStore.frontendPreflight(props.item, APP_STATUS.uninstalled);
hasCheck = true;
}
break;
case APP_STATUS.uninstalled:
status.value = t('app.get');
Expand Down
118 changes: 0 additions & 118 deletions frontend/src/css/github-dark.css

This file was deleted.

118 changes: 0 additions & 118 deletions frontend/src/css/github.css

This file was deleted.

Loading

0 comments on commit aff3a21

Please sign in to comment.