mirror of
https://github.com/binaris00/Theme-Controller.git
synced 2026-07-22 05:32:18 +00:00
Finally working on mobile
This commit is contained in:
parent
0abce483e8
commit
f5fd29391c
2 changed files with 9 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "bin-theme-controller",
|
||||
"name": "Theme Controller",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"minAppVersion": "0.15.0",
|
||||
"description": "Set when and how the themes will be displayed.",
|
||||
"author": "Binaris",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { App, TFile } from "obsidian";
|
||||
import { App, TFile, Plugin } from 'obsidian';
|
||||
import ThControl from "./main";
|
||||
import { IThControlSettings } from "./settings/settings";
|
||||
import * as path from 'path-browserify';
|
||||
|
|
@ -44,9 +44,14 @@ export class PathController {
|
|||
|
||||
|
||||
export function isPathInside(basePath: string, targetPath: string): number {
|
||||
const normalizedBase = path.resolve(basePath);
|
||||
const normalizedTarget = path.resolve(targetPath);
|
||||
let normalizedBase = basePath
|
||||
let normalizedTarget = targetPath
|
||||
|
||||
if(!app.isMobile){
|
||||
normalizedBase = path.resolve(basePath);
|
||||
normalizedTarget = path.resolve(targetPath);
|
||||
}
|
||||
|
||||
if (normalizedTarget.startsWith(normalizedBase + path.sep)) {
|
||||
const baseParts = normalizedBase.split(path.sep);
|
||||
const targetParts = normalizedTarget.split(path.sep);
|
||||
|
|
|
|||
Loading…
Reference in a new issue