mirror of
https://github.com/zen-browser/surfer.git
synced 2025-07-07 17:05:33 +02:00
🔥 Remove html
ui mode
You should use a gecko template like ajvincent/motherhen instead
This commit is contained in:
parent
a9eb87ab65
commit
ff7157bd1f
10 changed files with 13 additions and 93 deletions
|
@ -74,7 +74,13 @@ The appid follows reverse dns naming conventions. For example, Fushra owns the d
|
|||
? Enter an appid › dev.gluon.example
|
||||
```
|
||||
|
||||
Next you need to chose a starting template for your browser. You can go with userchrome, where you apply css changes to firefox or custom html, where you have to write everything (tabs, navigation, search boxes) yourself. We generally recommend userchrome for new users, as it has the lowest learning curve. Additionally, you can chose to use no template.
|
||||
Next you need to chose a starting template for your browser. If you know what you are doing, you can go with `None` and configure it how you like. Otherwise, we recommend you stick with `UserChrome`.
|
||||
|
||||
```
|
||||
? Select a ui mode template › - Use arrow-keys. Return to submit.
|
||||
None
|
||||
❯ User Chrome (custom browser css, simplest)
|
||||
```
|
||||
|
||||
Now you have created the directory structure for your project, you can build it for the first time. First, ask melon to download the firefox source.
|
||||
|
||||
|
|
|
@ -115,16 +115,16 @@ export async function setupProject(): Promise<void> {
|
|||
choices: [
|
||||
{
|
||||
title: 'None',
|
||||
description:
|
||||
'No files for the ui will be created, we will let you find that out on your own',
|
||||
value: 'none',
|
||||
},
|
||||
{
|
||||
title: 'User Chrome (custom browser css, simplest)',
|
||||
title: 'UserChrome',
|
||||
value: 'uc',
|
||||
},
|
||||
{
|
||||
title: 'Custom html',
|
||||
value: 'html',
|
||||
},
|
||||
// TODO: We also need to add extension based theming like the version
|
||||
// used in Pulse Browser
|
||||
],
|
||||
},
|
||||
])
|
||||
|
@ -142,13 +142,7 @@ export async function setupProject(): Promise<void> {
|
|||
|
||||
await copyRequired()
|
||||
|
||||
if (ui === 'html') {
|
||||
await copyOptional([
|
||||
'customui',
|
||||
'toolkit-mozbuild.patch',
|
||||
'confvars-sh.patch',
|
||||
])
|
||||
} else if (ui === 'uc') {
|
||||
if (ui === 'uc') {
|
||||
await copyOptional(['browser/themes'])
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/browser/confvars.sh b/browser/confvars.sh
|
||||
index 92871c9516f98e065c5240a4a1cc7ead1de8ef9d..f9c515c48b67ee581e1280d587de5cdcf380002f 100755
|
||||
--- a/browser/confvars.sh
|
||||
+++ b/browser/confvars.sh
|
||||
@@ -26,7 +26,7 @@ if test "$OS_ARCH" = "WINNT"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
-BROWSER_CHROME_URL=chrome://browser/content/browser.xhtml
|
||||
+BROWSER_CHROME_URL=chrome://customui/content/browser.html
|
||||
|
||||
# MOZ_APP_DISPLAYNAME will be set by branding/configure.sh
|
||||
# MOZ_BRANDING_DIRECTORY is the default branding directory used when none is
|
|
@ -1,26 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html id="browser-window" chromemargin="0,2,2,2" windowtype="navigator:browser">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Welcome to the browser</title>
|
||||
|
||||
<link rel="stylesheet" href="css/browser.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="grid">
|
||||
<div>
|
||||
<img width="98" src="https://twemoji.maxcdn.com/v/13.0.1/svg/1f349.svg"/>
|
||||
</div>
|
||||
<div>
|
||||
<h1>Good, you are setup!</h1>
|
||||
<p>You chose the option to customize the html of the browser. This means you inherit none of the UI or logic firefox has in relation to tabs, etc. I wish you the best of luck!</p>
|
||||
<button id="launchDevTools">Launch dev tools</button>
|
||||
<button onclick="window.location.reload()">Reload chrome</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="module" src="scripts/browser.js"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,14 +0,0 @@
|
|||
body {
|
||||
background-color: #333333;
|
||||
color: white;
|
||||
font-family: sans-serif;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
height: 100%;
|
||||
align-content: center;
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
browser.jar:
|
||||
% content customui %content/customui/ contentaccessible=yes
|
||||
content/customui/browser.html (browser.html)
|
||||
content/customui/css/ (css/**/**)
|
||||
content/customui/scripts/ (scripts/**/**)
|
|
@ -1 +0,0 @@
|
|||
JAR_MANIFESTS += ["jar.mn"]
|
|
@ -1,3 +0,0 @@
|
|||
import { launchDevTools } from './devtools.js'
|
||||
|
||||
document.getElementById('launchDevTools').addEventListener('click', launchDevTools)
|
|
@ -1,7 +0,0 @@
|
|||
const launcher = ChromeUtils.import(
|
||||
"resource://devtools/client/framework/browser-toolbox/Launcher.jsm"
|
||||
).BrowserToolboxLauncher
|
||||
|
||||
export function launchDevTools() {
|
||||
launcher.init()
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
diff --git a/toolkit/toolkit.mozbuild b/toolkit/toolkit.mozbuild
|
||||
index fd9903bac5b07c655ee77c94f8f795b6773676ad..3127dc35fd8793b91ddd437f30b1917f6eff29ce 100644
|
||||
--- a/toolkit/toolkit.mozbuild
|
||||
+++ b/toolkit/toolkit.mozbuild
|
||||
@@ -202,3 +202,6 @@ if CONFIG['ENABLE_TESTS']:
|
||||
|
||||
if CONFIG['FUZZING']:
|
||||
DIRS += ['/tools/fuzzing']
|
||||
+
|
||||
+# Custom UI toolkit
|
||||
+DIRS += ['/customui']
|
Loading…
Add table
Add a link
Reference in a new issue