From 5963f624f2cc17041e4b7aaf593e34ba749e935c Mon Sep 17 00:00:00 2001 From: JannisX11 Date: Sat, 15 Jun 2024 00:12:20 +0200 Subject: [PATCH] Add classes to improve theming --- index.html | 3 +-- js/desktop.js | 2 +- js/interface/start_screen.js | 16 ++++++++-------- js/plugin_loader.js | 6 +++--- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/index.html b/index.html index bb688fde..85c135e1 100644 --- a/index.html +++ b/index.html @@ -298,8 +298,7 @@
- +
diff --git a/js/desktop.js b/js/desktop.js index 98c243e9..079031a7 100644 --- a/js/desktop.js +++ b/js/desktop.js @@ -732,7 +732,7 @@ ipcRenderer.on('update-available', (event, arg) => { }) } else { - addStartScreenSection({ + addStartScreenSection('update_notification', { color: 'var(--color-back)', graphic: {type: 'icon', icon: 'update'}, text: [ diff --git a/js/interface/start_screen.js b/js/interface/start_screen.js index a7413b26..4fffe9aa 100644 --- a/js/interface/start_screen.js +++ b/js/interface/start_screen.js @@ -36,7 +36,7 @@ function addStartScreenSection(id, data) { data = id; id = ''; } - var obj = $(Interface.createElement('section', {id})) + var obj = $(Interface.createElement('section', {class: 'start_screen_section', section_id: id})) if (typeof data.graphic === 'object') { var left = $('
') obj.append(left) @@ -140,9 +140,9 @@ function addStartScreenSection(id, data) { if (data.last) { $('#start_screen > content').append(obj); } else if (data.insert_after) { - $('#start_screen > content').find(`#${data.insert_after}`).after(obj); + $('#start_screen > content').find(`.start_screen_section[section_id="${data.insert_after}"]`).after(obj); } else if (data.insert_before) { - $('#start_screen > content').find(`#${data.insert_before}`).before(obj); + $('#start_screen > content').find(`.start_screen_section[section_id="${data.insert_before}"]`).before(obj); } else { $('#start_screen > content').prepend(obj); } @@ -375,7 +375,7 @@ onVueSetup(async function() { template: `
-
+

@@ -387,7 +387,7 @@ onVueSetup(async function() { clear
-
+

${tl('mode.start.new')}

@@ -581,7 +581,7 @@ ModelLoader.loaders = {}; let twitter_ad; if (Blockbench.startup_count < 20 && Blockbench.startup_count % 5 === 4) { twitter_ad = true; - addStartScreenSection({ + addStartScreenSection('twitter_link', { color: '#1da1f2', text_color: '#ffffff', graphic: {type: 'icon', icon: 'fab.fa-twitter'}, @@ -594,7 +594,7 @@ ModelLoader.loaders = {}; } //Discord if (Blockbench.startup_count < 6 && !twitter_ad) { - addStartScreenSection({ + addStartScreenSection('discord_link', { color: '#5865F2', text_color: '#ffffff', graphic: {type: 'icon', icon: 'fab.fa-discord'}, @@ -666,7 +666,7 @@ ModelLoader.loaders = {}; } }, template: ` -
+
clear

${tl('mode.start.quick_setup')}

diff --git a/js/plugin_loader.js b/js/plugin_loader.js index 23f44b7a..87670bcc 100644 --- a/js/plugin_loader.js +++ b/js/plugin_loader.js @@ -1267,8 +1267,8 @@ BARS.defineActions(function() {
${tl('dialog.plugins.installed')}
${tl('dialog.plugins.available')}
-
    -
  • +
      +
    • @@ -1292,7 +1292,7 @@ BARS.defineActions(function() {
      -
      +
      arrow_back_ios ${tl('generic.navigate_back')}