Adding default sprite definition
parent
f6090960ef
commit
8a374a110a
|
@ -0,0 +1,205 @@
|
|||
export type ClientIconClass = "client-about" | "client-activate_microphone" | "client-add" | "client-add_foe" | "client-add_folder" | "client-add_friend" | "client-addon-collection" | "client-addon" | "client-apply" | "client-arrow_down" | "client-arrow_left" | "client-arrow_right" | "client-arrow_up" | "client-away" | "client-ban_client" | "client-ban_list" | "client-bookmark_add" | "client-bookmark_add_folder" | "client-bookmark_duplicate" | "client-bookmark_manager" | "client-bookmark_remove" | "client-broken_image" | "client-browse-addon-online" | "client-capture" | "client-change_nickname" | "client-changelog" | "client-channel_chat" | "client-channel_collapse_all" | "client-channel_commander" | "client-channel_create" | "client-channel_create_sub" | "client-channel_default" | "client-channel_delete" | "client-channel_edit" | "client-channel_expand_all" | "client-channel_green" | "client-channel_green_subscribed" | "client-channel_green_subscribed2" | "client-channel_private" | "client-channel_red" | "client-channel_red_subscribed" | "client-channel_switch" | "client-channel_unsubscribed" | "client-channel_yellow" | "client-channel_yellow_subscribed" | "client-check_update" | "client-client_hide" | "client-client_show" | "client-close_button" | "client-complaint_list" | "client-conflict-icon" | "client-connect" | "client-contact" | "client-copy" | "client-copy_url" | "client-d_sound" | "client-d_sound_me" | "client-d_sound_user" | "client-default" | "client-default_for_all_bookmarks" | "client-delete" | "client-delete_avatar" | "client-disconnect" | "client-down" | "client-download" | "client-edit" | "client-edit_friend_foe_status" | "client-emoticon" | "client-error" | "client-file_home" | "client-file_refresh" | "client-filetransfer" | "client-find" | "client-folder" | "client-folder_up" | "client-group_100" | "client-group_200" | "client-group_300" | "client-group_500" | "client-group_600" | "client-guisetup" | "client-hardware_input_muted" | "client-hardware_output_muted" | "client-home" | "client-hoster_button" | "client-hotkeys" | "client-icon-pack" | "client-iconsview" | "client-iconviewer" | "client-identity_default" | "client-identity_export" | "client-identity_import" | "client-identity_manager" | "client-info" | "client-input_muted" | "client-input_muted_local" | "client-invite_buddy" | "client-is_talker" | "client-kick_channel" | "client-kick_server" | "client-listview" | "client-loading_image" | "client-message_incoming" | "client-message_info" | "client-message_outgoing" | "client-messages" | "client-moderated" | "client-move_client_to_own_channel" | "client-music" | "client-new_chat" | "client-notifications" | "client-offline_messages" | "client-on_whisperlist" | "client-output_muted" | "client-permission_channel" | "client-permission_client" | "client-permission_overview" | "client-permission_server_groups" | "client-phoneticsnickname" | "client-ping_1" | "client-ping_2" | "client-ping_3" | "client-ping_4" | "client-ping_calculating" | "client-ping_disconnected" | "client-play" | "client-player_chat" | "client-player_commander_off" | "client-player_commander_on" | "client-player_off" | "client-player_on" | "client-player_whisper" | "client-plugins" | "client-poke" | "client-present" | "client-recording_start" | "client-recording_stop" | "client-refresh" | "client-register" | "client-reload" | "client-remove_foe" | "client-remove_friend" | "client-security" | "client-selectfolder" | "client-send_complaint" | "client-server_green" | "client-server_log" | "client-server_query" | "client-settings" | "client-sort_by_name" | "client-sound-pack" | "client-soundpack" | "client-stop" | "client-subscribe_mode" | "client-subscribe_to_all_channels" | "client-subscribe_to_channel" | "client-subscribe_to_channel_family" | "client-switch_advanced" | "client-switch_standard" | "client-sync-disable" | "client-sync-enable" | "client-sync-icon" | "client-tab_close_button" | "client-talk_power_grant" | "client-talk_power_grant_next" | "client-talk_power_request" | "client-talk_power_request_cancel" | "client-talk_power_revoke" | "client-talk_power_revoke_all_grant_next" | "client-temp_server_password" | "client-temp_server_password_add" | "client-textformat" | "client-textformat_bold" | "client-textformat_foreground" | "client-textformat_italic" | "client-textformat_underline" | "client-theme" | "client-toggle_server_query_clients" | "client-toggle_whisper" | "client-token" | "client-token_use" | "client-translation" | "client-unsubscribe_from_all_channels" | "client-unsubscribe_from_channel_family" | "client-unsubscribe_mode" | "client-up" | "client-upload" | "client-upload_avatar" | "client-urlcatcher" | "client-user-account" | "client-virtualserver_edit" | "client-volume" | "client-w2g" | "client-warning" | "client-warning_external_link" | "client-warning_info" | "client-warning_question" | "client-weblist" | "client-whisper" | "client-whisperlists";
|
||||
export enum ClientIcon {
|
||||
About = "client-about",
|
||||
ActivateMicrophone = "client-activate_microphone",
|
||||
Add = "client-add",
|
||||
AddFoe = "client-add_foe",
|
||||
AddFolder = "client-add_folder",
|
||||
AddFriend = "client-add_friend",
|
||||
AddonCollection = "client-addon-collection",
|
||||
Addon = "client-addon",
|
||||
Apply = "client-apply",
|
||||
ArrowDown = "client-arrow_down",
|
||||
ArrowLeft = "client-arrow_left",
|
||||
ArrowRight = "client-arrow_right",
|
||||
ArrowUp = "client-arrow_up",
|
||||
Away = "client-away",
|
||||
BanClient = "client-ban_client",
|
||||
BanList = "client-ban_list",
|
||||
BookmarkAdd = "client-bookmark_add",
|
||||
BookmarkAddFolder = "client-bookmark_add_folder",
|
||||
BookmarkDuplicate = "client-bookmark_duplicate",
|
||||
BookmarkManager = "client-bookmark_manager",
|
||||
BookmarkRemove = "client-bookmark_remove",
|
||||
BrokenImage = "client-broken_image",
|
||||
BrowseAddonOnline = "client-browse-addon-online",
|
||||
Capture = "client-capture",
|
||||
ChangeNickname = "client-change_nickname",
|
||||
Changelog = "client-changelog",
|
||||
ChannelChat = "client-channel_chat",
|
||||
ChannelCollapseAll = "client-channel_collapse_all",
|
||||
ChannelCommander = "client-channel_commander",
|
||||
ChannelCreate = "client-channel_create",
|
||||
ChannelCreateSub = "client-channel_create_sub",
|
||||
ChannelDefault = "client-channel_default",
|
||||
ChannelDelete = "client-channel_delete",
|
||||
ChannelEdit = "client-channel_edit",
|
||||
ChannelExpandAll = "client-channel_expand_all",
|
||||
ChannelGreen = "client-channel_green",
|
||||
ChannelGreenSubscribed = "client-channel_green_subscribed",
|
||||
ChannelGreenSubscribed2 = "client-channel_green_subscribed2",
|
||||
ChannelPrivate = "client-channel_private",
|
||||
ChannelRed = "client-channel_red",
|
||||
ChannelRedSubscribed = "client-channel_red_subscribed",
|
||||
ChannelSwitch = "client-channel_switch",
|
||||
ChannelUnsubscribed = "client-channel_unsubscribed",
|
||||
ChannelYellow = "client-channel_yellow",
|
||||
ChannelYellowSubscribed = "client-channel_yellow_subscribed",
|
||||
CheckUpdate = "client-check_update",
|
||||
ClientHide = "client-client_hide",
|
||||
ClientShow = "client-client_show",
|
||||
CloseButton = "client-close_button",
|
||||
ComplaintList = "client-complaint_list",
|
||||
ConflictIcon = "client-conflict-icon",
|
||||
Connect = "client-connect",
|
||||
Contact = "client-contact",
|
||||
Copy = "client-copy",
|
||||
CopyUrl = "client-copy_url",
|
||||
DSound = "client-d_sound",
|
||||
DSoundMe = "client-d_sound_me",
|
||||
DSoundUser = "client-d_sound_user",
|
||||
Default = "client-default",
|
||||
DefaultForAllBookmarks = "client-default_for_all_bookmarks",
|
||||
Delete = "client-delete",
|
||||
DeleteAvatar = "client-delete_avatar",
|
||||
Disconnect = "client-disconnect",
|
||||
Down = "client-down",
|
||||
Download = "client-download",
|
||||
Edit = "client-edit",
|
||||
EditFriendFoeStatus = "client-edit_friend_foe_status",
|
||||
Emoticon = "client-emoticon",
|
||||
Error = "client-error",
|
||||
FileHome = "client-file_home",
|
||||
FileRefresh = "client-file_refresh",
|
||||
Filetransfer = "client-filetransfer",
|
||||
Find = "client-find",
|
||||
Folder = "client-folder",
|
||||
FolderUp = "client-folder_up",
|
||||
Group_100 = "client-group_100",
|
||||
Group_200 = "client-group_200",
|
||||
Group_300 = "client-group_300",
|
||||
Group_500 = "client-group_500",
|
||||
Group_600 = "client-group_600",
|
||||
Guisetup = "client-guisetup",
|
||||
HardwareInputMuted = "client-hardware_input_muted",
|
||||
HardwareOutputMuted = "client-hardware_output_muted",
|
||||
Home = "client-home",
|
||||
HosterButton = "client-hoster_button",
|
||||
Hotkeys = "client-hotkeys",
|
||||
IconPack = "client-icon-pack",
|
||||
Iconsview = "client-iconsview",
|
||||
Iconviewer = "client-iconviewer",
|
||||
IdentityDefault = "client-identity_default",
|
||||
IdentityExport = "client-identity_export",
|
||||
IdentityImport = "client-identity_import",
|
||||
IdentityManager = "client-identity_manager",
|
||||
Info = "client-info",
|
||||
InputMuted = "client-input_muted",
|
||||
InputMutedLocal = "client-input_muted_local",
|
||||
InviteBuddy = "client-invite_buddy",
|
||||
IsTalker = "client-is_talker",
|
||||
KickChannel = "client-kick_channel",
|
||||
KickServer = "client-kick_server",
|
||||
Listview = "client-listview",
|
||||
LoadingImage = "client-loading_image",
|
||||
MessageIncoming = "client-message_incoming",
|
||||
MessageInfo = "client-message_info",
|
||||
MessageOutgoing = "client-message_outgoing",
|
||||
Messages = "client-messages",
|
||||
Moderated = "client-moderated",
|
||||
MoveClientToOwnChannel = "client-move_client_to_own_channel",
|
||||
Music = "client-music",
|
||||
NewChat = "client-new_chat",
|
||||
Notifications = "client-notifications",
|
||||
OfflineMessages = "client-offline_messages",
|
||||
OnWhisperlist = "client-on_whisperlist",
|
||||
OutputMuted = "client-output_muted",
|
||||
PermissionChannel = "client-permission_channel",
|
||||
PermissionClient = "client-permission_client",
|
||||
PermissionOverview = "client-permission_overview",
|
||||
PermissionServerGroups = "client-permission_server_groups",
|
||||
Phoneticsnickname = "client-phoneticsnickname",
|
||||
Ping_1 = "client-ping_1",
|
||||
Ping_2 = "client-ping_2",
|
||||
Ping_3 = "client-ping_3",
|
||||
Ping_4 = "client-ping_4",
|
||||
PingCalculating = "client-ping_calculating",
|
||||
PingDisconnected = "client-ping_disconnected",
|
||||
Play = "client-play",
|
||||
PlayerChat = "client-player_chat",
|
||||
PlayerCommanderOff = "client-player_commander_off",
|
||||
PlayerCommanderOn = "client-player_commander_on",
|
||||
PlayerOff = "client-player_off",
|
||||
PlayerOn = "client-player_on",
|
||||
PlayerWhisper = "client-player_whisper",
|
||||
Plugins = "client-plugins",
|
||||
Poke = "client-poke",
|
||||
Present = "client-present",
|
||||
RecordingStart = "client-recording_start",
|
||||
RecordingStop = "client-recording_stop",
|
||||
Refresh = "client-refresh",
|
||||
Register = "client-register",
|
||||
Reload = "client-reload",
|
||||
RemoveFoe = "client-remove_foe",
|
||||
RemoveFriend = "client-remove_friend",
|
||||
Security = "client-security",
|
||||
Selectfolder = "client-selectfolder",
|
||||
SendComplaint = "client-send_complaint",
|
||||
ServerGreen = "client-server_green",
|
||||
ServerLog = "client-server_log",
|
||||
ServerQuery = "client-server_query",
|
||||
Settings = "client-settings",
|
||||
SortByName = "client-sort_by_name",
|
||||
SoundPack = "client-sound-pack",
|
||||
Soundpack = "client-soundpack",
|
||||
Stop = "client-stop",
|
||||
SubscribeMode = "client-subscribe_mode",
|
||||
SubscribeToAllChannels = "client-subscribe_to_all_channels",
|
||||
SubscribeToChannel = "client-subscribe_to_channel",
|
||||
SubscribeToChannelFamily = "client-subscribe_to_channel_family",
|
||||
SwitchAdvanced = "client-switch_advanced",
|
||||
SwitchStandard = "client-switch_standard",
|
||||
SyncDisable = "client-sync-disable",
|
||||
SyncEnable = "client-sync-enable",
|
||||
SyncIcon = "client-sync-icon",
|
||||
TabCloseButton = "client-tab_close_button",
|
||||
TalkPowerGrant = "client-talk_power_grant",
|
||||
TalkPowerGrantNext = "client-talk_power_grant_next",
|
||||
TalkPowerRequest = "client-talk_power_request",
|
||||
TalkPowerRequestCancel = "client-talk_power_request_cancel",
|
||||
TalkPowerRevoke = "client-talk_power_revoke",
|
||||
TalkPowerRevokeAllGrantNext = "client-talk_power_revoke_all_grant_next",
|
||||
TempServerPassword = "client-temp_server_password",
|
||||
TempServerPasswordAdd = "client-temp_server_password_add",
|
||||
Textformat = "client-textformat",
|
||||
TextformatBold = "client-textformat_bold",
|
||||
TextformatForeground = "client-textformat_foreground",
|
||||
TextformatItalic = "client-textformat_italic",
|
||||
TextformatUnderline = "client-textformat_underline",
|
||||
Theme = "client-theme",
|
||||
ToggleServerQueryClients = "client-toggle_server_query_clients",
|
||||
ToggleWhisper = "client-toggle_whisper",
|
||||
Token = "client-token",
|
||||
TokenUse = "client-token_use",
|
||||
Translation = "client-translation",
|
||||
UnsubscribeFromAllChannels = "client-unsubscribe_from_all_channels",
|
||||
UnsubscribeFromChannelFamily = "client-unsubscribe_from_channel_family",
|
||||
UnsubscribeMode = "client-unsubscribe_mode",
|
||||
Up = "client-up",
|
||||
Upload = "client-upload",
|
||||
UploadAvatar = "client-upload_avatar",
|
||||
Urlcatcher = "client-urlcatcher",
|
||||
UserAccount = "client-user-account",
|
||||
VirtualserverEdit = "client-virtualserver_edit",
|
||||
Volume = "client-volume",
|
||||
W2g = "client-w2g",
|
||||
Warning = "client-warning",
|
||||
WarningExternalLink = "client-warning_external_link",
|
||||
WarningInfo = "client-warning_info",
|
||||
WarningQuestion = "client-warning_question",
|
||||
Weblist = "client-weblist",
|
||||
Whisper = "client-whisper",
|
||||
Whisperlists = "client-whisperlists",
|
||||
}
|
||||
export const spriteUrl: string;
|
||||
export const classList: string[];
|
|
@ -17,38 +17,6 @@ const WorkerPlugin = require('worker-plugin');
|
|||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
||||
|
||||
/*
|
||||
const sourceFolder = path.join(__dirname, "..", "shared", "img", "icon-sprite");
|
||||
|
||||
const publicCssUrl = "url('../../../img/client_icon_sprite_new.svg'), url('../../img/client_icon_sprite_new.svg')";
|
||||
const cssConfigurations: SpriteCssOptions[] = [
|
||||
{
|
||||
scale: 1,
|
||||
selector: ".icon",
|
||||
prefix: "client-",
|
||||
unit: "px"
|
||||
},
|
||||
{
|
||||
scale: 1.5,
|
||||
selector: ".icon_x24",
|
||||
prefix: "client-",
|
||||
unit: "px"
|
||||
},
|
||||
{
|
||||
scale: 2,
|
||||
selector: ".icon_x32",
|
||||
prefix: "client-",
|
||||
unit: "px"
|
||||
},
|
||||
{
|
||||
scale: 1,
|
||||
selector: ".icon_em",
|
||||
prefix: "client-",
|
||||
unit: "em"
|
||||
}
|
||||
];
|
||||
*/
|
||||
|
||||
export let isDevelopment = process.env.NODE_ENV === 'development';
|
||||
console.log("Webpacking for %s (%s)", isDevelopment ? "development" : "production", process.env.NODE_ENV || "NODE_ENV not specified");
|
||||
const generate_definitions = async (target: string) => {
|
||||
|
@ -116,41 +84,37 @@ export const config = async (target: "web" | "client"): Promise<Configuration> =
|
|||
}),
|
||||
new webpack.DefinePlugin(await generate_definitions(target)),
|
||||
new SvgSpriteGenerator({
|
||||
dtsOutputFolder: path.join(__dirname, "shared", "generated"),
|
||||
dtsOutputFolder: path.join(__dirname, "shared", "svg-sprites"),
|
||||
configurations: {
|
||||
"client-icons": {
|
||||
folder: path.join(__dirname, "shared", "img", "icon-sprite"),
|
||||
folder: path.join(__dirname, "shared", "img", "client-icons"),
|
||||
cssClassPrefix: "client-",
|
||||
cssOptions: [
|
||||
{
|
||||
scale: 1,
|
||||
selector: ".icon",
|
||||
prefix: "client-",
|
||||
unit: "px"
|
||||
},
|
||||
{
|
||||
scale: 1.5,
|
||||
selector: ".icon_x24",
|
||||
prefix: "client-",
|
||||
unit: "px"
|
||||
},
|
||||
{
|
||||
scale: 2,
|
||||
selector: ".icon_x32",
|
||||
prefix: "client-",
|
||||
unit: "px"
|
||||
},
|
||||
{
|
||||
scale: 1,
|
||||
selector: ".icon_em",
|
||||
prefix: "client-",
|
||||
unit: "em"
|
||||
}
|
||||
],
|
||||
dtsOptions: {
|
||||
enumName: "ClientIcon",
|
||||
classUnionName: "ClientIconClass",
|
||||
module: true,
|
||||
cssClassPrefix: "client-"
|
||||
module: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue