-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1322 from longguikeji/feature-797
Feature 797
- Loading branch information
Showing
9 changed files
with
85 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
path=tag, | ||
name=name, | ||
page=page, | ||
icon='archive' | ||
) | ||
|
||
page.create_actions( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from arkid.core import extension | ||
from arkid.core.translation import gettext_default as _ | ||
from .models import DefaultDesktop | ||
from typing import List, Optional | ||
from pydantic import Field | ||
|
||
class DefaultDesktopExtension(extension.Extension): | ||
|
||
def load(self): | ||
super().load() | ||
self.register_extend_field(DefaultDesktop, 'default_desktop') | ||
from api.v1.schema.tenant import TenantConfigItemOut,TenantConfigUpdateIn,TenantItemOut,DefaultTenantItemOut | ||
from api.v1.views.loginpage import LoginPageTenantSchema | ||
self.register_extend_api( | ||
TenantConfigItemOut, | ||
TenantConfigUpdateIn, | ||
TenantItemOut, | ||
DefaultTenantItemOut, | ||
LoginPageTenantSchema, | ||
default_desktop=(Optional[str],Field(title=_("默认桌面路径"))) | ||
) | ||
|
||
extension = DefaultDesktopExtension() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package='com.longgui.other.defaultdesktop' | ||
name="租户默认桌面设置" | ||
version='1.0' | ||
labels='defaultdesktop' | ||
homepage='https://www.company.com' | ||
logo='' | ||
author='guancyxx@guancyxx.cn' |
29 changes: 29 additions & 0 deletions
29
extension_root/com_longgui_default_desktop/migrations/0001_initial.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Generated by Django 3.2.13 on 2022-09-30 02:01 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import uuid | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('core', '0030_userpersonalsettings'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='DefaultDesktop', | ||
fields=[ | ||
('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False, unique=True, verbose_name='ID')), | ||
('is_del', models.BooleanField(default=False, verbose_name='是否删除')), | ||
('is_active', models.BooleanField(default=True, verbose_name='是否可用')), | ||
('updated', models.DateTimeField(auto_now=True, null=True, verbose_name='更新时间')), | ||
('created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='创建时间')), | ||
('default_desktop', models.CharField(blank=True, max_length=1024, null=True, verbose_name='Default Desktop')), | ||
('target', models.OneToOneField(blank=True, default=None, on_delete=django.db.models.deletion.PROTECT, related_name='com_longgui_default_desktop_defaultdesktop', to='core.tenant')), | ||
], | ||
), | ||
] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from django.db import models | ||
from arkid.core.translation import gettext_default as _ | ||
from django.apps import AppConfig | ||
from arkid.core.models import TenantExpandAbstract | ||
|
||
app_label = "com_longgui_default_desktop" | ||
|
||
class LongguiDefaultDesktopAppConfig(AppConfig): | ||
name = app_label | ||
|
||
class DefaultDesktop(TenantExpandAbstract): | ||
class Meta: | ||
app_label = app_label | ||
|
||
default_desktop = models.CharField(verbose_name=_('Default Desktop', '默认桌面'),blank=True,null=True, max_length=1024) | ||
|
||
|