mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-27 07:44:43 +02:00
fix
This commit is contained in:
parent
ce6afd3deb
commit
94033723f1
@ -4,6 +4,8 @@ import {pathEscapeSegments, pathUnescapeSegments} from '../utils/url.ts';
|
|||||||
import {GET, PUT} from '../modules/fetch.ts';
|
import {GET, PUT} from '../modules/fetch.ts';
|
||||||
import ViewFileTree from '../components/ViewFileTree.vue';
|
import ViewFileTree from '../components/ViewFileTree.vue';
|
||||||
|
|
||||||
|
const {appSubUrl} = window.config;
|
||||||
|
|
||||||
async function toggleSidebar(sidebarEl: HTMLElement, shouldShow: boolean) {
|
async function toggleSidebar(sidebarEl: HTMLElement, shouldShow: boolean) {
|
||||||
const showBtnEl = sidebarEl.parentElement.querySelector('.show-tree-sidebar-button');
|
const showBtnEl = sidebarEl.parentElement.querySelector('.show-tree-sidebar-button');
|
||||||
const containerClassList = sidebarEl.parentElement.classList;
|
const containerClassList = sidebarEl.parentElement.classList;
|
||||||
@ -17,7 +19,7 @@ async function toggleSidebar(sidebarEl: HTMLElement, shouldShow: boolean) {
|
|||||||
if (!sidebarEl.hasAttribute('data-is-signed')) return;
|
if (!sidebarEl.hasAttribute('data-is-signed')) return;
|
||||||
|
|
||||||
// save to session
|
// save to session
|
||||||
await PUT('/repo/preferences', {
|
await PUT(`${appSubUrl}/repo/preferences`, {
|
||||||
data: {
|
data: {
|
||||||
show_file_view_tree_sidebar: shouldShow,
|
show_file_view_tree_sidebar: shouldShow,
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user