mirror of
https://github.com/HeyPuter/puter.git
synced 2025-02-02 14:18:43 +08:00
delete components that aren't used
This commit is contained in:
parent
2728761d3c
commit
4da9f525da
@ -1,59 +0,0 @@
|
||||
/**
|
||||
* Copyright (C) 2024 Puter Technologies Inc.
|
||||
*
|
||||
* This file is part of Puter.
|
||||
*
|
||||
* Puter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
const Component = use('util.Component');
|
||||
|
||||
export default def(class ActionCard extends Component {
|
||||
static ID = 'ui.component.ActionCard';
|
||||
static RENDER_MODE = Component.NO_SHADOW;
|
||||
|
||||
static PROPERTIES = {
|
||||
title: {
|
||||
value: 'Title'
|
||||
},
|
||||
info: {},
|
||||
button_text: {},
|
||||
button_style: {},
|
||||
on_click: {},
|
||||
style: {},
|
||||
}
|
||||
|
||||
create_template ({ template }) {
|
||||
$(template).html(/*html*/`
|
||||
<div class="settings-card ${ this.get('style') ? this.get('style') : '' }">
|
||||
<div>
|
||||
<strong style="display: block">${ this.get('title') }</strong>
|
||||
<span style="display: block margin-top: 5px">${
|
||||
this.get('info')
|
||||
}</span>
|
||||
</div>
|
||||
<div style="flex-grow: 1">
|
||||
<button class="button ${ this.get('button_style') }" style="float: right;">${
|
||||
this.get('button_text')
|
||||
}</button>
|
||||
</div>
|
||||
</div>
|
||||
`);
|
||||
}
|
||||
|
||||
on_ready ({ listen }) {
|
||||
$(this.dom_).find('button').on('click', this.get('on_click') || (() => {}));
|
||||
}
|
||||
});
|
@ -1,40 +0,0 @@
|
||||
/**
|
||||
* Copyright (C) 2024 Puter Technologies Inc.
|
||||
*
|
||||
* This file is part of Puter.
|
||||
*
|
||||
* Puter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
const Component = use('util.Component');
|
||||
|
||||
export default def(class Frame extends Component {
|
||||
static ID = 'ui.component.Frame';
|
||||
static RENDER_MODE = Component.NO_SHADOW;
|
||||
|
||||
static PROPERTIES = {
|
||||
component: {},
|
||||
}
|
||||
|
||||
on_ready ({ listen }) {
|
||||
listen('component', component => {
|
||||
this.dom_.innerHTML = '';
|
||||
if ( ! component ) {
|
||||
return;
|
||||
}
|
||||
component.attach(this.dom_);
|
||||
});
|
||||
}
|
||||
});
|
@ -1,48 +0,0 @@
|
||||
/**
|
||||
* Copyright (C) 2024 Puter Technologies Inc.
|
||||
*
|
||||
* This file is part of Puter.
|
||||
*
|
||||
* Puter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
import { Component } from "../../util/Component.js";
|
||||
|
||||
export default def(class Glyph extends Component {
|
||||
static ID = 'ui.component.Glyph';
|
||||
|
||||
static PROPERTIES = {
|
||||
size: {
|
||||
value: 24,
|
||||
},
|
||||
codepoint: {
|
||||
value: '✅',
|
||||
},
|
||||
}
|
||||
|
||||
static CSS = `
|
||||
div {
|
||||
text-align: center;
|
||||
}
|
||||
`;
|
||||
|
||||
create_template ({ template }) {
|
||||
template.innerHTML = /*html*/`
|
||||
<div style="font-size: ${this.get('size')}px;">
|
||||
${this.get('codepoint')}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
});
|
@ -1,19 +0,0 @@
|
||||
const Component = use('util.Component');
|
||||
|
||||
export default def(class JustID extends Component {
|
||||
static ID = 'ui.component.JustID';
|
||||
static RENDER_MODE = Component.NO_SHADOW;
|
||||
|
||||
static PROPERTIES = {
|
||||
id: { value: undefined },
|
||||
}
|
||||
|
||||
create_template ({ template }) {
|
||||
const size = 24;
|
||||
$(template).html(/*html*/`
|
||||
<div
|
||||
style="height: 358px"
|
||||
id="${this.get('id')}"></div>
|
||||
`);
|
||||
}
|
||||
})
|
@ -1,41 +0,0 @@
|
||||
/**
|
||||
* Copyright (C) 2024 Puter Technologies Inc.
|
||||
*
|
||||
* This file is part of Puter.
|
||||
*
|
||||
* Puter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
const Component = use('util.Component');
|
||||
|
||||
export default def(class NotifCard extends Component {
|
||||
static ID = 'ui.component.NotifCard';
|
||||
static RENDER_MODE = Component.NO_SHADOW;
|
||||
|
||||
static PROPERTIES = {
|
||||
text: { value: 'no text' },
|
||||
style: {},
|
||||
}
|
||||
|
||||
create_template ({ template }) {
|
||||
$(template).html(/*html*/`
|
||||
<div class="settings-card thin-card ${ this.get('style') ? this.get('style') : '' }">
|
||||
<div>
|
||||
${ this.get('text') }
|
||||
</div>
|
||||
</div>
|
||||
`);
|
||||
}
|
||||
});
|
@ -1,42 +0,0 @@
|
||||
/**
|
||||
* Copyright (C) 2024 Puter Technologies Inc.
|
||||
*
|
||||
* This file is part of Puter.
|
||||
*
|
||||
* Puter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
const Component = use('util.Component');
|
||||
|
||||
/**
|
||||
* A simple component when you just need to test something.
|
||||
*/
|
||||
export default def(class TestView extends Component {
|
||||
static ID = 'ui.component.TestView';
|
||||
|
||||
static CSS = `
|
||||
div {
|
||||
background-color: lightblue;
|
||||
padding: 1em;
|
||||
border-radius: 0.5em;
|
||||
}
|
||||
`;
|
||||
|
||||
create_template ({ template }) {
|
||||
$(template).html(`
|
||||
<div>I am a test view</div>
|
||||
`);
|
||||
}
|
||||
});
|
@ -22,13 +22,7 @@ logger.info('start -> async initialization');
|
||||
import './util/TeePromise.js';
|
||||
import './util/Component.js';
|
||||
import './util/Collector.js';
|
||||
import './UI/Components/Frame.js';
|
||||
import './UI/Components/Glyph.js';
|
||||
import './UI/Components/Spinner.js';
|
||||
import './UI/Components/ActionCard.js';
|
||||
import './UI/Components/NotifCard.js';
|
||||
import './UI/Components/TestView.js';
|
||||
import './UI/Components/JustID.js';
|
||||
import './UI/UIElement.js';
|
||||
import './UI/UIWindowSaveAccount.js';
|
||||
import './UI/UIWindowEmailConfirmationRequired.js';
|
||||
|
@ -20,7 +20,6 @@ import { encode } from 'html-entities';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import webpack from 'webpack';
|
||||
import webpack_config from './webpack.config.cjs';
|
||||
import CleanCSS from 'clean-css';
|
||||
import uglifyjs from 'uglify-js';
|
||||
import { lib_paths, css_paths, js_paths } from './src/static-assets.js';
|
||||
|
Loading…
Reference in New Issue
Block a user