Spaces:
Paused
Paused
ML Intern deploy
Deploy httpSMS gateway to Hugging Face Spaces (Docker SDK): nginx :7860 -> Go API :8000, Nuxt SPA, Android APK, bootstrap-mode entrypoint
83a59ca Download web/app/stores/app.ts from red-kit/httpsms-gateway: direct link, hf CLI and curl.
- Browser
- Download file 972 Bytes
-
https://huggingface.co/spaces/red-kit/httpsms-gateway/resolve/main/web/app/stores/app.ts
- Command line
-
hf download hf://spaces/red-kit/httpsms-gateway/web/app/stores/app.ts
-
curl -L -o app.ts https://huggingface.co/spaces/red-kit/httpsms-gateway/resolve/main/web/app/stores/app.ts
972 Bytes
| import { defineStore } from 'pinia' | |
| export interface AppData { | |
| url: string | |
| name: string | |
| env: string | |
| appDownloadUrl: string | |
| documentationUrl: string | |
| githubUrl: string | |
| } | |
| export const useAppStore = defineStore('app', () => { | |
| const config = useRuntimeConfig() | |
| const polling = ref(false) | |
| const appData = computed<AppData>(() => { | |
| const publicConfig = config.public | |
| let url = publicConfig.appUrl || '' | |
| if (url.endsWith('/')) { | |
| url = url.substring(0, url.length - 1) | |
| } | |
| return { | |
| url, | |
| env: publicConfig.appEnv, | |
| appDownloadUrl: publicConfig.appDownloadUrl, | |
| documentationUrl: publicConfig.appDocumentationUrl, | |
| githubUrl: publicConfig.appGithubUrl, | |
| name: publicConfig.appName, | |
| } | |
| }) | |
| const isLocal = computed(() => config.public.appEnv === 'local') | |
| function setPolling(value: boolean) { | |
| polling.value = value | |
| } | |
| return { | |
| polling, | |
| appData, | |
| isLocal, | |
| setPolling, | |
| } | |
| }) | |