Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
update dashboard theatrics, improve config file write/clear logic, up…
Browse files Browse the repository at this point in the history
…date app icon to prepare for first official release
  • Loading branch information
jdheeter committed Aug 13, 2021
1 parent eb14d5c commit cc1912c
Show file tree
Hide file tree
Showing 26 changed files with 210 additions and 118 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "subspace-desktop",
"version": "0.0.1",
"version": "0.0.2",
"private": true,
"description": "Simple desktop app for Subspace farmers.",
"author": "",
Expand Down Expand Up @@ -46,4 +46,4 @@
"yarn": ">= 1.21.1"
},
"productName": "subspace"
}
}
2 changes: 1 addition & 1 deletion quasar.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ module.exports = configure(function (ctx) {

// animations: 'all', // --- includes all animations
// https://v2.quasar.dev/options/animations
animations: [],
animations: 'all',

// https://v2.quasar.dev/quasar-cli/developing-ssr/configuring-ssr
ssr: {
Expand Down
Binary file modified src-tauri/icons/128x128.png
Loading
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
Loading
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
Loading
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
Loading
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
Loading
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
Loading
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
Loading
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
Loading
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
Loading
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
Loading
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
Loading
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
Loading
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
Loading
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.icns
Binary file not shown.
Binary file modified src-tauri/icons/icon.ico
Binary file not shown.
Binary file modified src-tauri/icons/icon.png
Loading
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/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"package": {
"productName": "yarn tauri info",
"productName": "Subspace Farmer Demo",
"version": "0.1.0"
},
"build": {
Expand Down Expand Up @@ -53,7 +53,7 @@
},
"windows": [
{
"title": "Subspace",
"title": "Subspace Farmer Demo",
"width": 800,
"height": 600,
"resizable": false,
Expand Down
12 changes: 8 additions & 4 deletions src/layouts/MainLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ q-layout(view="hHh lpr fFf")
q-toolbar-title
.row(v-if="$route.name == 'dashboard'")
.col-auto.q-mr-md.relative-position
q-icon(color="green-5" name="trip_origin" size="40px" style="bottom: 0px; right: 5px")
q-icon(color="green-5" name="trip_origin" size="40px" style="bottom: 0px; right: 5px" v-if="global.status.state == 'live'")
q-icon(color="yellow-8" name="trip_origin" size="40px" style="bottom: 0px; right: 5px" v-if="global.status.state == 'loading'")
//- q-spinner-oval(color="green" size="55px")
q-tooltip
.col
p Farmer Status:
h6.no-margin Connected Synced and Farming
h6.no-margin {{ global.status.message }}
div
q-btn(flat icon="settings" round)
q-menu(auto-close)
Expand Down Expand Up @@ -39,7 +40,7 @@ export default defineComponent({
data() {
return {
data: global.data,
global: global.data,
util,
}
},
Expand All @@ -61,7 +62,10 @@ export default defineComponent({
html: true,
ok: { label: "reset", icon: "refresh", flat: true, color: "red" },
cancel: true,
}).onOk(util.reset)
}).onOk(async () => {
util.reset()
this.$router.replace({ name: "index" })
})
},
},
})
Expand Down
2 changes: 1 addition & 1 deletion src/lib/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const list: string[] = []
import getLang from "../loc/lang"

let text: any
export var data = reactive({ loc: { selected: 'en', text, } })
export var data = reactive({ status: { state: "loading", message: "loading" }, loc: { selected: 'en', text, } })
export var mutations = {
async changeLang(newLang: string) {
data.loc.selected = newLang
Expand Down
10 changes: 5 additions & 5 deletions src/lib/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export async function showModal(componentName: string, props: propsType = {}): P
}

export function toFixed(num: number, precision: number) {
if (!num) return 0
return parseFloat(num.toFixed(precision))
}

Expand All @@ -38,8 +39,8 @@ export function plotTimeMsEstimate(gb: number): number {
}

export async function reset() {
const configData = await config.read()
if (configData?.plot?.location) await tauri.fs.removeFile(configData.plot.location)
const configData = await config.read().catch(console.error)
if (configData?.plot?.location) await tauri.fs.removeFile(configData.plot.location).catch(console.error)
config.clear()
}

Expand All @@ -51,9 +52,8 @@ export const config = {
validate(config: ConfigFile): boolean {
const acctValid = config.account ? true : false
const plotValid = config.plot ? true : false
console.log('acctValid', acctValid);
console.log('plotValid', acctValid);

// console.log('acctValid', acctValid);
// console.log('plotValid', acctValid);
return (acctValid && plotValid)
},
async read(dir?: string): Promise<ConfigFile> {
Expand Down
Loading

0 comments on commit cc1912c

Please sign in to comment.