Add real workspace channels

This commit is contained in:
2026-05-05 13:06:57 -04:00
parent 6e658b8215
commit 244be555f9
26 changed files with 2598 additions and 128 deletions

View File

@@ -2,6 +2,7 @@
import { computed, onBeforeUnmount, reactive, watch } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { useSessionStorage } from '@vueuse/core';
import { mdiArrowLeft } from '@mdi/js';
import AppAvatar from '@/components/AppAvatar.vue';
import { useChannelsStore } from '@/features/channels/stores/channelsStore.js';
import { useClientsStore } from '@/features/clients/stores/clientsStore.js';
@@ -332,6 +333,23 @@
commentForm.body = '';
}
async function navigateBackToContent() {
const returnTo = typeof route.query.returnTo === 'string' ? route.query.returnTo : '';
const previousPath = router.options.history.state.back;
if (returnTo.startsWith('/app/content')) {
await router.push(returnTo);
return;
}
if (typeof previousPath === 'string' && previousPath.startsWith('/app/content')) {
router.back();
return;
}
await router.push({ name: 'content-items' });
}
function formatDateTime(value) {
return value ? new Date(value).toLocaleString() : '';
}
@@ -373,6 +391,15 @@
<template>
<section class="editor-shell">
<button
class="back-button"
type="button"
@click="navigateBackToContent"
>
<v-icon :icon="mdiArrowLeft" />
Back to content
</button>
<div
v-if="!isCreateMode && detailStore.isLoading"
class="page-message"
@@ -838,9 +865,22 @@
color: #172033;
}
.back-button,
.primary-button,
.secondary-button {
@apply inline-flex items-center justify-center rounded-full px-5 py-3 text-sm font-bold transition;
@apply inline-flex items-center justify-center gap-2 rounded-full px-5 py-3 text-sm font-bold transition;
}
.back-button {
@apply w-fit border;
background: rgba(255, 255, 255, 0.88);
border-color: rgba(23, 32, 51, 0.12);
color: #172033;
}
.back-button:hover {
background: #172033;
color: #fffaf2;
}
.primary-button {