diff --git a/src/TableEditor.vue b/src/TableEditor.vue index a6cffeb..847b72d 100644 --- a/src/TableEditor.vue +++ b/src/TableEditor.vue @@ -1,25 +1,46 @@ + + + Back + + + http://{{ hostname }}/{{ table.table_link }} + + + {{ + isTableInactive() + ? 'inactive' + : isTableLoading() + ? 'loading' + : isTableReady() + ? 'ready' + : 'what' + }} {{ table.table_name }} - Status: - + + Status: + + - Table Status: {{tableStatus.active}} - World: {{tableStatus.world}} - Users: {{tableStatus.users}} + + Table Status: {{ foundryStatus.active }} + World: {{ foundryStatus.world }} + Users: {{ foundryStatus.users }} + - - - + + + @@ -41,10 +62,11 @@ placeholder="Table Link" v-model="tableLink" /> + - + @@ -69,36 +91,58 @@ .button-box { margin: 5px; } + +.active-foundry-stats { +} + +.inactive-foundry-stats { + display: none; +} diff --git a/src/TableManager.vue b/src/TableManager.vue index 09bf379..43bb2e5 100644 --- a/src/TableManager.vue +++ b/src/TableManager.vue @@ -11,6 +11,7 @@ import SplitButton from 'primevue/splitbutton' import ConfirmDialog from 'primevue/confirmdialog' import { useConfirm } from 'primevue/useconfirm' +const hostname = ref() const router = useRouter() const allTables = ref() const activeTables = ref() @@ -19,6 +20,7 @@ const confirm = useConfirm() onMounted(() => { activeTables.value = [] loadTables() + hostname.value = location.host }) async function loadTables(): Promise { @@ -120,7 +122,7 @@ function buildButtonModel(table: any) { - http://localhost/{{ slotProps.data.table_link }} + http://{{ hostname }}/{{ slotProps.data.table_link }} @@ -144,10 +146,10 @@ function buildButtonModel(table: any) { - http://localhost/{{ slotProps.data.table_link }} + http://{{ hostname }}/{{ slotProps.data.table_link }} - http://localhost/{{ slotProps.data.table_link }} + http://{{ hostname }}/{{ slotProps.data.table_link }}