Skip to content

Commit 7208f5c

Browse files
authored
Merge pull request #1967 from jonboiser/remove-scratchpad
Remove scratchpad code from manage, learn, user plugins
2 parents ff58749 + 8d4b971 commit 7208f5c

File tree

12 files changed

+2
-91
lines changed

12 files changed

+2
-91
lines changed

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ rules:
2323
vue/html-quotes: [2, 'double']
2424
vue/order-in-components: 2
2525
# ignores the 'kolibri.*' imports
26-
import/no-unresolved: [2, { ignore: ['kolibri\.'] }]
26+
import/no-unresolved: [2, { ignore: ['kolibri[_.]'] }]

kolibri/plugins/learn/assets/src/app.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,6 @@ class LearnModule extends KolibriModule {
3838
actions.redirectToChannelSearch(store);
3939
},
4040
},
41-
{
42-
name: PageNames.SCRATCHPAD,
43-
path: '/scratchpad',
44-
handler: (toRoute, fromRoute) => {
45-
actions.showScratchpad(store);
46-
},
47-
},
4841
{
4942
name: PageNames.CONTENT_UNAVAILABLE,
5043
path: '/content-unavailable',

kolibri/plugins/learn/assets/src/constants.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const PageNames = {
77
LEARN_ROOT: 'LEARN_ROOT',
88
LEARN_CHANNEL: 'LEARN_CHANNEL',
99
LEARN_CONTENT: 'LEARN_CONTENT',
10-
SCRATCHPAD: 'SCRATCHPAD',
1110
CONTENT_UNAVAILABLE: 'CONTENT_UNAVAILABLE',
1211
SEARCH_ROOT: 'SEARCH_ROOT',
1312
SEARCH: 'SEARCH',

kolibri/plugins/learn/assets/src/state/actions.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -463,14 +463,6 @@ function clearSearch(store) {
463463
});
464464
}
465465

466-
function showScratchpad(store) {
467-
store.dispatch('SET_PAGE_NAME', PageNames.SCRATCHPAD);
468-
store.dispatch('SET_PAGE_STATE', {});
469-
store.dispatch('CORE_SET_PAGE_LOADING', false);
470-
store.dispatch('CORE_SET_ERROR', null);
471-
store.dispatch('CORE_SET_TITLE', 'Scratchpad');
472-
}
473-
474466
function showContentUnavailable(store) {
475467
store.dispatch('SET_PAGE_NAME', PageNames.CONTENT_UNAVAILABLE);
476468
store.dispatch('SET_PAGE_STATE', {});
@@ -807,7 +799,6 @@ export {
807799
showExploreContent,
808800
showLearnChannel,
809801
showLearnContent,
810-
showScratchpad,
811802
showContentUnavailable,
812803
triggerSearch,
813804
clearSearch,

kolibri/plugins/learn/assets/src/views/index.vue

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
import explorePage from './explore-page';
5757
import contentPage from './content-page';
5858
import learnPage from './learn-page';
59-
import scratchpadPage from './scratchpad-page';
6059
import contentUnavailablePage from './content-unavailable-page';
6160
import coreBase from 'kolibri.coreVue.components.coreBase';
6261
import channelSwitcher from './channel-switcher';
@@ -81,7 +80,6 @@
8180
explorePage,
8281
contentPage,
8382
learnPage,
84-
scratchpadPage,
8583
contentUnavailablePage,
8684
coreBase,
8785
channelSwitcher,
@@ -147,9 +145,6 @@
147145
if (this.pageName === PageNames.LEARN_CHANNEL) {
148146
return 'learn-page';
149147
}
150-
if (this.pageName === PageNames.SCRATCHPAD) {
151-
return 'scratchpad-page';
152-
}
153148
if (this.pageName === PageNames.CONTENT_UNAVAILABLE) {
154149
return 'content-unavailable-page';
155150
}

kolibri/plugins/learn/assets/src/views/scratchpad-page/index.vue

Lines changed: 0 additions & 22 deletions
This file was deleted.

kolibri/plugins/management/assets/src/app.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,6 @@ class ManagementModule extends KolibriModule {
6262
actions.showFacilityConfigPage(store);
6363
},
6464
},
65-
{
66-
name: PageNames.SCRATCHPAD,
67-
path: '/scratchpad',
68-
handler: (toRoute, fromRoute) => {
69-
actions.showScratchpad(store);
70-
},
71-
},
7265
{
7366
path: '/',
7467
redirect: '/classes',

kolibri/plugins/management/assets/src/constants.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const PageNames = {
66
USER_MGMT_PAGE: 'USER_MGMT_PAGE',
77
CONTENT_MGMT_PAGE: 'CONTENT_MGMT_PAGE',
88
DATA_EXPORT_PAGE: 'DATA_EXPORT_PAGE',
9-
SCRATCHPAD: 'SCRATCHPAD',
109
FACILITY_CONFIG_PAGE: 'FACILITY_CONFIG_PAGE',
1110
};
1211

@@ -17,7 +16,6 @@ const Modals = {
1716
EDIT_CLASS_NAME: 'EDIT_CLASS_NAME',
1817
REMOVE_USER: 'REMOVE_USER',
1918
CONFIRM_ENROLLMENT: 'CONFIRM_ENROLLMENT',
20-
2119
CREATE_USER: 'CREATE_USER',
2220
EDIT_USER: 'EDIT_USER',
2321
};

kolibri/plugins/management/assets/src/state/actions.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -678,15 +678,6 @@ function showDataPage(store) {
678678
store.dispatch('SET_PAGE_STATE', {});
679679
}
680680

681-
function showScratchpad(store) {
682-
preparePage(store.dispatch, {
683-
name: PageNames.DATA_EXPORT_PAGE,
684-
title: _managePageTitle('Scratchpad'),
685-
isAsync: false,
686-
});
687-
store.dispatch('SET_PAGE_STATE', {});
688-
}
689-
690681
export {
691682
displayModal,
692683
createClass,
@@ -718,5 +709,4 @@ export {
718709
triggerRemoteContentImportTask,
719710
updateWizardLocalDriveList,
720711
showDataPage,
721-
showScratchpad,
722712
};

kolibri/plugins/management/assets/src/views/index.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
[PageNames.CONTENT_MGMT_PAGE]: 'manage-content-page',
3030
[PageNames.DATA_EXPORT_PAGE]: 'data-page',
3131
[PageNames.FACILITY_CONFIG_PAGE]: 'facilities-config-page',
32-
[PageNames.SCRATCHPAD]: 'scratchpad-page',
3332
[PageNames.USER_MGMT_PAGE]: 'user-page',
3433
};
3534
import authMessage from 'kolibri.coreVue.components.authMessage';
@@ -40,7 +39,6 @@
4039
import facilitiesConfigPage from './facilities-config-page';
4140
import manageClassPage from './manage-class-page';
4241
import manageContentPage from './manage-content-page';
43-
import scratchpadPage from './scratchpad-page';
4442
import topNav from './top-nav';
4543
import userPage from './user-page';
4644
export default {
@@ -55,7 +53,6 @@
5553
facilitiesConfigPage,
5654
manageClassPage,
5755
manageContentPage,
58-
scratchpadPage,
5956
topNav,
6057
userPage,
6158
},

0 commit comments

Comments
 (0)