mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-02-02 16:23:58 +03:00
Bugfix: blank icon
This commit is contained in:
parent
638619b3b4
commit
19e664cc8d
4
client/demo/dist/index.js
vendored
4
client/demo/dist/index.js
vendored
File diff suppressed because one or more lines are too long
@ -5,6 +5,7 @@ import { DDSPSVCModelSlot, DiffusionSVCModelSlot, MMVCv13ModelSlot, MMVCv15Model
|
||||
import { useMessageBuilder } from "../../hooks/useMessageBuilder";
|
||||
import { ModelSlotManagerDialogScreen } from "./904_ModelSlotManagerDialog";
|
||||
import { checkExtention, trimfileName } from "../../utils/utils";
|
||||
import { MODEL_ICON_BLANK_URL } from "../../const";
|
||||
|
||||
export type MainScreenProps = {
|
||||
screen: ModelSlotManagerDialogScreen;
|
||||
@ -98,8 +99,11 @@ export const MainScreen = (props: MainScreenProps) => {
|
||||
|
||||
const slotRow = serverSetting.serverSetting.modelSlots.map((x, index) => {
|
||||
// モデルのアイコン
|
||||
const generateIconArea = (slotIndex: number, iconUrl: string, tooltip: boolean) => {
|
||||
const realIconUrl = iconUrl.length > 0 ? serverSetting.serverSetting.voiceChangerParams.model_dir + "/" + slotIndex + "/" + iconUrl.split(/[\/\\]/).pop() : "/assets/icons/noimage.png";
|
||||
const generateIconArea = (slotIndex: number, iconUrl: string | null, tooltip: boolean) => {
|
||||
let realIconUrl = MODEL_ICON_BLANK_URL;
|
||||
if (iconUrl) {
|
||||
realIconUrl = iconUrl.length > 0 ? serverSetting.serverSetting.voiceChangerParams.model_dir + "/" + slotIndex + "/" + iconUrl.split(/[\/\\]/).pop() : "/assets/icons/noimage.png";
|
||||
}
|
||||
const iconDivClass = tooltip ? "tooltip" : "";
|
||||
const iconClass = tooltip ? "model-slot-icon-pointable" : "model-slot-icon";
|
||||
return (
|
||||
@ -225,7 +229,7 @@ export const MainScreen = (props: MainScreenProps) => {
|
||||
fileRows.push(generateFileRow("model", slotInfo.modelFile));
|
||||
infoRow = generateInfoRow(`tune:${slotInfo.defaultTune},mks:${slotInfo.kStepMax},ks:${slotInfo.defaultKstep}, sp:${slotInfo.defaultSpeedup}, l:${slotInfo.nLayers},${slotInfo.nnLayers},`);
|
||||
} else {
|
||||
iconArea = generateIconArea(index, "/assets/icons/blank.png", false);
|
||||
iconArea = generateIconArea(index, null, false);
|
||||
nameRow = generateNameRow(index, "", "");
|
||||
}
|
||||
return (
|
||||
|
@ -12,6 +12,7 @@ export const INDEXEDDB_KEY_AUDIO_OUTPUT = "INDEXEDDB_KEY_AUDIO_OUTPUT"
|
||||
export const INDEXEDDB_KEY_AUDIO_MONITR = "INDEXEDDB_KEY_AUDIO_MONITOR"
|
||||
export const INDEXEDDB_KEY_DEFAULT_MODEL_TYPE = "INDEXEDDB_KEY_DEFALT_MODEL_TYPE"
|
||||
|
||||
export const MODEL_ICON_BLANK_URL = "/assets/icons/blank.png"
|
||||
|
||||
export const isDesktopApp = () => {
|
||||
if (navigator.userAgent.indexOf('Electron') >= 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user