subpage.js 749 B

1234567891011121314151617181920
  1. import { createApp } from 'vue';
  2. import Antd, { message } from 'ant-design-vue';
  3. import 'ant-design-vue/dist/reset.css';
  4. // The sub page is served by the subscription HTTP server (sub/sub.go)
  5. // at /<linksPath>/<subId>?html=1. Go injects window.__SUB_PAGE_DATA__
  6. // with the parsed traffic/quota/expiry view-model and the rendered
  7. // share links — the SPA reads those at mount.
  8. import '@/composables/useTheme.js';
  9. import { i18n, readyI18n } from '@/i18n/index.js';
  10. import SubPage from '@/pages/sub/SubPage.vue';
  11. const messageContainer = document.getElementById('message');
  12. if (messageContainer) {
  13. message.config({ getContainer: () => messageContainer });
  14. }
  15. readyI18n().then(() => {
  16. createApp(SubPage).use(Antd).use(i18n).mount('#app');
  17. });