From aaf5de2f433bde82d1b9b0220f813bc75e75bf12 Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 15 Mar 2024 16:52:00 +0100 Subject: [PATCH] Remove test app --- www/sidebar/app-sidebar.less | 23 -------- www/sidebar/index.html | 21 ------- www/sidebar/inner.html | 22 ------- www/sidebar/inner.js | 111 ----------------------------------- www/sidebar/main.js | 32 ---------- 5 files changed, 209 deletions(-) delete mode 100644 www/sidebar/app-sidebar.less delete mode 100644 www/sidebar/index.html delete mode 100644 www/sidebar/inner.html delete mode 100644 www/sidebar/inner.js delete mode 100644 www/sidebar/main.js diff --git a/www/sidebar/app-sidebar.less b/www/sidebar/app-sidebar.less deleted file mode 100644 index 7503eb430..000000000 --- a/www/sidebar/app-sidebar.less +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023 XWiki CryptPad Team and contributors - * - * SPDX-License-Identifier: AGPL-3.0-or-later - */ - -@import (reference) '../../customize/src/less2/include/sidebar-layout.less'; -@import (reference) "../../customize/src/less2/include/limit-bar.less"; -@import (reference) "../../customize/src/less2/include/creation.less"; -@import (reference) '../../customize/src/less2/include/framework.less'; -@import (reference) '../../customize/src/less2/include/export.less'; - -&.cp-app-sidebar { - .framework_min_main(); - .sidebar-layout_main(); - .limit-bar_main(); - .creation_main(); - - display: flex; - flex-flow: column; - font: @colortheme_app-font; -} - diff --git a/www/sidebar/index.html b/www/sidebar/index.html deleted file mode 100644 index c8c6384bb..000000000 --- a/www/sidebar/index.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - CryptPad - - - - - - - - - - - diff --git a/www/sidebar/inner.html b/www/sidebar/inner.html deleted file mode 100644 index a04a8b1f4..000000000 --- a/www/sidebar/inner.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - -
-
- - diff --git a/www/sidebar/inner.js b/www/sidebar/inner.js deleted file mode 100644 index c596d2e37..000000000 --- a/www/sidebar/inner.js +++ /dev/null @@ -1,111 +0,0 @@ -// SPDX-FileCopyrightText: 2023 XWiki CryptPad Team and contributors -// -// SPDX-License-Identifier: AGPL-3.0-or-later - -define([ - 'jquery', - '/common/toolbar.js', - '/components/nthen/index.js', - '/common/sframe-common.js', - '/common/common-interface.js', - '/common/common-ui-elements.js', - '/common/common-util.js', - '/common/common-hash.js', - '/common/inner/sidebar-layout.js', - '/customize/messages.js', - '/common/hyperscript.js', - '/customize/application_config.js', - '/api/config', - - 'css!/components/bootstrap/dist/css/bootstrap.min.css', - 'css!/components/components-font-awesome/css/font-awesome.min.css', - 'less!/sidebar/app-sidebar.less', -], function( - $, - Toolbar, - nThen, - SFCommon, - UI, - UIElements, - Util, - Hash, - Sidebar, - Messages, - h, - AppConfig, - ApiConfig, -) { - var APP = window.APP = {}; - - var common; - var metadataMgr; - var privateData; - var sframeChan; - - var andThen = function (common, $container) { - const sidebar = Sidebar.create(common, 'sidebar', $container); - var categories = { - 'users': { - icon: 'fa fa-users', - content: [ - 'invitations', - 'directory' - ] - }, - 'test': { - icon: 'fa fa-bell', - content: [ - ] - }, - 'click': { - icon: 'fa fa-file', - onClick: () => { - common.openUnsafeURL('https://cryptpad.fr'); - } - } - }; - - const blocks = sidebar.blocks; - sidebar.addItem('invitations', function (cb) { - var input = h('input', {type:'number'}); - var label = blocks.labelledInput('Test Input label', input); - var button = blocks.button('secondary', 'fa-question', "My Button text"); - var content = blocks.form(label, blocks.nav(button)); - cb(content); - }); - - sidebar.makeLeftside(categories); - }; - - - nThen(function(waitFor) { - $(waitFor(UI.addLoadingScreen)); - SFCommon.create(waitFor(function(c) { APP.common = common = c; })); - }).nThen(function(waitFor) { - APP.$container = $('#cp-sidebarlayout-container'); - APP.$toolbar = $('#cp-toolbar'); - sframeChan = common.getSframeChannel(); - sframeChan.onReady(waitFor()); - }).nThen(function( /*waitFor*/ ) { - metadataMgr = common.getMetadataMgr(); - privateData = metadataMgr.getPrivateData(); - - // Toolbar - var displayed = ['useradmin', 'newpad', 'limit', 'pageTitle', 'notifications']; - var configTb = { - displayed: displayed, - sfCommon: common, - $container: APP.$toolbar, - pageTitle: 'TEST SIDEBAR', - metadataMgr: common.getMetadataMgr(), - }; - APP.toolbar = Toolbar.create(configTb); - APP.toolbar.$rightside.hide(); - - // Content - andThen(common, APP.$container); - - common.setTabTitle(Messages.settings_title); - UI.removeLoadingScreen(); - }); -}); diff --git a/www/sidebar/main.js b/www/sidebar/main.js deleted file mode 100644 index 1a7142112..000000000 --- a/www/sidebar/main.js +++ /dev/null @@ -1,32 +0,0 @@ -// SPDX-FileCopyrightText: 2023 XWiki CryptPad Team and contributors -// -// SPDX-License-Identifier: AGPL-3.0-or-later - -// Load #1, load as little as possible because we are in a race to get the loading screen up. -define([ - '/components/nthen/index.js', - '/api/config', - '/common/dom-ready.js', - '/common/sframe-common-outer.js' -], function (nThen, ApiConfig, DomReady, SFCommonO) { - - // Loaded in load #2 - nThen(function (waitFor) { - DomReady.onReady(waitFor()); - }).nThen(function (waitFor) { - SFCommonO.initIframe(waitFor); - }).nThen(function (/*waitFor*/) { - var category; - if (window.location.hash) { - category = window.location.hash.slice(1); - window.location.hash = ''; - } - var addData = function (obj, Cryptpad, user, Utils) { - if (category) { obj.category = category; } - }; - SFCommonO.start({ - noRealtime: true, - addData: addData - }); - }); -});