removed app, reorganized logic into modules
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { DirectoryPicker, GetLibraryDir} from '../../../wailsjs/go/main/App';
|
||||
import { DirectoryPicker } from '../../../wailsjs/go/frontendbindings/FrontendBindings';
|
||||
import { GetDir as GetLibraryDir } from '../../../wailsjs/go/library/Library';
|
||||
import { Play } from '../../../wailsjs/go/player/Player';
|
||||
|
||||
|
||||
@@ -15,7 +16,7 @@ window.onPlayPauseButtonClick = function() {
|
||||
try {
|
||||
Play().then((result) => {
|
||||
console.log(result)
|
||||
playPauseButton.setAttribute("src", "/src/assets/images/icons/music/pause-solid.svg")
|
||||
playPauseButtonIcon.setAttribute("src", "/src/assets/images/icons/music/pause-solid.svg")
|
||||
}).catch((err) => {
|
||||
console.log("There is an error with playing")
|
||||
console.error(err);
|
||||
@@ -27,7 +28,6 @@ window.onPlayPauseButtonClick = function() {
|
||||
}
|
||||
|
||||
window.dirPicker = function() {
|
||||
var dir;
|
||||
try {
|
||||
DirectoryPicker()
|
||||
.then((result) => { window.updateLibraryDirLabel(result); })
|
||||
|
||||
Vendored
+2
-1
@@ -1,6 +1,7 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
import {context} from '../models';
|
||||
|
||||
export function DirectoryPicker():Promise<string>;
|
||||
|
||||
export function GetLibraryDir():Promise<string>;
|
||||
export function Init(arg1:context.Context):Promise<void>;
|
||||
@@ -0,0 +1,11 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
export function DirectoryPicker() {
|
||||
return window['go']['frontendbindings']['FrontendBindings']['DirectoryPicker']();
|
||||
}
|
||||
|
||||
export function Init(arg1) {
|
||||
return window['go']['frontendbindings']['FrontendBindings']['Init'](arg1);
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
import {context} from '../models';
|
||||
|
||||
export function GetDir():Promise<string>;
|
||||
|
||||
export function Init(arg1:context.Context):Promise<void>;
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
export function GetDir() {
|
||||
return window['go']['library']['Library']['GetDir']();
|
||||
}
|
||||
|
||||
export function Init(arg1) {
|
||||
return window['go']['library']['Library']['Init'](arg1);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
export function DirectoryPicker() {
|
||||
return window['go']['main']['App']['DirectoryPicker']();
|
||||
}
|
||||
|
||||
export function GetLibraryDir() {
|
||||
return window['go']['main']['App']['GetLibraryDir']();
|
||||
}
|
||||
Reference in New Issue
Block a user