2016-06-30 18:18:54 +00:00
|
|
|
# Copyright 2015 Canonical, Ltd.
|
|
|
|
#
|
|
|
|
# This program 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 <http://www.gnu.org/licenses/>.
|
|
|
|
|
2020-03-24 10:18:53 +00:00
|
|
|
from console_conf.ui.views import ChooserWelcomeView, WelcomeView
|
2020-07-31 00:14:51 +00:00
|
|
|
from subiquitycore.tuicontroller import TuiController
|
2016-06-30 18:18:54 +00:00
|
|
|
|
|
|
|
|
2020-07-31 00:14:51 +00:00
|
|
|
class WelcomeController(TuiController):
|
2020-03-24 10:18:53 +00:00
|
|
|
welcome_view = WelcomeView
|
|
|
|
|
2020-09-17 23:44:00 +00:00
|
|
|
def make_ui(self):
|
|
|
|
return self.welcome_view(self)
|
2017-01-13 03:06:04 +00:00
|
|
|
|
|
|
|
def done(self):
|
2019-12-16 10:02:03 +00:00
|
|
|
self.app.next_screen()
|
2017-01-13 03:06:04 +00:00
|
|
|
|
|
|
|
def cancel(self):
|
|
|
|
# Can't go back from here!
|
|
|
|
pass
|
2020-03-24 10:18:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
class RecoveryChooserWelcomeController(WelcomeController):
|
|
|
|
welcome_view = ChooserWelcomeView
|
2020-04-07 15:36:47 +00:00
|
|
|
|
|
|
|
def __init__(self, app):
|
|
|
|
super().__init__(app)
|
|
|
|
self.model = app.base_model
|