+ {{ $tr('resourcesCount', {count: node.resource_count || 0}) }}
-
-
-
-
- info
-
-
-
- keyboard_arrow_right
-
-
+
+ {{ node.description }}
-
-
-
-
-
+
+
+
+
+
+
+
+ info
+
+
+
+ keyboard_arrow_right
+
+
+
+
+
+
+
-
-
-
- assignment
-
-
-
-
- {{ $tr("cancel") }}
-
-
- {{ $tr("moveHere") }}
-
-
+
+
+
+
+ {{ $tr("cancel") }}
+
+
+ {{ $tr("moveHere") }}
+
+
-
-
-
+
+
+
+
+
diff --git a/contentcuration/contentcuration/frontend/shared/views/OfflineText.vue b/contentcuration/contentcuration/frontend/shared/views/OfflineText.vue
new file mode 100644
index 0000000000..aa5926afc0
--- /dev/null
+++ b/contentcuration/contentcuration/frontend/shared/views/OfflineText.vue
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+ cloud_off
+
+
+ {{ $tr('offlineIndicatorText') }}
+
+
+
+ {{ $tr('offlineText') }}
+
+
+
+ cloud_off
+
+ {{ $tr('offlineText') }}
+
+
+
+ cloud_off
+
+ {{ $tr('offlineText') }}
+
+
+
+
+
+
+
+
diff --git a/contentcuration/contentcuration/frontend/shared/views/__tests__/offlineText.spec.js b/contentcuration/contentcuration/frontend/shared/views/__tests__/offlineText.spec.js
new file mode 100644
index 0000000000..7fa0046ae1
--- /dev/null
+++ b/contentcuration/contentcuration/frontend/shared/views/__tests__/offlineText.spec.js
@@ -0,0 +1,25 @@
+import { mount } from '@vue/test-utils';
+import OfflineText from '../OfflineText';
+import storeFactory from 'shared/vuex/baseStore';
+
+const store = storeFactory();
+function makeWrapper() {
+ return mount(OfflineText, {
+ store,
+ });
+}
+
+describe('offlineText', () => {
+ let wrapper;
+ beforeEach(() => {
+ wrapper = makeWrapper();
+ });
+ it('should show if connection is offline', () => {
+ store.state.connection.online = false;
+ expect(wrapper.find('[data-test="text"]').exists()).toBe(true);
+ });
+ it('should be hidden if connection is online', () => {
+ store.state.connection.online = true;
+ expect(wrapper.find('[data-test="text"]').exists()).toBe(false);
+ });
+});
diff --git a/contentcuration/contentcuration/frontend/shared/views/channel/ChannelDetailsModal.vue b/contentcuration/contentcuration/frontend/shared/views/channel/ChannelDetailsModal.vue
index d4b68d4679..6f34c7f304 100644
--- a/contentcuration/contentcuration/frontend/shared/views/channel/ChannelDetailsModal.vue
+++ b/contentcuration/contentcuration/frontend/shared/views/channel/ChannelDetailsModal.vue
@@ -1,59 +1,42 @@
-
-
-
-
-
- clear
-
-
-
- {{ channel.name }}
-
-
-
-
-
-
-
-
-
-
- {{ $tr('downloadButton') }}
-
- arrow_drop_down
-
-
-
-
- {{ $tr('downloadPDF') }}
-
-
- {{ $tr('downloadCSV') }}
-
-
-
-
-
-
-
-
-
+
+ {{ channel.name }}
+
+
+
+
+
+
+
+
+ {{ $tr('downloadButton') }}
+
+ arrow_drop_down
+
+
+
+
+ {{ $tr('downloadPDF') }}
+
+
+ {{ $tr('downloadCSV') }}
+
+
+
+
+
+
+
@@ -64,12 +47,14 @@
import Details from 'shared/views/details/Details';
import { fileSizeMixin, constantsTranslationMixin, routerMixin } from 'shared/mixins';
import LoadingText from 'shared/views/LoadingText';
+ import FullscreenModal from 'shared/views/FullscreenModal';
export default {
name: 'ChannelDetailsModal',
components: {
Details,
LoadingText,
+ FullscreenModal,
},
mixins: [fileSizeMixin, constantsTranslationMixin, routerMixin, channelExportMixin],
props: {
@@ -86,6 +71,16 @@
},
computed: {
...mapGetters('channel', ['getChannel']),
+ dialog: {
+ get() {
+ return this.channelId && this.routeParamID === this.channelId;
+ },
+ set(value) {
+ if (!value) {
+ this.$router.push(this.backLink);
+ }
+ },
+ },
channel() {
return this.getChannel(this.channelId);
},
@@ -109,11 +104,6 @@
return this.$route.params.channelId;
},
},
- watch: {
- routeParamID(val) {
- this.hideHTMLScroll(!!val);
- },
- },
beforeRouteEnter(to, from, next) {
next(vm => {
if (vm.channel) {
@@ -124,7 +114,6 @@
},
mounted() {
this.load();
- this.hideHTMLScroll(true);
},
methods: {
...mapActions('channel', ['loadChannel', 'loadChannelDetails']),
@@ -156,11 +145,6 @@
this.loadError = true;
});
},
- hideHTMLScroll(hidden) {
- document.querySelector('html').style = hidden
- ? 'overflow-y: hidden !important;'
- : 'overflow-y: auto !important';
- },
},
$trs: {
downloadButton: 'Download channel summary',
@@ -184,13 +168,6 @@
color: gray;
}
- .channel-wrapper {
- overflow-y: auto;
- .v-card__text {
- padding-top: 72px;
- }
- }
-
.channel-details-wrapper {
max-width: 900px;
padding-bottom: 100px;
diff --git a/contentcuration/contentcuration/frontend/shared/views/channel/ChannelModal.vue b/contentcuration/contentcuration/frontend/shared/views/channel/ChannelModal.vue
index 0c00e83e9a..78104167e3 100644
--- a/contentcuration/contentcuration/frontend/shared/views/channel/ChannelModal.vue
+++ b/contentcuration/contentcuration/frontend/shared/views/channel/ChannelModal.vue
@@ -1,125 +1,90 @@
-
-
-
-
-
- clear
-
-
-
-
- {{ $tr('creatingHeader') }}
-
-
- {{ header }}
-
-
-
-
- {{ isNew? $tr('createButton') : $tr('saveChangesButton' ) }}
-
-
-
-
- {{ $tr('editTab') }}
-
-
- {{ $tr('shareTab') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ {{ isNew? $tr('createButton') : $tr('saveChangesButton' ) }}
+
+
+
+
+ {{ $tr('editTab') }}
+
+
+ {{ $tr('shareTab') }}
+
+
+
+
+
+
+
+
+
-
-
-
- {{ $tr('closeButton') }}
-
-
- {{ $tr('keepEditingButton') }}
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+ {{ $tr('closeButton') }}
+
+
+ {{ $tr('keepEditingButton') }}
+
+
+
+
@@ -134,6 +99,7 @@
import MessageDialog from 'shared/views/MessageDialog';
import LanguageDropdown from 'shared/views/LanguageDropdown';
import ContentDefaults from 'shared/views/form/ContentDefaults';
+ import FullscreenModal from 'shared/views/FullscreenModal';
export default {
name: 'ChannelModal',
@@ -143,6 +109,7 @@
ChannelThumbnail,
ChannelSharing,
MessageDialog,
+ FullscreenModal,
},
props: {
channelId: {
@@ -170,9 +137,21 @@
routeParamID() {
return this.$route.params.channelId;
},
+ dialog: {
+ get() {
+ return this.channelId && this.routeParamID === this.channelId;
+ },
+ set(value) {
+ if (!value) {
+ this.cancelChanges();
+ }
+ },
+ },
currentTab: {
get() {
- return this.$route.query.sharing ? 'share' : 'edit';
+ const sharing = this.$route.query.sharing;
+ // On load, sharing counts as string, so just process as if a string
+ return sharing && sharing.toString() === 'true' ? 'share' : 'edit';
},
set(value) {
this.$router.replace({
@@ -233,18 +212,12 @@
},
},
},
- watch: {
- routeParamID(val) {
- this.hideHTMLScroll(!!val);
- },
- },
beforeRouteEnter(to, from, next) {
next(vm => {
const channelId = to.params.channelId;
vm.verifyChannel(channelId)
.then(() => {
vm.header = vm.channel.name; // Get channel name when user enters modal
- vm.hideHTMLScroll(true);
})
.catch(() => {
// Couldn't verify the channel details, so go back!
@@ -256,20 +229,11 @@
});
},
mounted() {
- // For some reason the 'hideScroll' method of the VDialog is not
- // being called the first time the dialog is opened, so do that explicitly
- this.$refs.dialog.hideScroll();
-
// Set expiry to 1ms
this.header = this.channel.name; // Get channel name when user enters modal
},
methods: {
...mapActions('channel', ['updateChannel', 'loadChannel', 'deleteChannel', 'commitChannel']),
- hideHTMLScroll(hidden) {
- document.querySelector('html').style = hidden
- ? 'overflow-y: hidden !important;'
- : 'overflow-y: auto !important';
- },
saveChannel() {
if (this.$refs.detailsform.validate()) {
this.changed = false;