Skip to content

Commit 143249f

Browse files
committed
change loading
1 parent 158b79e commit 143249f

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

templates/repo/view_file_tree_sidebar.tmpl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,5 @@
5959
</div>
6060
</div>
6161
<div class="view-file-tree-sidebar-bottom">
62-
<div id="view-file-tree" class="center" data-api-base-url="{{.RepoLink}}" data-tree-path="{{$.TreePath}}">
63-
{{svg "octicon-sync" 16 "job-status-rotate"}}
64-
</div>
62+
<div id="view-file-tree" class="is-loading" data-api-base-url="{{.RepoLink}}" data-tree-path="{{$.TreePath}}"></div>
6563
</div>

web_src/css/repo/home.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@
6262
grid-row: 1 / 4;
6363
}
6464

65+
#view-file-tree.is-loading {
66+
aspect-ratio: 5.415; /* the size is about 790 x 145 */
67+
}
68+
6569
.repo-grid-tree-sidebar .repo-view-file-tree-sidebar {
6670
display: flex;
6771
flex-direction: column;

web_src/js/features/repo-view-file-tree-sidebar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export async function initViewFileTreeSidebar() {
6666

6767
const files = await loadChildren({path: treePath}, true);
6868

69-
fileTree.classList.remove('center');
69+
fileTree.classList.remove('is-loading');
7070
const fileTreeView = createApp(ViewFileTree, {files, selectedItem, loadChildren, loadContent: (item) => {
7171
window.history.pushState(null, null, item.htmlUrl);
7272
selectedItem.value = item.path;

0 commit comments

Comments
 (0)