Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "duinoapp-client",
"version": "3.2.2",
"version": "3.2.3",
"author": "Fraser Bullock",
"license": "GPL-3.0",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
workbox.core.setCacheNameDetails({ prefix: 'd4' });

// Do not touch this line
const LATEST_VERSION = '3.2.2';
const LATEST_VERSION = '3.2.3';

self.addEventListener('activate', (event) => {
console.log(`%c ${LATEST_VERSION} `, 'background: #ddd; color: #0000ff');
Expand Down
2 changes: 0 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,6 @@ export default {
await this.$FeathersVuex.api.Setting.find({ query: { $limit: 9999999 } });
const { Setting } = this.$FeathersVuex.api;
const { data } = Setting.findInStore({ query: { key: 'editor' } });
// eslint-disable-next-line no-console
console.log(data[0]);
this.$vuetify.theme.dark = /(dark)|(black)/.test(data[0]?.value?.theme ?? '');
},
};
Expand Down
4 changes: 1 addition & 3 deletions src/components/files/editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ export default {
const { Setting } = this.$FeathersVuex.api;
const { data } = Setting.findInStore({ query: { key: 'editor' } });
if (data[0]) return data[0].value;
const settings = new Setting({ key: 'editor' });
settings.save();
return settings.value;
return {};
},
currentFile() {
const { File } = this.$FeathersVuex.api;
Expand Down
4 changes: 1 addition & 3 deletions src/components/ide.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ export default {
const { Setting } = this.$FeathersVuex.api;
const { data } = Setting.findInStore({ query: { key: 'editor' } });
if (data[0]) return data[0].value;
const settings = new Setting({ key: 'editor' });
settings.save();
return settings.value;
return {};
},
editorOptions() {
return {
Expand Down
35 changes: 16 additions & 19 deletions src/components/settings/compiler.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</v-card-title>
<v-card-text>
<v-row>
<v-col cols="12" sm="6" md="4" class="py-0">
<v-col cols="12" sm="6" md="4" class="pt-0">
<v-checkbox
:input-value="!!settings.value.verbose"
label="Verbose Output"
Expand All @@ -14,15 +14,6 @@
@change="$set(settings.value, 'verbose', $event)"
/>
</v-col>
<v-col cols="12" sm="6" md="4" class="py-0">
<v-checkbox
:input-value="!!settings.value.preferLocal"
label="Prefer Local Upload"
hint="If possible, will use a locally ported upload protocol over using the remote server"
persistent-hint
@change="$set(settings.value, 'preferLocal', $event)"
/>
</v-col>
</v-row>
</v-card-text>
</v-card>
Expand All @@ -31,30 +22,36 @@
<script>

export default {
computed: {
settings() {
data() {
return {
settings: { value: {} },
};
},
methods: {
loadSettings() {
const { Setting } = this.$FeathersVuex.api;
const { data } = Setting.findInStore({ query: { key: 'compiler' } });
if (data[0]) return data[0];
if (data[0]) {
[this.settings] = data;
return;
}
const settings = new Setting({ key: 'compiler' });
settings.save();
return settings;
this.settings = settings;
},
},
methods: {
handleSave(to, from) {
if (JSON.stringify(to) === JSON.stringify(from)) return false;
this.settings.save();
return true;
},
},
mounted() {
this.loadSettings();
},
watch: {
'settings.value.verbose': {
handler(to, from) { this.handleSave(to, from); },
},
'settings.value.preferLocal': {
handler(to, from) { this.handleSave(to, from); },
},
},
};
</script>
17 changes: 11 additions & 6 deletions src/components/settings/editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,25 +87,30 @@ export default {
{ text: 'High Contrast', value: 'hc-black' },
],
demoCode,
settings: { value: {} },
};
},
computed: {
settings() {
methods: {
loadSettings() {
const { Setting } = this.$FeathersVuex.api;
const { data } = Setting.findInStore({ query: { key: 'editor' } });
if (data[0]) return data[0];
if (data[0]) {
[this.settings] = data;
return;
}
const settings = new Setting({ key: 'editor' });
settings.save();
return settings;
this.settings = settings;
},
},
methods: {
handleSave(to, from) {
if (JSON.stringify(to) === JSON.stringify(from)) return false;
this.settings.save();
return true;
},
},
mounted() {
this.loadSettings();
},
watch: {
'settings.value.theme': {
handler(to, from) {
Expand Down
6 changes: 1 addition & 5 deletions src/plugins/compile-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ class CompileServer extends EventEmitter {
}

async load() {
// eslint-disable-next-line no-console
console.log(this.isValid());
if (!this.isValid()) return;
// eslint-disable-next-line no-console
console.log('loading start');
Expand Down Expand Up @@ -151,8 +149,6 @@ class CompileServer extends EventEmitter {
}

async librariesSearch(search, limit = 10, skip = 0, sortBy = 'name', sortDesc = false) {
// eslint-disable-next-line no-console
console.log('lib-search');
await this.initPromise;
const e = encodeURIComponent;
const query = `?search=${e(search ?? '')}&limit=${limit}&skip=${skip}&sortBy=${e(sortBy)}&sortDesc=${sortDesc}`;
Expand Down Expand Up @@ -259,7 +255,7 @@ class CompileServer extends EventEmitter {
const hex = await this.compile(1, false);
this.emit('console.progress', { percent: 0.5, message: 'Uploading code...' });
// eslint-disable-next-line no-console
console.log(this.Vue.$serial);
// console.log(this.Vue.$serial);
await this.Vue.$uploader.upload(hex, { ...flags });
this.emit('console.progress', { percent: 1.0, message: 'Done!' });
} catch (err) {
Expand Down