Skip to content

Commit

Permalink
Images updated
Browse files Browse the repository at this point in the history
  • Loading branch information
hakanersu committed Sep 3, 2021
1 parent 6379ce9 commit 5ac52a7
Show file tree
Hide file tree
Showing 18 changed files with 70 additions and 18 deletions.
Binary file modified src-tauri/icons/128x128.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/128x128@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/32x32.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square107x107Logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square142x142Logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square150x150Logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square284x284Logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square30x30Logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square310x310Logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square44x44Logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square71x71Logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/Square89x89Logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/StoreLogo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src-tauri/icons/icon.ico
Binary file not shown.
Binary file modified src-tauri/icons/icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src-tauri/src/main.rs
Expand Up @@ -6,13 +6,13 @@ use std::io::prelude::*;
use std::process::{Command, Stdio};

#[tauri::command]
fn tinker(command: String, path: String) -> String {
fn tinker(command: String, path: String, bin: String) -> String {
let artisan_path = path + "/artisan";
let b = std::path::Path::new(&artisan_path).exists();
if !b {
return String::from("Artisan file not found. Please check your path");
}
let process = match Command::new("php")
let process = match Command::new(bin)
.arg(artisan_path)
.arg("tinker")
.stdin(Stdio::piped())
Expand Down
81 changes: 66 additions & 15 deletions src/components/Settings.vue
@@ -1,53 +1,104 @@
<template>
<div class="row">
<label for="path">Project path</label>
<input
type="text"
name="path"
v-model="path"
<div>
<div class="flex">
<div class="row">
<label for="path">Project path</label>
<input
type="text"
name="project_path"
v-model="project_path"
>
</div>
<button
@click="open"
class="button"
>Choose path</button>
</div>
<div
class="flex"
style="margin-top: 15px;"
>
<button @click="open">Choose path</button>
<div class="row">
<label for="path">PHP executable path</label>
<input
type="text"
name="bin_path"
v-model="bin_path"
>
</div>
<button
@click="saveBinPath"
class="button"
>Save</button>
</div>
</div>
</template>

<script>
import {dialog} from "@tauri-apps/api";
import { dialog } from "@tauri-apps/api";
export default {
data: () => ({
path: ''
project_path: '',
bin_path: '/usr/bin/php',
}),
mounted () {
this. path = localStorage.getItem('tinker_path')
this.project_path = localStorage.getItem('tinker_path')
},
methods: {
async open () {
await dialog.open({ directory: true}).then(res => {
this.path = res
await dialog.open({ directory: true }).then(res => {
if (!res) {
return false
}
this.project_path = res
localStorage.setItem('tinker_path', res)
})
})
},
saveBinPath () {
localStorage.setItem('bin_path', this.bin_path)
}
}
}
</script>

<style>
.flex {
display: flex;
align-items: flex-end;
}
.row {
display: flex;
flex-direction: column;
width: 600px;
}
.row label {
margin-bottom: 3px;
display: block;
}
.row input {
width: 50%;
margin: 0;
padding: 1.4em 1.4em 1.4em 1.4em;
padding: 5px;
height: 40px;
text-indent: 1em;
border: 0;
border-radius: 4px;
background: #252830;
color: white;
margin-top: 3px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
box-sizing: border-box;
}
.button {
box-sizing: border-box;
border-radius: 4px;
margin-left: 15px;
height: 40px;
border: 0;
padding: 10px;
background-color: #66abff;
border-color: #66abff;
color: #fff;
font-weight: 600;
cursor: pointer;
}
</style>
3 changes: 2 additions & 1 deletion src/components/Tinker.vue
Expand Up @@ -68,7 +68,8 @@ export default {
},
handleExecute (output) {
const path = localStorage.getItem('tinker_path')
invoke('tinker', { command: output , path: path}).then(resp => {
const bin_path = localStorage.getItem('bin_path') || '/usr/bin/php'
invoke('tinker', { command: output , path: path, bin: bin_path}).then(resp => {
this.output = resp
})
},
Expand Down

0 comments on commit 5ac52a7

Please sign in to comment.