4
0
mirror of https://github.com/AltarikMC/Launcher synced 2024-11-22 06:19:50 +01:00

Move credits from dialog to in app fullscreen

This commit is contained in:
Quentin Legot 2022-05-17 13:43:44 +02:00
parent af7a6f881d
commit 459edb66a7
4 changed files with 54 additions and 46 deletions

View File

@ -159,7 +159,7 @@ h3 {
cursor: pointer; cursor: pointer;
} }
#settings { #settings, #credits {
position: relative; position: relative;
top: 50%; top: 50%;
left: 50%; left: 50%;
@ -170,6 +170,12 @@ h3 {
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100%; background-size: 100%;
padding: 10px 65px; padding: 10px 65px;
max-height: 80vh;
}
#credits > .content {
overflow: auto;
max-height: inherit;
} }
#settings > h2 { #settings > h2 {

View File

@ -11,6 +11,8 @@ app = vue.createApp({
invalidateButtonText: "Supprimer et retélécharger les bibliothèques", invalidateButtonText: "Supprimer et retélécharger les bibliothèques",
invalidateButtonDisabled: false, invalidateButtonDisabled: false,
displayFullscreen: "none", displayFullscreen: "none",
displaySettings: "none",
displayCredits: "none",
nick: "Chargement", nick: "Chargement",
launchBtnText: "Selectionnez un chapitre", launchBtnText: "Selectionnez un chapitre",
launchBtnDisable: true, launchBtnDisable: true,
@ -73,20 +75,27 @@ app = vue.createApp({
ipcRenderer.send('disconnect') ipcRenderer.send('disconnect')
}, },
options () { options () {
if(!this.gameLaunching) if(!this.gameLaunching) {
this.displayFullscreen = "block" this.displayFullscreen = "block"
this.displaySettings = "block"
this.displayCredits = "none"
}
}, },
discord() { discord() {
shell.openExternal("https://discord.gg/b923tMhmRE") } shell.openExternal("https://discord.gg/b923tMhmRE")
, },
web() { web() {
shell.openExternal("https://altarik.fr") shell.openExternal("https://altarik.fr")
}, },
closeFullscreen () { closeFullscreen () {
this.displayFullscreen = "none" this.displayFullscreen = "none"
this.displaySettings = "none"
this.displayCredits = "none"
}, },
credits() { credits() {
ipcRenderer.send("credits") this.displayFullscreen = "block"
this.displaySettings = "none"
this.displayCredits = "block"
}, },
updateModsInformations(content) { updateModsInformations(content) {
this.modsInformations = content this.modsInformations = content

View File

@ -23,7 +23,7 @@
</div> </div>
<div id="fullscreen" :style="{ display: displayFullscreen }"> <div id="fullscreen" :style="{ display: displayFullscreen }">
<div @click="closeFullscreen" id="close"><i class="material-icons">close</i></div> <div @click="closeFullscreen" id="close"><i class="material-icons">close</i></div>
<div id="settings"> <div id="settings" :style="{ display: displaySettings }">
<h2>Paramètres</h2> <h2>Paramètres</h2>
<span href="" id="disconnect-btn" @click="disconnectBtn">Se déconnecter</span> <span href="" id="disconnect-btn" @click="disconnectBtn">Se déconnecter</span>
<h4>Allocation mémoire</h4> <h4>Allocation mémoire</h4>
@ -35,6 +35,39 @@
<button @click="invalidateData" :disabled="invalidateButtonDisabled">{{ invalidateButtonText }}</button><br /> <button @click="invalidateData" :disabled="invalidateButtonDisabled">{{ invalidateButtonText }}</button><br />
<span @click="credits">Voir crédits</span> <span @click="credits">Voir crédits</span>
</div> </div>
<div id="credits" :style="{ display: displayCredits }">
<div class="content">
<p>BSD 3-Clause License</p>
<p>Copyright (c) 2021, Altarik<br />
All rights reserved.</p>
<p>Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:</p>
<ol>
<li>Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.</li>
<li>Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.</li>
<li>Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.</li>
</ol>
<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>
</div>
</div>
</div> </div>
<div id="content"> <div id="content">
<div id="sidebar"> <div id="sidebar">

View File

@ -61,46 +61,6 @@ app.on('activate', () => {
} }
}) })
ipcMain.on("credits", () => {
const dialogOpts = {
type: 'info',
buttons: ['OK'],
title: 'Crédits',
message: 'Altarik Launcher',
detail: `BSD 3-Clause License
Copyright (c) 2021, Altarik
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
`
}
dialog.showMessageBox(dialogOpts)
})
ipcMain.on("login", (event, args) => { ipcMain.on("login", (event, args) => {
minecraft.login(event, win, args.user, args.pass) minecraft.login(event, win, args.user, args.pass)
}) })