Move JavaScript files into subdirectories
This commit is contained in:
@@ -100,6 +100,11 @@ radicale = [
|
||||
"web/internal_data/css/main.css",
|
||||
"web/internal_data/css/icons/*.svg",
|
||||
"web/internal_data/*.js",
|
||||
"web/internal_data/js/*.js",
|
||||
"web/internal_data/js/api/*.js",
|
||||
"web/internal_data/js/models/*.js",
|
||||
"web/internal_data/js/scenes/*.js",
|
||||
"web/internal_data/js/utils/*.js",
|
||||
"web/internal_data/index.html",
|
||||
"py.typed",
|
||||
]
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<script type="module" src="main.js"></script>
|
||||
<script type="module" src="js/main.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -312,4 +312,4 @@
|
||||
</main>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { COLOR_RE, ROOT_PATH, SERVER } from "./constants.js";
|
||||
import { Collection, CollectionType } from "./models.js";
|
||||
import { escape_xml } from "./utils.js";
|
||||
import { COLOR_RE, ROOT_PATH, SERVER } from "../constants.js";
|
||||
import { Collection, CollectionType } from "../models/collection.js";
|
||||
import { escape_xml } from "../utils/misc.js";
|
||||
/**
|
||||
* @typedef {Object} SharingFeatures
|
||||
* @property {number} [ApiVersion]
|
||||
@@ -19,8 +19,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { push_scene } from "./scene_manager.js";
|
||||
import { LoginScene } from "./LoginScene.js";
|
||||
import { LoginScene } from "./scenes/LoginScene.js";
|
||||
import { push_scene } from "./scenes/scene_manager.js";
|
||||
|
||||
// Hide startup loading message
|
||||
document.getElementById("loadingscene").classList.add("hidden");
|
||||
@@ -19,16 +19,16 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { discover_server_features, get_collections } from "../api/api.js";
|
||||
import { SERVER } from "../constants.js";
|
||||
import { Collection, CollectionType } from "../models/collection.js";
|
||||
import { bytesToHumanReadable } from "../utils/misc.js";
|
||||
import { CreateEditCollectionScene } from "./CreateEditCollectionScene.js";
|
||||
import { DeleteCollectionScene } from "./DeleteCollectionScene.js";
|
||||
import { LoadingScene } from "./LoadingScene.js";
|
||||
import { Scene, pop_scene, push_scene, scene_stack } from "./scene_manager.js";
|
||||
import { ShareCollectionScene, maybe_enable_sharing_options } from "./ShareCollectionScene.js";
|
||||
import { UploadCollectionScene } from "./UploadCollectionScene.js";
|
||||
import { discover_server_features, get_collections } from "./api.js";
|
||||
import { SERVER } from "./constants.js";
|
||||
import { Collection, CollectionType } from "./models.js";
|
||||
import { Scene, pop_scene, push_scene, scene_stack } from "./scene_manager.js";
|
||||
import { bytesToHumanReadable } from "./utils.js";
|
||||
|
||||
/**
|
||||
* @implements {Scene}
|
||||
@@ -19,12 +19,12 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { create_collection, edit_collection } from "../api/api.js";
|
||||
import { COLOR_RE } from "../constants.js";
|
||||
import { Collection, CollectionType } from "../models/collection.js";
|
||||
import { cleanHREFinput, isValidHREF, onCleanHREFinput, random_hex, random_uuid } from "../utils/misc.js";
|
||||
import { LoadingScene } from "./LoadingScene.js";
|
||||
import { create_collection, edit_collection } from "./api.js";
|
||||
import { COLOR_RE } from "./constants.js";
|
||||
import { Collection, CollectionType } from "./models.js";
|
||||
import { Scene, pop_scene, push_scene, scene_stack } from "./scene_manager.js";
|
||||
import { cleanHREFinput, isValidHREF, onCleanHREFinput, random_hex, random_uuid } from "./utils.js";
|
||||
|
||||
/**
|
||||
* @implements {Scene}
|
||||
@@ -19,11 +19,11 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Scene, push_scene, pop_scene, scene_stack } from "./scene_manager.js";
|
||||
import { Collection } from "./models.js";
|
||||
import { DELETE_CONFIRMATION_TEXT } from "./constants.js";
|
||||
import { delete_collection } from "../api/api.js";
|
||||
import { DELETE_CONFIRMATION_TEXT } from "../constants.js";
|
||||
import { Collection } from "../models/collection.js";
|
||||
import { LoadingScene } from "./LoadingScene.js";
|
||||
import { delete_collection } from "./api.js";
|
||||
import { Scene, pop_scene, push_scene, scene_stack } from "./scene_manager.js";
|
||||
|
||||
/**
|
||||
* @implements {Scene}
|
||||
@@ -19,7 +19,7 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { get_principal } from "./api.js";
|
||||
import { get_principal } from "../api/api.js";
|
||||
import { CollectionsScene } from "./CollectionsScene.js";
|
||||
import { LoadingScene } from "./LoadingScene.js";
|
||||
import { Scene, pop_scene, push_scene, scene_stack } from "./scene_manager.js";
|
||||
@@ -19,9 +19,9 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { add_share_by_map, add_share_by_token } from "./api.js";
|
||||
import { add_share_by_map, add_share_by_token } from "../api/api.js";
|
||||
import { onCleanHREFinput } from "../utils/misc.js";
|
||||
import { Scene, pop_scene, scene_stack } from "./scene_manager.js";
|
||||
import { onCleanHREFinput } from "./utils.js";
|
||||
|
||||
/**
|
||||
* @implements {Scene}
|
||||
@@ -24,8 +24,8 @@ import {
|
||||
delete_share_by_token,
|
||||
reload_sharing_list,
|
||||
server_features,
|
||||
} from "./api.js";
|
||||
import { Collection } from "./models.js";
|
||||
} from "../api/api.js";
|
||||
import { Collection } from "../models/collection.js";
|
||||
import { NewShareScene } from "./NewShareScene.js";
|
||||
import { Scene, pop_scene, push_scene, scene_stack } from "./scene_manager.js";
|
||||
|
||||
@@ -155,7 +155,7 @@ function update_share_list(user, password, collection) {
|
||||
* @param {string} user
|
||||
* @param {string} password
|
||||
* @param {Collection} collection
|
||||
* @param {import('./api.js').Share} share
|
||||
* @param {import('../api/api.js').Share} share
|
||||
* @param {HTMLElement} template
|
||||
* @param {string} delete_label
|
||||
* @param {function(string, string, string, function():void):void} delete_action
|
||||
@@ -205,7 +205,7 @@ function add_share_row_node(user, password, collection, share, template, delete_
|
||||
* @param {string} user
|
||||
* @param {string} password
|
||||
* @param {Collection} collection
|
||||
* @param {Array<import('./api.js').Share>} shares
|
||||
* @param {Array<import('../api/api.js').Share>} shares
|
||||
*/
|
||||
function add_share_rows(user, password, collection, shares) {
|
||||
/** @type {HTMLElement} */ let token_template = document.querySelector("[data-name=sharetokenrowtemplate]");
|
||||
@@ -19,10 +19,10 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { upload_collection } from "../api/api.js";
|
||||
import { Collection } from "../models/collection.js";
|
||||
import { cleanHREFinput, isValidHREF, onCleanHREFinput, random_uuid } from "../utils/misc.js";
|
||||
import { Scene, pop_scene, scene_stack } from "./scene_manager.js";
|
||||
import { Collection } from "./models.js";
|
||||
import { cleanHREFinput, isValidHREF, onCleanHREFinput, random_uuid } from "./utils.js";
|
||||
import { upload_collection } from "./api.js";
|
||||
|
||||
/**
|
||||
* @implements {Scene}
|
||||
@@ -30,7 +30,11 @@ web_files = ["web/internal_data/css/icon.png",
|
||||
"web/internal_data/css/logo.svg",
|
||||
"web/internal_data/css/main.css",
|
||||
"web/internal_data/css/icons/*.svg",
|
||||
"web/internal_data/*.js",
|
||||
"web/internal_data/js/*.js",
|
||||
"web/internal_data/js/api/*.js",
|
||||
"web/internal_data/js/models/*.js",
|
||||
"web/internal_data/js/scenes/*.js",
|
||||
"web/internal_data/js/utils/*.js",
|
||||
"web/internal_data/index.html"]
|
||||
|
||||
# Hint: if bcyrpt < 5.0.0 is used, passlib(libpass) dependency can be downgraded/reverted by: sed -i 's|libpass[^"]*|passlib|' setup.py.legacy
|
||||
|
||||
Reference in New Issue
Block a user