From a533d4adcc7e365781547cb7ad43aedaecf596c1 Mon Sep 17 00:00:00 2001
From: Joelant05
Date: Wed, 15 Jul 2020 14:51:49 +0100
Subject: [PATCH 1/8] restore discord notification
---
app/renderer/src/AppCycle/startUp.ts | 2 --
1 file changed, 2 deletions(-)
diff --git a/app/renderer/src/AppCycle/startUp.ts b/app/renderer/src/AppCycle/startUp.ts
index 6075840e6..bb0e59f7e 100644
--- a/app/renderer/src/AppCycle/startUp.ts
+++ b/app/renderer/src/AppCycle/startUp.ts
@@ -16,7 +16,6 @@ export default async function startUp() {
CONNECTION.startListening()
setupDefaultMenus()
- /* No longer needed - discord link on welcome screen
if (process.env.NODE_ENV !== 'development') {
let discord_msg = createNotification({
icon: 'mdi-discord',
@@ -35,7 +34,6 @@ export default async function startUp() {
},
})
}
- */
// Fetch the latest json/version data
fetchLatestJson().then(updateData => {
From 9248f93165a32690b1b6eb01047ca48f4fb4368c Mon Sep 17 00:00:00 2001
From: solvedDev
Date: Wed, 15 Jul 2020 16:43:45 +0200
Subject: [PATCH 2/8] v1.7.0
---
app/shared/app_version.ts | 2 +-
package.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/shared/app_version.ts b/app/shared/app_version.ts
index 8734b6611..c1aed15e8 100644
--- a/app/shared/app_version.ts
+++ b/app/shared/app_version.ts
@@ -1,4 +1,4 @@
/**
* Current bridge. app version
*/
-export default 'v1.7.0-pre10'
+export default 'v1.7.0'
diff --git a/package.json b/package.json
index 61197d2f2..6bad06cc8 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "bridge",
- "version": "1.7.0-pre10",
+ "version": "1.7.0",
"author": "solvedDev ",
"description": "A powerful add-on editor",
"license": "GNU",
From 52ff3f0cd319ba4a5546716c37817b92408259ae Mon Sep 17 00:00:00 2001
From: solvedDev
Date: Thu, 16 Jul 2020 13:21:01 +0200
Subject: [PATCH 3/8] closes #237
---
app/renderer/src/editor/Themes/ThemeManager.ts | 2 +-
app/renderer/store/Settings.ts | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/app/renderer/src/editor/Themes/ThemeManager.ts b/app/renderer/src/editor/Themes/ThemeManager.ts
index ec28283d3..7122dd424 100644
--- a/app/renderer/src/editor/Themes/ThemeManager.ts
+++ b/app/renderer/src/editor/Themes/ThemeManager.ts
@@ -131,7 +131,7 @@ export default class ThemeManager {
else this.plugin_themes[id] = theme
}
- static applyTheme(id: string) {
+ static applyTheme(id = 'bridge.default.theme') {
this.current_theme = id
const theme =
this.themes[id] ||
diff --git a/app/renderer/store/Settings.ts b/app/renderer/store/Settings.ts
index 5b2b78314..495b28531 100644
--- a/app/renderer/store/Settings.ts
+++ b/app/renderer/store/Settings.ts
@@ -56,6 +56,8 @@ function setup() {
if (DATA.target_version !== undefined) save({ target_version: undefined })
if (DATA.text_auto_completions !== undefined)
save({ text_auto_completions: undefined })
+ if (DATA.global_theme === undefined)
+ save({ global_theme: 'bridge.default.theme' })
}
function save(settings: { [s: string]: any }) {
if (DATA) DATA = Object.assign(DATA, settings)
From a6d1d8b8b8228b026c06266315d48fe2e5ce6f64 Mon Sep 17 00:00:00 2001
From: solvedDev
Date: Thu, 16 Jul 2020 13:41:39 +0200
Subject: [PATCH 4/8] closes #238
---
app/renderer/src/UI/ContextMenu/File.ts | 11 ++---
.../Content/explorer/FileDisplayer.vue | 20 +++++++---
app/renderer/src/UI/Sidebar/FileExplorer.ts | 40 +++++++++++--------
app/renderer/src/editor/OmegaCache.ts | 5 +--
4 files changed, 44 insertions(+), 32 deletions(-)
diff --git a/app/renderer/src/UI/ContextMenu/File.ts b/app/renderer/src/UI/ContextMenu/File.ts
index 19e100897..72db52c1a 100644
--- a/app/renderer/src/UI/ContextMenu/File.ts
+++ b/app/renderer/src/UI/ContextMenu/File.ts
@@ -70,18 +70,19 @@ export const FILE_CONTEXT_MENU = async (
},
async (new_name: string) => {
const CLOSED = TabSystem.closeByPath(file_path)
- const NEW_PATH = path.join(
+ const newPath = path.join(
path.dirname(file_path),
path.dirname(new_name),
path.basename(new_name)
)
- await fs.mkdir(path.dirname(NEW_PATH), {
+ await fs.mkdir(path.dirname(newPath), {
recursive: true,
})
- await fs.rename(file_path, NEW_PATH)
+ await fs.rename(file_path, newPath)
+
await file.update(
- NEW_PATH,
+ newPath,
path.join(
path.dirname(file.path),
path.dirname(new_name),
@@ -90,7 +91,7 @@ export const FILE_CONTEXT_MENU = async (
)
await file.parent.refresh()
- if (CLOSED) FileSystem.open(NEW_PATH)
+ if (CLOSED) FileSystem.open(newPath)
}
)
},
diff --git a/app/renderer/src/UI/Sidebar/Content/explorer/FileDisplayer.vue b/app/renderer/src/UI/Sidebar/Content/explorer/FileDisplayer.vue
index 185503f46..0cd1f0414 100644
--- a/app/renderer/src/UI/Sidebar/Content/explorer/FileDisplayer.vue
+++ b/app/renderer/src/UI/Sidebar/Content/explorer/FileDisplayer.vue
@@ -3,7 +3,9 @@
v-if="
first && file_explorer.children === 0 && !file_explorer.is_loading
"
- >This directory has no content.
+ >
+ This directory has no content.
+
-
+
mdi-folder-open
{{
- file.absolute_path.includes('cache')
- ? 'mdi-folder-lock'
- : 'mdi-folder'
+ file.absolute_path.includes('cache')
+ ? 'mdi-folder-lock'
+ : 'mdi-folder'
}}
{{ file.name }}
@@ -198,9 +205,10 @@ export default {
path.join(this.file_explorer.absolute_path, name)
)
added.element.update(
- this.file_explorer.absolute_path,
+ path.join(this.file_explorer.absolute_path, name),
this.file_explorer.path
)
+ added.element.parent = this.file_explorer
} catch (e) {
new InformationWindow(
'ERROR',
diff --git a/app/renderer/src/UI/Sidebar/FileExplorer.ts b/app/renderer/src/UI/Sidebar/FileExplorer.ts
index 3707678ab..a886000a2 100644
--- a/app/renderer/src/UI/Sidebar/FileExplorer.ts
+++ b/app/renderer/src/UI/Sidebar/FileExplorer.ts
@@ -162,16 +162,16 @@ export class FileExplorer {
async update(absolute_path: string, f_path: string) {
if (this.is_loading) await this.loading_promise
- const newAbsolutePath = path.join(absolute_path, this.name)
if (!this.is_folder) {
await Promise.all([
- OmegaCache.rename(this.absolute_path, newAbsolutePath),
- LightningCache.rename(this.absolute_path, newAbsolutePath),
- JSONFileMasks.rename(this.absolute_path, newAbsolutePath),
+ OmegaCache.rename(this.absolute_path, absolute_path),
+ LightningCache.rename(this.absolute_path, absolute_path),
+ JSONFileMasks.rename(this.absolute_path, absolute_path),
])
}
- this.absolute_path = newAbsolutePath
+ this.absolute_path = absolute_path
+ this.name = path.basename(absolute_path)
this.path = path.join(f_path, this.name)
if (!this.loaded_children && this.is_folder) await this.load()
@@ -210,31 +210,37 @@ export class FileExplorer {
}
this.parent.updateUUID()
}
- async duplicate(new_name: string, open = true) {
- if (this.parent.find(new_name) !== undefined)
+ async duplicate(newName: string, open = true) {
+ if (this.parent.find(newName) !== undefined)
return new InformationWindow(
'Error',
- `A file with the name "${new_name}" already exists`
+ `A file with the name "${newName}" already exists`
)
- let new_path = path.join(path.dirname(this.absolute_path), new_name)
+ let newAbsolutePath = path.join(
+ path.dirname(this.absolute_path),
+ newName
+ )
await Promise.all([
- OmegaCache.duplicate(this.absolute_path, new_path).catch(() => {}),
- LightningCache.duplicate(this.absolute_path, new_path),
- JSONFileMasks.duplicate(this.absolute_path, new_path),
- fs.copyFile(this.absolute_path, new_path),
+ OmegaCache.duplicate(
+ this.absolute_path,
+ newAbsolutePath
+ ).catch(() => {}),
+ LightningCache.duplicate(this.absolute_path, newAbsolutePath),
+ JSONFileMasks.duplicate(this.absolute_path, newAbsolutePath),
+ fs.copyFile(this.absolute_path, newAbsolutePath),
])
this.parent.children.push(
new FileExplorer(
this.parent,
- path.join(this.parent.path, new_name),
- new_path,
+ path.join(this.parent.path, newName),
+ newAbsolutePath,
false
)
)
- if (open)
- FileSystem.open(path.join(this.parent.absolute_path, new_name))
+ if (open) FileSystem.open(path.join(this.parent.absolute_path, newName))
+ this.parent.sort()
this.parent.updateUUID()
}
rename(val: string) {
diff --git a/app/renderer/src/editor/OmegaCache.ts b/app/renderer/src/editor/OmegaCache.ts
index b5f441b22..9e1b4abfd 100644
--- a/app/renderer/src/editor/OmegaCache.ts
+++ b/app/renderer/src/editor/OmegaCache.ts
@@ -201,14 +201,11 @@ export default class OmegaCache {
try {
await fsp.mkdir(path.dirname(newCachePath), { recursive: true })
} catch {}
- console.log(oldCachePath, newCachePath)
try {
await fsp.copyFile(oldCachePath, newCachePath)
this.clear(old_path)
- } catch (e) {
- console.error(e)
- }
+ } catch {}
}
static async duplicate(what: string, as: string) {
if (!this.mayBeCached(as)) return
From 83ee1a6d0aa315a9439c29926c855cd7f0d890d9 Mon Sep 17 00:00:00 2001
From: solvedDev
Date: Thu, 16 Jul 2020 13:47:50 +0200
Subject: [PATCH 5/8] remove unused argument
---
app/renderer/src/editor/LightningCache.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/renderer/src/editor/LightningCache.ts b/app/renderer/src/editor/LightningCache.ts
index b7831b4b7..8f5cd514d 100644
--- a/app/renderer/src/editor/LightningCache.ts
+++ b/app/renderer/src/editor/LightningCache.ts
@@ -279,7 +279,7 @@ export default class LightningCache {
}
}
- static async load(filePath?: string): Promise {
+ static async load(): Promise {
if (this.globalCache !== undefined) return this.globalCache
try {
From 979889933693aba09de391d5cd4050a2d759ef13 Mon Sep 17 00:00:00 2001
From: solvedDev
Date: Thu, 16 Jul 2020 13:59:14 +0200
Subject: [PATCH 6/8] fix project chooser card positions
---
app/renderer/src/UI/ProjectScreen/Main.vue | 52 ++++++++++++----------
1 file changed, 29 insertions(+), 23 deletions(-)
diff --git a/app/renderer/src/UI/ProjectScreen/Main.vue b/app/renderer/src/UI/ProjectScreen/Main.vue
index b30fade00..a5d13512d 100644
--- a/app/renderer/src/UI/ProjectScreen/Main.vue
+++ b/app/renderer/src/UI/ProjectScreen/Main.vue
@@ -6,29 +6,35 @@
@closeWindow="isVisible.value = false"
>
-
+